Commit 97be7054 authored by Yoshinori Okuji's avatar Yoshinori Okuji

2010-07-01 yo

* Fix a bug that scripts in every fetched document may be executed. Otherwise, ready callbacks can be executed many times.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36767 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 36479fda
...@@ -89,11 +89,11 @@ jQuery(function() {\n ...@@ -89,11 +89,11 @@ jQuery(function() {\n
animate();\n animate();\n
\n \n
// define fallback values\n // define fallback values\n
if(method_name==undefined)\n if (method_name == undefined)\n
method_name = \'post\';\n method_name = \'post\';\n
if(method_name==\'post\')\n if (method_name == \'post\')\n
var caller = jQuery.post;\n var caller = jQuery.post;\n
if(method_name==\'get\')\n if (method_name == \'get\')\n
var caller = jQuery.get;\n var caller = jQuery.get;\n
caller(url, query, function(data, textStatus, XMLHttpRequest) {\n caller(url, query, function(data, textStatus, XMLHttpRequest) {\n
if (textStatus == \'success\' || textStatus == \'notmodified\') {\n if (textStatus == \'success\' || textStatus == \'notmodified\') {\n
...@@ -101,7 +101,8 @@ jQuery(function() {\n ...@@ -101,7 +101,8 @@ jQuery(function() {\n
dialog.empty();\n dialog.empty();\n
//jQuery(\'div.loading\', dialog).remove();\n //jQuery(\'div.loading\', dialog).remove();\n
\n \n
dialog.html(jQuery(\'<div />\').append(data).find(\'form\'));\n dialog.html(jQuery(\'<div />\').append(data.replace(/<script(.|\\s)*?\\/script>/g, "")).find(\'form\'));\n
\n
// XXX Get rid of unneeded stuff in JavaScript for now.\n // XXX Get rid of unneeded stuff in JavaScript for now.\n
jQuery(\'.bars, .breadcrumb, .logged_in_as\', dialog).remove();\n jQuery(\'.bars, .breadcrumb, .logged_in_as\', dialog).remove();\n
jQuery(\'[id]\', dialog).removeAttr(\'id\');\n jQuery(\'[id]\', dialog).removeAttr(\'id\');\n
......
2010-07-01 yo
* Fix a bug that scripts in every fetched document may be executed. Otherwise, ready callbacks can be executed many times.
2010-06-30 yo 2010-06-30 yo
* Remove jquery from this Business Template. Instead, depend on erp5_jquery. * Remove jquery from this Business Template. Instead, depend on erp5_jquery.
......
9 10
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment