[view/explorer][xs]: remove (already obsolete) router and routing code from explorer.

This commit is contained in:
Rufus Pollock
2012-04-26 17:22:03 +01:00
parent 706819e288
commit c9a3471b57

View File

@@ -225,9 +225,6 @@ my.DataExplorer = Backbone.View.extend({
this.updateNav(this.pageViews[0].id); this.updateNav(this.pageViews[0].id);
} }
this.router = new Backbone.Router();
this.setupRouting();
this.model.bind('query:start', function() { this.model.bind('query:start', function() {
my.notify('Loading data', {loader: true}); my.notify('Loading data', {loader: true});
}); });
@@ -239,7 +236,6 @@ my.DataExplorer = Backbone.View.extend({
var qs = my.parseHashQueryString(); var qs = my.parseHashQueryString();
qs.reclineQuery = JSON.stringify(self.model.queryState.toJSON()); qs.reclineQuery = JSON.stringify(self.model.queryState.toJSON());
var out = my.getNewHashForQueryString(qs); var out = my.getNewHashForQueryString(qs);
// self.router.navigate(out);
}); });
this.model.bind('query:fail', function(error) { this.model.bind('query:fail', function(error) {
my.clearNotifications(); my.clearNotifications();
@@ -299,21 +295,6 @@ my.DataExplorer = Backbone.View.extend({
this.el.find('.header').append(facetViewer.el); this.el.find('.header').append(facetViewer.el);
}, },
setupRouting: function() {
var self = this;
// Default route
// this.router.route(/^(\?.*)?$/, this.pageViews[0].id, function(queryString) {
// self.updateNav(self.pageViews[0].id, queryString);
// });
// $.each(this.pageViews, function(idx, view) {
// self.router.route(/^([^?]+)(\?.*)?/, 'view', function(viewId, queryString) {
// self.updateNav(viewId, queryString);
// });
// });
this.router.route(/.*/, 'view', function() {
});
},
updateNav: function(pageName) { updateNav: function(pageName) {
this.el.find('.navigation li').removeClass('active'); this.el.find('.navigation li').removeClass('active');
this.el.find('.navigation li a').removeClass('disabled'); this.el.find('.navigation li a').removeClass('disabled');