[WebUI] Cleanup stray whitespace

This commit is contained in:
Calum Lind 2015-08-20 19:23:26 +01:00
commit 5c05d3d7ea
9 changed files with 36 additions and 36 deletions

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.EventsManager.js * Deluge.EventsManager.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
@ -42,7 +42,7 @@ Deluge.EventsManager = Ext.extend(Ext.util.Observable, {
this.on('login', this.onLogin, this); this.on('login', this.onLogin, this);
Deluge.EventsManager.superclass.constructor.call(this); Deluge.EventsManager.superclass.constructor.call(this);
}, },
/** /**
* Append an event handler to this object. * Append an event handler to this object.
*/ */
@ -116,14 +116,14 @@ Deluge.EventsManager = Ext.extend(Ext.util.Observable, {
/** /**
* Appends an event handler to this object (shorthand for {@link #addListener}) * Appends an event handler to this object (shorthand for {@link #addListener})
* @method * @method
*/ */
Deluge.EventsManager.prototype.on = Deluge.EventsManager.prototype.addListener Deluge.EventsManager.prototype.on = Deluge.EventsManager.prototype.addListener
/** /**
* Fires the specified event with the passed parameters (minus the * Fires the specified event with the passed parameters (minus the
* event name). * event name).
* @method * @method
*/ */
Deluge.EventsManager.prototype.fire = Deluge.EventsManager.prototype.fireEvent Deluge.EventsManager.prototype.fire = Deluge.EventsManager.prototype.fireEvent
deluge.events = new Deluge.EventsManager(); deluge.events = new Deluge.EventsManager();

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.FileBrowser.js * Deluge.FileBrowser.js
* *
* Copyright (c) Damien Churchill 2010 <damoxc@gmail.com> * Copyright (c) Damien Churchill 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

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.MultiOptionsManager.js * Deluge.MultiOptionsManager.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.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
this.stored = {}; this.stored = {};
Deluge.MultiOptionsManager.superclass.constructor.call(this, config); Deluge.MultiOptionsManager.superclass.constructor.call(this, config);
}, },
/** /**
* Changes bound fields to use the specified id. * Changes bound fields to use the specified id.
* @param {String} id * @param {String} id
@ -70,7 +70,7 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
this.stored[this.currentId] = Ext.apply(this.stored[this.currentId], this.changed[this.currentId]); this.stored[this.currentId] = Ext.apply(this.stored[this.currentId], this.changed[this.currentId]);
this.reset(); this.reset();
}, },
/** /**
* Get the value for an option * Get the value for an option
* @param {String/Array} option A single option or an array of options to return. * @param {String/Array} option A single option or an array of options to return.
@ -164,15 +164,15 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
} else { } else {
var oldValue = this.getDefault(option); var oldValue = this.getDefault(option);
value = this.convertValueType(oldValue, value); value = this.convertValueType(oldValue, value);
// If the value is the same as the old value there is // If the value is the same as the old value there is
// no point in setting it again. // no point in setting it again.
if (oldValue == value) return; if (oldValue == value) return;
// Store the new default // Store the new default
if (!this.stored[this.currentId]) this.stored[this.currentId] = {}; if (!this.stored[this.currentId]) this.stored[this.currentId] = {};
this.stored[this.currentId][option] = value; this.stored[this.currentId][option] = value;
if (!this.isDirty(option)) { if (!this.isDirty(option)) {
this.fireEvent('changed', option, value, oldValue); this.fireEvent('changed', option, value, oldValue);
} }
@ -197,7 +197,7 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
var defaultValue = this.getDefault(option); var defaultValue = this.getDefault(option);
value = this.convertValueType(defaultValue, value); value = this.convertValueType(defaultValue, value);
var oldValue = this.get(option); var oldValue = this.get(option);
if (oldValue == value) return; if (oldValue == value) return;

View file

@ -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
@ -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();
} }

View file

@ -51,7 +51,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
initComponent: function() { initComponent: function() {
Deluge.add.FileWindow.superclass.initComponent.call(this); Deluge.add.FileWindow.superclass.initComponent.call(this);
this.addButton(_('Add'), this.onAddClick, this); this.addButton(_('Add'), this.onAddClick, this);
this.form = this.add({ this.form = this.add({
xtype: 'form', xtype: 'form',
baseCls: 'x-plain', baseCls: 'x-plain',
@ -72,7 +72,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
}] }]
}); });
}, },
// private // private
onAddClick: function(field, e) { onAddClick: function(field, e) {
if (this.form.getForm().isValid()) { if (this.form.getForm().isValid()) {
@ -89,7 +89,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
this.fireEvent('beforeadd', this.torrentId, name); this.fireEvent('beforeadd', this.torrentId, name);
} }
}, },
// private // private
onGotInfo: function(info, obj, response, request) { onGotInfo: function(info, obj, response, request) {
info['filename'] = request.options.filename; info['filename'] = request.options.filename;
@ -100,7 +100,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
onUploadFailure: function(form, action) { onUploadFailure: function(form, action) {
this.hide(); this.hide();
}, },
// private // private
onUploadSuccess: function(fp, upload) { onUploadSuccess: function(fp, upload) {
this.hide(); this.hide();

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.add.Infohash.js * Deluge.add.Infohash.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

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.add.Window.js * Deluge.add.Window.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

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.data.PeerRecord.js * Deluge.data.PeerRecord.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

View file

@ -1,6 +1,6 @@
/*! /*!
* Deluge.preferences.InstallPluginWindow.js * Deluge.preferences.InstallPluginWindow.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
@ -41,7 +41,7 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
layout: 'fit', layout: 'fit',
height: 115, height: 115,
width: 350, width: 350,
bodyStyle: 'padding: 10px 5px;', bodyStyle: 'padding: 10px 5px;',
buttonAlign: 'center', buttonAlign: 'center',
closeAction: 'hide', closeAction: 'hide',
@ -52,7 +52,7 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
initComponent: function() { initComponent: function() {
Deluge.add.FileWindow.superclass.initComponent.call(this); Deluge.add.FileWindow.superclass.initComponent.call(this);
this.addButton(_('Install'), this.onInstall, this); this.addButton(_('Install'), this.onInstall, this);
this.form = this.add({ this.form = this.add({
xtype: 'form', xtype: 'form',
baseCls: 'x-plain', baseCls: 'x-plain',
@ -78,7 +78,7 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
waitMsg: _('Uploading your plugin...'), waitMsg: _('Uploading your plugin...'),
success: this.onUploadSuccess, success: this.onUploadSuccess,
scope: this scope: this
}); });
}, },
onUploadPlugin: function(info, obj, response, request) { onUploadPlugin: function(info, obj, response, request) {