From 02139d7640605c0ad1de59a852c1a17e8277f5d7 Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Fri, 4 Sep 2009 08:16:21 +0000 Subject: [PATCH] navigation MDL-14632 stopped set_user_pref from firing at page load if things were moved to the sidebar --- lib/javascript-navigation.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/javascript-navigation.js b/lib/javascript-navigation.js index 5611533fb4..50e461593f 100644 --- a/lib/javascript-navigation.js +++ b/lib/javascript-navigation.js @@ -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; -- 2.39.5