Commit 84c00e15 authored by Ivan Tyagov's avatar Ivan Tyagov

Make function work in asynchronous mode (in cases when generating a full popup...

Make function work in asynchronous mode (in cases when generating a full popup window requires another server side request).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43178 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d93ca43
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts95279629.97</string> </value>
<value> <string>ts97173866.97</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -73,15 +73,37 @@ function requestPasswordReset(script_name){\n
main_form.submit();\n
};\n
\n
function showPopik(dom_id, what, delay){\n
/* Show details pop up in search mode */\n
var obj = $("#" + dom_id);\n
if(what==true){obj.show();}\n
else{obj.hide();}\n
var popup_local_dict={};\n
var popup_request_dict={};\n
function showPopik(dom_id, action, path){\n
/* \n
Show / Hide popup details window up in search mode.\n
*/\n
var popup = $("#" + dom_id);\n
function delayedDocumentDetailsPopupWindowLoad(){\n
$.ajax({url:path+"/Document_getPopupInfo", \n
success: function(data){\n
popup.html(data);\n
popup.show();\n
popup_local_dict[dom_id] = data;}});\n
}\n
\n
if (action){\n
if (path==\'\'){popup.show();}\n
else{\n
// we must request popup info with another request\n
popup_html = popup_local_dict[dom_id];\n
popup_request = popup_request_dict[dom_id]\n
if (popup_html==undefined&&popup_request==undefined){\n
popup_request_dict[dom_id] = path;\n
setTimeout(delayedDocumentDetailsPopupWindowLoad, 1000);\n
}\n
else{popup.show();}\n
}\n
}\n
else{popup.hide();}\n
}\n
\n
\n
\n
\n
]]></string> </value>
......@@ -92,7 +114,7 @@ function showPopik(dom_id, what, delay){\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1886</int> </value>
<value> <int>2649</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
1745
\ No newline at end of file
1747
\ 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