Simplify browse routes and make routes more consistent

This gets rid of the /browse/ prefix and uses /history consistently
for all routes that show a list of changesets.
This commit is contained in:
Tom Hughes 2013-11-28 00:14:07 +00:00
parent 6b236ec95b
commit 3cd5f45e08
9 changed files with 62 additions and 46 deletions

View file

@ -124,7 +124,7 @@ function initializeBrowse(map) {
layer.originalStyle = layer.options;
layer.setStyle({color: '#0000ff', weight: 8});
OSM.router.route('/browse/' + layer.feature.type + '/' + layer.feature.id);
OSM.router.route('/' + layer.feature.type + '/' + layer.feature.id);
// Stash the currently drawn feature
selectedLayer = layer;

View file

@ -30,7 +30,7 @@ OSM.NewNote = function(map) {
if ($(this).hasClass('disabled')) return;
OSM.router.route('/new_note');
OSM.router.route('/note/new');
});
function createNote(marker, form, url) {
@ -61,7 +61,7 @@ OSM.NewNote = function(map) {
newNote = null;
noteLayer.removeLayer(marker);
addNoteButton.removeClass("active");
OSM.route('/browse/note/' + feature.properties.id);
OSM.route('/note/' + feature.properties.id);
}
}

View file

@ -34,7 +34,7 @@ function initializeNotes(map) {
});
noteLayer.on('click', function(e) {
OSM.router.route('/browse/note/' + e.layer.id);
OSM.router.route('/note/' + e.layer.id);
});
function updateMarker(marker, feature) {