Changeset 1103607 in github
- Timestamp:
- May 1, 2012 3:04:40 AM (13 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo
- Children:
- f802b3d
- Parents:
- 58154f5
- Location:
- program
- Files:
-
- 5 edited
-
include/rcmail.php (modified) (1 diff)
-
js/app.js (modified) (8 diffs)
-
localization/de_CH/messages.inc (modified) (1 diff)
-
localization/de_DE/messages.inc (modified) (1 diff)
-
localization/en_US/messages.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcmail.php
r6a8b4c2 r1103607 326 326 327 327 // add some basic labels to client 328 $this->output->add_label('loading', 'servererror' );328 $this->output->add_label('loading', 'servererror', 'requesttimedout'); 329 329 330 330 return $this->output; -
program/js/app.js
rd960a01 r1103607 55 55 // set jQuery ajax options 56 56 $.ajaxSetup({ 57 cache:false, 58 error:function(request, status, err){ ref.http_error(request, status, err); }, 59 beforeSend:function(xmlhttp){ xmlhttp.setRequestHeader('X-Roundcube-Request', ref.env.request_token); } 57 cache: false, 58 timeout: this.env.request_timeout * 1000, 59 error: function(request, status, err){ ref.http_error(request, status, err); }, 60 beforeSend: function(xmlhttp){ xmlhttp.setRequestHeader('X-Roundcube-Request', ref.env.request_token); } 60 61 }); 61 62 … … 956 957 form.submit(); 957 958 958 // clear timeout (sending could take longer)959 clearTimeout(this.request_timer);960 959 break; 961 960 … … 1159 1158 this.lock_form(this.gui_objects.editform, a); 1160 1159 1161 // clear pending timer1162 if (this.request_timer)1163 clearTimeout(this.request_timer);1164 1165 // set timer for requests1166 if (a && this.env.request_timeout)1167 this.request_timer = setTimeout(function(){ ref.request_timed_out(); }, this.env.request_timeout * 1000);1168 1169 1160 return id; 1170 1161 }; … … 1203 1194 1204 1195 return url.replace(/_task=[a-z]+/, '_task='+task); 1205 };1206 1207 // called when a request timed out1208 this.request_timed_out = function()1209 {1210 this.set_busy(false);1211 this.display_message('Request timed out!', 'error');1212 1196 }; 1213 1197 … … 5998 5982 type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json', 5999 5983 success: function(data){ ref.http_response(data); }, 6000 error: function(o, status, err) { r cmail.http_error(o, status, err, lock); }5984 error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } 6001 5985 }); 6002 5986 }; … … 6030 6014 type: 'POST', url: url, data: postdata, dataType: 'json', 6031 6015 success: function(data){ ref.http_response(data); }, 6032 error: function(o, status, err) { r cmail.http_error(o, status, err, lock); }6016 error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } 6033 6017 }); 6034 6018 }; … … 6162 6146 6163 6147 // handle HTTP request errors 6164 this.http_error = function(request, status, err, lock )6148 this.http_error = function(request, status, err, lock, action) 6165 6149 { 6166 6150 var errmsg = request.statusText; … … 6171 6155 if (request.status && errmsg) 6172 6156 this.display_message(this.get_label('servererror') + ' (' + errmsg + ')', 'error'); 6157 else if (status == 'timeout') 6158 this.display_message(this.get_label('requesttimedout'), 'error'); 6159 else if (request.status == 0 && status != 'abort') 6160 this.display_message(this.get_label('servererror') + ' (No connection)', 'error'); 6161 6162 // re-send keep-alive requests after 30 seconds 6163 if (action == 'keep-alive') 6164 setTimeout(function(){ ref.keep_alive(); }, 30000); 6165 else if (action == 'check-recent') 6166 setTimeout(function(){ ref.check_for_recent(false); }, 30000); 6173 6167 }; 6174 6168 -
program/localization/de_CH/messages.inc
rdc365cc r1103607 24 24 $messages['servererrormsg'] = 'Serverfehler: $msg'; 25 25 $messages['dberror'] = 'Datenbankfehler!'; 26 $messages['requesttimedout'] = 'Zeitlimit ÃŒberschritten'; 26 27 $messages['errorreadonly'] = 'Die Aktion kann nicht ausgefÃŒhrt werden. Der Ordner ist schreibgeschÃŒtzt.'; 27 28 $messages['errornoperm'] = 'Die Aktion kann nicht ausgefÃŒhrt werden. Zugriff verweigert.'; -
program/localization/de_DE/messages.inc
rdc365cc r1103607 24 24 $messages['servererrormsg'] = 'Serverfehler: $msg'; 25 25 $messages['dberror'] = 'Datenbankfehler!'; 26 $messages['requesttimedout'] = 'Zeitlimit ÃŒberschritten'; 26 27 $messages['errorreadonly'] = 'Die Aktion kann nicht ausgefÃŒhrt werden. Der Ordner ist schreibgeschÃŒtzt.'; 27 28 $messages['errornoperm'] = 'Die Aktion kann nicht ausgefÃŒhrt werden. Zugriff verweigert.'; -
program/localization/en_US/messages.inc
r71e9efb r1103607 30 30 $messages['servererrormsg'] = 'Server Error: $msg'; 31 31 $messages['dberror'] = 'Database Error!'; 32 $messages['requesttimedout'] = 'Request timed out'; 32 33 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.'; 33 34 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
Note: See TracChangeset
for help on using the changeset viewer.
