mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
(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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user