Commit fe66fd5f authored by Ivan Tyagov's avatar Ivan Tyagov

Show nice "server side error" message rather than "Loading ..." forever in...

Show nice "server side error" message rather than "Loading ..." forever in case asynchronous request to server did not succeeded (due to server side error).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32774 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc1cbf9b
......@@ -15,7 +15,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts66484637.32</string> </value>
<value> <string>ts66498134.37</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -102,13 +102,15 @@ function updater(url, box_relative_url, dom_id, \n
request_params[\'is_gadget_mode:int\'] = 1; \n
request_params[\'editable_mode:int\'] = editable_mode; \n
\n
getElement(dom_id).style.opacity = 0.5; //innerHTML = \'<div><p style="text-align: left; vertical-align: middle; font-size: large;">Loading...</p></div>\';\n
getElement(dom_id).style.opacity = 0.5;\n
d = MochiKit.Async.doSimpleXMLHttpRequest(url, request_params);\n
d.addCallback(handleServerSuccess);\n
d.addCallbacks(handleServerSuccess, handleServerError);\n
function handleServerSuccess(res){\n
getElement(dom_id).innerHTML = res.responseText;\n
getElement(dom_id).style.opacity = 1.0;\n
}\n
getElement(dom_id).style.opacity = 1.0;};\n
function handleServerError(res){\n
getElement(dom_id).innerHTML = \'Server side error.\';\n
getElement(dom_id).style.opacity = 1.0;};\n
}\n
\n
function checkForActivitiesOnServer(timeout, return_url, mode, default_pad_group){\n
......@@ -377,7 +379,7 @@ MochiKit.DOM.addLoadEvent(initialize);\n
</item>
<item>
<key> <string>size</string> </key>
<value> <long>13496</long> </value>
<value> <long>13542</long> </value>
</item>
<item>
<key> <string>title</string> </key>
......
480
\ No newline at end of file
481
\ 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