From ed29701105110dd239f5502cf1af8e6743c84772 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Mon, 24 Jan 2011 13:28:11 +0000 Subject: [PATCH] Make sure to unbind all "click" events when initializing gadget's show / hide tabs switch otherwise we may chain too much of them (in cases of instant pad switch). git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42627 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_knowledge_pad/erp5_knowledge_box.js.xml | 12 +++++++----- bt5/erp5_knowledge_pad/bt/revision | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml index 02f39497ed..969d46cfc4 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/erp5_knowledge_box.js.xml @@ -12,7 +12,7 @@ </item> <item> <key> <string>_EtagSupport__etag</string> </key> - <value> <string>ts95535671.25</string> </value> + <value> <string>ts95875565.52</string> </value> </item> <item> <key> <string>__name__</string> </key> @@ -404,14 +404,14 @@ function initialize(){\n function toggleTabNavigation(){\n /* Toggle tabs navigation */\n var is_tabs_visible=0;\n - if(gadgets_tabs.css("display")!="block"){\n + if($("#tabs").css("display")!="block"){\n is_tabs_visible=1;\n $("#tab_switcher_visible").show();\n $("#tab_switcher_hidden").hide();}\n else{\n $("#tab_switcher_visible").hide();\n $("#tab_switcher_hidden").show();}\n - gadgets_tabs.toggle();\n + $("#tabs").toggle();\n createCookie("is_tabs_visible", is_tabs_visible, 365); }\n \n function bindGadgetHandlers(index, box){\n @@ -458,7 +458,9 @@ function initialize(){\n }\n \n // tabs navigation\n - if(gadgets_tabs_switcher){gadgets_tabs_switcher.bind("click", toggleTabNavigation);}\n + if(gadgets_tabs_switcher){\n + gadgets_tabs_switcher.unbind("click");\n + gadgets_tabs_switcher.bind("click", toggleTabNavigation);}\n \n // for each box (gadget) add respective event handlers\n gadget_list = $("div.block");\n @@ -483,7 +485,7 @@ $(document).ready(initialize);\n </item> <item> <key> <string>size</string> </key> - <value> <int>18051</int> </value> + <value> <int>18095</int> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 01b67236d1..55df208815 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -688 \ No newline at end of file +689 \ No newline at end of file -- 2.30.9