w2v-server: save active tab in localStorage
diff --git a/templates/index.html.ep b/templates/index.html.ep
index 9656c56..59514fd 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -30,7 +30,14 @@
return true;
}});
- $(".selector").tabs({ active: 1 });
+ if (localStorage) { // let's not crash if some user has IE7
+ var index = parseInt(localStorage['tab']||'0');
+ $("#tabs").tabs({ active: index });
+ }
+
+ $( "#tabs" ).on( "tabsactivate", function( event, ui ) {
+ if (localStorage) localStorage['tab'] = ui.newTab.index();
+ });
$(function(){
$("#SEARCH").click(function() {
@@ -198,7 +205,6 @@
});
} );
- var tabactivated = {}
$( function() {
$( "#tabs" ).tabs().addClass('tabs-min');
} );