mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 18:38:42 +00:00
(trunk web) rename "iphone" variables and css files as "mobile", since they also work on iPods and Android phones.
This commit is contained in:
@@ -46,13 +46,8 @@ Dialog.prototype = {
|
||||
hideDialog: function()
|
||||
{
|
||||
$('body.dialog_showing').removeClass('dialog_showing');
|
||||
if (Safari3) {
|
||||
$('div#dialog_container div.dialog_window').css('top', '-150px');
|
||||
setTimeout("dialog._container.hide();",500);
|
||||
} else {
|
||||
this._container.hide();
|
||||
transmission.hideiPhoneAddressbar();
|
||||
}
|
||||
this._container.hide();
|
||||
transmission.hideMobileAddressbar();
|
||||
transmission.updateButtonStates();
|
||||
},
|
||||
|
||||
@@ -80,14 +75,8 @@ Dialog.prototype = {
|
||||
confirm: function(dialog_heading, dialog_message, confirm_button_label,
|
||||
callback_function, callback_data, cancel_button_label)
|
||||
{
|
||||
if (!iPhone && Safari3) {
|
||||
$('div#upload_container div.dialog_window').css('top', '-205px');
|
||||
$('div#prefs_container div.dialog_window').css('top', '-425px');
|
||||
setTimeout("$('#upload_container').hide();",500);
|
||||
setTimeout("$('#prefs_container').hide();",500);
|
||||
} else if (!iPhone) {
|
||||
if (!isMobileDevice)
|
||||
$('.dialog_container').hide();
|
||||
}
|
||||
setInnerHTML(this._heading[0], dialog_heading);
|
||||
setInnerHTML(this._message[0], dialog_message);
|
||||
setInnerHTML(this._cancel_button[0], (cancel_button_label == null) ? 'Cancel' : cancel_button_label);
|
||||
@@ -98,51 +87,28 @@ Dialog.prototype = {
|
||||
$('body').addClass('dialog_showing');
|
||||
this._container.show();
|
||||
transmission.updateButtonStates();
|
||||
if (iPhone) {
|
||||
transmission.hideiPhoneAddressbar();
|
||||
} else if (Safari3) {
|
||||
setTimeout("$('div#dialog_container div.dialog_window').css('top', '0px');",10);
|
||||
}
|
||||
if (isMobileDevice)
|
||||
transmission.hideMobileAddressbar();
|
||||
},
|
||||
|
||||
/*
|
||||
* Display an alert dialog
|
||||
*/
|
||||
alert: function(dialog_heading, dialog_message, cancel_button_label) {
|
||||
if (!iPhone && Safari3) {
|
||||
$('div#upload_container div.dialog_window').css('top', '-205px');
|
||||
$('div#prefs_container div.dialog_window').css('top', '-425px');
|
||||
setTimeout("$('#upload_container').hide();",500);
|
||||
setTimeout("$('#prefs_container').hide();",500);
|
||||
} else if (!iPhone) {
|
||||
if (!isMobileDevice)
|
||||
$('.dialog_container').hide();
|
||||
}
|
||||
setInnerHTML(this._heading[0], dialog_heading);
|
||||
setInnerHTML(this._message[0], dialog_message);
|
||||
// jquery::hide() doesn't work here in Safari for some odd reason
|
||||
this._confirm_button.css('display', 'none');
|
||||
setInnerHTML(this._cancel_button[0], cancel_button_label);
|
||||
// Just in case
|
||||
if (!iPhone && Safari3) {
|
||||
$('div#upload_container div.dialog_window').css('top', '-205px');
|
||||
setTimeout("$('#upload_container').hide();",500);
|
||||
} else {
|
||||
$('#upload_container').hide();
|
||||
}
|
||||
$('#upload_container').hide();
|
||||
$('body').addClass('dialog_showing');
|
||||
transmission.updateButtonStates();
|
||||
if (iPhone) {
|
||||
transmission.hideiPhoneAddressbar();
|
||||
this._container.show();
|
||||
} else if (Safari3) {
|
||||
// long pause as we just hid all the dialogs on a timeout - we'll get the error
|
||||
// scrolling in and immediately disappearing if we're not careful!
|
||||
//dialogTimeout = null;
|
||||
this._container.show();
|
||||
setTimeout("$('div#dialog_container div.dialog_window').css('top', '0px');",500);
|
||||
} else {
|
||||
this._container.show();
|
||||
}
|
||||
if (isMobileDevice)
|
||||
transmission.hideMobileAddressbar();
|
||||
this._container.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user