// used in selectize callbacks
var view = this,
- optionTemplate = _.template('<div><div><%= host %></div><div class="small text-muted"><%= path %></div></div>');
+ optionTemplate = _.template('<div><div><%- host %></div><div class="small text-muted"><%- path %></div></div>');
this.$('#host-selector').selectize({
optgroupField: 'group',
this.hostSelectize = this.$('#host-selector')[0].selectize;
this.render();
- Backbone.history.start({silent: true});
+ Backbone.history.start();
},
render: function() {
this.reloadFiles();
this.updateFavorites();
+
+ localStorage.last_location = location;
},
reloadFiles: function() {
},
initialLoad: function() {
- if (!this.host) {
- var opts = this.hostSelectize.options;
+ var opts = this.hostSelectize.options,
+ location = localStorage.last_location || opts[Object.keys(opts)[0]].value;
- this.router.navigate('#' + opts[Object.keys(opts)[0]].value, {trigger: true, replace: true});
- }
+ this.router.navigate('#' + location, {trigger: true, replace: true});
},
updateFavorites: function() {