From 7824b430d418f085e8c7b173dd2c6c8a968f5299 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Mon, 7 Nov 2011 15:25:10 +0200 Subject: [PATCH] Try to be more defensive and run only if in proper page (otherwise it breaks some UI jQuery functions). --- .../portal_skins/erp5_dhtml_style/live_test.js.xml | 10 +++++++--- bt5/erp5_dhtml_style/bt/revision | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml b/bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml index 31dc4ce871..2aa9527e6a 100644 --- a/bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml +++ b/bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/live_test.js.xml @@ -12,7 +12,7 @@ </item> <item> <key> <string>_EtagSupport__etag</string> </key> - <value> <string>ts00095498.85</string> </value> + <value> <string>ts20671633.65</string> </value> </item> <item> <key> <string>__name__</string> </key> @@ -25,9 +25,13 @@ <item> <key> <string>data</string> </key> <value> <string>$(document).ready(function(){\n -\n var my_url_run_test = $(document)[0].baseURI + \'runLiveTest\'\n var my_url_read_test = $(document)[0].baseURI + \'readTestOutput\'\n + if (jQuery("*[name=\'field_your_test\']").length==0){\n + // not in proper page no need to continue\n + return ;\n + }\n +\n var test = jQuery("*[name=\'field_your_test\']")[0].defaultValue\n var run_only = jQuery("*[name=\'field_your_run_only\']")[0].defaultValue\n var debug = 0\n @@ -86,7 +90,7 @@ </item> <item> <key> <string>size</string> </key> - <value> <int>1813</int> </value> + <value> <int>1938</int> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_dhtml_style/bt/revision b/bt5/erp5_dhtml_style/bt/revision index 9d607966b7..3cacc0b93c 100644 --- a/bt5/erp5_dhtml_style/bt/revision +++ b/bt5/erp5_dhtml_style/bt/revision @@ -1 +1 @@ -11 \ No newline at end of file +12 \ No newline at end of file -- 2.30.9