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
......@@ -88,12 +88,12 @@ jQuery(function() {\n
jQuery(\'<div class="loading" style="background-color: #AAAAAA; opacity: 0.5; position: absolute; left: 0%; width: 100%; top: 0%; height: 100%; transparent;"><p class="loading" style="position: absolute; left: 0%; width: 100%; top: 30%; height: 40%; text-align: center; color: black; font-size: 32pt;">Loading...</p></div>\').appendTo(dialog);\n
animate();\n
\n
// define fallback values\n
if(method_name==undefined)\n
// define fallback values\n
if (method_name == undefined)\n
method_name = \'post\';\n
if(method_name==\'post\')\n
if (method_name == \'post\')\n
var caller = jQuery.post;\n
if(method_name==\'get\')\n
if (method_name == \'get\')\n
var caller = jQuery.get;\n
caller(url, query, function(data, textStatus, XMLHttpRequest) {\n
if (textStatus == \'success\' || textStatus == \'notmodified\') {\n
......@@ -101,7 +101,8 @@ jQuery(function() {\n
dialog.empty();\n
//jQuery(\'div.loading\', dialog).remove();\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
jQuery(\'.bars, .breadcrumb, .logged_in_as\', dialog).remove();\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
* Remove jquery from this Business Template. Instead, depend on erp5_jquery.
......
9
\ No newline at end of file
10
\ 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