mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
[WebUI] Lint and minify
This commit is contained in:
parent
8ac65d77e0
commit
7223a51ba5
6 changed files with 2464 additions and 4077 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
/*!
|
/*!
|
||||||
* Deluge.Toolbar.js
|
* Deluge.Toolbar.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -43,7 +43,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
id: 'tbar-deluge-text',
|
id: 'tbar-deluge-text',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
text: _('Deluge'),
|
text: _('Deluge'),
|
||||||
iconCls: 'x-deluge-main-panel',
|
iconCls: 'x-deluge-main-panel'
|
||||||
}, new Ext.Toolbar.Separator(),
|
}, new Ext.Toolbar.Separator(),
|
||||||
{
|
{
|
||||||
id: 'create',
|
id: 'create',
|
||||||
|
@ -123,53 +123,53 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
connectedButtons: [
|
connectedButtons: [
|
||||||
'add', 'remove', 'pause', 'resume', 'up', 'down'
|
'add', 'remove', 'pause', 'resume', 'up', 'down'
|
||||||
],
|
],
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.Toolbar.superclass.initComponent.call(this);
|
Deluge.Toolbar.superclass.initComponent.call(this);
|
||||||
deluge.events.on('connect', this.onConnect, this);
|
deluge.events.on('connect', this.onConnect, this);
|
||||||
deluge.events.on('login', this.onLogin, this);
|
deluge.events.on('login', this.onLogin, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
onConnect: function() {
|
onConnect: function() {
|
||||||
Ext.each(this.connectedButtons, function(buttonId) {
|
Ext.each(this.connectedButtons, function(buttonId) {
|
||||||
this.items.get(buttonId).enable();
|
this.items.get(buttonId).enable();
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
onDisconnect: function() {
|
onDisconnect: function() {
|
||||||
Ext.each(this.connectedButtons, function(buttonId) {
|
Ext.each(this.connectedButtons, function(buttonId) {
|
||||||
this.items.get(buttonId).disable();
|
this.items.get(buttonId).disable();
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
onLogin: function() {
|
onLogin: function() {
|
||||||
this.items.get('logout').enable();
|
this.items.get('logout').enable();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLogout: function() {
|
onLogout: function() {
|
||||||
this.items.get('logout').disable();
|
this.items.get('logout').disable();
|
||||||
deluge.login.logout();
|
deluge.login.logout();
|
||||||
},
|
},
|
||||||
|
|
||||||
onConnectionManagerClick: function() {
|
onConnectionManagerClick: function() {
|
||||||
deluge.connectionManager.show();
|
deluge.connectionManager.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
onHelpClick: function() {
|
onHelpClick: function() {
|
||||||
window.open('http://dev.deluge-torrent.org/wiki/UserGuide');
|
window.open('http://dev.deluge-torrent.org/wiki/UserGuide');
|
||||||
},
|
},
|
||||||
|
|
||||||
onPreferencesClick: function() {
|
onPreferencesClick: function() {
|
||||||
deluge.preferences.show();
|
deluge.preferences.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
onTorrentAction: function(item) {
|
onTorrentAction: function(item) {
|
||||||
var selection = deluge.torrents.getSelections();
|
var selection = deluge.torrents.getSelections();
|
||||||
var ids = [];
|
var ids = [];
|
||||||
Ext.each(selection, function(record) {
|
Ext.each(selection, function(record) {
|
||||||
ids.push(record.id);
|
ids.push(record.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (item.id) {
|
switch (item.id) {
|
||||||
case 'remove':
|
case 'remove':
|
||||||
deluge.removeWindow.show(ids);
|
deluge.removeWindow.show(ids);
|
||||||
|
@ -192,7 +192,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onTorrentAdd: function() {
|
onTorrentAdd: function() {
|
||||||
deluge.add.show();
|
deluge.add.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ deluge.ui = {
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
items: [
|
items: [
|
||||||
deluge.details
|
deluge.details
|
||||||
],
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
this.MainPanel = new Ext.Panel({
|
this.MainPanel = new Ext.Panel({
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue