mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
URL, not Url
This commit is contained in:
@@ -19,7 +19,7 @@ iD.Connection = function(context, options) {
|
||||
relationStr = 'relation',
|
||||
off;
|
||||
|
||||
connection.changesetUrl = function(changesetId) {
|
||||
connection.changesetURL = function(changesetId) {
|
||||
return url + '/browse/changeset/' + changesetId;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ iD.Connection = function(context, options) {
|
||||
return url + '/browse/' + entity.type + '/' + entity.osmId();
|
||||
};
|
||||
|
||||
connection.userUrl = function(username) {
|
||||
connection.userURL = function(username) {
|
||||
return url + "/user/" + username;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ iD.ui.Account = function(context) {
|
||||
|
||||
// Link
|
||||
var userLink = selection.append('a')
|
||||
.attr('href', connection.userUrl(details.display_name))
|
||||
.attr('href', connection.userURL(details.display_name))
|
||||
.attr('target', '_blank');
|
||||
|
||||
// Add thumbnail or dont
|
||||
|
||||
@@ -64,7 +64,7 @@ iD.ui.Commit = function(context) {
|
||||
userLink.append('a')
|
||||
.attr('class','user-info')
|
||||
.text(user.display_name)
|
||||
.attr('href', connection.userUrl(user.display_name))
|
||||
.attr('href', connection.userURL(user.display_name))
|
||||
.attr('tabindex', -1)
|
||||
.attr('target', '_blank');
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ iD.ui.Contributors = function(context) {
|
||||
.enter()
|
||||
.append('a')
|
||||
.attr('class', 'user-link')
|
||||
.attr('href', function(d) { return context.connection().userUrl(d); })
|
||||
.attr('href', function(d) { return context.connection().userURL(d); })
|
||||
.attr('target', '_blank')
|
||||
.attr('tabindex', -1)
|
||||
.text(String);
|
||||
|
||||
@@ -14,7 +14,7 @@ iD.ui.Success = function(connection) {
|
||||
}
|
||||
|
||||
var message = (m || 'Edited OSM!') +
|
||||
connection.changesetUrl(changeset.id);
|
||||
connection.changesetURL(changeset.id);
|
||||
|
||||
var links = body.append('div').attr('class','modal-actions cf');
|
||||
|
||||
@@ -22,7 +22,7 @@ iD.ui.Success = function(connection) {
|
||||
.attr('class','col6 osm')
|
||||
.attr('target', '_blank')
|
||||
.attr('href', function() {
|
||||
return connection.changesetUrl(changeset.id);
|
||||
return connection.changesetURL(changeset.id);
|
||||
})
|
||||
.text(t('view_on_osm'));
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ describe('iD.Connection', function () {
|
||||
|
||||
describe('#changesetUrl', function() {
|
||||
it('provides a changeset url', function() {
|
||||
expect(c.changesetUrl(2)).to.eql('http://www.openstreetmap.org/browse/changeset/2');
|
||||
expect(c.changesetURL(2)).to.eql('http://www.openstreetmap.org/browse/changeset/2');
|
||||
});
|
||||
});
|
||||
|
||||
describe('#userUrl', function() {
|
||||
describe('#userURL', function() {
|
||||
it('provides a user url', function() {
|
||||
expect(c.userUrl('bob')).to.eql('http://www.openstreetmap.org/user/bob');
|
||||
expect(c.userURL('bob')).to.eql('http://www.openstreetmap.org/user/bob');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('iD.Connection', function () {
|
||||
c.switch({
|
||||
url: "http://example.com"
|
||||
});
|
||||
expect(c.changesetUrl(1)).to.equal("http://example.com/browse/changeset/1")
|
||||
expect(c.changesetURL(1)).to.equal("http://example.com/browse/changeset/1")
|
||||
});
|
||||
|
||||
it("emits an auth event", function(done) {
|
||||
|
||||
Reference in New Issue
Block a user