upgrade to ext js 3.1
This commit is contained in:
parent
1ac0403f05
commit
cd24acd74f
|
@ -380,8 +380,8 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
initComponent: function() {
|
||||
Ext.deluge.add.AddWindow.superclass.initComponent.call(this);
|
||||
|
||||
this.addButton(_('Cancel'), this.onCancel, this);
|
||||
this.addButton(_('Add'), this.onAdd, this);
|
||||
this.addButton(_('Cancel'), this.onCancelClick, this);
|
||||
this.addButton(_('Add'), this.onAddClick, this);
|
||||
|
||||
function torrentRenderer(value, p, r) {
|
||||
if (r.data['info_hash']) {
|
||||
|
@ -465,8 +465,9 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
this.optionsPanel.clear();
|
||||
},
|
||||
|
||||
onAdd: function() {
|
||||
onAddClick: function() {
|
||||
var torrents = [];
|
||||
if (!this.grid) return;
|
||||
this.grid.getStore().each(function(r) {
|
||||
var id = r.get('info_hash');
|
||||
torrents.push({
|
||||
|
@ -483,7 +484,7 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
|||
this.hide();
|
||||
},
|
||||
|
||||
onCancel: function() {
|
||||
onCancelClick: function() {
|
||||
this.clear();
|
||||
this.hide();
|
||||
},
|
||||
|
|
|
@ -61,7 +61,7 @@ Copyright:
|
|||
this.addEvents('hostadded');
|
||||
|
||||
this.addButton(_('Close'), this.hide, this);
|
||||
this.addButton(_('Add'), this.onAdd, this);
|
||||
this.addButton(_('Add'), this.onAddClick, this);
|
||||
|
||||
this.on('hide', this.onHide, this);
|
||||
|
||||
|
@ -115,7 +115,7 @@ Copyright:
|
|||
});
|
||||
},
|
||||
|
||||
onAdd: function() {
|
||||
onAddClick: function() {
|
||||
var host = this.hostField.getValue();
|
||||
var port = this.portField.getValue();
|
||||
var username = this.usernameField.getValue();
|
||||
|
@ -221,7 +221,7 @@ Copyright:
|
|||
cls: 'x-btn-text-icon',
|
||||
text: _('Add'),
|
||||
icon: '/icons/add.png',
|
||||
handler: this.onAdd,
|
||||
handler: this.onAddClick,
|
||||
scope: this
|
||||
}, {
|
||||
id: 'cm-remove',
|
||||
|
@ -298,7 +298,7 @@ Copyright:
|
|||
}
|
||||
},
|
||||
|
||||
onAdd: function(button, e) {
|
||||
onAddClick: function(button, e) {
|
||||
if (!this.addWindow) {
|
||||
this.addWindow = new Ext.deluge.AddConnectionWindow();
|
||||
this.addWindow.on('hostadded', this.onHostAdded, this);
|
||||
|
|
|
@ -54,8 +54,8 @@ Copyright:
|
|||
initComponent: function() {
|
||||
Ext.deluge.AddTracker.superclass.initComponent.call(this);
|
||||
|
||||
this.addButton(_('Cancel'), this.onCancel, this);
|
||||
this.addButton(_('Add'), this.onAdd, this);
|
||||
this.addButton(_('Cancel'), this.onCancelClick, this);
|
||||
this.addButton(_('Add'), this.onAddClick, this);
|
||||
this.addEvents('add');
|
||||
|
||||
this.form = this.add({
|
||||
|
@ -71,12 +71,7 @@ Copyright:
|
|||
})
|
||||
},
|
||||
|
||||
onCancel: function() {
|
||||
this.form.getForm().findField('trackers').setValue('');
|
||||
this.hide();
|
||||
},
|
||||
|
||||
onAdd: function() {
|
||||
onAddClick: function() {
|
||||
var trackers = this.form.getForm().findField('trackers').getValue();
|
||||
trackers = trackers.split('\n');
|
||||
|
||||
|
@ -89,6 +84,11 @@ Copyright:
|
|||
this.fireEvent('add', cleaned);
|
||||
this.hide();
|
||||
this.form.getForm().findField('trackers').setValue('');
|
||||
},
|
||||
|
||||
onCancelClick: function() {
|
||||
this.form.getForm().findField('trackers').setValue('');
|
||||
this.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -224,31 +224,31 @@ Copyright:
|
|||
cls: 'x-btn-text-icon',
|
||||
text: _('Up'),
|
||||
icon: '/icons/up.png',
|
||||
handler: this.onUp,
|
||||
handler: this.onUpClick,
|
||||
scope: this
|
||||
}, {
|
||||
cls: 'x-btn-text-icon',
|
||||
text: _('Down'),
|
||||
icon: '/icons/down.png',
|
||||
handler: this.onDown,
|
||||
handler: this.onDownClick,
|
||||
scope: this
|
||||
}, '->', {
|
||||
cls: 'x-btn-text-icon',
|
||||
text: _('Add'),
|
||||
icon: '/icons/add.png',
|
||||
handler: this.onAdd,
|
||||
handler: this.onAddClick,
|
||||
scope: this
|
||||
}, {
|
||||
cls: 'x-btn-text-icon',
|
||||
text: _('Edit'),
|
||||
icon: '/icons/edit_trackers.png',
|
||||
handler: this.onEdit,
|
||||
handler: this.onEditClick,
|
||||
scope: this
|
||||
}, {
|
||||
cls: 'x-btn-text-icon',
|
||||
text: _('Remove'),
|
||||
icon: '/icons/remove.png',
|
||||
handler: this.onRemove,
|
||||
handler: this.onRemoveClick,
|
||||
scope: this
|
||||
}
|
||||
]
|
||||
|
@ -256,7 +256,7 @@ Copyright:
|
|||
});
|
||||
},
|
||||
|
||||
onAdd: function() {
|
||||
onAddClick: function() {
|
||||
this.addWindow.show();
|
||||
},
|
||||
|
||||
|
@ -279,11 +279,11 @@ Copyright:
|
|||
}, this);
|
||||
},
|
||||
|
||||
onCancel: function() {
|
||||
onCancelClick: function() {
|
||||
this.hide();
|
||||
},
|
||||
|
||||
onEdit: function() {
|
||||
onEditClick: function() {
|
||||
var r = this.grid.getSelectionModel().getSelected();
|
||||
this.editWindow.show(r);
|
||||
},
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
(function() {
|
||||
Ext.deluge.Statusbar = Ext.extend(Ext.StatusBar, {
|
||||
Ext.deluge.Statusbar = Ext.extend(Ext.Toolbar, {
|
||||
constructor: function(config) {
|
||||
config = Ext.apply({
|
||||
id: 'deluge-statusbar',
|
||||
|
@ -61,10 +60,10 @@
|
|||
},
|
||||
|
||||
onConnect: function() {
|
||||
this.setStatus({
|
||||
iconCls: 'x-connected',
|
||||
text: ''
|
||||
});
|
||||
//this.setStatus({
|
||||
// iconCls: 'x-connected',
|
||||
// text: ''
|
||||
//});
|
||||
if (!this.created) this.createButtons();
|
||||
else {
|
||||
this.items.each(function(item) {
|
||||
|
@ -75,7 +74,7 @@
|
|||
},
|
||||
|
||||
onDisconnect: function() {
|
||||
this.clearStatus({useDefaults:true});
|
||||
//this.clearStatus({useDefaults:true});
|
||||
this.items.each(function(item) {
|
||||
item.hide();
|
||||
item.disable();
|
||||
|
@ -150,4 +149,3 @@
|
|||
}
|
||||
});
|
||||
Deluge.Statusbar = new Ext.deluge.Statusbar();
|
||||
})();
|
||||
|
|
|
@ -48,8 +48,8 @@ Copyright:
|
|||
value = new Number(value);
|
||||
var progress = value;
|
||||
var text = r.data['state'] + ' ' + value.toFixed(2) + '%'
|
||||
var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]) - 8;
|
||||
return Deluge.progressBar(value, width, text);
|
||||
//var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]) - 8;
|
||||
return Deluge.progressBar(value, this.width - 8, text);
|
||||
}
|
||||
function seedsRenderer(value, p, r) {
|
||||
if (r.data['total_seeds'] > -1) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -309,7 +309,7 @@ class TopLevel(resource.Resource):
|
|||
]
|
||||
|
||||
__debug_scripts = [
|
||||
"/js/ext-base.js",
|
||||
"/js/ext-base-debug.js",
|
||||
"/js/ext-all-debug.js",
|
||||
"/js/ext-extensions-debug.js",
|
||||
"/config.js",
|
||||
|
|
Loading…
Reference in New Issue