mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Firefox compatibility fixes, be more aware of problems in authentication
This commit is contained in:
@@ -53,6 +53,7 @@ button {
|
||||
line-height:18px;
|
||||
margin:5px 5px 0 0;
|
||||
cursor:pointer;
|
||||
border-radius:2px;
|
||||
}
|
||||
|
||||
button.cancel {
|
||||
@@ -285,7 +286,8 @@ input#geocode-location {
|
||||
|
||||
.commit-pane .changeset-comment {
|
||||
width:630px;
|
||||
font-size:12px;
|
||||
/* firefox uses monospace in textareas */
|
||||
font:normal 12px/20px 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.commit-section {
|
||||
|
||||
@@ -66,11 +66,11 @@ var iD = function(container) {
|
||||
|
||||
bar.append('button')
|
||||
.attr('class', 'save')
|
||||
.html("Save<small id='as-username'></small>")
|
||||
.html("Upload<small id='as-username'></small>")
|
||||
.on('click', function() {
|
||||
function save(e) {
|
||||
d3.select('.shaded').remove();
|
||||
var l = iD.loading('committing changes to openstreetmap');
|
||||
var l = iD.loading('uploading changes to openstreetmap');
|
||||
connection.putChangeset(map.history.changes(), e.comment, function() {
|
||||
l.remove();
|
||||
map.history = iD.History();
|
||||
|
||||
@@ -11,8 +11,8 @@ iD.OAuth = function() {
|
||||
|
||||
function keyclean(x) { return x.replace(/\W/g, ''); }
|
||||
|
||||
if (localStorage.oauth_token) {
|
||||
o.oauth_token = localStorage.oauth_token;
|
||||
if (token('oauth_token')) {
|
||||
o.oauth_token = token('oauth_token');
|
||||
}
|
||||
|
||||
function timenonce(o) {
|
||||
@@ -36,6 +36,7 @@ iD.OAuth = function() {
|
||||
oauth.logout = function() {
|
||||
token('oauth_token', '');
|
||||
token('oauth_token_secret', '');
|
||||
token('oauth_request_token_secret', '');
|
||||
return oauth;
|
||||
};
|
||||
|
||||
@@ -55,8 +56,8 @@ iD.OAuth = function() {
|
||||
};
|
||||
|
||||
oauth.authenticate = function(callback) {
|
||||
// TODO: deal with changing the api endpoint
|
||||
if (oauth.authenticated()) return callback();
|
||||
oauth.logout();
|
||||
|
||||
var shaded = d3.select(document.body)
|
||||
.append('div')
|
||||
|
||||
@@ -116,11 +116,7 @@ iD.Map = function(elem, connection) {
|
||||
function(d) { return only[d.id]; } : function() { return true; };
|
||||
|
||||
if (all.length > 2000) {
|
||||
d3.select('.messages').text('Zoom in to edit the map');
|
||||
hideVector();
|
||||
return;
|
||||
} else {
|
||||
d3.select('.messages').text('Zoom in to edit the map');
|
||||
return hideVector();
|
||||
}
|
||||
|
||||
for (var i = 0; i < all.length; i++) {
|
||||
|
||||
@@ -6,7 +6,8 @@ iD.commit = function() {
|
||||
header = selection.append('div').attr('class', 'header'),
|
||||
body = selection.append('div').attr('class', 'body');
|
||||
|
||||
header.append('h2').text('Save Changes to OpenStreetMap');
|
||||
header.append('h2').text('Upload Changes to OpenStreetMap');
|
||||
header.append('p').text('the changes you upload will be visible on all maps using OpenStreetMap data');
|
||||
|
||||
var section = body.selectAll('div.commit-section')
|
||||
.data(['modify', 'delete', 'create'].filter(function(d) {
|
||||
|
||||
Reference in New Issue
Block a user