(trunk web) rewrite the dialogs to use jQuery.UI instead of a homerolled dialog. This partially to use more standardized components, and partially to get rid of as many browser/platform-specific hardcodings as possible to make the code more flexible. I'm flying blind wrt iPhone support, so for a little while this may be a two-steps-forward-one-step-back process. Feedback from users runnin the web client on their phones is encouraged...

This commit is contained in:
Charles Kerr
2010-08-08 20:06:46 +00:00
parent 8e58e60d43
commit fa7f51f130
17 changed files with 931 additions and 1229 deletions

View File

@@ -67,13 +67,8 @@ TransmissionRemote.prototype =
: "";
if( !remote._error.length )
remote._error = 'Server not responding';
dialog.confirm('Connection Failed',
'Could not connect to the server. You may need to reload the page to reconnect.',
'Details',
'alert(remote._error);',
null,
'Dismiss');
tellUser( 'Connection failed',
'Could not connect to the server. You may need to reload the page to reconnect.' );
remote._controller.togglePeriodicRefresh(false);
remote._controller.togglePeriodicSessionRefresh(false);
},
@@ -93,7 +88,7 @@ TransmissionRemote.prototype =
contentType: 'json',
dataType: 'json',
cache: false,
data: $.toJSON(data),
data: JSON.stringify(data),
beforeSend: function(XHR){ remote.appendSessionId(XHR) },
error: function(request, error_string, exception){ remote.ajaxError(request, error_string, exception, ajaxSettings) },
success: success,
@@ -115,6 +110,19 @@ TransmissionRemote.prototype =
this.sendRequest( o, callback, async );
},
blocklistUpdate: function( callback, async ) {
var tr = this._controller;
var o = { method: 'blocklist-update' };
this.sendRequest( o, callback, async );
},
portTest: function( callback, async ) {
var tr = this._controller;
var o = { method: 'port-test' };
this.sendRequest( o, callback, async );
},
getInitialDataFor: function(torrent_ids, callback) {
var o = {
method: 'torrent-get',