X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=filex%2Fstatic%2Ffilex%2Ffilex.js;h=9f34b5ede6deeaab84120142fbd4005efcbea1d5;hb=bc6c1b10265d2c52e9f592cafacf0ae54fa033b0;hp=dc776d8dd606f79aa5c75360b06f20c98ddd7aeb;hpb=8cb1584dc8c5733aa00d3223cc2380eecac13f41;p=qcg-portal.git
diff --git a/filex/static/filex/filex.js b/filex/static/filex/filex.js
index dc776d8..9f34b5e 100644
--- a/filex/static/filex/filex.js
+++ b/filex/static/filex/filex.js
@@ -234,7 +234,7 @@ $(function(){
// used in selectize callbacks
var view = this,
- optionTemplate = _.template('
');
+ optionTemplate = _.template('');
this.$('#host-selector').selectize({
optgroupField: 'group',
@@ -329,7 +329,7 @@ $(function(){
this.hostSelectize = this.$('#host-selector')[0].selectize;
this.render();
- Backbone.history.start({silent: true});
+ Backbone.history.start();
},
render: function() {
@@ -357,6 +357,8 @@ $(function(){
this.reloadFiles();
this.updateFavorites();
+
+ localStorage.last_location = location;
},
reloadFiles: function() {
@@ -488,11 +490,10 @@ $(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() {