mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Pass context
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ iD.ui.Save = function(context) {
|
||||
id: changeset_id,
|
||||
comment: e.comment
|
||||
})
|
||||
.call(iD.ui.Success(connection)
|
||||
.call(iD.ui.Success(context)
|
||||
.on('cancel', function() {
|
||||
modal.remove();
|
||||
}));
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
iD.ui.Success = function(connection) {
|
||||
iD.ui.Success = function(context) {
|
||||
var event = d3.dispatch('cancel', 'save');
|
||||
|
||||
function success(selection) {
|
||||
@@ -12,7 +12,7 @@ iD.ui.Success = function(connection) {
|
||||
changeset.comment.substring(0, 130) : '';
|
||||
|
||||
var message = (m || t('success.edited_osm')) + ' ' +
|
||||
connection.changesetURL(changeset.id);
|
||||
context.connection().changesetURL(changeset.id);
|
||||
|
||||
var links = body.append('div').attr('class','modal-actions cf');
|
||||
|
||||
@@ -20,7 +20,7 @@ iD.ui.Success = function(connection) {
|
||||
.attr('class','col4 osm')
|
||||
.attr('target', '_blank')
|
||||
.attr('href', function() {
|
||||
return connection.changesetURL(changeset.id);
|
||||
return context.connection().changesetURL(changeset.id);
|
||||
})
|
||||
.text(t('view_on_osm'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user