Changeset a9c1b87 in github
- Timestamp:
- May 8, 2012 6:06:03 AM (13 months ago)
- Branches:
- release-0.8
- Children:
- 05383a9
- Parents:
- 9e8d8e4a
- git-author:
- thomascube <thomas@…> (05/01/12 03:04:40)
- git-committer:
- Aleksander Machniak <alec@…> (05/08/12 06:06:03)
- 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
r9e8d8e4a ra9c1b87 557 557 558 558 // add some basic labels to client 559 $this->output->add_label('loading', 'servererror' );559 $this->output->add_label('loading', 'servererror', 'requesttimedout'); 560 560 561 561 return $this->output; -
program/js/app.js
rf4698cb ra9c1b87 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 … … 955 956 form.submit(); 956 957 957 // clear timeout (sending could take longer)958 clearTimeout(this.request_timer);959 958 break; 960 959 … … 1158 1157 this.lock_form(this.gui_objects.editform, a); 1159 1158 1160 // clear pending timer1161 if (this.request_timer)1162 clearTimeout(this.request_timer);1163 1164 // set timer for requests1165 if (a && this.env.request_timeout)1166 this.request_timer = setTimeout(function(){ ref.request_timed_out(); }, this.env.request_timeout * 1000);1167 1168 1159 return id; 1169 1160 }; … … 1202 1193 1203 1194 return url.replace(/_task=[a-z]+/, '_task='+task); 1204 };1205 1206 // called when a request timed out1207 this.request_timed_out = function()1208 {1209 this.set_busy(false);1210 this.display_message('Request timed out!', 'error');1211 1195 }; 1212 1196 … … 5975 5959 type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json', 5976 5960 success: function(data){ ref.http_response(data); }, 5977 error: function(o, status, err) { r cmail.http_error(o, status, err, lock); }5961 error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } 5978 5962 }); 5979 5963 }; … … 6007 5991 type: 'POST', url: url, data: postdata, dataType: 'json', 6008 5992 success: function(data){ ref.http_response(data); }, 6009 error: function(o, status, err) { r cmail.http_error(o, status, err, lock); }5993 error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } 6010 5994 }); 6011 5995 }; … … 6139 6123 6140 6124 // handle HTTP request errors 6141 this.http_error = function(request, status, err, lock )6125 this.http_error = function(request, status, err, lock, action) 6142 6126 { 6143 6127 var errmsg = request.statusText; … … 6148 6132 if (request.status && errmsg) 6149 6133 this.display_message(this.get_label('servererror') + ' (' + errmsg + ')', 'error'); 6134 else if (status == 'timeout') 6135 this.display_message(this.get_label('requesttimedout'), 'error'); 6136 else if (request.status == 0 && status != 'abort') 6137 this.display_message(this.get_label('servererror') + ' (No connection)', 'error'); 6138 6139 // re-send keep-alive requests after 30 seconds 6140 if (action == 'keep-alive') 6141 setTimeout(function(){ ref.keep_alive(); }, 30000); 6142 else if (action == 'check-recent') 6143 setTimeout(function(){ ref.check_for_recent(false); }, 30000); 6150 6144 }; 6151 6145 -
program/localization/de_CH/messages.inc
rdc365cc ra9c1b87 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 ra9c1b87 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 ra9c1b87 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.
