# HG changeset patch # User Ludovic Chabant # Date 1362031322 28800 # Node ID f6b51480403e36df952341f7edf9bec7b7466963 # Parent b4599ca2c573d8d932a0cd458895adc71b4fe003 Fixed model URL bug. Expose `url_edit` for the history view. diff -r b4599ca2c573 -r f6b51480403e static/js/wikked/models.js --- a/static/js/wikked/models.js Wed Feb 27 22:02:02 2013 -0800 +++ b/static/js/wikked/models.js Wed Feb 27 22:02:02 2013 -0800 @@ -133,7 +133,7 @@ return this; }, url: function() { - var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError(); + var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || Backbone.urlError(); if (this.isNew()) return base; return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + this.id; }, @@ -275,6 +275,8 @@ _onChangePath: function(path) { PageHistoryModel.__super__._onChangePath.apply(this, arguments); this.set({ + url_read: '/#/read/' + path, + url_edit: '/#/edit/' + path, url_rev: '/#/revision/' + path, url_diffc: '/#/diff/c/' + path, url_diffr: '/#/diff/r/' + path