]> git.mjollnir.org Git - moodle.git/commitdiff
navigation MDL-14632 stopped set_user_pref from firing at page load if things were...
authorsamhemelryk <samhemelryk>
Fri, 4 Sep 2009 08:16:21 +0000 (08:16 +0000)
committersamhemelryk <samhemelryk>
Fri, 4 Sep 2009 08:16:21 +0000 (08:16 +0000)
lib/javascript-navigation.js

index 5611533fb4f17c43473d8e1262c2cab0e5683f4a..50e461593f928969161043707e97d29bf93bea99 100644 (file)
@@ -351,6 +351,7 @@ navigation_tree.prototype.move_to_sidebar_popout = function(e) {
         YAHOO.moodle.navigation.tabpanel = new navigation_tab_panel();
     }
     YAHOO.moodle.navigation.tabpanel.add_to_tab_panel(this.name, tabtitle, tabcontent, tabcommands);
+    set_user_preference('nav_in_tab_panel_'+this.name, 1);
     return true;
 }
 /**
@@ -417,6 +418,7 @@ navigation_tree.prototype.move_to_block_position = function(e) {
     while (!YAHOO.util.Dom.hasClass(block, 'sideblock')) {
         block = block.parentNode;
     }
+    set_user_preference('nav_in_tab_panel_'+this.name, 0);
     return true;
 }
 
@@ -571,8 +573,6 @@ navigation_tab_panel.prototype.add_to_tab_panel = function (tabname, tabtitle, t
     this.tabcount++;
 
     YAHOO.util.Event.addListener(sidetab, "mouseover", this.show_tab, tabname, this);
-
-    set_user_preference('nav_in_tab_panel_'+tabname, 1);
 }
 /**
  * This function handles checking the size, and positioning of the navigaiton
@@ -667,7 +667,6 @@ navigation_tab_panel.prototype.hide_tab = function(e, tabname) {
  * @return {bool}
  */
 navigation_tab_panel.prototype.remove_from_tab_panel = function(tabname) {
-    set_user_preference('nav_in_tab_panel_'+tabname, 0);
     var tab = document.getElementById(tabname+'_sidebarpopup');
     if (!tab) {
         return false;