URL, not Url

This commit is contained in:
John Firebaugh
2013-04-17 17:25:04 -07:00
parent f4d9ec23c7
commit a0edf68cbf
6 changed files with 11 additions and 11 deletions

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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');

View File

@@ -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);

View File

@@ -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'));

View File

@@ -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) {