diff --git a/deluge/ui/web/docs/files.html b/deluge/ui/web/docs/files.html deleted file mode 100644 index 3443294c3..000000000 --- a/deluge/ui/web/docs/files.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - JsDoc Reference - File Index - - - - - - - - -
-
Class Index -| File Index
-
-

Classes

- -
-
- -
-

File Index

- - -
-

Deluge.Add.File.js

- -
- - - - -
-
-
- -
-

Deluge.Add.js

- -
- - - - -
-
-
- -
-

Deluge.Add.Url.js

- -
- - - - -
-
-
- -
-

Deluge.Client.js

- -
- - - - -
-
-
- -
-

Deluge.ConnectionManager.js

- -
- - - - -
-
-
- -
-

Deluge.Details.Details.js

- -
- - - - -
-
-
- -
-

Deluge.Details.Files.js

- -
- - - - -
-
-
- -
-

Deluge.Details.js

- -
- - - - -
-
-
- -
-

Deluge.Details.Options.js

- -
- - - - -
-
-
- -
-

Deluge.Details.Peers.js

- -
- - - - -
-
-
- -
-

Deluge.Details.Status.js

- -
- - - - -
-
-
- -
-

Deluge.EditTrackers.js

- -
- - - - -
-
-
- -
-

Deluge.Events.js

- -
- - - - -
-
-
- -
-

Deluge.Formatters.js

- -
- - - - -
-
-
- -
-

Deluge.js

- -
- - - - -
-
-
- -
-

Deluge.Keys.js

- -
- - - - -
-
-
- -
-

Deluge.Login.js

- -
- - - - -
-
-
- -
-

Deluge.Menus.js

- -
- - - - -
-
-
- -
-

Deluge.OptionsManager.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Bandwidth.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Daemon.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Downloads.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Interface.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Network.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Notification.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Other.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Plugins.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Proxy.js

- -
- - - - -
-
-
- -
-

Deluge.Preferences.Queue.js

- -
- - - - -
-
-
- -
-

Deluge.Sidebar.js

- -
- - - - -
-
-
- -
-

Deluge.Statusbar.js

- -
- - - - -
-
-
- -
-

Deluge.Toolbar.js

- -
- - - - -
-
-
- -
-

Deluge.Torrents.js

- -
- - - - -
-
-
- -
-

Deluge.UI.js

- -
- - - - -
-
-
- -
-

ext-extensions-debug.js

- -
- - - - -
-
-
- - -
-
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - \ No newline at end of file diff --git a/deluge/ui/web/docs/index.html b/deluge/ui/web/docs/index.html deleted file mode 100644 index 3fab6c1b4..000000000 --- a/deluge/ui/web/docs/index.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - JsDoc Reference - Index - - - - - - - - -
-
Class Index -| File Index
-
-

Classes

- -
-
- -
-

Class Index

- - -
-

_global_

- -
-
- -
-

Deluge.Events

- Deluge.Events -
-
- -
-

Deluge.Formatters

- Deluge.Formatters -
-
- -
-

Deluge.Keys

- Deluge.Keys -
-
- -
-

Deluge.OptionsManager

- Deluge -
-
- -
-

Deluge.UI

- Deluge -
-
- -
-

Ext.deluge.TorrentGrid

- Ext.deluge.TorrentGrid -
-
- -
-

Ext.ux.FullProgressBar

- Ext.deluge.ProgressBar -
-
- - -
-
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - \ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/Deluge.Events.html b/deluge/ui/web/docs/symbols/Deluge.Events.html deleted file mode 100644 index 3caec31c4..000000000 --- a/deluge/ui/web/docs/symbols/Deluge.Events.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - JsDoc Reference - Deluge.Events - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Namespace Deluge.Events -

- - -

- - - Deluge.Events - - -
Defined in: Deluge.Events.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
Class for holding global events that occur within the UI.
-
- - - - - - - - - - - - -
-
- Namespace Detail -
- -
- Deluge.Events -
- -
- Class for holding global events that occur within the UI. - -
- - - - - - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Deluge.Formatters.html b/deluge/ui/web/docs/symbols/Deluge.Formatters.html deleted file mode 100644 index ce8ef8af4..000000000 --- a/deluge/ui/web/docs/symbols/Deluge.Formatters.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - - - - JsDoc Reference - Deluge.Formatters - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Namespace Deluge.Formatters -

- - -

- - - Deluge.Formatters - - -
Defined in: Deluge.Formatters.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
A collection of functions for string formatting values.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
Deluge.Formatters.date(timestamp) -
-
Formats a date string in the locale's date representation based on the -systems timezone.
-
<static>   -
Deluge.Formatters.plain(value,) -
-
Simply returns the value untouched, for when no formatting is required.
-
<static>   -
Deluge.Formatters.size(bytes) -
-
Formats the bytes value into a string with KiB, MiB or GiB units.
-
<static>   -
Deluge.Formatters.speed(bytes) -
-
Formats a string to display a transfer speed utilizing Deluge.Formatters.size
-
<static>   -
Deluge.Formatters.timeRemaining(time) -
-
Formats a string to show time in a human readable form.
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- Deluge.Formatters -
- -
- A collection of functions for string formatting values. - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - {string} - Deluge.Formatters.date(timestamp) - -
-
- Formats a date string in the locale's date representation based on the -systems timezone. - - -
- - - - -
-
Parameters:
- -
- {number} timestamp - -
-
time in seconds since the Epoch
- -
- - - - - -
-
Returns:
- -
{string} a string in the locale's date representation or "" -if seconds < 0
- -
- - - - -
- - -
<static> - - - Deluge.Formatters.plain(value,) - -
-
- Simply returns the value untouched, for when no formatting is required. - - -
- - - - -
-
Parameters:
- -
- value, - -
-
the value to be displayed
- -
- - - - - -
-
Returns:
- -
the untouched value.
- -
- - - - -
- - -
<static> - - {string} - Deluge.Formatters.size(bytes) - -
-
- Formats the bytes value into a string with KiB, MiB or GiB units. - - -
- - - - -
-
Parameters:
- -
- {number} bytes - -
-
the filesize in bytes
- -
- - - - - -
-
Returns:
- -
{string} formatted string with KiB, MiB or GiB units.
- -
- - - - -
- - -
<static> - - {string} - Deluge.Formatters.speed(bytes) - -
-
- Formats a string to display a transfer speed utilizing Deluge.Formatters.size - - -
- - - - -
-
Parameters:
- -
- {number} bytes - -
-
the filesize in bytes
- -
- - - - - -
-
Returns:
- -
{string} formatted string with KiB, MiB or GiB units.
- -
- - - - -
- - -
<static> - - {string} - Deluge.Formatters.timeRemaining(time) - -
-
- Formats a string to show time in a human readable form. - - -
- - - - -
-
Parameters:
- -
- {number} time - -
-
the number of seconds
- -
- - - - - -
-
Returns:
- -
{string} a formatted time string. will return '' if seconds == 0
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Deluge.Keys.html b/deluge/ui/web/docs/symbols/Deluge.Keys.html deleted file mode 100644 index a47681426..000000000 --- a/deluge/ui/web/docs/symbols/Deluge.Keys.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - JsDoc Reference - Deluge.Keys - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Namespace Deluge.Keys -

- - -

- - - Deluge.Keys - - -
Defined in: Deluge.Keys.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
The torrent status keys that are commonly used around the UI.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- Deluge.Keys.Details -
-
Keys used in the details tab of the statistics panel.
-
<static>   -
- Deluge.Keys.Files -
-
Keys used in the files tab of the statistics panel.
-
<static>   -
- Deluge.Keys.Grid -
-
-
<static>   -
- Deluge.Keys.Options -
-
Keys used in the options tab of the statistics panel.
-
<static>   -
- Deluge.Keys.Peers -
-
Keys used in the peers tab of the statistics panel.
-
<static>   -
- Deluge.Keys.Status -
-
Keys used in the status tab of the statistics panel.
-
- - - - - - - - - - - - -
-
- Namespace Detail -
- -
- Deluge.Keys -
- -
- The torrent status keys that are commonly used around the UI. - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - Deluge.Keys.Details - -
-
- Keys used in the details tab of the statistics panel. - - -
- - - - - - - - -
- - -
<static> - - - Deluge.Keys.Files - -
-
- Keys used in the files tab of the statistics panel. -
['files', 'file_progress', 'file_priorities']
- - -
- - - - - - - - -
- - -
<static> - - - Deluge.Keys.Grid - -
-
- - - -
- - - - - - - - -
- - -
<static> - - - Deluge.Keys.Options - -
-
- Keys used in the options tab of the statistics panel. -
['max_download_speed', 'max_upload_speed', 'max_connections', 'max_upload_slots',
- 'is_auto_managed', 'stop_at_ratio', 'stop_ratio', 'remove_at_ratio', 'private',
- 'prioritize_first_last']
- - -
- - - - - - - - -
- - -
<static> - - - Deluge.Keys.Peers - -
-
- Keys used in the peers tab of the statistics panel. -
['peers', 'seed']
- - -
- - - - - - - - -
- - -
<static> - - - Deluge.Keys.Status - -
-
- Keys used in the status tab of the statistics panel. -These get extended -by Deluge.Keys.Grid. - - -
- - - - - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Deluge.OptionsManager.html b/deluge/ui/web/docs/symbols/Deluge.OptionsManager.html deleted file mode 100644 index a24b10c58..000000000 --- a/deluge/ui/web/docs/symbols/Deluge.OptionsManager.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - JsDoc Reference - Deluge.OptionsManager - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Namespace Deluge.OptionsManager -

- - -

- - - Deluge - - -
Defined in: Deluge.OptionsManager.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
A class that can be used to manage options throughout the ui.
-
- - - - - - - - - - - - -
-
- Namespace Detail -
- -
- Deluge.OptionsManager -
- -
- A class that can be used to manage options throughout the ui. - -
- - - - - - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Deluge.UI.html b/deluge/ui/web/docs/symbols/Deluge.UI.html deleted file mode 100644 index 6fbb60008..000000000 --- a/deluge/ui/web/docs/symbols/Deluge.UI.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - - JsDoc Reference - Deluge.UI - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Namespace Deluge.UI -

- - -

- - - Deluge - - -
Defined in: Deluge.UI.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  -
- Deluge.UI -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
Deluge.UI.initialize() -
-
Create all the interface components, the json-rpc client -and set up various events that the UI will utilise.
-
<static>   -
Deluge.UI.onConnectedCheck(connected) -
-
-
<static>   -
Deluge.UI.onUpdateError(error) -
-
-
<static>   -
Deluge.UI.stop() -
-
-
<static>   -
Deluge.UI.update() -
-
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- Deluge.UI -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - Deluge.UI.initialize() - -
-
- Create all the interface components, the json-rpc client -and set up various events that the UI will utilise. - - -
- - - - - - - - - - - -
- - -
<static> - - - Deluge.UI.onConnectedCheck(connected) - -
-
- - - -
- - - - -
-
Parameters:
- -
- connected - -
-
- -
- - - - - - - - -
- - -
<static> - - - Deluge.UI.onUpdateError(error) - -
-
- - - -
- - - - -
-
Parameters:
- -
- error - -
-
- -
- - - - - - - - -
- - -
<static> - - - Deluge.UI.stop() - -
-
- - - -
- - - - - - - - - - - -
- - -
<static> - - - Deluge.UI.update() - -
-
- - - -
- - - - - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Ext.deluge.TorrentGrid.html b/deluge/ui/web/docs/symbols/Ext.deluge.TorrentGrid.html deleted file mode 100644 index 39a348341..000000000 --- a/deluge/ui/web/docs/symbols/Ext.deluge.TorrentGrid.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - JsDoc Reference - Ext.deluge.TorrentGrid - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Class Ext.deluge.TorrentGrid -

- - -

-
Extends - Ext.grid.GridPanel.
- - - Ext.deluge.TorrentGrid - - -
Defined in: Deluge.Torrents.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
Ext.deluge.TorrentGrid Class
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- Ext.deluge.TorrentGrid(config) -
- -
- Ext.deluge.TorrentGrid Class -
Author: Damien Churchill . -
- - - - - -
-
Parameters:
- -
- {Object} config - -
-
Configuration options
- -
- - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/Ext.ux.FullProgressBar.html b/deluge/ui/web/docs/symbols/Ext.ux.FullProgressBar.html deleted file mode 100644 index 567797cad..000000000 --- a/deluge/ui/web/docs/symbols/Ext.ux.FullProgressBar.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - JsDoc Reference - Ext.ux.FullProgressBar - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Class Ext.ux.FullProgressBar -

- - -

-
Extends - Ext.ProgressBar.
- - - Ext.deluge.ProgressBar - - -
Defined in: ext-extensions-debug.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
Ext.ux.FullProgressBar Class
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- Ext.ux.FullProgressBar(config) -
- -
- Ext.ux.FullProgressBar Class -
Author: Damien Churchill . -
- - - - - -
-
Parameters:
- -
- {Object} config - -
-
Configuration options
- -
- - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/_global_.html b/deluge/ui/web/docs/symbols/_global_.html deleted file mode 100644 index 640ed6ca2..000000000 --- a/deluge/ui/web/docs/symbols/_global_.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - JsDoc Reference - _global_ - - - - - - - - - - - -
- -
Class Index -| File Index
-
-

Classes

- -
- -
- -
- -

- - Built-In Namespace _global_ -

- - -

- - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- autoSize -
-
-
  - -
-
  - -
-
  - -
-
  -
- readOnly -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
-
  - -
-
  - -
-
  - -
-
  - -
-
  -
onLimitChanged(item, checked) -
-
-
  -
onResize(w, h) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
Event Summary
Event AttributesEvent Name and Description
  -
onRender(this, value) -
-
-
- - - - - - - - - - -
- Field Detail -
- - -
- - - autoSize - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - -
- - -
- - - buttonOffset - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - -
- - -
- - - buttonOnly - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - -
- - -
- - - buttonText - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - -
- - -
- - - readOnly - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - alignErrorIcon() - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - -
- - -
- - - getFileInputId() - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - -
- - -
- - - getPositionEl() - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - -
- - -
- - - getResizeEl() - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - -
- - -
- - - initComponent() - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - - - - - - - - -
- - -
- - - onLimitChanged(item, checked) - -
-
- - -
- Defined in: Deluge.Menus.js. - - -
- - - - -
-
Parameters:
- -
- item - -
-
- -
- checked - -
-
- -
- - - - - - - - -
- - -
- - - onResize(w, h) - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - -
-
Parameters:
- -
- w - -
-
- -
- h - -
-
- -
- - - - - - - - - - - - - - -
- Event Detail -
- - -
- - - onRender(this, value) - -
-
- - -
- Defined in: ext-extensions-debug.js. - - -
- - - - -
-
Parameters:
- -
- {Ext.form.FileUploadField} this - -
-
- -
- {String} value - -
-
The file value returned by the underlying file input field
- -
- - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.1.0 on Mon Jul 13 2009 00:34:03 GMT+0100 (BST) -
- - diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Add.File.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Add.File.js.html deleted file mode 100644 index e9cc46550..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Add.File.js.html +++ /dev/null @@ -1,113 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Add.File.js
-  3     Contains the Add Torrent by file window.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
- 36 	constructor: function(config) {
- 37 		config = Ext.apply({
- 38 			layout: 'fit',
- 39 			width: 350,
- 40 			height: 115,
- 41 			bodyStyle: 'padding: 10px 5px;',
- 42 			buttonAlign: 'center',
- 43 			closeAction: 'hide',
- 44 			modal: true,
- 45 			plain: true,
- 46 			title: _('Add from File'),
- 47 			iconCls: 'x-deluge-add-file',
- 48 			buttons: [{
- 49 				text: _('Add'),
- 50 				handler: this.onAdd,
- 51 				scope: this
- 52 			}]
- 53 		}, config);
- 54 		Ext.deluge.add.UrlWindow.superclass.constructor.call(this, config);
- 55 	},
- 56 	
- 57 	initComponent: function() {
- 58 		Ext.deluge.add.UrlWindow.superclass.initComponent.call(this);
- 59 		this.form = this.add(new Ext.form.FormPanel({
- 60 			baseCls: 'x-plain',
- 61 			labelWidth: 55,
- 62 			autoHeight: true,
- 63 			fileUpload: true,
- 64 			items: [{
- 65 				xtype: 'fileuploadfield',
- 66 				id: 'torrentFile',
- 67 				emptyText: _('Select a torrent'),
- 68 				fieldLabel: _('File'),
- 69 				name: 'file',
- 70 				buttonCfg: {
- 71 					text: _('Browse') + '...'
- 72 				}
- 73 			}]
- 74 		}));
- 75 	},
- 76 	
- 77 	onAdd: function(field, e) {
- 78 		if (this.form.getForm().isValid()) {
- 79 			this.torrentId = this.createTorrentId();
- 80 			this.form.getForm().submit({
- 81 				url: '/upload',
- 82 				waitMsg: _('Uploading your torrent...'),
- 83 				success: this.onUploadSuccess,
- 84 				scope: this
- 85 			});
- 86 			var name = this.form.getForm().findField('torrentFile').value;
- 87 			this.fireEvent('beforeadd', this.torrentId, name);
- 88 		}
- 89 	},
- 90 	
- 91 	onGotInfo: function(info, obj, response, request) {
- 92 		info['filename'] = request.options.filename;
- 93 		this.fireEvent('add', this.torrentId, info);
- 94 	},
- 95 	
- 96 	onUploadSuccess: function(fp, upload) {
- 97 		this.hide();
- 98 		var filename = upload.result.toString();
- 99 		this.form.getForm().findField('torrentFile').setValue('');
-100 		Deluge.Client.web.get_torrent_info(filename, {
-101 			success: this.onGotInfo,
-102 			scope: this,
-103 			filename: filename
-104 		});
-105 	}
-106 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Add.Url.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Add.Url.js.html deleted file mode 100644 index 91b11cb55..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Add.Url.js.html +++ /dev/null @@ -1,116 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Add.Url.js
-  3     Contains the Add Torrent by url window.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Ext.deluge.add.UrlWindow = Ext.extend(Ext.deluge.add.Window, {
- 36 	constructor: function(config) {
- 37 		config = Ext.apply({
- 38 			layout: 'fit',
- 39 			width: 350,
- 40 			height: 115,
- 41 			bodyStyle: 'padding: 10px 5px;',
- 42 			buttonAlign: 'center',
- 43 			closeAction: 'hide',
- 44 			modal: true,
- 45 			plain: true,
- 46 			title: _('Add from Url'),
- 47 			iconCls: 'x-deluge-add-url-window-icon',
- 48 			buttons: [{
- 49 				text: _('Add'),
- 50 				handler: this.onAdd,
- 51 				scope: this
- 52 			}]
- 53 		}, config);
- 54 		Ext.deluge.add.UrlWindow.superclass.constructor.call(this, config);
- 55 	},
- 56 	
- 57 	initComponent: function() {
- 58 		Ext.deluge.add.UrlWindow.superclass.initComponent.call(this);
- 59 		this.form = this.add(new Ext.form.FormPanel({
- 60 			defaultType: 'textfield',
- 61 			baseCls: 'x-plain',
- 62 			labelWidth: 55,
- 63 			items: [{
- 64 				fieldLabel: _('Url'),
- 65 				id: 'url',
- 66 				name: 'url',
- 67 				inputType: 'url',
- 68 				anchor: '100%',
- 69 				listeners: {
- 70 					'specialkey': {
- 71 						fn: this.onAdd,
- 72 						scope: this
- 73 					}
- 74 				}
- 75 			}]
- 76 		}));
- 77 	},
- 78 	
- 79 	onAdd: function(field, e) {
- 80 		if (field.id == 'url' && e.getKey() != e.ENTER) return;
- 81 
- 82 		var field = this.form.items.get('url');
- 83 		var url = field.getValue();
- 84 		var torrentId = this.createTorrentId();
- 85 		
- 86 		Deluge.Client.web.download_torrent_from_url(url, {
- 87 			success: this.onDownload,
- 88 			scope: this,
- 89 			torrentId: torrentId
- 90 		});
- 91 		this.hide();
- 92 		this.fireEvent('beforeadd', torrentId, url);
- 93 	},
- 94 	
- 95 	onDownload: function(filename, obj, resp, req) {
- 96 		this.form.items.get('url').setValue('');
- 97 		Deluge.Client.web.get_torrent_info(filename, {
- 98 			success: this.onGotInfo,
- 99 			scope: this,
-100 			filename: filename,
-101 			torrentId: req.options.torrentId
-102 		});
-103 	},
-104 	
-105 	onGotInfo: function(info, obj, response, request) {
-106 		info['filename'] = request.options.filename;
-107 		this.fireEvent('add', request.options.torrentId, info);
-108 	}
-109 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Add.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Add.js.html deleted file mode 100644 index b912b7ea5..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Add.js.html +++ /dev/null @@ -1,555 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Add.js
-  3     Contains the Add Torrent window.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Ext.namespace('Ext.deluge.add');
- 36 Ext.deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, {
- 37 	
- 38 	torrents: {},
- 39 
- 40 	constructor: function(config) {
- 41 		config = Ext.apply({
- 42 			region: 'south',
- 43 			margins: '5 5 5 5',
- 44 			activeTab: 0,
- 45 			height: 220
- 46 		}, config);
- 47 		Ext.deluge.add.OptionsPanel.superclass.constructor.call(this, config);
- 48 	},
- 49 	
- 50 	initComponent: function() {
- 51 		Ext.deluge.add.OptionsPanel.superclass.initComponent.call(this);
- 52 		this.files = this.add(new Ext.tree.ColumnTree({
- 53 			layout: 'fit',
- 54 			title: _('Files'),
- 55 			rootVisible: false,
- 56 			autoScroll: true,
- 57 			height: 170,
- 58 			border: false,
- 59 			animate: false,
- 60 			
- 61 			columns: [{
- 62 				header: _('Filename'),
- 63 				width: 275,
- 64 				dataIndex: 'filename'
- 65 			},{
- 66 				header: _('Size'),
- 67 				width: 80,
- 68 				dataIndex: 'size'
- 69 			}],
- 70 			
- 71 			root: new Ext.tree.AsyncTreeNode({
- 72 				text: 'Files'
- 73 			})
- 74 		}));
- 75 		new Ext.tree.TreeSorter(this.files, {
- 76 			folderSort: true
- 77 		});
- 78 		
- 79 		this.optionsManager = new Deluge.OptionsManager({
- 80 			defaults: {
- 81 				'add_paused': false,
- 82 				'compact_allocation': false,
- 83 				'download_location': '',
- 84 				'max_connections_per_torrent': -1,
- 85 				'max_download_speed_per_torrent': -1,
- 86 				'max_upload_slots_per_torrent': -1,
- 87 				'max_upload_speed_per_torrent': -1,
- 88 				'prioritize_first_last_pieces': false,
- 89 				'file_priorities': []
- 90 			}
- 91 		});
- 92 		
- 93 		this.form = this.add({
- 94 			xtype: 'form',
- 95 			labelWidth: 1,
- 96 			title: _('Options'),
- 97 			bodyStyle: 'padding: 5px;',
- 98 			border: false,
- 99 			height: 170
-100 		});
-101 		
-102 		var fieldset = this.form.add({
-103 			xtype: 'fieldset',
-104 			title: _('Download Location'),
-105 			border: false,
-106 			autoHeight: true,
-107 			defaultType: 'textfield',
-108 			labelWidth: 1,
-109 			fieldLabel: ''
-110 		});
-111 		this.optionsManager.bind('download_location', fieldset.add({
-112 			fieldLabel: '',
-113 			name: 'download_location',
-114 			width: 400,
-115 			labelSeparator: ''
-116 		}));
-117 		
-118 		var panel = this.form.add({
-119 			border: false,
-120 			layout: 'column',
-121 			defaultType: 'fieldset'
-122 		});
-123 		fieldset = panel.add({
-124 			title: _('Allocation'),
-125 			border: false,
-126 			autoHeight: true,
-127 			defaultType: 'radio',
-128 			width: 100
-129 		});
-130 
-131 		this.optionsManager.bind('compact_allocation', fieldset.add({
-132 			xtype: 'radiogroup',
-133 			columns: 1,
-134 			vertical: true,
-135 			labelSeparator: '',
-136 			items: [{
-137 				name: 'compact_allocation',
-138 				value: false,
-139 				inputValue: false,
-140 				boxLabel: _('Full'),
-141 				fieldLabel: '',
-142 				labelSeparator: ''
-143 			}, {
-144 				name: 'compact_allocation',
-145 				value: true,
-146 				inputValue: true,
-147 				boxLabel: _('Compact'),
-148 				fieldLabel: '',
-149 				labelSeparator: '',
-150 			}]
-151 		}));
-152 		
-153 		fieldset = panel.add({
-154 			title: _('Bandwidth'),
-155 			border: false,
-156 			autoHeight: true,
-157 			labelWidth: 100,
-158 			width: 200,
-159 			defaultType: 'uxspinner'
-160 		});
-161 		this.optionsManager.bind('max_download_speed_per_torrent', fieldset.add({
-162 			fieldLabel: _('Max Down Speed'),
-163 			/*labelStyle: 'margin-left: 10px',*/
-164 			name: 'max_download_speed_per_torrent',
-165 			width: 60
-166 		}));
-167 		this.optionsManager.bind('max_upload_speed_per_torrent', fieldset.add({
-168 			fieldLabel: _('Max Up Speed'),
-169 			/*labelStyle: 'margin-left: 10px',*/
-170 			name: 'max_upload_speed_per_torrent',
-171 			width: 60
-172 		}));
-173 		this.optionsManager.bind('max_connections_per_torrent', fieldset.add({
-174 			fieldLabel: _('Max Connections'),
-175 			/*labelStyle: 'margin-left: 10px',*/
-176 			name: 'max_connections_per_torrent',
-177 			width: 60
-178 		}));
-179 		this.optionsManager.bind('max_upload_slots_per_torrent', fieldset.add({
-180 			fieldLabel: _('Max Upload Slots'),
-181 			/*labelStyle: 'margin-left: 10px',*/
-182 			name: 'max_upload_slots_per_torrent',
-183 			width: 60
-184 		}));
-185 		
-186 		fieldset = panel.add({
-187 			title: _('General'),
-188 			border: false,
-189 			autoHeight: true,
-190 			defaultType: 'checkbox'
-191 		});
-192 		this.optionsManager.bind('add_paused', fieldset.add({
-193 			name: 'add_paused',
-194 			boxLabel: _('Add In Paused State'),
-195 			fieldLabel: '',
-196 			labelSeparator: '',
-197 		}));
-198 		this.optionsManager.bind('prioritize_first_last_pieces', fieldset.add({
-199 			name: 'prioritize_first_last_pieces',
-200 			boxLabel: _('Prioritize First/Last Pieces'),
-201 			fieldLabel: '',
-202 			labelSeparator: '',
-203 		}));
-204 		
-205 		this.form.on('render', this.onFormRender, this);
-206 		this.form.disable();
-207 	},
-208 	
-209 	onFormRender: function(form) {
-210 		form.layout = new Ext.layout.FormLayout();
-211 		form.layout.setContainer(form);
-212 		form.doLayout();
-213 		
-214 		this.optionsManager.changeId(null);
-215 	},
-216 	
-217 	addTorrent: function(torrent) {
-218 		this.torrents[torrent['info_hash']] = torrent;
-219 		var fileIndexes = {};
-220 		this.walkFileTree(torrent['files_tree'], function(filename, type, entry, parent) {
-221 			if (type != 'file') return;
-222 			fileIndexes[entry[0]] = entry[2];
-223 		}, this);
-224 		
-225 		var priorities = [];
-226 		Ext.each(Ext.keys(fileIndexes), function(index) {
-227 			priorities[index] = fileIndexes[index];
-228 		});
-229 		this.optionsManager.set(torrent['info_hash'], 'file_priorities', priorities);
-230 	},
-231 	
-232 	clear: function() {
-233 		this.clearFiles();
-234 	},
-235 	
-236 	clearFiles: function() {
-237 		var root = this.files.getRootNode();
-238 		if (!root.hasChildNodes()) return;
-239 		root.cascade(function(node) {
-240 			if (!node.parentNode || !node.getOwnerTree()) return;
-241 			node.remove();
-242 		});
-243 	},
-244 	
-245 	getDefaults: function() {
-246 		var keys = ['add_paused','compact_allocation','download_location',
-247 		'max_connections_per_torrent','max_download_speed_per_torrent',
-248 		'max_upload_slots_per_torrent','max_upload_speed_per_torrent',
-249 		'prioritize_first_last_pieces'];
-250 		
-251 		Deluge.Client.core.get_config_values(keys, {
-252 			success: function(config) {
-253 				config['file_priorities'] = [];
-254 				this.optionsManager.defaults = config;
-255 			},
-256 			scope: this
-257 		});
-258 	},
-259 	
-260 	getFilename: function(torrentId) {
-261 		return this.torrents[torrentId]['filename'];
-262 	},
-263 	
-264 	getOptions: function(torrentId) {
-265 		var options = this.optionsManager.get(torrentId);
-266 		Ext.each(options['file_priorities'], function(priority, index) {
-267 			options['file_priorities'][index] = (priority) ? 1 : 0;
-268 		});
-269 		return options;
-270 	},
-271 	
-272 	setTorrent: function(torrentId) {
-273 		this.torrentId = torrentId;
-274 		this.optionsManager.changeId(torrentId);
-275 		
-276 		this.clearFiles();
-277 		var root = this.files.getRootNode();
-278 		var priorities = this.optionsManager.get(this.torrentId, 'file_priorities');
-279 		
-280 		this.walkFileTree(this.torrents[torrentId]['files_tree'], function(filename, type, entry, parent) {
-281 			if (type == 'dir') {
-282 				var folder = new Ext.tree.TreeNode({
-283 					text: filename,
-284 					checked: true
-285 				});
-286 				folder.on('checkchange', this.onFolderCheck, this);
-287 				parent.appendChild(folder);
-288 				return folder;
-289 			} else {
-290 				var node = new Ext.tree.TreeNode({
-291 					filename: filename,
-292 					fileindex: entry[0],
-293 					text: filename, // this needs to be here for sorting reasons
-294 					size: fsize(entry[1]),
-295 					leaf: true,
-296 					checked: priorities[entry[0]],
-297 					iconCls: 'x-deluge-file',
-298 					uiProvider: Ext.tree.ColumnNodeUI
-299 				});
-300 				node.on('checkchange', this.onNodeCheck, this);
-301 				parent.appendChild(node);
-302 			}
-303 		}, this, root);
-304 		root.firstChild.expand();
-305 	},
-306 	
-307 	walkFileTree: function(files, callback, scope, parent) {
-308 		for (var filename in files) {
-309 			var entry = files[filename];
-310 			var type = (Ext.type(entry) == 'object') ? 'dir' : 'file';
-311 			
-312 			if (scope) {
-313 				var ret = callback.apply(scope, [filename, type, entry, parent]);
-314 			} else {
-315 				var ret = callback(filename, type, entry, parent);
-316 			}
-317 			
-318 			if (type == 'dir') this.walkFileTree(entry, callback, scope, ret);
-319 		}
-320 	},
-321 	
-322 	onFolderCheck: function(node, checked) {
-323 		var priorities = this.optionsManager.get(this.torrentId, 'file_priorities');
-324 		node.cascade(function(child) {
-325 			if (!child.ui.checkbox) {
-326 				child.attributes.checked = checked;
-327 			} else {
-328 				child.ui.checkbox.checked = checked;
-329 			}
-330 			priorities[child.attributes.fileindex] = checked;
-331 		}, this);
-332 		this.optionsManager.update(this.torrentId, 'file_priorities', priorities);
-333 	},
-334 	
-335 	onNodeCheck: function(node, checked) {
-336 		var priorities = this.optionsManager.get(this.torrentId, 'file_priorities');
-337 		priorities[node.attributes.fileindex] = checked;
-338 		this.optionsManager.update(this.torrentId, 'file_priorities', priorities);
-339 	}
-340 });
-341 
-342 Ext.deluge.add.Window = Ext.extend(Ext.Window, {
-343 	initComponent: function() {
-344 		Ext.deluge.add.Window.superclass.initComponent.call(this);
-345 		this.addEvents(
-346 			'beforeadd',
-347 			'add'
-348 		);
-349 	},
-350 	
-351 	createTorrentId: function() {
-352 		return new Date().getTime();
-353 	}
-354 });
-355 
-356 Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
-357 	
-358 	constructor: function(config) {
-359 		config = Ext.apply({
-360 			title: _('Add Torrents'),
-361 			layout: 'border',
-362 			width: 470,
-363 			height: 450,
-364 			bodyStyle: 'padding: 10px 5px;',
-365 			buttonAlign: 'right',
-366 			closeAction: 'hide',
-367 			closable: true,
-368 			plain: true,
-369 			iconCls: 'x-deluge-add-window-icon'
-370 		}, config);
-371 		Ext.deluge.add.AddWindow.superclass.constructor.call(this, config);
-372 	},
-373 	
-374 	initComponent: function() {
-375 		Ext.deluge.add.AddWindow.superclass.initComponent.call(this);
-376 		
-377 		this.addButton(_('Cancel'), this.onCancel, this);
-378 		this.addButton(_('Add'), this.onAdd, this);
-379 		
-380 		function torrentRenderer(value, p, r) {
-381 			if (r.data['info_hash']) {
-382 				return String.format('<div class="x-deluge-add-torrent-name">{0}</div>', value);
-383 			} else {
-384 				return String.format('<div class="x-deluge-add-torrent-name-loading">{0}</div>', value);
-385 			}
-386 		}
-387 		
-388 		this.grid = this.add({
-389 			xtype: 'grid',
-390 			region: 'center',
-391 			store: new Ext.data.SimpleStore({
-392 				fields: [
-393 					{name: 'info_hash', mapping: 1},
-394 					{name: 'text', mapping: 2}
-395 				],
-396 				id: 0
-397 			}),
-398 			columns: [{
-399 					id: 'torrent',
-400 					width: 150,
-401 					sortable: true,
-402 					renderer: torrentRenderer,
-403 					dataIndex: 'text'
-404 			}],	
-405 			stripeRows: true,
-406 			selModel: new Ext.grid.RowSelectionModel({
-407 				singleSelect: true,
-408 				listeners: {
-409 					'rowselect': {
-410 						fn: this.onSelect,
-411 						scope: this
-412 					}
-413 				}
-414 			}),
-415 			hideHeaders: true,
-416 			autoExpandColumn: 'torrent',
-417 			deferredRender: false,
-418 			autoScroll: true,
-419 			margins: '5 5 5 5',
-420 			bbar: new Ext.Toolbar({
-421 				items: [{
-422 					id: 'file',
-423 					cls: 'x-btn-text-icon',
-424 					iconCls: 'x-deluge-add-file',
-425 					text: _('File'),
-426 					handler: this.onFile,
-427 					scope: this
-428 				}, {
-429 					id: 'url',
-430 					cls: 'x-btn-text-icon',
-431 					text: _('Url'),
-432 					icon: '/icons/add_url.png',
-433 					handler: this.onUrl,
-434 					scope: this
-435 				}, {
-436 					id: 'infohash',
-437 					cls: 'x-btn-text-icon',
-438 					text: _('Infohash'),
-439 					icon: '/icons/add_magnet.png',
-440 					disabled: true
-441 				}, '->', {
-442 					id: 'remove',
-443 					cls: 'x-btn-text-icon',
-444 					text: _('Remove'),
-445 					icon: '/icons/remove.png',
-446 					handler: this.onRemove,
-447 					scope: this
-448 				}]
-449 			})
-450 		});
-451 		
-452 		this.optionsPanel = this.add(new Ext.deluge.add.OptionsPanel());
-453 		this.on('show', this.onShow, this);
-454 	},
-455 	
-456 	clear: function() {
-457 		this.torrents = {};
-458 		this.grid.getStore().removeAll();
-459 	},
-460 	
-461 	onAdd: function() {
-462 		var torrents = [];
-463 		this.grid.getStore().each(function(r) {
-464 			var id = r.get('info_hash');
-465 			torrents.push({
-466 				path: this.optionsPanel.getFilename(id),
-467 				options: this.optionsPanel.getOptions(id)
-468 			});
-469 		}, this);
-470 
-471 		Deluge.Client.web.add_torrents(torrents, {
-472 			success: function(result) {
-473 			}
-474 		})
-475 		this.clear();
-476 		this.hide();
-477 	},
-478 	
-479 	onCancel: function() {
-480 		this.clear();
-481 		this.hide();
-482 	},
-483 	
-484 	onFile: function() {
-485 		this.file.show();
-486 	},
-487 	
-488 	onRemove: function() {
-489 		var selection = this.grid.getSelectionModel();
-490 		if (!selection.hasSelection()) return;
-491 		var torrent = selection.getSelected();
-492 		
-493 		delete this.torrents[torrent.id];
-494 		this.grid.getStore().remove(torrent);
-495 		this.options.clear();
-496 	},
-497 	
-498 	onSelect: function(selModel, rowIndex, record) {
-499 		this.optionsPanel.setTorrent(record.get('info_hash'));
-500 	},
-501 	
-502 	onShow: function() {
-503 		if (!this.url) {
-504 			this.url = new Ext.deluge.add.UrlWindow();
-505 			this.url.on('beforeadd', this.onTorrentBeforeAdd, this);
-506 			this.url.on('add', this.onTorrentAdd, this);
-507 		}
-508 		
-509 		if (!this.file) {
-510 			this.file = new Ext.deluge.add.FileWindow();
-511 			this.file.on('beforeadd', this.onTorrentBeforeAdd, this);
-512 			this.file.on('add', this.onTorrentAdd, this);
-513 		}
-514 		
-515 		this.optionsPanel.getDefaults();
-516 	},
-517 	
-518 	onTorrentBeforeAdd: function(torrentId, text) {
-519 		var store = this.grid.getStore();
-520 		store.loadData([[torrentId, null, text]], true);
-521 	},
-522 	
-523 	onTorrentAdd: function(torrentId, info) {
-524 		if (!info) {
-525 			Ext.MessageBox.show({
-526 				title: _('Error'),
-527 				msg: _('Not a valid torrent'),
-528 				buttons: Ext.MessageBox.OK,
-529 				modal: false,
-530 				icon: Ext.MessageBox.ERROR,
-531 				iconCls: 'x-deluge-icon-error'
-532 			});
-533 			return;
-534 		}
-535 		
-536 		var r = this.grid.getStore().getById(torrentId);
-537 		r.set('info_hash', info['info_hash']);
-538 		r.set('text', info['name']);
-539 		this.grid.getStore().commitChanges();
-540 		this.optionsPanel.addTorrent(info);
-541 	},
-542 	
-543 	onUrl: function(button, event) {
-544 		this.url.show();
-545 	}
-546 });
-547 Deluge.Add = new Ext.deluge.add.AddWindow();
-548 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Client.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Client.js.html deleted file mode 100644 index 1ab70606b..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Client.js.html +++ /dev/null @@ -1,191 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Client.js
-  3     A JSON-RPC proxy built on top of ext-core.
-  4 
-  5 Copyright:
-  6     (C) Damien Churchill 2009 <damoxc@gmail.com>
-  7     This program is free software; you can redistribute it and/or modify
-  8     it under the terms of the GNU General Public License as published by
-  9     the Free Software Foundation; either version 3, or (at your option)
- 10     any later version.
- 11 
- 12     This program is distributed in the hope that it will be useful,
- 13     but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15     GNU General Public License for more details.
- 16 
- 17     You should have received a copy of the GNU General Public License
- 18     along with this program.  If not, write to:
- 19         The Free Software Foundation, Inc.,
- 20         51 Franklin Street, Fifth Floor
- 21         Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Ext.namespace('Ext.ux.util');
- 36 (function() {
- 37     Ext.ux.util.RpcClient = Ext.extend(Ext.util.Observable, {
- 38 
- 39         _components: [],
- 40         
- 41         _methods: [],
- 42         
- 43         _requests: {},
- 44         
- 45         _url: null,
- 46         
- 47         _optionKeys: ['scope', 'success', 'failure'],
- 48         
- 49         constructor: function(config) {
- 50             Ext.ux.util.RpcClient.superclass.constructor.call(this, config);
- 51             this._url = config.url || null;
- 52             this._id = 0;
- 53             
- 54             this.addEvents(
- 55                 // raw events
- 56                 /**
- 57                  * @event connected
- 58                  * Fires when the client has retrieved the list of methods from the server.
- 59                  * @param {Ext.ux.util.RpcClient} this
- 60                  */
- 61                  'connected'
- 62             );
- 63             this.reloadMethods();
- 64         },
- 65         
- 66         reloadMethods: function() {
- 67             Ext.each(this._components, function(component) {
- 68                 delete this[component];
- 69             }, this);
- 70             this._execute('system.listMethods', {
- 71                 success: this._setMethods,
- 72                 scope: this
- 73             });
- 74         },
- 75     
- 76         _execute: function(method, options) {
- 77             options = options || {};
- 78             options.params = options.params || [];
- 79             options.id = this._id;
- 80             
- 81             var request = Ext.encode({
- 82                 method: method,
- 83                 params: options.params,
- 84                 id: options.id
- 85             });
- 86             this._id++;
- 87             
- 88             return Ext.Ajax.request({
- 89                 url: this._url,
- 90                 method: 'POST',
- 91                 success: this._onSuccess,
- 92                 failure: this._onFailure,
- 93                 scope: this,
- 94                 jsonData: request,
- 95                 options: options
- 96             });
- 97         },
- 98         
- 99         _onFailure: function(response, requestOptions) {
-100             var options = requestOptions.options;
-101             errorObj = {
-102                 id: options.id,
-103                 result: null,
-104                 error: 'HTTP: ' + response.status + ' ' + response.statusText
-105             }            
-106             if (Ext.type(options.failure) != 'function') return;
-107             if (options.scope) {
-108                 options.failure.call(options.scope, errorObj, response, requestOptions);
-109             } else {
-110                 options.failure(errorObj, response, requestOptions);
-111             }
-112         },
-113         
-114         _onSuccess: function(response, requestOptions) {
-115             var responseObj = Ext.decode(response.responseText);
-116             var options = requestOptions.options;
-117             if (responseObj.error) {
-118                 if (Ext.type(options.failure) != 'function') return;
-119                 if (options.scope) {
-120                     options.failure.call(options.scope, responseObj, response, requestOptions);
-121                 } else {
-122                     options.failure(responseObj, response, requestOptions);
-123                 }
-124             } else {
-125                 if (Ext.type(options.success) != 'function') return;
-126                 if (options.scope) {
-127                     options.success.call(options.scope, responseObj.result, responseObj, response, requestOptions);
-128                 } else {
-129                     options.success(responseObj.result, responseObj, response, requestOptions);
-130                 }
-131             }
-132         },
-133         
-134         _parseArgs: function(args) {
-135             var params = [];
-136             Ext.each(args, function(arg) {
-137                 params.push(arg);
-138             });
-139             
-140             var options = params[params.length - 1];
-141             if (Ext.type(options) == 'object') {
-142                 var keys = Ext.keys(options), isOption = false;
-143                 
-144                 Ext.each(this._optionKeys, function(key) {
-145                     if (keys.indexOf(key) > -1) isOption = true;
-146                 });
-147                 
-148                 if (isOption) {
-149                     params.remove(options)
-150                 } else {
-151                     options = {}
-152                 }
-153             } else {
-154                 options = {}
-155             }
-156             options.params = params;
-157             return options;
-158         },
-159     
-160         _setMethods: function(methods) {
-161             var components = {}, self = this;
-162             
-163             Ext.each(methods, function(method) {
-164                 var parts = method.split('.');
-165                 var component = components[parts[0]] || {};
-166                 
-167                 var fn = function() {
-168                     var options = self._parseArgs(arguments);
-169                     return self._execute(method, options);
-170                 }
-171                 component[parts[1]] = fn;
-172                 components[parts[0]] = component;
-173             });
-174             
-175             for (var name in components) {
-176                 self[name] = components[name];
-177             }
-178             
-179             this._components = Ext.keys(components);
-180             this.fireEvent('connected', this);
-181         }
-182     });
-183 })();
-184 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.ConnectionManager.js.html b/deluge/ui/web/docs/symbols/src/Deluge.ConnectionManager.js.html deleted file mode 100644 index db55e8ce4..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.ConnectionManager.js.html +++ /dev/null @@ -1,408 +0,0 @@ -
  1 /*
-  2 Script: deluge-connections.js
-  3     Contains all objects and functions related to the connection manager.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {
- 36 	var hostRenderer = function(value, p, r) {
- 37 		return value + ':' + r.data['port']
- 38 	}
- 39 	
- 40 	Ext.deluge.AddConnectionWindow = Ext.extend(Ext.Window, {
- 41 		
- 42 		constructor: function(config) {
- 43 			config = Ext.apply({
- 44 				layout: 'fit',
- 45 				width: 300,
- 46 				height: 195,
- 47 				bodyStyle: 'padding: 10px 5px;',
- 48 				buttonAlign: 'right',
- 49 				closeAction: 'hide',
- 50 				closable: true,
- 51 				plain: true,
- 52 				title: _('Add Connection'),
- 53 				iconCls: 'x-deluge-add-window-icon'
- 54 			}, config);
- 55 			Ext.deluge.AddConnectionWindow.superclass.constructor.call(this, config);
- 56 		},
- 57 		
- 58 		initComponent: function() {
- 59 			Ext.deluge.AddConnectionWindow.superclass.initComponent.call(this);
- 60 			
- 61 			this.addEvents('hostadded');
- 62 			
- 63 			this.addButton(_('Close'), this.hide, this);
- 64 			this.addButton(_('Add'), this.onAdd, this);
- 65 			
- 66 			this.on('hide', this.onHide, this);
- 67 			
- 68 			this.form = this.add({
- 69 				xtype: 'form',
- 70 				defaultType: 'textfield',
- 71 				id: 'connectionAddForm',
- 72 				baseCls: 'x-plain',
- 73 				labelWidth: 55
- 74 			});
- 75 			
- 76 			this.hostField = this.form.add({
- 77 				fieldLabel: _('Host'),
- 78 				id: 'host',
- 79 				name: 'host',
- 80 				anchor: '100%',
- 81 				value: ''
- 82 			});
- 83 			
- 84 			this.portField = this.form.add({
- 85 				fieldLabel: _('Port'),
- 86 				id: 'port',
- 87 				xtype: 'uxspinner',
- 88 				ctCls: 'x-form-uxspinner',
- 89 				name: 'port',
- 90 				strategy: Ext.ux.form.Spinner.NumberStrategy(),
- 91 				value: '58846',
- 92 				anchor: '50%'
- 93 			});
- 94 			
- 95 			this.usernameField = this.form.add({
- 96 				fieldLabel: _('Username'),
- 97 				id: 'username',
- 98 				name: 'username',
- 99 				anchor: '100%',
-100 				value: ''
-101 			});
-102 			
-103 			this.passwordField = this.form.add({
-104 				fieldLabel: _('Password'),
-105 				anchor: '100%',
-106 				id: '_password',
-107 				name: '_password',
-108 				inputType: 'password',
-109 				value: ''
-110 			});
-111 		},
-112 		
-113 		onAdd: function() {
-114 			var host = this.hostField.getValue();
-115 			var port = this.portField.getValue();
-116 			var username = this.usernameField.getValue();
-117 			var password = this.passwordField.getValue();
-118 			
-119 			Deluge.Client.web.add_host(host, port, username, password, {
-120 				success: function(result) {
-121 					if (!result[0]) {
-122 						Ext.MessageBox.show({
-123 							title: _('Error'),
-124 							msg: "Unable to add host: " + result[1],
-125 							buttons: Ext.MessageBox.OK,
-126 							modal: false,
-127 							icon: Ext.MessageBox.ERROR,
-128 							iconCls: 'x-deluge-icon-error'
-129 						});
-130 					} else {
-131 						this.fireEvent('hostadded');
-132 					}
-133 					this.hide();
-134 				},
-135 				scope: this
-136 			});
-137 		},
-138 		
-139 		onHide: function() {
-140 			this.form.getForm().reset();
-141 		}
-142 	});
-143 
-144 	Ext.deluge.ConnectionManager = Ext.extend(Ext.Window, {
-145 	
-146 		layout: 'fit',
-147 		width: 300,
-148 		height: 220,
-149 		bodyStyle: 'padding: 10px 5px;',
-150 		buttonAlign: 'right',
-151 		closeAction: 'hide',
-152 		closable: true,
-153 		plain: true,
-154 		title: _('Connection Manager'),
-155 		iconCls: 'x-deluge-connect-window-icon',
-156 		
-157 		initComponent: function() {
-158 			Ext.deluge.ConnectionManager.superclass.initComponent.call(this);
-159 			this.on({
-160 				'hide': this.onHide,
-161 				'show': this.onShow
-162 			});
-163 			Deluge.Events.on('login', this.onLogin, this);
-164 			Deluge.Events.on('logout', this.onLogout, this);
-165 			
-166 			this.addButton(_('Close'), this.onClose, this);
-167 			this.addButton(_('Connect'), this.onConnect, this);
-168 			
-169 			this.grid = this.add({
-170 				xtype: 'grid',
-171 				store: new Ext.data.SimpleStore({
-172 					fields: [
-173 						{name: 'status', mapping: 3},
-174 						{name: 'host', mapping: 1},
-175 						{name: 'port', mapping: 2},
-176 						{name: 'version', mapping: 4}
-177 					],
-178 					id: 0
-179 				}),
-180 				columns: [{
-181 					header: _('Status'),
-182 					width: 65,
-183 					sortable: true,
-184 					renderer: fplain,
-185 					dataIndex: 'status'
-186 				}, {
-187 					id:'host',
-188 					header: _('Host'),
-189 					width: 150,
-190 					sortable: true,
-191 					renderer: hostRenderer,
-192 					dataIndex: 'host'
-193 				}, {
-194 					header: _('Version'),
-195 					width: 75,
-196 					sortable: true,
-197 					renderer: fplain,
-198 					dataIndex: 'version'
-199 				}],
-200 				stripeRows: true,
-201 				selModel: new Ext.grid.RowSelectionModel({
-202 					singleSelect: true,
-203 					listeners: {
-204 						'rowselect': {fn: this.onSelect, scope: this}
-205 					}
-206 				}),
-207 				autoExpandColumn: 'host',
-208 				deferredRender:false,
-209 				autoScroll:true,
-210 				margins: '0 0 0 0',
-211 				bbar: new Ext.Toolbar({
-212 					items: [
-213 						{
-214 							id: 'add',
-215 							cls: 'x-btn-text-icon',
-216 							text: _('Add'),
-217 							icon: '/icons/add.png',
-218 							handler: this.onAdd,
-219 							scope: this
-220 						}, {
-221 							id: 'remove',
-222 							cls: 'x-btn-text-icon',
-223 							text: _('Remove'),
-224 							icon: '/icons/remove.png',
-225 							handler: this.onRemove,
-226 							scope: this
-227 						}, '->', {
-228 							id: 'stop',
-229 							cls: 'x-btn-text-icon',
-230 							text: _('Stop Daemon'),
-231 							icon: '/icons/error.png',
-232 							handler: this.onStop,
-233 							scope: this
-234 						}
-235 					]
-236 				})
-237 			});
-238 		},
-239 		
-240 		disconnect: function() {
-241 			Deluge.Events.fire('disconnect');
-242 		},
-243 		
-244 		loadHosts: function() {
-245 			Deluge.Client.web.get_hosts({
-246 				success: this.onGetHosts,
-247 				scope: this
-248 			});
-249 		},
-250 		
-251 		update: function(self) {
-252 			self.grid.getStore().each(function(r) {
-253 				Deluge.Client.web.get_host_status(r.id, {
-254 					success: self.onGetHostStatus,
-255 					scope: self
-256 				});
-257 			}, this);
-258 		},
-259 		
-260 		onAdd: function(button, e) {
-261 			if (!this.addWindow) {
-262 				this.addWindow = new Ext.deluge.AddConnectionWindow();
-263 				this.addWindow.on('hostadded', this.onHostAdded, this);
-264 			}
-265 			this.addWindow.show();
-266 		},
-267 		
-268 		onHostAdded: function() {
-269 			this.runCheck();
-270 		},
-271 		
-272 		onClose: function(e) {
-273 			if (this.running) window.clearInterval(this.running);
-274 			this.hide();
-275 		},
-276 		
-277 		onConnect: function(e) {
-278 			var selected = this.grid.getSelectionModel().getSelected();
-279 			if (!selected) return;
-280 			
-281 			if (selected.get('status') == _('Connected')) {
-282 				Deluge.Client.web.disconnect({
-283 					success: function(result) {
-284 						this.update();
-285 						Deluge.Events.fire('disconnect');
-286 					},
-287 					scope: this
-288 				});
-289 			} else {
-290 				var id = selected.id;
-291 				Deluge.Client.web.connect(id, {
-292 					success: function(methods) {
-293 						Deluge.Client.reloadMethods();
-294 						Deluge.Client.on('connected', function(e) {
-295 							Deluge.Events.fire('connect');
-296 						}, this, {single: true});
-297 					}
-298 				});
-299 				if (this.running) window.clearInterval(this.running);
-300 				this.hide();
-301 			}
-302 		},
-303 		
-304 		onGetHosts: function(hosts) {
-305 			var store = this.grid.getStore();
-306 			Ext.each(hosts, function(host) {
-307 				var record = store.getById(host[0]);
-308 				if (!record) {
-309 					store.loadData([host], true);
-310 				}
-311 				Deluge.Client.web.get_host_status(host[0], {
-312 					success: this.onGetHostStatus,
-313 					scope: this
-314 				});
-315 			}, this);
-316 		},
-317 		
-318 		onGetHostStatus: function(host) {
-319 			var record = this.grid.getStore().getById(host[0]);
-320 			record.set('status', host[3])
-321 			record.set('version', host[4])
-322 			record.commit();
-323 		},
-324 		
-325 		onLogin: function() {
-326 			Deluge.Client.web.connected({
-327 				success: function(connected) {
-328 					if (connected) {
-329 						Deluge.Events.fire('connect');
-330 					} else {
-331 						this.show();
-332 					}
-333 				},
-334 				scope: this
-335 			});
-336 		},
-337 		
-338 		onLogout: function() {
-339 			this.disconnect();
-340 			if (!this.hidden && this.rendered) {
-341 				this.hide();
-342 			}
-343 		},
-344 		
-345 		onRemove: function(button) {
-346 			var connection = this.grid.getSelectionModel().getSelected();
-347 			Deluge.Client.web.remove_host(connection.id, {
-348 				success: function(result) {
-349 					if (!result) {
-350 						Ext.MessageBox.show({
-351 							title: _('Error'),
-352 							msg: result[1],
-353 							buttons: Ext.MessageBox.OK,
-354 							modal: false,
-355 							icon: Ext.MessageBox.ERROR,
-356 							iconCls: 'x-deluge-icon-error'
-357 						});
-358 					} else {
-359 						this.grid.getStore().remove(connection);
-360 					}
-361 				},
-362 				scope: this
-363 			});
-364 		},
-365 		
-366 		onSelect: function(selModel, rowIndex, record) {
-367 			this.selectedRow = rowIndex;
-368 			var button = this.buttons[1];
-369 			if (record.get('status') == _('Connected')) {
-370 				button.setText(_('Disconnect'));
-371 			} else {
-372 				button.setText(_('Connect'));
-373 			}
-374 		},
-375 		
-376 		onShow: function() {
-377 			this.loadHosts();
-378 			this.running = window.setInterval(this.update, 2000, this);
-379 		},
-380 		
-381 		onStop: function(button, e) {
-382 			var connection = this.grid.getSelectionModel().getSelected();
-383 			Deluge.Client.web.stop_daemon(connection.id, {
-384 				success: function(result) {
-385 					if (!result[0]) {
-386 						Ext.MessageBox.show({
-387 							title: _('Error'),
-388 							msg: result[1],
-389 							buttons: Ext.MessageBox.OK,
-390 							modal: false,
-391 							icon: Ext.MessageBox.ERROR,
-392 							iconCls: 'x-deluge-icon-error'
-393 						});
-394 					}
-395 				}
-396 			});
-397 		}
-398 	});
-399 	Deluge.ConnectionManager = new Ext.deluge.ConnectionManager();
-400 })();
-401 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.Details.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.Details.js.html deleted file mode 100644 index 3064895ba..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.Details.js.html +++ /dev/null @@ -1,95 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.Details.js
-  3     The details tab displayed in the details panel.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Ext.deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
- 36 	title: _('Details'),
- 37 	bodyStyle: 'padding 5px',
- 38 	
- 39 	onRender: function(ct, position) {
- 40 		Ext.deluge.details.DetailsTab.superclass.onRender.call(this, ct, position);
- 41 		this.load({
- 42 			url: '/render/tab_details.html',
- 43 			text: _('Loading') + '...'
- 44 		});
- 45 		this.body.setStyle('padding', '5px');
- 46 		this.getUpdater().on('update', this.onPanelUpdate, this);
- 47 	},
- 48 	
- 49 	clear: function() {
- 50 		if (!this.fields) return;
- 51 		for (var k in this.fields) {
- 52 			this.fields[k].innerHTML = '';
- 53 		}
- 54 	},
- 55 	
- 56 	update: function(torrentId) {
- 57 		Deluge.Client.core.get_torrent_status(torrentId, Deluge.Keys.Details, {
- 58 			success: this.onRequestComplete,
- 59 			scope: this,
- 60 			torrentId: torrentId
- 61 		});
- 62 	},
- 63 	
- 64 	onPanelUpdate: function(el, response) {
- 65 		this.fields = {};
- 66 		Ext.each(Ext.query('dd', this.body.dom), function(field) {
- 67 			this.fields[field.className] = field;
- 68 		}, this);
- 69 	},
- 70 	
- 71 	onRequestComplete: function(torrent, options) {
- 72 		var data = {
- 73 			torrent_name: torrent.name,
- 74 			hash: options.torrentId,
- 75 			path: torrent.save_path,
- 76 			size: fsize(torrent.total_size),
- 77 			files: torrent.num_files,
- 78 			status: torrent.tracker_status,
- 79 			tracker: torrent.tracker,
- 80 			comment: torrent.comment
- 81 		};
- 82 		
- 83 		for (var field in this.fields) {
- 84 			this.fields[field].innerHTML = data[field];
- 85 		}
- 86 	}
- 87 });
- 88 Deluge.Details.add(new Ext.deluge.details.DetailsTab());
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.Files.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.Files.js.html deleted file mode 100644 index 84a6441c6..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.Files.js.html +++ /dev/null @@ -1,209 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.Files.js
-  3     The files tab displayed in the details panel.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 (function() {
- 34 	/* Renderers for the column tree */
- 35 	function fileProgressRenderer(value) {
- 36 		var progress = value * 100;
- 37 		return Deluge.progressBar(progress, this.width - 50, progress.toFixed(2) + '%', 0);
- 38 	}
- 39 	function priorityRenderer(value) {
- 40 		return String.format('<div class="{0}">{1}</div>', FILE_PRIORITY_CSS[value], _(FILE_PRIORITY[value]));
- 41 	}
- 42 	
- 43 	Ext.deluge.details.FilesTab = Ext.extend(Ext.tree.ColumnTree, {
- 44 		
- 45 		constructor: function(config) {
- 46 			config = Ext.apply({
- 47 				title: _('Files'),
- 48 				rootVisible: false,
- 49 				autoScroll: true,
- 50 				selModel: new Ext.tree.MultiSelectionModel(),
- 51 				
- 52 				columns: [{
- 53 					header: _('Filename'),
- 54 					width: 330,
- 55 					dataIndex: 'filename'
- 56 				}, {
- 57 					header: _('Size'),
- 58 					width: 150,
- 59 					dataIndex: 'size',
- 60 					renderer: fsize
- 61 				}, {
- 62 					header: _('Progress'),
- 63 					width: 150,
- 64 					dataIndex: 'progress',
- 65 					renderer: fileProgressRenderer
- 66 				}, {
- 67 					header: _('Priority'),
- 68 					width: 150,
- 69 					dataIndex: 'priority',
- 70 					renderer: priorityRenderer
- 71 				}],
- 72 				
- 73 				root: new Ext.tree.TreeNode({
- 74 					text: 'Files'
- 75 				})
- 76 			}, config);
- 77 			Ext.deluge.details.FilesTab.superclass.constructor.call(this, config);
- 78 		},
- 79 		
- 80 		onRender: function(ct, position) {
- 81 			Ext.deluge.details.FilesTab.superclass.onRender.call(this, ct, position);
- 82 			Deluge.Menus.FilePriorities.on('itemclick', this.onItemClick, this);
- 83 			this.on('contextmenu', this.onContextMenu, this);
- 84 			this.sorter = new Ext.tree.TreeSorter(this, {
- 85 				folderSort: true
- 86 			});
- 87 		},
- 88 		
- 89 		clear: function() {
- 90 			var root = this.getRootNode();
- 91 			if (!root.hasChildNodes()) return;
- 92 			root.cascade(function(node) {
- 93 				var parent = node.parentNode;
- 94 				if (!parent) return;
- 95 				if (!parent.ownerTree) return;
- 96 				parent.removeChild(node);
- 97 			});
- 98 		},
- 99 		
-100 		update: function(torrentId) {
-101 			if (this.torrentId != torrentId) {
-102 				this.clear();
-103 				this.torrentId = torrentId;
-104 			}
-105 			
-106 			Deluge.Client.web.get_torrent_files(torrentId, {
-107 				success: this.onRequestComplete,
-108 				scope: this,
-109 				torrentId: torrentId
-110 			});
-111 		},
-112 		
-113 		onContextMenu: function(node, e) {
-114 			e.stopEvent();
-115 			var selModel = this.getSelectionModel();
-116 			if (selModel.getSelectedNodes().length < 2) {
-117 				selModel.clearSelections();
-118 				node.select();
-119 			}
-120 			Deluge.Menus.FilePriorities.showAt(e.getPoint());
-121 		},
-122 		
-123 		onItemClick: function(baseItem, e) {
-124 			switch (baseItem.id) {
-125 				case 'expandAll':
-126 					this.expandAll();
-127 					break;
-128 				default:
-129 					var indexes = {};
-130 					function walk(node) {
-131 						if (Ext.isEmpty(node.attributes.fileIndex)) return;
-132 						indexes[node.attributes.fileIndex] = node.attributes.priority;
-133 					}
-134 					this.getRootNode().cascade(walk);
-135 					
-136 					var nodes = this.getSelectionModel().getSelectedNodes();
-137 					Ext.each(nodes, function(node) {
-138 						if (Ext.isEmpty(node.attributes.fileIndex)) return;
-139 						indexes[node.attributes.fileIndex] = baseItem.filePriority;
-140 					});
-141 					
-142 					var priorities = new Array(Ext.keys(indexes).length);
-143 					for (var index in indexes) {
-144 						priorities[index] = indexes[index];
-145 					}
-146 
-147 					Deluge.Client.core.set_torrent_file_priorities(this.torrentId, priorities, {
-148 						success: function() {
-149 							Ext.each(nodes, function(node) {
-150 								node.setColumnValue(3, baseItem.filePriority);
-151 							});
-152 						},
-153 						scope: this
-154 					});
-155 					break;
-156 			}
-157 		},
-158 		
-159 		onRequestComplete: function(files, options) {
-160 			function walk(files, parent) {
-161 				for (var file in files) {
-162 					var item = files[file];
-163 					var child = parent.findChild('id', file);
-164 					if (Ext.type(item) == 'object') {
-165 						if (!child) {
-166 							child = new Ext.tree.TreeNode({
-167 								id: file,
-168 								text: file
-169 							});
-170 							parent.appendChild(child);
-171 						}
-172 						walk(item, child);
-173 					} else {
-174 						if (!child) {
-175 							child = new Ext.tree.ColumnTreeNode({
-176 								id: file,
-177 								filename: file,
-178 								text: file, // this needs to be here for sorting
-179 								fileIndex: item[0],
-180 								size: item[1],
-181 								progress: item[2],
-182 								priority: item[3],
-183 								leaf: true,
-184 								iconCls: 'x-deluge-file',
-185 								uiProvider: Ext.tree.ColumnNodeUI
-186 							});
-187 							parent.appendChild(child);
-188 						}
-189 						child.setColumnValue(1, item[1]);
-190 						child.setColumnValue(2, item[2]);
-191 						child.setColumnValue(3, item[3]);
-192 					}
-193 				}
-194 			}
-195 			var root = this.getRootNode();
-196 			walk(files, root);
-197 			root.firstChild.expand();
-198 		}
-199 	});
-200 	Deluge.Details.add(new Ext.deluge.details.FilesTab());
-201 })();
-202 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.Options.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.Options.js.html deleted file mode 100644 index 885c27d70..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.Options.js.html +++ /dev/null @@ -1,425 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.Options.js
-  3     The options tab displayed in the details panel.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 
- 35 Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
- 36 
- 37 	constructor: function(config) {
- 38 		config = Ext.apply({
- 39 			autoScroll: true,
- 40 			bodyStyle: 'padding: 5px;',
- 41 			border: false,
- 42 			cls: 'x-deluge-options',
- 43 			defaults: {
- 44 				autoHeight: true,
- 45 				labelWidth: 1,
- 46 				defaultType: 'checkbox'
- 47 			},
- 48 			deferredRender: false,
- 49 			layout: 'column',
- 50 			title: _('Options')
- 51 		}, config);
- 52 		Ext.deluge.details.OptionsTab.superclass.constructor.call(this, config);
- 53 	},
- 54 	
- 55 	initComponent: function() {
- 56 		Ext.deluge.details.OptionsTab.superclass.initComponent.call(this);
- 57 		
- 58 		this.fieldsets = {}, this.fields = {};
- 59 		this.optionsManager = new Deluge.OptionsManager({
- 60 			defaults: {
- 61 				'max_download_speed': -1,
- 62 				'max_upload_speed': -1,
- 63 				'max_connections': -1,
- 64 				'max_upload_slots': -1,
- 65 				'is_auto_managed': false,
- 66 				'stop_at_ratio': false,
- 67 				'stop_ratio': 2.0,
- 68 				'remove_at_ratio': false,
- 69 				'move_completed': null,
- 70 				'private': false,
- 71 				'prioritize_first_last': false
- 72 			}
- 73 		});
- 74 		this.optionsManager.on('changed', this.onOptionChanged, this);
- 75 		
- 76 		/*
- 77 		 * Bandwidth Options
- 78 		 */
- 79 		this.fieldsets.bandwidth = this.add({
- 80 			xtype: 'fieldset',
- 81 			defaultType: 'uxspinner',
- 82 			bodyStyle: 'padding: 5px',
- 83 			
- 84 			layout: 'table',
- 85 			layoutConfig: {columns: 3},
- 86 			labelWidth: 150,
- 87 			
- 88 			style: 'margin-left: 10px; margin-right: 5px; padding: 5px',
- 89 			title: _('Bandwidth'),
- 90 			width: 250
- 91 		});
- 92 		
- 93 		/*
- 94 		 * Max Download Speed
- 95 		 */
- 96 		this.fieldsets.bandwidth.add({
- 97 			xtype: 'label',
- 98 			text: _('Max Download Speed'),
- 99 			forId: 'max_download_speed',
-100 			cls: 'x-deluge-options-label'
-101 		});
-102 		this.fields.max_download_speed = this.fieldsets.bandwidth.add({
-103 			id: 'max_download_speed',
-104 			name: 'max_download_speed',
-105 			width: 70,
-106 			strategy: {
-107 				xtype: 'number',
-108 				decimalPrecision: 1,
-109 				minValue: -1,
-110 				maxValue: 99999
-111 			}
-112 		});
-113 		this.fieldsets.bandwidth.add({
-114 			xtype: 'label',
-115 			text: _('KiB/s'),
-116 			style: 'margin-left: 10px'
-117 		});
-118 		
-119 		/*
-120 		 * Max Upload Speed
-121 		 */
-122 		this.fieldsets.bandwidth.add({
-123 			xtype: 'label',
-124 			text: _('Max Upload Speed'),
-125 			forId: 'max_upload_speed',
-126 			cls: 'x-deluge-options-label'
-127 		});
-128 		this.fields.max_upload_speed = this.fieldsets.bandwidth.add({
-129 			id: 'max_upload_speed',
-130 			name: 'max_upload_speed',
-131 			width: 70,
-132 			value: -1,
-133 			strategy: {
-134 				xtype: 'number',
-135 				decimalPrecision: 1,
-136 				minValue: -1,
-137 				maxValue: 99999
-138 			}
-139 		});
-140 		this.fieldsets.bandwidth.add({
-141 			xtype: 'label',
-142 			text: _('KiB/s'),
-143 			style: 'margin-left: 10px'
-144 		});
-145 		
-146 		/*
-147 		 * Max Connections
-148 		 */
-149 		this.fieldsets.bandwidth.add({
-150 			xtype: 'label',
-151 			text: _('Max Connections'),
-152 			forId: 'max_connections',
-153 			cls: 'x-deluge-options-label'
-154 		});
-155 		this.fields.max_connections = this.fieldsets.bandwidth.add({
-156 			id: 'max_connections',
-157 			name: 'max_connections',
-158 			width: 70,
-159 			value: -1,
-160 			strategy: {
-161 				xtype: 'number',
-162 				decimalPrecision: 0,
-163 				minValue: -1,
-164 				maxValue: 99999
-165 			},
-166 			colspan: 2
-167 		});
-168 		
-169 		/*
-170 		 * Max Upload Slots
-171 		 */
-172 		this.fieldsets.bandwidth.add({
-173 			xtype: 'label',
-174 			text: _('Max Upload Slots'),
-175 			forId: 'max_upload_slots',
-176 			cls: 'x-deluge-options-label'
-177 		});
-178 		this.fields.max_upload_slots = this.fieldsets.bandwidth.add({
-179 			id: 'max_upload_slots',
-180 			name: 'max_upload_slots',
-181 			width: 70,
-182 			value: -1,
-183 			strategy: {
-184 				xtype: 'number',
-185 				decimalPrecision: 0,
-186 				minValue: -1,
-187 				maxValue: 99999
-188 			},
-189 			colspan: 2
-190 		});
-191 
-192 		/*
-193 		 * Queue Options
-194 		 */
-195 		this.fieldsets.queue = this.add({
-196 			xtype: 'fieldset',
-197 			title: _('Queue'),
-198 			style: 'margin-left: 5px; margin-right: 5px; padding: 5px',
-199 			width: 210,
-200 			
-201 			layout: 'table',
-202 			layoutConfig: {columns: 2},
-203 			labelWidth: 0,
-204 			
-205 			defaults: {
-206 				fieldLabel: '',
-207 				labelSeparator: ''
-208 			}
-209 		});
-210 		
-211 		this.fields.is_auto_managed = this.fieldsets.queue.add({
-212 			fieldLabel: '',
-213 			labelSeparator: '',
-214 			id: 'is_auto_managed',
-215 			boxLabel: _('Auto Managed'),
-216 			width: 200,
-217 			colspan: 2
-218 		});
-219 		
-220 		this.fields.stop_at_ratio = this.fieldsets.queue.add({
-221 			fieldLabel: '',
-222 			labelSeparator: '',
-223 			id: 'stop_at_ratio',
-224 			width: 120,
-225 			boxLabel: _('Stop seed at ratio')
-226 		});
-227 		
-228 		this.fields.stop_ratio = this.fieldsets.queue.add({
-229 			xtype: 'uxspinner',
-230 			id: 'stop_ratio',
-231 			name: 'stop_ratio',
-232 			disabled: true,
-233 			width: 50,
-234 			value: 2.0,
-235 			strategy: {
-236 				xtype: 'number',
-237 				minValue: -1,
-238 				maxValue: 99999,
-239 				incrementValue: 0.1,
-240 				alternateIncrementValue: 1,
-241 				decimalPrecision: 1
-242 			}
-243 		});
-244 		
-245 		this.fields.remove_at_ratio = this.fieldsets.queue.add({
-246 			fieldLabel: '',
-247 			labelSeparator: '',
-248 			id: 'remove_at_ratio',
-249 			bodyStyle: 'padding-left: 10px',
-250 			boxLabel: _('Remove at ratio'),
-251 			disabled: true,
-252 			colspan: 2
-253 		});
-254 		
-255 		this.fields.move_completed = this.fieldsets.queue.add({
-256 			fieldLabel: '',
-257 			labelSeparator: '',
-258 			id: 'move_completed',
-259 			boxLabel: _('Move Completed'),
-260 			colspan: 2
-261 		});
-262 		
-263 		
-264 		/*
-265 		 * General Options
-266 		 */
-267 		this.rightColumn =  this.add({
-268 			border: false,
-269 			autoHeight: true,
-270 			style: 'margin-left: 5px',
-271 			width: 200
-272 		});
-273 		
-274 		this.fieldsets.general = this.rightColumn.add({
-275 			xtype: 'fieldset',
-276 			autoHeight: true,
-277 			defaultType: 'checkbox',
-278 			title: _('General'),
-279 			layout: 'form'
-280 		});
-281 		
-282 		this.fields['private'] = this.fieldsets.general.add({
-283 			fieldLabel: '',
-284 			labelSeparator: '',
-285 			boxLabel: _('Private'),
-286 			id: 'private'
-287 		});
-288 		
-289 		this.fields.prioritize_first_last = this.fieldsets.general.add({
-290 			fieldLabel: '',
-291 			labelSeparator: '',
-292 			boxLabel: _('Prioritize First/Last'),
-293 			id: 'prioritize_first_last'
-294 		});
-295 		
-296 		// Bind the fields so the options manager can manage them.
-297 		for (var id in this.fields) {
-298 			this.optionsManager.bind(id, this.fields[id]);
-299 		}
-300 		
-301 		/*
-302 		 * Buttons
-303 		 */
-304 		this.buttonPanel = this.rightColumn.add({
-305 			layout: 'column',
-306 			xtype: 'panel',
-307 			border: false
-308 		});
-309 		
-310 		// The buttons below are required to be added to a panel
-311 		// first as simply adding them to the column layout throws an
-312 		// error c.getSize() does not exist. This could be intentional
-313 		// or it may possible be a bug in ext-js. Take care when upgrading
-314 		// to ext-js 3.0.
-315 		
-316 		/*
-317 		 * Edit Trackers button
-318 		 */
-319 		this.buttonPanel.add({
-320 			xtype: 'panel',
-321 			border: false
-322 		}).add({
-323 			id: 'edit_trackers',
-324 			xtype: 'button',
-325 			text: _('Edit Trackers'),
-326 			cls: 'x-btn-text-icon',
-327 			iconCls: 'x-deluge-edit-trackers',
-328 			border: false,
-329 			width: 100,
-330 			handler: this.onEditTrackers,
-331 			scope: this
-332 		});
-333 		
-334 		/*
-335 		 * Apply button
-336 		 */
-337 		this.buttonPanel.add({
-338 			xtype: 'panel',
-339 			border: false
-340 		}).add({
-341 			id: 'apply',
-342 			xtype: 'button',
-343 			text: _('Apply'),
-344 			style: 'margin-left: 10px;',
-345 			border: false,
-346 			width: 100,
-347 			handler: this.onApply,
-348 			scope: this
-349 		});
-350 	},
-351 	
-352 	onRender: function(ct, position) {
-353 		Ext.deluge.details.OptionsTab.superclass.onRender.call(this, ct, position);
-354 		
-355 		// This is another hack I think, so keep an eye out here when upgrading.
-356 		this.layout = new Ext.layout.ColumnLayout();
-357 		this.layout.setContainer(this);
-358 		this.doLayout();
-359 	},
-360 	
-361 	clear: function() {
-362 		this.optionsManager.changeId(null);
-363 	},
-364 	
-365 	reset: function() {
-366 		if (this.torrentId) {
-367 			this.optionsManager.reset(this.torrentId);
-368 		}
-369 	},
-370 	
-371 	update: function(torrentId) {
-372 		this.torrentId = torrentId;
-373 		Deluge.Client.core.get_torrent_status(torrentId, Deluge.Keys.Options, {
-374 			success: this.onRequestComplete,
-375 			scope: this
-376 		});
-377 	},
-378 	
-379 	onApply: function() {
-380 		var changed = this.optionsManager.getChanged(this.torrentId);
-381 		if (!Ext.isEmpty(changed['prioritize_first_last'])) {
-382 			var value = changed['prioritize_first_last'];
-383 			Deluge.Client.core.set_torrent_prioritize_first_last(this.torrentId, value, {
-384 				success: function() {
-385 					this.optionsManager.set(this.torrentId, 'prioritize_first_last', value);
-386 				},
-387 				scope: this
-388 			});
-389 		}
-390 		Deluge.Client.core.set_torrent_options([this.torrentId], changed, {
-391 			success: function() {
-392 				this.optionsManager.set(this.torrentId, changed);
-393 				this.optionsManager.reset(this.torrentId);
-394 			},
-395 			scope: this
-396 		});
-397 	},
-398 	
-399 	onEditTrackers: function() {
-400 		Deluge.EditTrackers.show();
-401 	},
-402 	
-403 	onOptionChanged: function(id, key, newValue, oldValue) {
-404 		if (key == 'stop_at_ratio') {
-405 			this.fields.remove_at_ratio.setDisabled(!newValue);
-406 			this.fields.stop_ratio.setDisabled(!newValue);
-407 		}
-408 	},
-409 	
-410 	onRequestComplete: function(torrent, options) {
-411 		this.fields['private'].setDisabled(!torrent['private']);
-412 		delete torrent['private'];
-413 		
-414 		this.optionsManager.update(this.torrentId, torrent);
-415 	}
-416 });
-417 Deluge.Details.add(new Ext.deluge.details.OptionsTab());
-418 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.Peers.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.Peers.js.html deleted file mode 100644 index b1032da66..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.Peers.js.html +++ /dev/null @@ -1,154 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.Peers.js
-  3     The peers tab displayed in the details panel.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {
- 36 	function flagRenderer(value) {
- 37 		return String.format('<img src="/flag/{0}" />', value);
- 38 	}
- 39 	function peerAddressRenderer(value, p, record) {
- 40 		var seed = (record.data['seed'] == 1024) ? 'x-deluge-seed' : 'x-deluge-peer'
- 41 		return String.format('<div class="{0}">{1}</div>', seed, value);
- 42 	}
- 43 	function peerProgressRenderer(value) {
- 44 		var progress = (value * 100).toFixed(0);
- 45 		var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]).toFixed(0) - 8;
- 46 		return Deluge.progressBar(progress, width, progress + '%');
- 47 	}
- 48 	function sort_address(value) {
- 49 		var m = value.match(/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\:(\d+)/);
- 50 		var address = 0;
- 51 		var parts = [m[1], m[2], m[3], m[4]];
- 52 		Ext.each(parts, function(part, index) {
- 53 			part = parseInt(part);
- 54 			address = address | part << ((3 - index) * 8);
- 55 			//alert("Total: " + address + "\nPart: " + part + "\nIndex: " + index + "\nCalc: " + (part << ((3 - index) * 8)));
- 56 		});
- 57 		return address;
- 58 	}
- 59 
- 60 	Ext.deluge.details.PeersTab = Ext.extend(Ext.grid.GridPanel, {
- 61 		
- 62 		constructor: function(config) {
- 63 			config = Ext.apply({
- 64 				title: _('Peers'),
- 65 				cls: 'x-deluge-peers',
- 66 				store: new Ext.data.SimpleStore({
- 67 					fields: [
- 68 						{name: 'country'},
- 69 						{name: 'address', sortType: sort_address},
- 70 						{name: 'client'},
- 71 						{name: 'progress', type: 'float'},
- 72 						{name: 'downspeed', type: 'int'},
- 73 						{name: 'upspeed', type: 'int'},
- 74 						{name: 'seed', type: 'int'}
- 75 					],
- 76 					id: 0
- 77 				}),
- 78 				columns: [{
- 79 					header: ' ',
- 80 					width: 30,
- 81 					sortable: true,
- 82 					renderer: flagRenderer,
- 83 					dataIndex: 'country'
- 84 				}, {
- 85 					header: 'Address',
- 86 					width: 125,
- 87 					sortable: true,
- 88 					renderer: peerAddressRenderer,
- 89 					dataIndex: 'address'
- 90 				}, {
- 91 					header: 'Client',
- 92 					width: 125,
- 93 					sortable: true,
- 94 					renderer: fplain,
- 95 					dataIndex: 'client'
- 96 				}, {
- 97 					header: 'Progress',
- 98 					width: 150,
- 99 					sortable: true,
-100 					renderer: peerProgressRenderer,
-101 					dataIndex: 'progress'
-102 				}, {
-103 					header: 'Down Speed',
-104 					width: 100,
-105 					sortable: true,
-106 					renderer: fspeed,
-107 					dataIndex: 'downspeed'
-108 				}, {
-109 					header: 'Up Speed',
-110 					width: 100,
-111 					sortable: true,
-112 					renderer: fspeed,
-113 					dataIndex: 'upspeed'
-114 				}],	
-115 				stripeRows: true,
-116 				deferredRender:false,
-117 				autoScroll:true
-118 			}, config);
-119 			Ext.deluge.details.PeersTab.superclass.constructor.call(this, config);
-120 		},
-121 		
-122 		onRender: function(ct, position) {
-123 			Ext.deluge.details.PeersTab.superclass.onRender.call(this, ct, position);
-124 		},
-125 		
-126 		clear: function() {
-127 			this.getStore().loadData([]);
-128 		},
-129 		
-130 		update: function(torrentId) {
-131 			Deluge.Client.core.get_torrent_status(torrentId, Deluge.Keys.Peers, {
-132 				success: this.onRequestComplete,
-133 				scope: this
-134 			});
-135 		},
-136 		
-137 		onRequestComplete: function(torrent, options) {
-138 			if (!torrent) return;
-139 			var peers = new Array();
-140 			Ext.each(torrent.peers, function(peer) {
-141 				peers.push([peer.country, peer.ip, peer.client, peer.progress, peer.down_speed, peer.up_speed, peer.seed]);
-142 			}, this);
-143 			this.getStore().loadData(peers);
-144 		}
-145 	});
-146 	Deluge.Details.add(new Ext.deluge.details.PeersTab());
-147 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.Status.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.Status.js.html deleted file mode 100644 index 82db3cf5e..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.Status.js.html +++ /dev/null @@ -1,127 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.Status.js
-  3     The status tab displayed in the details panel.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
- 35 	title: _('Status'),
- 36 	autoScroll: true,
- 37 	
- 38 	onRender: function(ct, position) {
- 39 		Ext.deluge.details.StatusTab.superclass.onRender.call(this, ct, position);
- 40 		
- 41 		this.progressBar = this.add({
- 42 			xtype: 'fullprogressbar',
- 43 			cls: 'x-deluge-status-progressbar'
- 44 		});
- 45 		
- 46 		this.status = this.add({
- 47 			cls: 'x-deluge-status',
- 48 			id: 'deluge-details-status',
- 49 			
- 50 			border: false,
- 51 			width: 1000,
- 52 			listeners: {
- 53 				'render': {
- 54 					fn: function(panel) {
- 55 						panel.load({
- 56 							url: '/render/tab_status.html',
- 57 							text: _('Loading') + '...'
- 58 						});
- 59 						panel.getUpdater().on('update', this.onPanelUpdate, this);
- 60 					},
- 61 					scope: this
- 62 				}
- 63 			}
- 64 		});
- 65 	},
- 66 	
- 67 	clear: function() {
- 68 		this.progressBar.updateProgress(0, ' ');
- 69 		for (var k in this.fields) {
- 70 			this.fields[k].innerHTML = '';
- 71 		}
- 72 	},
- 73 	
- 74 	update: function(torrentId) {
- 75 		if (!this.fields) this.getFields();
- 76 		Deluge.Client.core.get_torrent_status(torrentId, Deluge.Keys.Status, {
- 77 			success: this.onRequestComplete,
- 78 			scope: this
- 79 		});
- 80 	},
- 81 	
- 82 	onPanelUpdate: function(el, response) {
- 83 		this.fields = {};
- 84 		Ext.each(Ext.query('dd', this.status.body.dom), function(field) {
- 85 			this.fields[field.className] = field;
- 86 		}, this);
- 87 	},
- 88 	
- 89 	onRequestComplete: function(status) {
- 90 		seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds
- 91 		peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers
- 92 		var data = {
- 93 			downloaded: fsize(status.total_done) + ' (' + fsize(status.total_payload_download) + ')',
- 94 			uploaded: fsize(status.total_uploaded) + ' (' + fsize(status.total_payload_upload) + ')',
- 95 			share: status.ratio.toFixed(3),
- 96 			announce: ftime(status.next_announce),
- 97 			tracker_status: status.tracker_status,
- 98 			downspeed: fspeed(status.download_payload_rate),
- 99 			upspeed: fspeed(status.upload_payload_rate),
-100 			eta: ftime(status.eta),
-101 			pieces: status.num_pieces + ' (' + fsize(status.piece_length) + ')',
-102 			seeders: seeders,
-103 			peers: peers,
-104 			avail: status.distributed_copies.toFixed(3),
-105 			active_time: ftime(status.active_time),
-106 			seeding_time: ftime(status.seeding_time),
-107 			seed_rank: status.seed_rank,
-108 			time_added: fdate(status.time_added)
-109 		}
-110 		data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
-111 		
-112 		for (var field in this.fields) {
-113 			this.fields[field].innerHTML = data[field];
-114 		}
-115 		var text = status.state + ' ' + status.progress.toFixed(2) + '%';
-116 		this.progressBar.updateProgress(status.progress, text);
-117 	}
-118 });
-119 Deluge.Details.add(new Ext.deluge.details.StatusTab());
-120 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Details.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Details.js.html deleted file mode 100644 index 31a8eab1e..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Details.js.html +++ /dev/null @@ -1,110 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Details.js
-  3     Contains all objects and functions related to the lower details panel and
-  4 	it's containing tabs.
-  5 
-  6 Copyright:
-  7 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  8 	This program is free software; you can redistribute it and/or modify
-  9 	it under the terms of the GNU General Public License as published by
- 10 	the Free Software Foundation; either version 3, or (at your option)
- 11 	any later version.
- 12 
- 13 	This program is distributed in the hope that it will be useful,
- 14 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 15 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 16 	GNU General Public License for more details.
- 17 
- 18 	You should have received a copy of the GNU General Public License
- 19 	along with this program.  If not, write to:
- 20 		The Free Software Foundation, Inc.,
- 21 		51 Franklin Street, Fifth Floor
- 22 		Boston, MA  02110-1301, USA.
- 23 
- 24     In addition, as a special exception, the copyright holders give
- 25     permission to link the code of portions of this program with the OpenSSL
- 26     library.
- 27     You must obey the GNU General Public License in all respects for all of
- 28     the code used other than OpenSSL. If you modify file(s) with this
- 29     exception, you may extend this exception to your version of the file(s),
- 30     but you are not obligated to do so. If you do not wish to do so, delete
- 31     this exception statement from your version. If you delete this exception
- 32     statement from all source files in the program, then also delete it here.
- 33 */
- 34 
- 35 (function() {
- 36 	Ext.namespace('Ext.deluge.details');
- 37 	Ext.deluge.details.TabPanel = Ext.extend(Ext.TabPanel, {
- 38 		
- 39 		constructor: function(config) {
- 40 			config = Ext.apply({
- 41 				region: 'south',
- 42 				id: 'torrentDetails',
- 43 				split: true,
- 44 				height: 220,
- 45 				minSize: 100,
- 46 				collapsible: true,
- 47 				margins: '0 5 5 5',
- 48 				activeTab: 0
- 49 			}, config);
- 50 			Ext.deluge.details.TabPanel.superclass.constructor.call(this, config);
- 51 		},
- 52 		
- 53 		clear: function() {
- 54 			this.items.each(function(panel) {
- 55 				if (panel.clear) {
- 56 					panel.clear.defer(100, panel);
- 57 					panel.disable();
- 58 				}
- 59 			});
- 60 		},
- 61 		
- 62 		
- 63 		update: function(tab) {
- 64 			var torrent = Deluge.Torrents.getSelected();
- 65 			if (!torrent) {
- 66 				this.clear();
- 67 				return;
- 68 			}
- 69 			
- 70 			this.items.each(function(tab) {
- 71 				if (tab.disabled) tab.enable();
- 72 			});
- 73 			
- 74 			tab = tab || this.getActiveTab();
- 75 			if (tab.update) tab.update(torrent.id);
- 76 		},
- 77 		
- 78 		/* Event Handlers */
- 79 		
- 80 		// We need to add the events in onRender since Deluge.Torrents hasn't
- 81 		// been created yet.
- 82 		onRender: function(ct, position) {
- 83 			Ext.deluge.details.TabPanel.superclass.onRender.call(this, ct, position);
- 84 			Deluge.Events.on('disconnect', this.clear, this);
- 85 			Deluge.Torrents.on('rowclick', this.onTorrentsClick, this);
- 86 			this.on('tabchange', this.onTabChange, this);
- 87 			
- 88 			Deluge.Torrents.getSelectionModel().on('selectionchange', function(selModel) {
- 89 				if (!selModel.hasSelection()) this.clear();
- 90 			}, this);
- 91 		},
- 92 		
- 93 		onTabChange: function(panel, tab) {
- 94 			this.update(tab);
- 95 		},
- 96 		
- 97 		onTorrentsClick: function(grid, rowIndex, e) {
- 98 			this.update();
- 99 		}
-100 	});
-101 	Deluge.Details = new Ext.deluge.details.TabPanel();
-102 })();
-103 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.EditTrackers.js.html b/deluge/ui/web/docs/symbols/src/Deluge.EditTrackers.js.html deleted file mode 100644 index 346558fee..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.EditTrackers.js.html +++ /dev/null @@ -1,354 +0,0 @@ -
  1 /*
-  2 Script: Deluge.EditTrackers.js
-  3     Contains the edit trackers window.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {
- 36 	Ext.deluge.AddTracker = Ext.extend(Ext.Window, {
- 37 		constructor: function(config) {
- 38 			config = Ext.apply({
- 39 				title: _('Add Tracker'),
- 40 				width: 375,
- 41 				height: 150,
- 42 				bodyStyle: 'padding: 5px',
- 43 				layout: 'fit',
- 44 				buttonAlign: 'right',
- 45 				closeAction: 'hide',
- 46 				closable: true,
- 47 				iconCls: 'x-deluge-edit-trackers',
- 48 				plain: true,
- 49 				resizable: false
- 50 			}, config);
- 51 			Ext.deluge.AddTracker.superclass.constructor.call(this, config);
- 52 		},
- 53 		
- 54 		initComponent: function() {
- 55 			Ext.deluge.AddTracker.superclass.initComponent.call(this);
- 56 			
- 57 			this.addButton(_('Cancel'), this.onCancel, this);
- 58 			this.addButton(_('Add'), this.onAdd, this);
- 59 			this.addEvents('add');
- 60 			
- 61 			this.form = this.add({
- 62 				xtype: 'form',
- 63 				defaultType: 'textarea',
- 64 				baseCls: 'x-plain',
- 65 				labelWidth: 55,
- 66 				items: [{
- 67 					fieldLabel: _('Trackers'),
- 68 					name: 'trackers',
- 69 					anchor: '100%'
- 70 				}]
- 71 			})
- 72 		},
- 73 		
- 74 		onCancel: function() {
- 75 			this.form.getForm().findField('trackers').setValue('');
- 76 			this.hide();
- 77 		},
- 78 		
- 79 		onAdd: function() {
- 80 			var trackers = this.form.getForm().findField('trackers').getValue();
- 81 			trackers = trackers.split('\n');
- 82 			
- 83 			var cleaned = [];
- 84 			Ext.each(trackers, function(tracker) {
- 85 				if (Ext.form.VTypes.url(tracker)) {
- 86 					cleaned.push(tracker);
- 87 				}
- 88 			}, this);
- 89 			this.fireEvent('add', cleaned);
- 90 			this.hide();
- 91 			this.form.getForm().findField('trackers').setValue('');
- 92 		}
- 93 	});
- 94 	
- 95 	Ext.deluge.EditTracker = Ext.extend(Ext.Window, {
- 96 		constructor: function(config) {
- 97 			config = Ext.apply({
- 98 				title: _('Edit Tracker'),
- 99 				width: 375,
-100 				height: 110,
-101 				bodyStyle: 'padding: 5px',
-102 				layout: 'fit',
-103 				buttonAlign: 'right',
-104 				closeAction: 'hide',
-105 				closable: true,
-106 				iconCls: 'x-deluge-edit-trackers',
-107 				plain: true,
-108 				resizable: false
-109 			}, config);
-110 			Ext.deluge.EditTracker.superclass.constructor.call(this, config);
-111 		},
-112 		
-113 		initComponent: function() {
-114 			Ext.deluge.EditTracker.superclass.initComponent.call(this);
-115 			
-116 			this.addButton(_('Cancel'), this.onCancel, this);
-117 			this.addButton(_('Save'), this.onSave, this);
-118 			this.on('hide', this.onHide, this);
-119 			
-120 			this.form = this.add({
-121 				xtype: 'form',
-122 				defaultType: 'textfield',
-123 				baseCls: 'x-plain',
-124 				labelWidth: 55,
-125 				items: [{
-126 					fieldLabel: _('Tracker'),
-127 					name: 'tracker',
-128 					anchor: '100%'
-129 				}]
-130 			});
-131 		},
-132 		
-133 		show: function(record) {
-134 			Ext.deluge.EditTracker.superclass.show.call(this);
-135 			
-136 			this.record = record;
-137 			this.form.getForm().findField('tracker').setValue(record.data['url']);
-138 		},
-139 		
-140 		onCancel: function() {
-141 			this.hide();
-142 		},
-143 		
-144 		onHide: function() {
-145 			this.form.getForm().findField('tracker').setValue('');
-146 		},
-147 		
-148 		onSave: function() {
-149 			var url = this.form.getForm().findField('tracker').getValue();
-150 			this.record.set('url', url);
-151 			this.record.commit();
-152 			this.hide();
-153 		}
-154 	});
-155 	
-156 	Ext.deluge.EditTrackers = Ext.extend(Ext.Window, {
-157 	
-158 		constructor: function(config) {
-159 			config = Ext.apply({
-160 				title: _('Edit Trackers'),
-161 				width: 350,
-162 				height: 220,
-163 				bodyStyle: 'padding: 5px',
-164 				layout: 'fit',
-165 				buttonAlign: 'right',
-166 				closeAction: 'hide',
-167 				closable: true,
-168 				iconCls: 'x-deluge-edit-trackers',
-169 				plain: true,
-170 				resizable: true
-171 			}, config);
-172 			Ext.deluge.EditTrackers.superclass.constructor.call(this, config);
-173 		},
-174 		
-175 		initComponent: function() {
-176 			Ext.deluge.EditTrackers.superclass.initComponent.call(this);
-177 			
-178 			this.addButton(_('Cancel'), this.onCancel, this);
-179 			this.addButton(_('Ok'), this.onOk, this);
-180 			this.addEvents('save');
-181 			
-182 			this.on('show', this.onShow, this);
-183 			this.on('save', this.onSave, this);
-184 			
-185 			this.addWindow = new Ext.deluge.AddTracker();
-186 			this.addWindow.on('add', this.onAddTrackers, this);
-187 			this.editWindow = new Ext.deluge.EditTracker();
-188 			
-189 			this.grid = this.add({
-190 				xtype: 'grid',
-191 				store: new Ext.data.SimpleStore({
-192 					fields: [
-193 						{name: 'tier', mapping: 0},
-194 						{name: 'url', mapping: 1}
-195 					]
-196 				}),
-197 				columns: [{
-198 					header: _('Tier'),
-199 					width: 50,
-200 					sortable: true,
-201 					renderer: fplain,
-202 					dataIndex: 'tier'
-203 				}, {
-204 					id:'tracker',
-205 					header: _('Tracker'),
-206 					sortable: true,
-207 					renderer: fplain,
-208 					dataIndex: 'url'
-209 				}],
-210 				stripeRows: true,
-211 				selModel: new Ext.grid.RowSelectionModel({
-212 					singleSelect: true,
-213 					listeners: {
-214 						'selectionchange': {fn: this.onSelect, scope: this}
-215 					}
-216 				}),
-217 				autoExpandColumn: 'tracker',
-218 				deferredRender:false,
-219 				autoScroll:true,
-220 				margins: '0 0 0 0',
-221 				bbar: new Ext.Toolbar({
-222 					items: [
-223 						{
-224 							cls: 'x-btn-text-icon',
-225 							text: _('Up'),
-226 							icon: '/icons/up.png',
-227 							handler: this.onUp,
-228 							scope: this
-229 						}, {
-230 							cls: 'x-btn-text-icon',
-231 							text: _('Down'),
-232 							icon: '/icons/down.png',
-233 							handler: this.onDown,
-234 							scope: this
-235 						}, '->', {
-236 							cls: 'x-btn-text-icon',
-237 							text: _('Add'),
-238 							icon: '/icons/add.png',
-239 							handler: this.onAdd,
-240 							scope: this
-241 						}, {
-242 							cls: 'x-btn-text-icon',
-243 							text: _('Edit'),
-244 							icon: '/icons/edit_trackers.png',
-245 							handler: this.onEdit,
-246 							scope: this
-247 						}, {
-248 							cls: 'x-btn-text-icon',
-249 							text: _('Remove'),
-250 							icon: '/icons/remove.png',
-251 							handler: this.onRemove,
-252 							scope: this
-253 						}
-254 					]
-255 				})
-256 			});
-257 		},
-258 		
-259 		onAdd: function() {
-260 			this.addWindow.show();
-261 		},
-262 		
-263 		onAddTrackers: function(trackers) {
-264 			var store = this.grid.getStore();
-265 			Ext.each(trackers, function(tracker) {
-266 				var duplicate = false, heightestTier = -1;
-267 				store.each(function(record) {
-268 					if (record.get('tier') > heightestTier) {
-269 						heightestTier = record.get('tier');
-270 					}
-271 					if (tracker == record.get('tracker')) {
-272 						duplicate = true;
-273 						return false;
-274 					}
-275 				}, this);
-276 				if (!duplicate) {
-277 					store.loadData([[heightestTier + 1, tracker]], true);
-278 				}
-279 			}, this);
-280 		},
-281 		
-282 		onCancel: function() {
-283 			this.hide();
-284 		},
-285 		
-286 		onEdit: function() {
-287 			var r = this.grid.getSelectionModel().getSelected();
-288 			this.editWindow.show(r);
-289 		},
-290 		
-291 		onHide: function() {
-292 			this.grid.getStore().removeAll();
-293 		},
-294 		
-295 		onOk: function() {
-296 			var trackers = [];
-297 			this.grid.getStore().each(function(record) {
-298 				trackers.push({
-299 					'tier': record.get('tier'),
-300 					'url': record.get('url')
-301 				})
-302 			}, this);
-303 			
-304 			Deluge.Client.core.set_torrent_trackers(this.torrentId, trackers, {
-305 				failure: this.onSaveFail,
-306 				scope: this
-307 			});
-308 
-309 			this.hide();
-310 		},
-311 		
-312 		onRemove: function() {
-313 			// Remove from the grid
-314 			var r = this.grid.getSelectionModel().getSelected();
-315 			this.grid.getStore().remove(r);
-316 		},
-317 		
-318 		onRequestComplete: function(status) {
-319 			var trackers = [];
-320 			Ext.each(status['trackers'], function(tracker) {
-321 				trackers.push([tracker['tier'], tracker['url']]);
-322 			});
-323 			this.grid.getStore().loadData(trackers);
-324 		},
-325 		
-326 		onSaveFail: function() {
-327 			
-328 		},
-329 		
-330 		onSelect: function(sm) {
-331 			if (sm.hasSelection()) {
-332 				this.grid.getBottomToolbar().items.get(4).enable();
-333 			}
-334 		},
-335 		
-336 		onShow: function() {
-337 			this.grid.getBottomToolbar().items.get(4).disable();
-338 			var r = Deluge.Torrents.getSelected();
-339 			this.torrentId = r.id;
-340 			Deluge.Client.core.get_torrent_status(r.id, ['trackers'], {
-341 				success: this.onRequestComplete,
-342 				scope: this
-343 			});
-344 		}
-345 	});
-346 	Deluge.EditTrackers = new Ext.deluge.EditTrackers();
-347 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Events.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Events.js.html deleted file mode 100644 index db91213aa..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Events.js.html +++ /dev/null @@ -1,64 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Events.js
-  3 	Class for holding global events that occur within the UI.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 /**
- 35  * @namespace Deluge.Events
- 36  * @class Deluge.Events
- 37  * @name Deluge.Events
- 38  * @description Class for holding global events that occur within the UI.
- 39  */
- 40 
- 41 (function() {
- 42 
- 43     Events = Ext.extend(Ext.util.Observable, {
- 44         constructor: function() {
- 45             Events.superclass.constructor.call(this);
- 46         },
- 47         
- 48         addListener: function(eventName, fn, scope, o) {
- 49             this.addEvents(eventName);
- 50             Events.superclass.addListener.call(this, eventName, fn, scope, o);
- 51         }
- 52     });
- 53     Events.prototype.on = Events.prototype.addListener
- 54     Events.prototype.fire = Events.prototype.fireEvent
- 55     Deluge.Events = new Events();
- 56 })();
- 57 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Formatters.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Formatters.js.html deleted file mode 100644 index 685c4285a..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Formatters.js.html +++ /dev/null @@ -1,151 +0,0 @@ -
  1 /*
-  2 Script:
-  3 	Deluge.Formatters.ks
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 /**
- 35  * @description A collection of functions for string formatting values.
- 36  * @namespace Deluge.Formatters
- 37  */
- 38 Deluge.Formatters = {
- 39 	/**
- 40 	 * Formats a date string in the locale's date representation based on the
- 41 	 * systems timezone.
- 42 	 *
- 43 	 * @param {number} timestamp time in seconds since the Epoch
- 44 	 * @returns {string} a string in the locale's date representation or ""
- 45 	 * if seconds < 0
- 46 	 */
- 47 	date: function(timestamp) {
- 48 		function zeroPad(num, count) {
- 49 			var numZeropad = num + '';
- 50 			while (numZeropad.length < count) {
- 51 				numZeropad = '0' + numZeropad;
- 52 			}
- 53 			return numZeropad;
- 54 		}
- 55 		timestamp = timestamp * 1000;
- 56 		var date = new Date(timestamp);
- 57 		return String.format('{0}/{1}/{2}', zeroPad(date.getDate(), 2), zeroPad(date.getMonth() + 1, 2), date.getFullYear());
- 58 	},
- 59 	
- 60 	/**
- 61 	 * Formats the bytes value into a string with KiB, MiB or GiB units.
- 62 	 *
- 63 	 * @param {number} bytes the filesize in bytes
- 64 	 * @returns {string} formatted string with KiB, MiB or GiB units.
- 65 	 */
- 66 	size: function(bytes) {
- 67 		bytes = bytes / 1024.0;
- 68 	
- 69 		if (bytes < 1024) { return bytes.toFixed(1)  + ' KiB'; }
- 70 		else { bytes = bytes / 1024; }
- 71 	
- 72 		if (bytes < 1024) { return bytes.toFixed(1)  + ' MiB'; }
- 73 		else { bytes = bytes / 1024; }
- 74 	
- 75 		return bytes.toFixed(1) + ' GiB'
- 76 	},
- 77 	
- 78 	/**
- 79 	 * Formats a string to display a transfer speed utilizing {@link Deluge.Formatters.size}
- 80 	 *
- 81 	 * @param {number} bytes the filesize in bytes
- 82 	 * @returns {string} formatted string with KiB, MiB or GiB units.
- 83 	 */
- 84 	speed: function(bits) {
- 85 		return fsize(bits) + '/s'
- 86 	},
- 87 	
- 88 	/**
- 89 	 * Formats a string to show time in a human readable form.
- 90 	 *
- 91 	 * @param {number} time the number of seconds
- 92 	 * @returns {string} a formatted time string. will return '' if seconds == 0
- 93 	 */
- 94 	timeRemaining: function(time) {
- 95 		if (time == 0) { return '∞' }
- 96 		if (time < 60) { return time + 's'; }
- 97 		else { time = time / 60; }
- 98 	
- 99 		if (time < 60) {
-100 			var minutes = Math.floor(time)
-101 			var seconds = Math.round(60 * (time - minutes))
-102 			if (seconds > 0) {
-103 				return minutes + 'm ' + seconds + 's';
-104 			} else {
-105 				return minutes + 'm'; }
-106 			}
-107 		else { time = time / 60; }
-108 	
-109 		if (time < 24) { 
-110 			var hours = Math.floor(time)
-111 			var minutes = Math.round(60 * (time - hours))
-112 			if (minutes > 0) {
-113 				return hours + 'h ' + minutes + 'm';
-114 			} else {
-115 				return hours + 'h';
-116 			}			
-117 		}
-118 		else { time = time / 24; }
-119 	
-120 		var days = Math.floor(time)
-121 		var hours = Math.round(24 * (time - days))
-122 		if (hours > 0) {
-123 			return days + 'd ' + hours + 'h';
-124 		} else {
-125 			return days + 'd';
-126 		}
-127 	},
-128 	
-129 	/**
-130 	 * Simply returns the value untouched, for when no formatting is required.
-131 	 *
-132 	 * @param value, the value to be displayed
-133 	 * @returns the untouched value.
-134 	 */
-135 	plain: function(value) {
-136 		return value;
-137 	}
-138 }
-139 var fsize = Deluge.Formatters.size;
-140 var fspeed = Deluge.Formatters.speed;
-141 var ftime = Deluge.Formatters.timeRemaining;
-142 var fdate = Deluge.Formatters.date;
-143 var fplain = Deluge.Formatters.plain;
-144 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Keys.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Keys.js.html deleted file mode 100644 index 34a06f5f8..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Keys.js.html +++ /dev/null @@ -1,115 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Keys.js
-  3     The torrent status keys that are commonly used around the UI.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 /**
- 35  * @description The torrent status keys that are commonly used around the UI.
- 36  * @namespace Deluge.Keys
- 37  */
- 38 Deluge.Keys = {
- 39 	/**
- 40 	 * @static
- 41 	 */
- 42     Grid: [
- 43         'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
- 44         'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
- 45         'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
- 46         'is_auto_managed', 'time_added', 'tracker_host'
- 47     ],
- 48     
- 49     /**
- 50      * @description Keys used in the status tab of the statistics panel.
- 51      * These get extended
- 52      * by {@link Deluge.Keys.Grid}.
- 53 	 * @static
- 54 	 */
- 55     Status: [
- 56         'total_done', 'total_payload_download', 'total_uploaded',
- 57         'total_payload_upload', 'next_announce', 'tracker_status', 'num_pieces',
- 58         'piece_length', 'is_auto_managed', 'active_time', 'seeding_time',
- 59         'seed_rank'
- 60     ],
- 61     
- 62     /**
- 63 	 * @static
- 64      * @description Keys used in the files tab of the statistics panel.
- 65      * <pre>['files', 'file_progress', 'file_priorities']</pre>
- 66 	 */
- 67     Files: [
- 68         'files', 'file_progress', 'file_priorities'
- 69     ],
- 70     
- 71     /**
- 72      * @description Keys used in the peers tab of the statistics panel.
- 73      * <pre>['peers', 'seed']</pre>
- 74 	 * @static
- 75 	 */
- 76     Peers: [
- 77         'peers', 'seeds'
- 78     ],
- 79     
- 80     /**
- 81      * @description Keys used in the details tab of the statistics panel.
- 82 	 * @static
- 83 	 */
- 84     Details: [
- 85         'name', 'save_path', 'total_size', 'num_files', 'tracker_status',
- 86         'tracker', 'comment'
- 87     ],
- 88     
- 89     /**
- 90 	 * @static
- 91 	 * @description Keys used in the options tab of the statistics panel.
- 92 	 * <pre>['max_download_speed', 'max_upload_speed', 'max_connections', 'max_upload_slots',
- 93 	 *  'is_auto_managed', 'stop_at_ratio', 'stop_ratio', 'remove_at_ratio', 'private',
- 94 	 *  'prioritize_first_last']</pre>
- 95 	 */
- 96     Options: [
- 97         'max_download_speed', 'max_upload_speed', 'max_connections',
- 98         'max_upload_slots','is_auto_managed', 'stop_at_ratio', 'stop_ratio',
- 99         'remove_at_ratio', 'private', 'prioritize_first_last'
-100     ]
-101 };
-102 
-103 // Merge the grid and status keys together as the status keys contain all the
-104 // grid ones.
-105 Ext.each(Deluge.Keys.Grid, function(key) {
-106     Deluge.Keys.Status.push(key);
-107 });
-108 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Login.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Login.js.html deleted file mode 100644 index 786160507..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Login.js.html +++ /dev/null @@ -1,174 +0,0 @@ -
  1 /*
-  2 Script: deluge-login.js
-  3     Contains all objects and functions related to the login system.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function(){
- 36 	Ext.deluge.LoginWindow = Ext.extend(Ext.Window, {
- 37 		
- 38 		firstShow: true,
- 39 		
- 40 		constructor: function(config) {
- 41 			config = Ext.apply({
- 42 				layout: 'fit',
- 43 				width: 300,
- 44 				height: 120,
- 45 				bodyStyle: 'padding: 10px 5px;',
- 46 				buttonAlign: 'center',
- 47 				closeAction: 'hide',
- 48 				closable: false,
- 49 				modal: true,
- 50 				plain: true,
- 51 				resizable: false,
- 52 				title: _('Login'),
- 53 				iconCls: 'x-deluge-login-window-icon'
- 54 			}, config);
- 55 			Ext.deluge.LoginWindow.superclass.constructor.call(this, config);
- 56 		},
- 57 		
- 58 		initComponent: function() {
- 59 			Ext.deluge.LoginWindow.superclass.initComponent.call(this);
- 60 			Deluge.Events.on('logout', this.onLogout, this);
- 61 			this.on('show', this.onShow, this);
- 62 			this.on('beforeshow', this.onBeforeShow, this);
- 63 			
- 64 			this.addButton({
- 65 				text: _('Login'),
- 66 				handler: this.onLogin,
- 67 				scope: this
- 68 			});
- 69 			
- 70 			this.loginForm = this.add({
- 71 				xtype: 'form',
- 72 				defaultType: 'textfield',
- 73 				id: 'loginForm',
- 74 				baseCls: 'x-plain',
- 75 				labelWidth: 55,
- 76 				items: [{
- 77 					fieldLabel: _('Password'),
- 78 					id: 'password',
- 79 					name: 'password',
- 80 					inputType: 'password',
- 81 					anchor: '100%',
- 82 					listeners: {
- 83 						'specialkey': {
- 84 							fn: this.onKey,
- 85 							scope: this
- 86 						}
- 87 					}
- 88 				}]
- 89 			})
- 90 		},
- 91 		
- 92 		onKey: function(field, e) {
- 93 			if (e.getKey() == 13) this.onLogin();
- 94 		},
- 95 		
- 96 		onLogin: function() {
- 97 			var passwordField = this.loginForm.items.get('password');
- 98 			Deluge.Client.auth.login(passwordField.getValue(), {
- 99 				success: function(result) {
-100 					if (result) {
-101 						Deluge.Events.fire('login');
-102 						this.hide();
-103 						passwordField.setRawValue('');
-104 						Deluge.UI.cookies.set("session", result);
-105 					} else {
-106 						Ext.MessageBox.show({
-107 							title: _('Login Failed'),
-108 							msg: _('You entered an incorrect password'),
-109 							buttons: Ext.MessageBox.OK,
-110 							modal: false,
-111 							fn: function() {
-112 								passwordField.focus();
-113 							},
-114 							icon: Ext.MessageBox.WARNING,
-115 							iconCls: 'x-deluge-icon-warning'
-116 						});
-117 					}
-118 				},
-119 				scope: this
-120 			});
-121 		},
-122 		
-123 		onLogout: function() {
-124 			var session = Deluge.UI.cookies.get("session", false);
-125 			if (session) {
-126 				Deluge.Client.auth.delete_session(session, {
-127 					success: function(result) {
-128 						Deluge.UI.cookies.clear("session");
-129 						this.show();
-130 					},
-131 					scope: this
-132 				});
-133 			}
-134 		},
-135 		
-136 		onBeforeShow: function() {
-137 			var session = Deluge.UI.cookies.get("session", false);
-138 			if (session) {
-139 				Deluge.Client.auth.check_session(session, {
-140 					success: function(result) {
-141 						if (result) {
-142 							Deluge.Events.fire('login');
-143 							this.loginForm.items.get('password').setRawValue('');
-144 							this.hide();
-145 						} else {
-146 							Deluge.UI.cookies.clear("session");
-147 							this.show();
-148 						}
-149 					},
-150 					failure: function(result) {
-151 						Deluge.UI.cookies.clear("session");
-152 						this.show();
-153 					},
-154 					scope: this
-155 				});
-156 				return false;
-157 			}
-158 		},
-159 		
-160 		onShow: function() {
-161 			var passwordField = this.loginForm.items.get('password');
-162 			passwordField.focus(false, 150);
-163 		}
-164 	});
-165 	
-166 	Deluge.Login = new Ext.deluge.LoginWindow();
-167 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Menus.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Menus.js.html deleted file mode 100644 index 5677002e5..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Menus.js.html +++ /dev/null @@ -1,439 +0,0 @@ -
  1 /*
-  2 Script: deluge-menus.js
-  3     Contains all the menus contained within the UI for easy access and editing.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 Deluge.Menus = {
- 36 	onTorrentAction: function(item, e) {
- 37 		var selection = Deluge.Torrents.getSelections();
- 38 		var ids = [];
- 39 		Ext.each(selection, function(record) {
- 40 			ids.push(record.id);
- 41 		});
- 42 		
- 43 		switch (item.id) {
- 44 			case 'pause':
- 45 			case 'resume':
- 46 				Deluge.Client.core[item.id + '_torrent'](ids, {
- 47 					success: function() {
- 48 						Deluge.UI.update();
- 49 					}
- 50 				});
- 51 				break;
- 52 			case 'top':
- 53 			case 'up':
- 54 			case 'down':
- 55 			case 'bottom':
- 56 				Deluge.Client.core['queue_' + item.id](ids, {
- 57 					success: function() {
- 58 						Deluge.UI.update();
- 59 					}
- 60 				});
- 61 				break;
- 62 			case 'edit_trackers':
- 63 				Deluge.EditTrackers.show();
- 64 				break;
- 65 			case 'update':
- 66 				Deluge.Client.core.force_reannounce(ids, {
- 67 					success: function() {
- 68 						Deluge.UI.update();
- 69 					}
- 70 				});
- 71 				break;
- 72 			case 'remove':
- 73 				Deluge.Events.fire('torrentRemoved', ids);
- 74 				Deluge.Client.core.remove_torrent(ids, null, {
- 75 					success: function() {
- 76 						Deluge.UI.update();
- 77 					}
- 78 				});
- 79 				break;
- 80 			case 'recheck':
- 81 				Deluge.Client.core.force_recheck(ids, {
- 82 					success: function() {	
- 83 						Deluge.UI.update();
- 84 					}
- 85 				});
- 86 				break;
- 87 		}
- 88 	}
- 89 }
- 90 
- 91 Deluge.Menus.Torrent = new Ext.menu.Menu({
- 92 	id: 'torrentMenu',
- 93 	items: [{
- 94 		id: 'pause',
- 95 		text: _('Pause'),
- 96 		icon: '/icons/pause.png',
- 97 		handler: Deluge.Menus.onTorrentAction,
- 98 		scope: Deluge.Menus
- 99 	}, {
-100 		id: 'resume',
-101 		text: _('Resume'),
-102 		icon: '/icons/start.png',
-103 		handler: Deluge.Menus.onTorrentAction,
-104 		scope: Deluge.Menus
-105 	}, '-', {
-106 		id: 'options',
-107 		text: _('Options'),
-108 		icon: '/icons/preferences.png',
-109 		menu: new Ext.menu.Menu({
-110 			items: [{
-111 				text: _('D/L Speed Limit'),
-112 				iconCls: 'x-deluge-downloading',
-113 				menu: new Ext.menu.Menu({
-114 					items: [{
-115 						text: _('5 KiB/s')
-116 					}, {
-117 						text: _('10 KiB/s')
-118 					}, {
-119 						text: _('30 KiB/s')
-120 					}, {
-121 						text: _('80 KiB/s')
-122 					}, {
-123 						text: _('300 KiB/s')
-124 					},{
-125 						text: _('Unlimited')
-126 					}]
-127 				})
-128 			}, {
-129 				text: _('U/L Speed Limit'),
-130 				iconCls: 'x-deluge-seeding',
-131 				menu: new Ext.menu.Menu({
-132 					items: [{
-133 						text: _('5 KiB/s')
-134 					}, {
-135 						text: _('10 KiB/s')
-136 					}, {
-137 						text: _('30 KiB/s')
-138 					}, {
-139 						text: _('80 KiB/s')
-140 					}, {
-141 						text: _('300 KiB/s')
-142 					},{
-143 						text: _('Unlimited')
-144 					}]
-145 				})
-146 			}, {
-147 				text: _('Connection Limit'),
-148 				iconCls: 'x-deluge-connections',
-149 				menu: new Ext.menu.Menu({
-150 					items: [{
-151 						text: _('50')
-152 					}, {
-153 						text: _('100')
-154 					}, {
-155 						text: _('200')
-156 					}, {
-157 						text: _('300')
-158 					}, {
-159 						text: _('500')
-160 					},{
-161 						text: _('Unlimited')
-162 					}]
-163 				})
-164 			}, {
-165 				text: _('Upload Slot Limit'),
-166 				icon: '/icons/upload_slots.png',
-167 				menu: new Ext.menu.Menu({
-168 					items: [{
-169 						text: _('0')
-170 					}, {
-171 						text: _('1')
-172 					}, {
-173 						text: _('2')
-174 					}, {
-175 						text: _('3')
-176 					}, {
-177 						text: _('5')
-178 					},{
-179 						text: _('Unlimited')
-180 					}]
-181 				})
-182 			}, {
-183 				id: 'auto_managed',
-184 				text: _('Auto Managed'),
-185 				checked: false
-186 			}]
-187 		})
-188 	}, '-', {
-189 		text: _('Queue'),
-190 		icon: '/icons/queue.png',
-191 		menu: new Ext.menu.Menu({
-192 			items: [{
-193 				id: 'top',
-194 				text: _('Top'),
-195 				icon: '/icons/top.png',
-196 				handler: Deluge.Menus.onTorrentAction,
-197 				scope: Deluge.Menus
-198 			},{
-199 				id: 'up',
-200 				text: _('Up'),
-201 				icon: '/icons/up.png',
-202 				handler: Deluge.Menus.onTorrentAction,
-203 				scope: Deluge.Menus
-204 			},{
-205 				id: 'down',
-206 				text: _('Down'),
-207 				icon: '/icons/down.png',
-208 				handler: Deluge.Menus.onTorrentAction,
-209 				scope: Deluge.Menus
-210 			},{
-211 				id: 'bottom',
-212 				text: _('Bottom'),
-213 				icon: '/icons/bottom.png',
-214 				handler: Deluge.Menus.onTorrentAction,
-215 				scope: Deluge.Menus
-216 			}]
-217 		})
-218 	}, '-', {
-219 		id: 'update',
-220 		text: _('Update Tracker'),
-221 		icon: '/icons/update.png',
-222 		handler: Deluge.Menus.onTorrentAction,
-223 		scope: Deluge.Menus
-224 	}, {
-225 		id: 'edit_trackers',
-226 		text: _('Edit Trackers'),
-227 		icon: '/icons/edit_trackers.png',
-228 		handler: Deluge.Menus.onTorrentAction,
-229 		scope: Deluge.Menus
-230 	}, '-', {
-231 		id: 'remove',
-232 		text: _('Remove Torrent'),
-233 		icon: '/icons/remove.png',
-234 		handler: Deluge.Menus.onTorrentAction,
-235 		scope: Deluge.Menus
-236 	}, '-', {
-237 		id: 'recheck',
-238 		text: _('Force Recheck'),
-239 		icon: '/icons/recheck.png',
-240 		handler: Deluge.Menus.onTorrentAction,
-241 		scope: Deluge.Menus
-242 	/*}, {
-243 		id: 'move',
-244 		text: _('Move Storage'),
-245 		icon: '/icons/move.png',
-246 		handler: Deluge.Menus.onTorrentAction,
-247 		scope: Deluge.Menus*/
-248 	}]
-249 });
-250 
-251 Deluge.Menus.Connections = new Ext.menu.Menu({
-252 	id: 'connectionsMenu',
-253 	items: [{
-254 		id: '50',
-255 		text: '50',
-256 		group: 'max_connections_global',
-257 		checked: false,
-258 		checkHandler: onLimitChanged
-259 	},{
-260 		id: '100',
-261 		text: '100',
-262 		group: 'max_connections_global',
-263 		checked: false,
-264 		checkHandler: onLimitChanged
-265 	},{
-266 		id: '200',
-267 		text: '200',
-268 		group: 'max_connections_global',
-269 		checked: false,
-270 		checkHandler: onLimitChanged
-271 	},{
-272 		id: '300',
-273 		text: '300',
-274 		group: 'max_connections_global',
-275 		checked: false,
-276 		checkHandler: onLimitChanged
-277 	},{
-278 		id: '500',
-279 		text: '500',
-280 		group: 'max_connections_global',
-281 		checked: false,
-282 		checkHandler: onLimitChanged
-283 	},{
-284 		id: '-1',
-285 		text: _('Unlimited'),
-286 		group: 'max_connections_global',
-287 		checked: false,
-288 		checkHandler: onLimitChanged
-289 	},'-',{
-290 		id: 'other',
-291 		text: _('Other'),
-292 		group: 'max_connections_global',
-293 		checked: false,
-294 		checkHandler: onLimitChanged
-295 	}]
-296 });
-297 
-298 Deluge.Menus.Download = new Ext.menu.Menu({
-299 	id: 'downspeedMenu',
-300 	items: [{
-301 		id: '5',
-302 		text: '5 KiB/s',
-303 		group: 'max_download_speed',
-304 		checked: false,
-305 		checkHandler: onLimitChanged
-306 	},{
-307 		id: '10',
-308 		text: '10 KiB/s',
-309 		group: 'max_download_speed',
-310 		checked: false,
-311 		checkHandler: onLimitChanged
-312 	},{
-313 		id: '30',
-314 		text: '30 KiB/s',
-315 		group: 'max_download_speed',
-316 		checked: false,
-317 		checkHandler: onLimitChanged
-318 	},{
-319 		id: '80',
-320 		text: '80 KiB/s',
-321 		group: 'max_download_speed',
-322 		checked: false,
-323 		checkHandler: onLimitChanged
-324 	},{
-325 		id: '300',
-326 		text: '300 KiB/s',
-327 		group: 'max_download_speed',
-328 		checked: false,
-329 		checkHandler: onLimitChanged
-330 	},{
-331 		id: '-1',
-332 		text: _('Unlimited'),
-333 		group: 'max_download_speed',
-334 		checked: false,
-335 		checkHandler: onLimitChanged
-336 	},'-',{
-337 		id: 'other',
-338 		text: _('Other'),
-339 		group: 'max_download_speed',
-340 		checked: false,
-341 		checkHandler: onLimitChanged
-342 	}]
-343 });
-344 
-345 Deluge.Menus.Upload = new Ext.menu.Menu({
-346 	id: 'upspeedMenu',
-347 	items: [{
-348 		id: '5',
-349 		text: '5 KiB/s',
-350 		group: 'max_upload_speed',
-351 		checked: false,
-352 		checkHandler: onLimitChanged
-353 	},{
-354 		id: '10',
-355 		text: '10 KiB/s',
-356 		group: 'max_upload_speed',
-357 		checked: false,
-358 		checkHandler: onLimitChanged
-359 	},{
-360 		id: '30',
-361 		text: '30 KiB/s',
-362 		group: 'max_upload_speed',
-363 		checked: false,
-364 		checkHandler: onLimitChanged
-365 	},{
-366 		id: '80',
-367 		text: '80 KiB/s',
-368 		group: 'max_upload_speed',
-369 		checked: false,
-370 		checkHandler: onLimitChanged
-371 	},{
-372 		id: '300',
-373 		text: '300 KiB/s',
-374 		group: 'max_upload_speed',
-375 		checked: false,
-376 		checkHandler: onLimitChanged
-377 	},{
-378 		id: '-1',
-379 		text: _('Unlimited'),
-380 		group: 'max_upload_speed',
-381 		checked: false,
-382 		checkHandler: onLimitChanged
-383 	},'-',{
-384 		id: 'other',
-385 		text: _('Other'),
-386 		group: 'max_upload_speed',
-387 		checked: false,
-388 		checkHandler: onLimitChanged
-389 	}]
-390 });
-391 
-392 Deluge.Menus.FilePriorities = new Ext.menu.Menu({
-393 	id: 'filePrioritiesMenu',
-394 	items: [{
-395 		id: 'expandAll',
-396 		text: _('Expand All'),
-397 		icon: '/icons/expand_all.png'
-398 	}, '-', {
-399 		id: 'no_download',
-400 		text: _('Do Not Download'),
-401 		icon: '/icons/no_download.png',
-402 		filePriority: 0
-403 	}, {
-404 		id: 'normal',
-405 		text: _('Normal Priority'),
-406 		icon: '/icons/normal.png',
-407 		filePriority: 1
-408 	}, {
-409 		id: 'high',
-410 		text: _('High Priority'),
-411 		icon: '/icons/high.png',
-412 		filePriority: 2
-413 	}, {
-414 		id: 'highest',
-415 		text: _('Highest Priority'),
-416 		icon: '/icons/highest.png',
-417 		filePriority: 5
-418 	}]
-419 });
-420 
-421 function onLimitChanged(item, checked) {
-422 	if (item.id == "other") {
-423 	} else {
-424 		config = {}
-425 		config[item.group] = item.id
-426 		Deluge.Client.core.set_config(config, {
-427 			success: function() {
-428 				Deluge.UI.update();
-429 			}
-430 		});
-431 	}
-432 }
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.OptionsManager.js.html b/deluge/ui/web/docs/symbols/src/Deluge.OptionsManager.js.html deleted file mode 100644 index 20e86c971..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.OptionsManager.js.html +++ /dev/null @@ -1,256 +0,0 @@ -
  1 /*
-  2 Script:
-  3 	Deluge.OptionsManager.js
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 /**
- 35  * @description A class that can be used to manage options throughout the ui.
- 36  * @namespace Deluge
- 37  * @class Deluge.OptionsManager
- 38  */
- 39 Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
- 40 	
- 41 	constructor: function(config) {
- 42 		this.binds = {};
- 43 		this.changed = {};
- 44 		this.defaults = config['defaults'] || {};
- 45 		this.options = {};
- 46 		this.currentId = null;
- 47 		
- 48 		this.addEvents({
- 49 			'add': true,
- 50 			'changed': true,
- 51 			'reset': true
- 52 		});
- 53 		this.on('changed', this.onChange, this);
- 54 		
- 55 		Deluge.OptionsManager.superclass.constructor.call(this);
- 56 	},
- 57 
- 58 	/**
- 59 	 * Add a set of default options and values to the options manager
- 60 	 * @param {String} id
- 61 	 * @param {Object} options The default options.
- 62 	 */
- 63 	addOptions: function(id, options) {
- 64 		this.options[id] = options;
- 65 	},
- 66 	
- 67 	/**
- 68 	 * Binds a form field to the specified option.
- 69 	 * @param {String} option
- 70 	 * @param {Ext.form.Field} field
- 71 	 */
- 72 	bind: function(option, field) {
- 73 		this.binds[option] = field;
- 74 		this.binds[field] = option;
- 75 		
- 76 		switch (field.getXType()) {
- 77 			case 'checkbox':
- 78 			case 'radiogroup':
- 79 				field.on('check', this.onFieldChange, this);
- 80 				break;
- 81 			case 'uxspinner':
- 82 				field.on('spin', this.onFieldChange, this);
- 83 				field.on('keypress', this.onFieldChange, this);
- 84 				break;
- 85 			default:
- 86 				break;
- 87 		}
- 88 	},
- 89 	
- 90 	/**
- 91 	 * Changes bound fields to use the specified id.
- 92 	 * @param {String} id
- 93 	 */
- 94 	changeId: function(id) {
- 95 		this.currentId = id;
- 96 		for (var option in this.defaults) {
- 97 			if (!this.binds[option]) continue;
- 98 			this.binds[option].setValue(this.get(id, option));
- 99 		}
-100 	},
-101 	
-102 	/**
-103 	 * Get the value for an option
-104 	 * @param {String} id
-105 	 * @param {String|Array} [option] A single option or an array of options to return.
-106 	 * @returns {Object} the options value.
-107 	 */
-108 	get: function(id, option) {
-109 		if (!option) {
-110 			var values = {};
-111 			for (var key in this.defaults) {
-112 				values[key] = this.get(id, key);
-113 			}
-114 			return values;
-115 		} else {
-116 			return (this.hasChanged(id, option)) ? this.changed[id][option] : this.getDefault(id, option);
-117 		}
-118 	},
-119 	
-120 	/**
-121 	 * Returns the changed values.
-122 	 * @param {String} id
-123 	 * @returns {Object} the changed options
-124 	 */
-125 	getChanged: function(id) {
-126 		return (this.changed[id]) ? this.changed[id] : {};
-127 	},
-128 	
-129 	/**
-130 	 * Get the default value for an option.
-131 	 * @param {String} id
-132 	 * @param {String|Array} [option] A single option or an array of options to return.
-133 	 * @returns {Object} the value of the option
-134 	 */
-135 	getDefault: function(id, option) {
-136 		return (this.hasOption(id, option)) ? this.options[id][option] : this.defaults[option];
-137 	},
-138 	
-139 	/**
-140 	 * Check to see if the option has been changed.
-141 	 * @param {String} id
-142 	 * @param {String} option
-143 	 * @returns {Boolean} true if the option has been changed, else false.
-144 	 */
-145 	hasChanged: function(id, option) {
-146 		return (this.changed[id] && !Ext.isEmpty(this.changed[id][option]));
-147 	},
-148 	
-149 	/**
-150 	 * Check to see if an id has had an option set to something other than the
-151 	 * default value.
-152 	 * @param {String} id
-153 	 * @param {String} option
-154 	 * @returns {Boolean} true if the id has an option, else false.
-155 	 */
-156 	hasOption: function(id, option) {
-157 		return (this.options[id] && !Ext.isEmpty(this.options[id][option]));
-158 	},
-159 
-160 	/**
-161 	 * Reset the options back to the default values for the specified id.
-162 	 * @param {String} id
-163 	 */
-164 	reset: function(id) {
-165 		if (!this.changed[id]) return;
-166 		delete this.changed[id];
-167 	},
-168 	
-169 	/**
-170 	 * Sets the value of specified option for the passed in id.
-171 	 * @param {String} id
-172 	 * @param {String} option
-173 	 * @param {Object} value The value for the option
-174 	 */
-175 	set: function(id, option, value) {
-176 		if (typeof value === undefined) {
-177 			for (var key in option) {
-178 				this.set(id, key, option[key]);
-179 			}
-180 		} else {
-181 			if (!this.options[id]) this.options[id] = {};
-182 			this.options[id][option] = value;
-183 		}
-184 	},
-185 	
-186 	/**
-187 	 * Update the value for the specified option and id.
-188 	 * @param {String} id
-189 	 * @param {String|Object} option or options to update
-190 	 * @param {Object} [value];
-191 	 */
-192 	update: function(id, option, value) {
-193 		if (typeof value === undefined) {
-194 			for (var key in option) {
-195 				this.update(id, key, option[key]);
-196 			}
-197 		} else {
-198 			if (!this.changed[id]) this.changed[id] = {};
-199 			
-200 			var oldValue = this.get(id, option);
-201 			if (oldValue == value) return;
-202 			
-203 			var defaultValue = this.getDefault(id, option);
-204 			if (defaultValue == value) {
-205 				if (this.hasChanged(id, option)) delete this.changed[id][option];
-206 				this.fireEvent('changed', id, option, value, oldValue);
-207 				return;
-208 			}
-209 			
-210 			if (Ext.type(defaultValue) != Ext.type(value)) {
-211 				switch (Ext.type(defaultValue)) {
-212 					case 'string':
-213 						value = String(value);
-214 						break;
-215 					case 'number':
-216 						value = Number(value);
-217 						break;
-218 					case 'boolean':
-219 						value = Boolean(value);
-220 						break;
-221 				}
-222 			}
-223 	
-224 			this.changed[id][option] = value;
-225 			this.fireEvent('changed', id, option, value, oldValue);
-226 		}
-227 	},
-228 	
-229 	/* Event Handlers */
-230 	
-231 	/**
-232 	 * Stops a form fields value from being blocked by the change functions
-233 	 * @param {Ext.form.Field} field
-234 	 * @private
-235 	 */
-236 	onFieldChange: function(field) {
-237 		var option = this.binds[field];
-238 		this.update(this.currentId, option, field.getValue());
-239 	},
-240 	
-241 	onChange: function(id, option, newValue, oldValue) {
-242 		// If we don't have a bind there's nothing to do.
-243 		if (Ext.isEmpty(this.binds[option])) return;
-244 		
-245 		// Set the form field to the new value.
-246 		this.binds[option].setValue(newValue);
-247 	}
-248 });
-249 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Bandwidth.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Bandwidth.js.html deleted file mode 100644 index 83db293c0..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Bandwidth.js.html +++ /dev/null @@ -1,103 +0,0 @@ -
  1 Deluge.Preferences.addPage({
-  2 	border: false,
-  3 	title: _('Bandwidth'),
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	labelWidth: 10,
-  7 	items: [{
-  8 		xtype: 'fieldset',
-  9 		border: false,
- 10 		title: _('Global Bandwidth Usage'),
- 11 		autoHeight: true,
- 12 		labelWidth: 200,
- 13 		style: 'margin-bottom: 0px; padding-bottom: 0px;',
- 14 		defaultType: 'uxspinner',
- 15 		items: [{
- 16 			name: 'max_connections',
- 17 			fieldLabel: _('Maximum Connections'),
- 18 			width: 60,
- 19 			value: -1
- 20 		}, {
- 21 			name: 'max_upload_slots',
- 22 			fieldLabel: _('Maximum Upload Slots'),
- 23 			width: 60,
- 24 			value: -1
- 25 		}, {
- 26 			name: 'max_download_speed',
- 27 			fieldLabel: _('Maximum Download Speed (KiB/s)'),
- 28 			width: 60,
- 29 			value: -1
- 30 		}, {
- 31 			name: 'max_upload_speed',
- 32 			fieldLabel: _('Maximum Upload Speed (KiB/s)'),
- 33 			width: 60,
- 34 			value: -1
- 35 		}, {
- 36 			name: 'max_half_open_connections',
- 37 			fieldLabel: _('Maximum Half-Open Connections'),
- 38 			width: 60,
- 39 			value: -1
- 40 		}, {
- 41 			name: 'max_connections_per_second',
- 42 			fieldLabel: _('Maximum Connection Attempts per Second'),
- 43 			width: 60,
- 44 			value: -1
- 45 		}]
- 46 	}, {
- 47 		xtype: 'fieldset',
- 48 		border: false,
- 49 		title: '',
- 50 		autoHeight: true,
- 51 		style: 'padding-top: 0px; margin-top: 0px; margin-bottom: 0px;',
- 52 		items: [{
- 53 			xtype: 'checkbox',
- 54 			name: 'ignore_local',
- 55 			fieldLabel: '',
- 56 			labelSeparator: '',
- 57 			boxLabel: _('Ignore limits on local network'),
- 58 			value: -1
- 59 		}, {
- 60 			xtype: 'checkbox',
- 61 			name: 'limit_ip_overhead',
- 62 			fieldLabel: '',
- 63 			labelSeparator: '',
- 64 			boxLabel: _('Rate limit IP overhead'),
- 65 			value: -1
- 66 		}]
- 67 	}, {
- 68 		xtype: 'fieldset',
- 69 		border: false,
- 70 		title: _('Per Torrent Bandwidth Usage'),
- 71 		autoHeight: true,
- 72 		labelWidth: 200,
- 73 		defaultType: 'uxspinner',
- 74 		items: [{
- 75 			name: 'max_connections_per_torrent',
- 76 			fieldLabel: _('Maximum Connections'),
- 77 			width: 60,
- 78 			value: -1
- 79 		}, {
- 80 			name: 'max_upload_slots_per_torrent',
- 81 			fieldLabel: _('Maximum Upload Slots'),
- 82 			width: 60,
- 83 			value: -1
- 84 		}, {
- 85 			name: 'max_download_speed_per_torrent',
- 86 			fieldLabel: _('Maximum Download Speed (KiB/s)'),
- 87 			width: 60,
- 88 			value: -1
- 89 		}, {
- 90 			name: 'max_upload_speed_per_torrent',
- 91 			fieldLabel: _('Maximum Upload Speed (KiB/s)'),
- 92 			width: 60,
- 93 			value: -1
- 94 		}]
- 95 	}]
- 96 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Daemon.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Daemon.js.html deleted file mode 100644 index 282cd2a65..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Daemon.js.html +++ /dev/null @@ -1,51 +0,0 @@ -
  1 Deluge.Preferences.addPage({
-  2 	border: false,
-  3 	title: _('Daemon'),
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	items: [{
-  7 		xtype: 'fieldset',
-  8 		border: false,
-  9 		title: _('Port'),
- 10 		autoHeight: true,
- 11 		defaultType: 'uxspinner',
- 12 		items: [{
- 13 			fieldLabel: _('Daemon port'),
- 14 			id: 'daemon_port'
- 15 		}]
- 16 	}, {
- 17 		xtype: 'fieldset',
- 18 		border: false,
- 19 		title: _('Connections'),
- 20 		autoHeight: true,
- 21 		labelWidth: 1,
- 22 		defaultType: 'checkbox',
- 23 		items: [{
- 24 			fieldLabel: '',
- 25 			labelSeparator: '',
- 26 			boxLabel: _('Allow Remote Connections'),
- 27 			id: 'allow_remote'
- 28 		}]
- 29 	}, {
- 30 		xtype: 'fieldset',
- 31 		border: false,
- 32 		title: _('Other'),
- 33 		autoHeight: true,
- 34 		labelWidth: 1,
- 35 		defaultType: 'checkbox',
- 36 		items: [{
- 37 			fieldLabel: '',
- 38 			labelSeparator: '',
- 39 			height: 40,
- 40 			boxLabel: _('Periodically check the website for new releases'),
- 41 			id: 'new_releases'
- 42 		}]
- 43 	}]
- 44 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Downloads.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Downloads.js.html deleted file mode 100644 index 06ee584b6..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Downloads.js.html +++ /dev/null @@ -1,66 +0,0 @@ -
  1 Deluge.Preferences.addPage({
-  2 	border: false,
-  3 	title: _('Downloads'),
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	items: [{
-  7 		xtype: 'fieldset',
-  8 		border: false,
-  9 		title: _('Folders'),
- 10 		labelWidth: 140,
- 11 		defaultType: 'textfield',
- 12 		autoHeight: true,
- 13 		items: [{
- 14 			name: 'download_location',
- 15 			fieldLabel: _('Download to'),
- 16 			width: 125
- 17 		}, {
- 18 			name: 'move_completed',
- 19 			fieldLabel: _('Move completed to'),
- 20 			width: 125
- 21 		}, {
- 22 			name: 'copy_torrent_files',
- 23 			fieldLabel: _('Copy of .torrent files to'),
- 24 			width: 125
- 25 		}]
- 26 	}, {
- 27 		xtype: 'fieldset',
- 28 		border: false,
- 29 		title: _('Allocation'),
- 30 		autoHeight: true,
- 31 		labelWidth: 1,
- 32 		defaultType: 'radio',
- 33 		items: [{
- 34 			name: 'compact_allocation',
- 35 			labelSeparator: '',
- 36 			boxLabel: _('Compact')
- 37 		}, {
- 38 			name: 'compact_allocation',
- 39 			labelSeparator: '',
- 40 			boxLabel: _('Full')
- 41 		}]
- 42 	}, {
- 43 		xtype: 'fieldset',
- 44 		border: false,
- 45 		title: _('Options'),
- 46 		autoHeight: true,
- 47 		labelWidth: 1,
- 48 		defaultType: 'checkbox',
- 49 		items: [{
- 50 			name: 'prioritize_first_last',
- 51 			labelSeparator: '',
- 52 			boxLabel: _('Prioritize first and last pieces of torrent')
- 53 		}, {
- 54 			name: 'add_paused',
- 55 			labelSeparator: '',
- 56 			boxLabel: _('Add torrents in Paused state')
- 57 		}]
- 58 	}]
- 59 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Interface.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Interface.js.html deleted file mode 100644 index 605ebcf41..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Interface.js.html +++ /dev/null @@ -1,55 +0,0 @@ -
  1 Deluge.Preferences.addPage({
-  2 	border: false,
-  3 	title: _('Interface'),
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	items: [{
-  7 		xtype: 'fieldset',
-  8 		border: false,
-  9 		title: _('Window'),
- 10 		autoHeight: true,
- 11 		labelWidth: 1,
- 12 		items: [{
- 13 			xtype: 'checkbox',
- 14 			fieldLabel: '',
- 15 			labelSeparator: '',
- 16 			boxLabel: _('Show session speed in titlebar'),
- 17 			id: 'show_session_speed'
- 18 		}]
- 19 	}, {
- 20 		xtype: 'fieldset',
- 21 		border: false,
- 22 		title: _('Sidebar'),
- 23 		autoHeight: true,
- 24 		labelWidth: 1,
- 25 		items: [{
- 26 			xtype: 'checkbox',
- 27 			fieldLabel: '',
- 28 			labelSeparator: '',
- 29 			boxLabel: _('Hide filters with zero torrents'),
- 30 			id: 'hide_sidebar_zero'
- 31 		}]
- 32 	}, {
- 33 		xtype: 'fieldset',
- 34 		border: false,
- 35 		title: _('Password'),
- 36 		autoHeight: true,
- 37 		defaultType: 'textfield',
- 38 		items: [{
- 39 			fieldLabel: 'New Password',
- 40 			inputType: 'password',
- 41 			id: 'new_password'
- 42 		}, {
- 43 			inputType: 'password',
- 44 			fieldLabel: 'Confirm Password',
- 45 			id: 'confirm_password'
- 46 		}]
- 47 	}]
- 48 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Network.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Network.js.html deleted file mode 100644 index cc8ef75a1..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Network.js.html +++ /dev/null @@ -1,14 +0,0 @@ -
  1 /*Deluge.Preferences.addPage(_('Network'), {
-  2 	border: false,
-  3 	xtype: 'form',
-  4 	layout: 'form',
-  5 	items: []
-  6 });
-  7 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Notification.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Notification.js.html deleted file mode 100644 index df36a2201..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Notification.js.html +++ /dev/null @@ -1,14 +0,0 @@ -
  1 /*Deluge.Preferences.addPage(_('Notification'), {
-  2 	border: false,
-  3 	xtype: 'form',
-  4 	layout: 'form',
-  5 	items: []
-  6 });
-  7 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Other.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Other.js.html deleted file mode 100644 index cdad634ef..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Other.js.html +++ /dev/null @@ -1,14 +0,0 @@ -
  1 /*Deluge.Preferences.addPage(_('Other'), {
-  2 	border: false,
-  3 	xtype: 'form',
-  4 	layout: 'form',
-  5 	items: []
-  6 });
-  7 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Plugins.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Plugins.js.html deleted file mode 100644 index e6d6e1f30..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Plugins.js.html +++ /dev/null @@ -1,14 +0,0 @@ -
  1 /*Deluge.Preferences.addPage(_('Plugins'), {
-  2 	border: false,
-  3 	xtype: 'form',
-  4 	layout: 'form',
-  5 	items: []
-  6 });
-  7 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Proxy.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Proxy.js.html deleted file mode 100644 index 0a52cb248..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Proxy.js.html +++ /dev/null @@ -1,15 +0,0 @@ -
  1 /*
-  2 Deluge.Preferences.addPage(_('Proxy'), {
-  3 	border: false,
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	items: []
-  7 });
-  8 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Queue.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Queue.js.html deleted file mode 100644 index 4a0aae4d0..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.Queue.js.html +++ /dev/null @@ -1,15 +0,0 @@ -
  1 /*
-  2 Deluge.Preferences.addPage(_('Queue'), {
-  3 	border: false,
-  4 	xtype: 'form',
-  5 	layout: 'form',
-  6 	items: []
-  7 });
-  8 */
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Preferences.js.html deleted file mode 100644 index cf5593d76..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Preferences.js.html +++ /dev/null @@ -1,140 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Preferences.js
-  3     Contains the preferences window.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {	
- 36 	Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
- 37 		constructor: function(config) {
- 38 			config = Ext.apply({
- 39 				layout: 'border',
- 40 				width: 485,
- 41 				height: 500,
- 42 				buttonAlign: 'right',
- 43 				closeAction: 'hide',
- 44 				closable: true,
- 45 				iconCls: 'x-deluge-preferences',
- 46 				plain: true,
- 47 				resizable: true,
- 48 				title: _('Preferences'),
- 49 				
- 50 				buttons: [{
- 51 					text: _('Close'),
- 52 					handler: this.onCloseButtonClick,
- 53 					scope: this
- 54 				},{
- 55 					text: _('Apply')
- 56 				},{
- 57 					text: _('Ok')
- 58 				}],
- 59 				
- 60 				currentPage: false,
- 61 				items: [{
- 62 					xtype: 'grid',
- 63 					region: 'west',
- 64 					title: _('Categories'),
- 65 					store: new Ext.data.SimpleStore({
- 66 						fields: [{name: 'name', mapping: 0}]
- 67 					}),
- 68 					columns: [{id: 'name', renderer: fplain, dataIndex: 'name'}],
- 69 					sm: new Ext.grid.RowSelectionModel({
- 70 						singleSelect: true,
- 71 						listeners: {'rowselect': {fn: this.onPageSelect, scope: this}}
- 72 					}),
- 73 					hideHeaders: true,
- 74 					autoExpandColumn: 'name',
- 75 					deferredRender: false,
- 76 					autoScroll: true,
- 77 					margins: '5 0 5 5',
- 78 					cmargins: '5 0 5 5',
- 79 					width: 120,
- 80 					collapsible: true
- 81 				}, {
- 82 					region: 'center',
- 83 					header: false,
- 84 					layout: 'fit',
- 85 					height: 400,
- 86 					margins: '5 5 5 5',
- 87 					cmargins: '5 5 5 5'
- 88 				}]
- 89 			}, config);
- 90 			Ext.deluge.PreferencesWindow.superclass.constructor.call(this, config);
- 91 		},
- 92 		
- 93 		initComponent: function() {
- 94 			Ext.deluge.PreferencesWindow.superclass.initComponent.call(this);
- 95 			this.categoriesGrid = this.items.get(0);
- 96 			this.configPanel = this.items.get(1);
- 97 			this.pages = {};
- 98 			this.on('show', this.onShow, this);
- 99 		},
-100 		
-101 		onCloseButtonClick: function() {
-102 			this.hide();
-103 		},
-104 		
-105 		addPage: function(page) {
-106 			var store = this.categoriesGrid.getStore();
-107 			var name = page.title;
-108 			store.loadData([[name]], true);
-109 			page['bodyStyle'] = 'margin: 5px';
-110 			this.pages[name] = this.configPanel.add(page);
-111 			this.pages[name].hide();
-112 		},
-113 		
-114 		onPageSelect: function(selModel, rowIndex, r) {
-115 			if (this.currentPage) {
-116 				this.currentPage.hide();
-117 			}
-118 			var name = r.get('name');
-119 			
-120 			this.pages[name].show();
-121 			this.currentPage = this.pages[name];
-122 			this.configPanel.doLayout();
-123 		},
-124 		
-125 		onShow: function() {
-126 			if (!this.categoriesGrid.getSelectionModel().hasSelection()) {
-127 				this.categoriesGrid.getSelectionModel().selectFirstRow();
-128 			}
-129 		}
-130 	});
-131 
-132 	Deluge.Preferences = new Ext.deluge.PreferencesWindow();
-133 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Sidebar.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Sidebar.js.html deleted file mode 100644 index a9dd263ab..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Sidebar.js.html +++ /dev/null @@ -1,243 +0,0 @@ -
  1 /*
-  2 Script: deluge-bars.js
-  3     Contains all objects and functions related to the statusbar, toolbar and
-  4 	sidebar.
-  5 
-  6 Copyright:
-  7 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  8 	This program is free software; you can redistribute it and/or modify
-  9 	it under the terms of the GNU General Public License as published by
- 10 	the Free Software Foundation; either version 3, or (at your option)
- 11 	any later version.
- 12 
- 13 	This program is distributed in the hope that it will be useful,
- 14 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 15 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 16 	GNU General Public License for more details.
- 17 
- 18 	You should have received a copy of the GNU General Public License
- 19 	along with this program.  If not, write to:
- 20 		The Free Software Foundation, Inc.,
- 21 		51 Franklin Street, Fifth Floor
- 22 		Boston, MA  02110-1301, USA.
- 23 
- 24     In addition, as a special exception, the copyright holders give
- 25     permission to link the code of portions of this program with the OpenSSL
- 26     library.
- 27     You must obey the GNU General Public License in all respects for all of
- 28     the code used other than OpenSSL. If you modify file(s) with this
- 29     exception, you may extend this exception to your version of the file(s),
- 30     but you are not obligated to do so. If you do not wish to do so, delete
- 31     this exception statement from your version. If you delete this exception
- 32     statement from all source files in the program, then also delete it here.
- 33 
- 34 */
- 35 
- 36 // These are just so gen_gettext.py will pick up the strings
- 37 // _('State')
- 38 // _('Tracker Host')
- 39 
- 40 (function() {
- 41 	// Renderer for the items in the filter grids.
- 42 	function filterRenderer(value, p, r) {
- 43 		var lname = value.toLowerCase().replace('.', '_');
- 44 		
- 45 		var image = '';	
- 46 		if (r.store.id == 'tracker_host') {
- 47 			if (value != 'Error') {
- 48 				image = String.format('url(/tracker/{0})', value);
- 49 			} else {
- 50 				lname = null;
- 51 			}
- 52 		}
- 53 		if (image) {
- 54 			return String.format('<div class="x-deluge-filter" style="background-image: {2};">{0} ({1})</div>', value, r.data['count'], image);
- 55 		} else if (lname) {
- 56 			return String.format('<div class="x-deluge-filter x-deluge-{2}">{0} ({1})</div>', value, r.data['count'], lname);
- 57 		} else {
- 58 			return String.format('<div class="x-deluge-filter">{0} ({1})</div>', value, r.data['count']);
- 59 		}
- 60 	}
- 61 	
- 62 	Ext.deluge.Sidebar = Ext.extend(Ext.Panel, {
- 63 		
- 64 		// private
- 65 		panels: {},
- 66 		
- 67 		// private
- 68 		selected: null,
- 69 		
- 70 		constructor: function(config) {
- 71 			config = Ext.apply({
- 72 				id: 'sidebar',
- 73 				region: 'west',
- 74 				cls: 'deluge-sidebar',
- 75 				title: _('Filters'),
- 76 				layout: 'accordion',
- 77 				split: true,
- 78 				width: 200,
- 79 				minSize: 175,
- 80 				collapsible: true,
- 81 				margins: '5 0 0 5',
- 82 				cmargins: '5 0 0 5'
- 83 			}, config);
- 84 			Ext.deluge.Sidebar.superclass.constructor.call(this, config);
- 85 		},
- 86 		
- 87 		// private
- 88 		initComponent: function() {
- 89 			Ext.deluge.Sidebar.superclass.initComponent.call(this);
- 90 			Deluge.Events.on("disconnect", this.onDisconnect, this);
- 91 		},
- 92 		
- 93 		createFilter: function(filter, states) {
- 94 			var store = new Ext.data.SimpleStore({
- 95 				id: filter,
- 96 				fields: [
- 97 					{name: 'filter'},
- 98 					{name: 'count'}
- 99 				]
-100 			});
-101 			
-102 			var title = filter.replace('_', ' ');
-103 			var parts = title.split(' ');
-104 			title = '';
-105 			Ext.each(parts, function(part) {
-106 				firstLetter = part.substring(0, 1);
-107 				firstLetter = firstLetter.toUpperCase();
-108 				part = firstLetter + part.substring(1);
-109 				title += part + ' ';
-110 			});
-111 			
-112 			var panel = new Ext.grid.GridPanel({
-113 				id: filter + '-panel',
-114 				store: store,
-115 				title: _(title),
-116 				columns: [
-117 					{id: 'filter', sortable: false, renderer: filterRenderer, dataIndex: 'filter'}
-118 				],	
-119 				stripeRows: false,
-120 				selModel: new Ext.grid.RowSelectionModel({
-121 					singleSelect: true,
-122 					listeners: {
-123 						'rowselect': {fn: this.onFilterSelect, scope: this}
-124 					}
-125 				}),
-126 				hideHeaders: true,
-127 				autoExpandColumn: 'filter',
-128 				deferredRender: false,
-129 				autoScroll: true
-130 			});
-131 			
-132 			if (Deluge.config['sidebar_show_zero'] == false) {
-133 				states = this.removeZero(states);
-134 			}
-135 			
-136 			store.loadData(states);
-137 			this.add(panel);
-138 			
-139 			this.doLayout();
-140 			this.panels[filter] = panel;
-141 			
-142 			if (!this.selected) {
-143 				panel.getSelectionModel().selectFirstRow();
-144 				this.selected = {
-145 					row: 0,
-146 					filter: states[0][0],
-147 					panel: panel
-148 				}
-149 			}
-150 		},
-151 		
-152 		getFilters: function() {
-153 			var filters = {}
-154 			if (!this.selected) {
-155 				return filters;
-156 			}
-157 			if (!this.selected.filter || !this.selected.panel) {
-158 				return filters;
-159 			}
-160 			var filterType = this.selected.panel.store.id;
-161 			if (filterType == "state" && this.selected.filter == "All") {
-162 				return filters;
-163 			}
-164 			
-165 			filters[filterType] = this.selected.filter;
-166 			return filters;
-167 		},
-168 		
-169 		// private
-170 		onDisconnect: function() {
-171 			Ext.each(Ext.getKeys(this.panels), function(filter) {
-172 				this.remove(filter + '-panel');
-173 			}, this);
-174 			this.panels = {};
-175 			this.selected = null;
-176 		},
-177 		
-178 		onFilterSelect: function(selModel, rowIndex, record) {
-179 			if (!this.selected) needsUpdate = true;
-180 			else if (this.selected.row != rowIndex) needsUpdate = true;
-181 			else needsUpdate = false;
-182 			this.selected = {
-183 				row: rowIndex,
-184 				filter: record.get('filter'),
-185 				panel: this.panels[record.store.id]
-186 			}
-187 			
-188 			if (needsUpdate) Deluge.UI.update();
-189 		},
-190 		
-191 		/**
-192 		 * Remove the states with zero torrents in them.
-193 		 */
-194 		removeZero: function(states) {
-195 			var newStates = [];
-196 			Ext.each(states, function(state) {
-197 				if (state[1] > 0) {
-198 					newStates.push(state);
-199 				}
-200 			});
-201 			return newStates;
-202 		},
-203 		
-204 		update: function(filters) {
-205 			for (var filter in filters) {
-206 				var states = filters[filter];
-207 				if (Ext.getKeys(this.panels).indexOf(filter) > -1) {
-208 					this.updateFilter(filter, states);
-209 				} else {
-210 					this.createFilter(filter, states);
-211 				}
-212 			}
-213 			
-214 			// Perform a cleanup of fitlers that aren't enabled any more
-215 			Ext.each(Ext.keys(this.panels), function(filter) {
-216 				if (Ext.keys(filters).indexOf(filter) == -1) {
-217 					// We need to remove the panel
-218 					this.panels[filter]
-219 				}
-220 			});
-221 		},
-222 		
-223 		updateFilter: function(filter, states) {
-224 			if (Deluge.config['sidebar_show_zero'] == false) {
-225 				states = this.removeZero(states);
-226 			}
-227 			
-228 			this.panels[filter].store.loadData(states);
-229 			if (this.selected && this.selected.panel == this.panels[filter]) {
-230 				this.panels[filter].getSelectionModel().selectRow(this.selected.row);
-231 			}
-232 		}
-233 		
-234 	});
-235 	Deluge.Sidebar = new Ext.deluge.Sidebar();
-236 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Statusbar.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Statusbar.js.html deleted file mode 100644 index 4069ea759..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Statusbar.js.html +++ /dev/null @@ -1,154 +0,0 @@ -
  1 (function() {	
-  2 	Ext.deluge.Statusbar = Ext.extend(Ext.StatusBar, {
-  3 		constructor: function(config) {
-  4 			config = Ext.apply({
-  5 				id: 'deluge-statusbar',
-  6 				defaultIconCls: 'x-not-connected',
-  7 				defaultText: _('Not Connected')
-  8 			}, config);
-  9 			Ext.deluge.Statusbar.superclass.constructor.call(this, config);
- 10 		},
- 11 		
- 12 		initComponent: function() {
- 13 			Ext.deluge.Statusbar.superclass.initComponent.call(this);
- 14 			
- 15 			Deluge.Events.on('connect', this.onConnect, this);
- 16 			Deluge.Events.on('disconnect', this.onDisconnect, this);
- 17 		},
- 18 		
- 19 		createButtons: function() {
- 20 			this.add({
- 21 				id: 'statusbar-connections',
- 22 				text: ' ',
- 23 				cls: 'x-btn-text-icon',
- 24 				iconCls: 'x-deluge-connections',
- 25 				menu: Deluge.Menus.Connections
- 26 			}, '-', {
- 27 				id: 'statusbar-downspeed',
- 28 				text: ' ',
- 29 				cls: 'x-btn-text-icon',
- 30 				iconCls: 'x-deluge-downloading',
- 31 				menu: Deluge.Menus.Download
- 32 			}, '-', {
- 33 				id: 'statusbar-upspeed',
- 34 				text: ' ',
- 35 				cls: 'x-btn-text-icon',
- 36 				iconCls: 'x-deluge-seeding',
- 37 				menu: Deluge.Menus.Upload
- 38 			}, '-', {
- 39 				id: 'statusbar-traffic',
- 40 				text: ' ',
- 41 				cls: 'x-btn-text-icon',
- 42 				iconCls: 'x-deluge-traffic'
- 43 			}, '-', {
- 44 				id: 'statusbar-dht',
- 45 				text: ' ',
- 46 				cls: 'x-btn-text-icon',
- 47 				iconCls: 'x-deluge-dht'
- 48 			});
- 49 			this.created = true;
- 50 		},
- 51 		
- 52 		onConnect: function() {
- 53 			this.setStatus({
- 54 				iconCls: 'x-connected',
- 55 				text: ''
- 56 			});
- 57 			if (!this.created) this.createButtons();
- 58 			else {
- 59 				this.items.each(function(item) {
- 60 					item.show();
- 61 					item.enable();
- 62 				});
- 63 			}
- 64 		},
- 65 	
- 66 		onDisconnect: function() {
- 67 			this.clearStatus({useDefaults:true});
- 68 			this.items.each(function(item) {
- 69 				item.hide();
- 70 				item.disable();
- 71 			});
- 72 		},
- 73 		
- 74 		update: function(stats) {
- 75 			function addSpeed(val) {return val + ' KiB/s'}
- 76 			
- 77 			var updateStat = function(name, config) {
- 78 				var item = this.items.get('statusbar-' + name);
- 79 				if (config.limit.value == -1) {
- 80 					var str = (config.value.formatter) ? config.value.formatter(config.value.value) : config.value.value;
- 81 				} else {
- 82 					var value = (config.value.formatter) ? config.value.formatter(config.value.value) : config.value.value;
- 83 					var limit = (config.limit.formatter) ? config.limit.formatter(config.limit.value) : config.limit.value;
- 84 					var str = String.format(config.format, value, limit);
- 85 				}
- 86 				item.setText(str);
- 87 			}.bind(this);
- 88 			
- 89 			updateStat('connections', {
- 90 				value: {value: stats.num_connections},
- 91 				limit: {value: stats.max_num_connections},
- 92 				format: '{0} ({1})'
- 93 			});
- 94 	
- 95 			updateStat('downspeed', {
- 96 				value: {
- 97 					value: stats.download_rate,
- 98 					formatter: Deluge.Formatters.speed
- 99 				},
-100 				limit: {
-101 					value: stats.max_download,
-102 					formatter: addSpeed
-103 				},
-104 				format: '{0} ({1})'
-105 			});
-106 	
-107 			updateStat('upspeed', {
-108 				value: {
-109 					value: stats.upload_rate,
-110 					formatter: Deluge.Formatters.speed
-111 				},
-112 				limit: {
-113 					value: stats.max_upload,
-114 					formatter: addSpeed
-115 				},
-116 				format: '{0} ({1})'
-117 			});
-118 			
-119 			updateStat('traffic', {
-120 				value: {
-121 					value: stats.payload_download_rate,
-122 					formatter: Deluge.Formatters.speed
-123 				},
-124 				limit: {
-125 					value: stats.payload_upload_rate,
-126 					formatter: Deluge.Formatters.speed
-127 				},
-128 				format: '{0}/{1}'
-129 			});
-130 	
-131 			this.items.get('statusbar-dht').setText(stats.dht_nodes);
-132 	
-133 			function updateMenu(menu, stat) {
-134 				var item = menu.items.get(stat)
-135 				if (!item) {
-136 					item = menu.items.get('other')
-137 				}
-138 				item.setChecked(true);
-139 			}
-140 			
-141 			updateMenu(Deluge.Menus.Connections, stats.max_num_connections);
-142 			updateMenu(Deluge.Menus.Download, stats.max_download);
-143 			updateMenu(Deluge.Menus.Upload, stats.max_upload);
-144 		}
-145 	});
-146 	Deluge.Statusbar = new Ext.deluge.Statusbar();
-147 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Toolbar.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Toolbar.js.html deleted file mode 100644 index 06d8c70d5..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Toolbar.js.html +++ /dev/null @@ -1,213 +0,0 @@ -
  1 /*
-  2 Script: Deluge.Toolbar.js
-  3     Contains the Deluge toolbar.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {
- 36 	Ext.deluge.Toolbar = Ext.extend(Ext.Toolbar, {
- 37 		constructor: function(config) {
- 38 			config = Ext.apply({
- 39 				items: [
- 40 					{
- 41 						id: 'create',
- 42 						cls: 'x-btn-text-icon',
- 43 						disabled: true,
- 44 						text: _('Create'),
- 45 						icon: '/icons/create.png',
- 46 						handler: this.onTorrentAction
- 47 					},{
- 48 						id: 'add',
- 49 						cls: 'x-btn-text-icon',
- 50 						disabled: true,
- 51 						text: _('Add'),
- 52 						icon: '/icons/add.png',
- 53 						handler: this.onTorrentAdd
- 54 					},{
- 55 						id: 'remove',
- 56 						cls: 'x-btn-text-icon',
- 57 						disabled: true,
- 58 						text: _('Remove'),
- 59 						icon: '/icons/remove.png',
- 60 						handler: this.onTorrentAction
- 61 					},'|',{
- 62 						id: 'pause',
- 63 						cls: 'x-btn-text-icon',
- 64 						disabled: true,
- 65 						text: _('Pause'),
- 66 						icon: '/icons/pause.png',
- 67 						handler: this.onTorrentAction
- 68 					},{
- 69 						id: 'resume',
- 70 						cls: 'x-btn-text-icon',
- 71 						disabled: true,
- 72 						text: _('Resume'),
- 73 						icon: '/icons/start.png',
- 74 						handler: this.onTorrentAction
- 75 					},'|',{
- 76 						id: 'up',
- 77 						cls: 'x-btn-text-icon',
- 78 						disabled: true,
- 79 						text: _('Up'),
- 80 						icon: '/icons/up.png',
- 81 						handler: this.onTorrentAction
- 82 					},{
- 83 						id: 'down',
- 84 						cls: 'x-btn-text-icon',
- 85 						disabled: true,
- 86 						text: _('Down'),
- 87 						icon: '/icons/down.png',
- 88 						handler: this.onTorrentAction
- 89 					},'|',{
- 90 						id: 'preferences',
- 91 						cls: 'x-btn-text-icon',
- 92 						text: _('Preferences'),
- 93 						icon: '/icons/preferences.png',
- 94 						handler: this.onPreferencesClick,
- 95 						scope: this
- 96 					},{
- 97 						id: 'connectionman',
- 98 						cls: 'x-btn-text-icon',
- 99 						text: _('Connection Manager'),
-100 						iconCls: 'x-deluge-connections',
-101 						handler: this.onConnectionManagerClick,
-102 						scope: this
-103 					},'->',{
-104 						id: 'help',
-105 						cls: 'x-btn-text-icon',
-106 						disabled: true,
-107 						icon: '/icons/help.png',
-108 						text: _('Help'),
-109 						handler: this.onHelpClick,
-110 						scope: this
-111 					},{
-112 						id: 'logout',
-113 						cls: 'x-btn-text-icon',
-114 						icon: '/icons/logout.png',
-115 						disabled: true,
-116 						text: _('Logout'),
-117 						handler: this.onLogout,
-118 						scope: this
-119 					}
-120 				]
-121 			}, config);
-122 			Ext.deluge.Toolbar.superclass.constructor.call(this, config);
-123 		},
-124 
-125 		connectedButtons: [
-126 			'add', 'remove', 'pause', 'resume', 'up', 'down'
-127 		],
-128 		
-129 		initComponent: function() {
-130 			Ext.deluge.Toolbar.superclass.initComponent.call(this);
-131 			Deluge.Events.on('connect', this.onConnect, this);
-132 			Deluge.Events.on('login', this.onLogin, this);
-133 		},
-134 		
-135 		onConnect: function() {
-136 			Ext.each(this.connectedButtons, function(buttonId) {
-137 				this.items.get(buttonId).enable();
-138 			}, this);
-139 		},
-140 		
-141 		onDisconnect: function() {
-142 			Ext.each(this.connectedButtons, function(buttonId) {
-143 				this.items.get(buttonId).disable();
-144 			}, this);
-145 		},
-146 		
-147 		onLogin: function() {
-148 			this.items.get('logout').enable();
-149 		},
-150 		
-151 		onLogout: function() {
-152 			this.items.get('logout').disable();
-153 			Deluge.Events.fire('logout');
-154 			Deluge.Login.show();
-155 		},
-156 		
-157 		onConnectionManagerClick: function() {
-158 			Deluge.ConnectionManager.show();
-159 		},
-160 		
-161 		onPreferencesClick: function() {
-162 			Deluge.Preferences.show();
-163 		},
-164 		
-165 		onTorrentAction: function(item) {
-166 			var selection = Deluge.Torrents.getSelections();
-167 			var ids = [];
-168 			Ext.each(selection, function(record) {
-169 				ids.push(record.id);
-170 			});
-171 			
-172 			switch (item.id) {
-173 				case 'remove':
-174 					Deluge.Events.fire('torrentRemoved', ids);
-175 					Deluge.Client.core.remove_torrent(ids, null, {
-176 						success: function() {
-177 							Deluge.UI.update();
-178 						}
-179 					});
-180 					break;
-181 				case 'pause':
-182 				case 'resume':
-183 					Deluge.Client.core[item.id + '_torrent'](ids, {
-184 						success: function() {
-185 							Deluge.UI.update();
-186 						}
-187 					});
-188 					break;
-189 				case 'up':
-190 				case 'down':
-191 					Deluge.Client.core['queue_' + item.id](ids, {
-192 						success: function() {
-193 							Deluge.UI.update();
-194 						}
-195 					});
-196 					break;
-197 			}
-198 		},
-199 		
-200 		onTorrentAdd: function() {
-201 			Deluge.Add.show();
-202 		}
-203 	});
-204 	
-205 	Deluge.Toolbar = new Ext.deluge.Toolbar();
-206 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.Torrents.js.html b/deluge/ui/web/docs/symbols/src/Deluge.Torrents.js.html deleted file mode 100644 index 7b0ea52e4..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.Torrents.js.html +++ /dev/null @@ -1,313 +0,0 @@ -
  1 /*
-  2 Script: deluge-torrents.js
-  3     Contains all objects and functions related to the torrent grid.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 
- 33 */
- 34 
- 35 (function() {
- 36 	/* Renderers for the Torrent Grid */
- 37 	function queueRenderer(value) {
- 38 		return (value == -1) ? '' : value + 1;
- 39 	}
- 40 	function torrentNameRenderer(value, p, r) {
- 41 		return String.format('<div class="torrent-name x-deluge-{0}">{1}</div>', r.data['state'].toLowerCase(), value);
- 42 	}
- 43 	function torrentSpeedRenderer(value) {
- 44 		if (!value) return;
- 45 		return fspeed(value);
- 46 	}
- 47 	function torrentProgressRenderer(value, p, r) {
- 48 		value = new Number(value);
- 49 		var progress = value;
- 50 		var text = r.data['state'] + ' ' + value.toFixed(2) + '%'
- 51 		var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]) - 8;
- 52 		return Deluge.progressBar(value, width, text);
- 53 	}
- 54 	function seedsRenderer(value, p, r) {
- 55 		if (r.data['total_seeds'] > -1) {
- 56 			return String.format('{0} ({1})', value, r.data['total_seeds']);
- 57 		} else {
- 58 			return value;
- 59 		}
- 60 	}
- 61 	function peersRenderer(value, p, r) {
- 62 		if (r.data['total_peers'] > -1) {
- 63 			return String.format('{0} ({1})', value, r.data['total_peers']);
- 64 		} else {
- 65 			return value;
- 66 		}
- 67 	}
- 68 	function availRenderer(value, p, r)	{
- 69 		return new Number(value).toFixed(3);
- 70 	}
- 71 	function trackerRenderer(value, p, r) {
- 72 		return String.format('<div style="background: url(/tracker/{0}) no-repeat; padding-left: 20px;">{0}</div>', value);
- 73 	}
- 74 	
- 75 	/**
- 76 	* Ext.deluge.TorrentGrid Class
- 77 	*
- 78 	* @author Damien Churchill <damoxc@gmail.com>
- 79 	* @version 1.2
- 80 	*
- 81 	* @class Ext.deluge.TorrentGrid
- 82 	* @extends Ext.grid.GridPanel
- 83 	* @constructor
- 84 	* @param {Object} config Configuration options
- 85 	*/
- 86 	Ext.deluge.TorrentGrid = Ext.extend(Ext.grid.GridPanel, {
- 87 		constructor: function(config) {
- 88 			config = Ext.apply({
- 89 				id: 'torrentGrid',
- 90 				store: new Ext.data.SimpleStore({
- 91 					fields: [
- 92 						{name: 'queue'},
- 93 						{name: 'name'},
- 94 						{name: 'size', type: 'int'},
- 95 						{name: 'state'},
- 96 						{name: 'progress', type: 'float'},
- 97 						{name: 'seeds', type: 'int'},
- 98 						{name: 'total_seeds', type: 'int'},
- 99 						{name: 'peers', type: 'int'},
-100 						{name: 'total_peers', type: 'int'},
-101 						{name: 'downspeed', type: 'int'},
-102 						{name: 'upspeed', type: 'int'},
-103 						{name: 'eta', type: 'int'},
-104 						{name: 'ratio', type: 'float'},
-105 						{name: 'avail', type: 'float'},
-106 						{name: 'added', type: 'int'},
-107 						{name: 'tracker'}
-108 					],
-109 					id: 16
-110 				}),
-111 				columns: [{
-112 					id:'queue',
-113 					header: _('#'), 
-114 					width: 30, 
-115 					sortable: true, 
-116 					renderer: queueRenderer,
-117 					dataIndex: 'queue'
-118 				}, {
-119 					id:'name',
-120 					header: _('Name'),
-121 					width: 150,
-122 					sortable: true,
-123 					renderer: torrentNameRenderer,
-124 					dataIndex: 'name'
-125 				}, {
-126 					header: _('Size'),
-127 					width: 75,
-128 					sortable: true,
-129 					renderer: fsize,
-130 					dataIndex: 'size'
-131 				}, {
-132 					header: _('Progress'),
-133 					width: 150, 
-134 					sortable: true, 
-135 					renderer: torrentProgressRenderer,
-136 					dataIndex: 'progress'
-137 				}, {
-138 					header: _('Seeders'),
-139 					width: 60,
-140 					sortable: true,
-141 					renderer: seedsRenderer,
-142 					dataIndex: 'seeds'
-143 				}, {
-144 					header: _('Peers'),
-145 					width: 60,
-146 					sortable: true,
-147 					renderer: peersRenderer,
-148 					dataIndex: 'peers'
-149 				}, {
-150 					header: _('Down Speed'),
-151 					width: 80,
-152 					sortable: true,
-153 					renderer: torrentSpeedRenderer,
-154 					dataIndex: 'downspeed'
-155 				}, {
-156 					header: _('Up Speed'),
-157 					width: 80,
-158 					sortable: true,
-159 					renderer: torrentSpeedRenderer,
-160 					dataIndex: 'upspeed'
-161 				}, {
-162 					header: _('ETA'),
-163 					width: 60,
-164 					sortable: true,
-165 					renderer: ftime,
-166 					dataIndex: 'eta'
-167 				}, {
-168 					header: _('Ratio'),
-169 					width: 60,
-170 					sortable: true,
-171 					renderer: availRenderer,
-172 					dataIndex: 'ratio'
-173 				}, {
-174 					header: _('Avail'),
-175 					width: 60,
-176 					sortable: true,
-177 					renderer: availRenderer,
-178 					dataIndex: 'avail'
-179 				}, {
-180 					header: _('Added'),
-181 					width: 80,
-182 					sortable: true,
-183 					renderer: fdate,
-184 					dataIndex: 'added'
-185 				}, {
-186 					header: _('Tracker'),
-187 					width: 120,
-188 					sortable: true,
-189 					renderer: trackerRenderer,
-190 					dataIndex: 'tracker'
-191 				}],
-192 				region: 'center',
-193 				cls: 'deluge-torrents',
-194 				stripeRows: true,
-195 				autoExpandColumn: 'name',
-196 				deferredRender:false,
-197 				autoScroll:true,
-198 				margins: '5 5 0 0'
-199 			}, config);
-200 			Ext.deluge.TorrentGrid.superclass.constructor.call(this, config);
-201 		},
-202 
-203 		initComponent: function() {
-204 			Ext.deluge.TorrentGrid.superclass.initComponent.call(this);
-205 			Deluge.Events.on('torrentRemoved', this.onTorrentRemoved, this);
-206 			this.on('rowcontextmenu', function(grid, rowIndex, e) {
-207 				e.stopEvent();
-208 				var selection = grid.getSelectionModel();
-209 				if (!selection.hasSelection()) {
-210 					selection.selectRow(rowIndex);
-211 				}
-212 				Deluge.Menus.Torrent.showAt(e.getPoint());
-213 			});
-214 		},
-215 		
-216 		/**
-217 		 * Returns the record representing the torrent at the specified index.
-218 		 *
-219 		 * @param {int} The row index of the torrent you wish to retrieve.
-220 		 * @return {Ext.data.Record} The record representing the torrent.
-221 		 */
-222 		getTorrent: function(rowIndex) {
-223 			return this.getStore().getAt(rowIndex);
-224 		},
-225 		
-226 		getSelected: function() {
-227 		return this.getSelectionModel().getSelected();
-228 		},
-229 		
-230 		getSelections: function() {
-231 			return this.getSelectionModel().getSelections();
-232 		},
-233 		
-234 		update: function(torrents) {
-235 			//var torrents = [];
-236 			var store = this.getStore();
-237 			for (var torrentId in torrents) {
-238 				var record = store.getById(torrentId);
-239 				var torrent = torrents[torrentId];
-240 				if (!record) {
-241 					// We need to create a new record
-242 					var data = [
-243 						torrent.queue,
-244 						torrent.name,
-245 						torrent.total_size,
-246 						torrent.state,
-247 						torrent.progress,
-248 						torrent.num_seeds,
-249 						torrent.total_seeds,
-250 						torrent.num_peers,
-251 						torrent.total_peers,
-252 						torrent.download_payload_rate,
-253 						torrent.upload_payload_rate,
-254 						torrent.eta,
-255 						torrent.ratio,
-256 						torrent.distributed_copies,
-257 						torrent.time_added,
-258 						torrent.tracker_host,
-259 						torrentId
-260 					];
-261 					store.loadData([data], true);
-262 				} else {
-263 					// We just need to do an update
-264 					record.set('queue', torrent.queue);
-265 					record.set('name', torrent.name);
-266 					record.set('size', torrent.total_size);
-267 					record.set('state', torrent.state);
-268 					record.set('progress', torrent.progress);
-269 					record.set('seeds', torrent.num_seeds);
-270 					record.set('total_seeds', torrent.total_seeds);
-271 					record.set('peers', torrent.num_peers);
-272 					record.set('total_peers', torrent.total_peers);
-273 					record.set('downspeed', torrent.download_payload_rate);
-274 					record.set('upspeed', torrent.upload_payload_rate);
-275 					record.set('eta', torrent.eta);
-276 					record.set('ratio', torrent.ratio);
-277 					record.set('avail', torrent.distributed_copies);
-278 					record.set('added', torrent.time_added);
-279 					record.set('tracker', torrent.tracker_host);
-280 					record.commit();
-281 				}
-282 			}
-283 			
-284 			var torrentIds = Ext.keys(torrents);
-285 			store.each(function(record) {
-286 				if (torrentIds.indexOf(record.id) == -1) {
-287 					// Torrent is no longer in the grid so we must remove it.
-288 					store.remove(record);
-289 				}
-290 			}, this);
-291 		},
-292 		
-293 		// private
-294 		onTorrentRemoved: function(torrentIds) {
-295 			var selModel = this.getSelectionModel();
-296 			Ext.each(torrentIds, function(torrentId) {
-297 				var record = this.getStore().getById(torrentId);
-298 				if (selModel.isSelected(record)) {
-299 					selModel.deselectRow(this.getStore().indexOf(record));
-300 				}
-301 				this.getStore().remove(record);
-302 			}, this);
-303 		}
-304 	});
-305 	Deluge.Torrents = new Ext.deluge.TorrentGrid();
-306 })();
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.UI.js.html b/deluge/ui/web/docs/symbols/src/Deluge.UI.js.html deleted file mode 100644 index 6c02f7b11..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.UI.js.html +++ /dev/null @@ -1,170 +0,0 @@ -
  1 /*
-  2 Script: deluge-ui.js
-  3     The core ui module that builds up the ui layout and controls the polling
-  4 	of the server.
-  5 
-  6 Copyright:
-  7 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  8 	This program is free software; you can redistribute it and/or modify
-  9 	it under the terms of the GNU General Public License as published by
- 10 	the Free Software Foundation; either version 3, or (at your option)
- 11 	any later version.
- 12 
- 13 	This program is distributed in the hope that it will be useful,
- 14 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 15 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 16 	GNU General Public License for more details.
- 17 
- 18 	You should have received a copy of the GNU General Public License
- 19 	along with this program.  If not, write to:
- 20 		The Free Software Foundation, Inc.,
- 21 		51 Franklin Street, Fifth Floor
- 22 		Boston, MA  02110-1301, USA.
- 23 
- 24     In addition, as a special exception, the copyright holders give
- 25     permission to link the code of portions of this program with the OpenSSL
- 26     library.
- 27     You must obey the GNU General Public License in all respects for all of
- 28     the code used other than OpenSSL. If you modify file(s) with this
- 29     exception, you may extend this exception to your version of the file(s),
- 30     but you are not obligated to do so. If you do not wish to do so, delete
- 31     this exception statement from your version. If you delete this exception
- 32     statement from all source files in the program, then also delete it here.
- 33 */
- 34 
- 35 /**
- 36  * @namespace Deluge
- 37  * @static
- 38  * @class Deluge.UI
- 39  * The controller for the whole interface, that ties all the components
- 40  * together and handles the 2 second poll.
- 41  */
- 42 Deluge.UI = {
- 43 
- 44 	cookies: new Ext.state.CookieProvider(),
- 45 	
- 46 	errorCount: 0,
- 47 	
- 48 	/**
- 49 	 * @description Create all the interface components, the json-rpc client
- 50 	 * and set up various events that the UI will utilise.
- 51 	 */
- 52 	initialize: function() {
- 53 		Ext.state.Manager.setProvider(this.cookies);		
- 54 		this.MainPanel = new Ext.Panel({
- 55 			id: 'mainPanel',
- 56 			iconCls: 'x-deluge-main-panel',
- 57 			title: 'Deluge',
- 58 			layout: 'border',
- 59 			tbar: Deluge.Toolbar,
- 60 			items: [
- 61 				Deluge.Sidebar,
- 62 				Deluge.Details,
- 63 				Deluge.Torrents
- 64 			],
- 65 			bbar: Deluge.Statusbar
- 66 		});
- 67 
- 68 		this.Viewport = new Ext.Viewport({
- 69 			layout: 'fit',
- 70 			items: [this.MainPanel]
- 71 		});
- 72 		
- 73 		Deluge.Events.on("connect", this.onConnect, this);
- 74 		Deluge.Events.on("disconnect", this.onDisconnect, this);
- 75 		Deluge.Client = new Ext.ux.util.RpcClient({
- 76 			url: '/json'
- 77 		});
- 78 		Deluge.Client.on('connected', function(e) {
- 79 			Deluge.Login.show();
- 80 		});
- 81 		this.update = this.update.bind(this);
- 82 	},
- 83 	
- 84 	update: function() {
- 85 		var filters = Deluge.Sidebar.getFilters();
- 86 		Deluge.Client.web.update_ui(Deluge.Keys.Grid, filters, {
- 87 			success: this.onUpdate,
- 88 			failure: this.onUpdateError,
- 89 			scope: this
- 90 		});
- 91 		Deluge.Details.update();
- 92 		Deluge.Client.web.connected({
- 93 			success: this.onConnectedCheck,
- 94 			scope: this
- 95 		});
- 96 	},
- 97 	
- 98 	onConnectedCheck: function(connected) {
- 99 		if (!connected) {
-100 			Deluge.Events.fire('disconnect');
-101 		}
-102 	},
-103 	
-104 	onUpdateError: function(error) {
-105 		if (this.errorCount == 2) {
-106 			Ext.MessageBox.show({
-107 				title: 'Lost Connection',
-108 				msg: 'The connection to the webserver has been lost!',
-109 				buttons: Ext.MessageBox.OK,
-110 				icon: Ext.MessageBox.ERROR
-111 			});
-112 		}
-113 		this.errorCount++;
-114 	},
-115 	
-116 	/**
-117 	 * @static
-118 	 * @private
-119 	 * Updates the various components in the interface.
-120 	 */
-121 	onUpdate: function(data) {
-122 		Deluge.Torrents.update(data['torrents']);
-123 		Deluge.Statusbar.update(data['stats']);
-124 		Deluge.Sidebar.update(data['filters']);
-125 		this.errorCount = 0;
-126 	},
-127 	
-128 	/**
-129 	 * @static
-130 	 * @private
-131 	 * Start the Deluge UI polling the server and update the interface.
-132 	 */
-133 	onConnect: function() {
-134 		if (!this.running) {
-135 			this.running = setInterval(this.update, 2000);
-136 			this.update();
-137 		}
-138 	},
-139 	
-140 	/**
-141 	 * @static
-142 	 * @private
-143 	 */
-144 	onDisconnect: function() {
-145 		this.stop();
-146 	},
-147 	
-148 	/**
-149 	 * @static
-150 	 * Stop the Deluge UI polling the server and clear the interface.
-151 	 */
-152 	stop: function() {
-153 		if (this.running) {
-154             clearInterval(this.running);
-155             this.running = false;
-156 			Deluge.Torrents.getStore().loadData([]);
-157         }
-158 	}
-159 }
-160 
-161 Ext.onReady(function(e) {
-162 	Deluge.UI.initialize();
-163 });
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/Deluge.js.html b/deluge/ui/web/docs/symbols/src/Deluge.js.html deleted file mode 100644 index 310e7856b..000000000 --- a/deluge/ui/web/docs/symbols/src/Deluge.js.html +++ /dev/null @@ -1,117 +0,0 @@ -
  1 /*
-  2 Script: Deluge.js
-  3     Contains the keys for get_torrent(s)_status.
-  4 
-  5 Copyright:
-  6 	(C) Damien Churchill 2009 <damoxc@gmail.com>
-  7 	This program is free software; you can redistribute it and/or modify
-  8 	it under the terms of the GNU General Public License as published by
-  9 	the Free Software Foundation; either version 3, or (at your option)
- 10 	any later version.
- 11 
- 12 	This program is distributed in the hope that it will be useful,
- 13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
- 14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- 15 	GNU General Public License for more details.
- 16 
- 17 	You should have received a copy of the GNU General Public License
- 18 	along with this program.  If not, write to:
- 19 		The Free Software Foundation, Inc.,
- 20 		51 Franklin Street, Fifth Floor
- 21 		Boston, MA  02110-1301, USA.
- 22 
- 23     In addition, as a special exception, the copyright holders give
- 24     permission to link the code of portions of this program with the OpenSSL
- 25     library.
- 26     You must obey the GNU General Public License in all respects for all of
- 27     the code used other than OpenSSL. If you modify file(s) with this
- 28     exception, you may extend this exception to your version of the file(s),
- 29     but you are not obligated to do so. If you do not wish to do so, delete
- 30     this exception statement from your version. If you delete this exception
- 31     statement from all source files in the program, then also delete it here.
- 32 */
- 33 
- 34 Ext.namespace('Ext.deluge');
- 35 
- 36 (function() {
- 37 	/* Add some helper functions to Ext */
- 38 	Ext.apply(Function.prototype, {
- 39 		bind: function(scope) {
- 40 			var self = this;
- 41 			return function() {
- 42 				return self.apply(scope, arguments);
- 43 			}
- 44 		}
- 45 	});
- 46 	
- 47 	Ext.apply(Ext, {
- 48 		keys: function(obj) {
- 49 			var keys = [];
- 50 			for (i in obj) if (obj.hasOwnProperty(i))
- 51 			{
- 52 				keys.push(i);
- 53 			}
- 54 			return keys;
- 55 		},
- 56 			
- 57 		splat: function(obj) {
- 58 			var type = Ext.type(obj);
- 59 			return (type) ? ((type != 'array') ? [obj] : obj) : [];
- 60 		}
- 61 	});
- 62 	Ext.getKeys = Ext.keys;
- 63 })();
- 64 
- 65 (function() {
- 66 	var tpl = '<div class="x-progress-wrap x-progress-renderered">' +
- 67 		'<div class="x-progress-inner">' +
- 68 			'<div style="width: {2}px" class="x-progress-bar">' +
- 69 				'<div style="z-index: 99; width: {3}px" class="x-progress-text">' +
- 70 					'<div style="width: {1}px;">{0}</div>' +
- 71 				'</div>' +
- 72 			'</div>' +
- 73 			'<div class="x-progress-text x-progress-text-back">' +
- 74 				'<div style="width: {1}px;">{0}</div>' +
- 75 			'</div>' +
- 76 		'</div>' +
- 77 	'</div>';
- 78 	
- 79 	Deluge.progressBar =  function(progress, width, text, modifier) {
- 80 		modifier = Ext.value(modifier, 10);
- 81 		var progressWidth = ((width / 100.0) * progress).toFixed(0);
- 82 		var barWidth = progressWidth - 1;
- 83 		var textWidth = ((progressWidth - modifier) > 0 ? progressWidth - modifier : 0);
- 84 		return String.format(tpl, text, width, barWidth, textWidth);
- 85 	}
- 86 })();
- 87 
- 88 // Hinting for gettext_gen.py
- 89 // _('Do Not Download')
- 90 // _('Normal Priority')
- 91 // _('High Priority')
- 92 // _('Highest Priority')
- 93 FILE_PRIORITY = {
- 94     0: 'Do Not Download',
- 95     1: 'Normal Priority',
- 96     2: 'High Priority',
- 97     5: 'Highest Priority',
- 98     'Do Not Download': 0,
- 99     'Normal Priority': 1,
-100     'High Priority': 2,
-101     'Highest Priority': 5
-102 }
-103 
-104 FILE_PRIORITY_CSS = {
-105 	0: 'x-no-download',
-106 	1: 'x-normal-download',
-107 	2: 'x-high-download',
-108 	5: 'x-highest-download'
-109 }
-110 
\ No newline at end of file diff --git a/deluge/ui/web/docs/symbols/src/ext-extensions-debug.js.html b/deluge/ui/web/docs/symbols/src/ext-extensions-debug.js.html deleted file mode 100644 index 35573d07b..000000000 --- a/deluge/ui/web/docs/symbols/src/ext-extensions-debug.js.html +++ /dev/null @@ -1,791 +0,0 @@ -
  1 /**
-  2  * Copyright (c) 2008, Steven Chim
-  3  * All rights reserved.
-  4  * 
-  5  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-  6  * 
-  7  *     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-  8  *     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-  9  *     * The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
- 10  * 
- 11  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 12  */
- 13 
- 14 /**
- 15   * Ext.ux.form.Spinner Class
- 16 	*
- 17 	* @author  Steven Chim
- 18 	* @version Spinner.js 2008-08-27 v0.35
- 19   *
- 20   * @class Ext.ux.form.Spinner
- 21   * @extends Ext.form.TriggerField
- 22   */
- 23 
- 24 Ext.namespace("Ext.ux.form");
- 25 
- 26 Ext.ux.form.Spinner = function(config){
- 27 	Ext.ux.form.Spinner.superclass.constructor.call(this, config);
- 28 	this.addEvents({
- 29 		'spin' : true,
- 30 		'spinup' : true,
- 31 		'spindown' : true
- 32 	});
- 33 }
- 34 
- 35 Ext.extend(Ext.ux.form.Spinner, Ext.form.TriggerField, {
- 36 	triggerClass : 'x-form-spinner-trigger',
- 37 	splitterClass : 'x-form-spinner-splitter',
- 38 
- 39 	alternateKey : Ext.EventObject.shiftKey,
- 40 	strategy : undefined,
- 41 
- 42 	//private
- 43 	onRender : function(ct, position){
- 44 		Ext.ux.form.Spinner.superclass.onRender.call(this, ct, position);
- 45 
- 46 		this.splitter = this.wrap.createChild({tag:'div', cls:this.splitterClass, style:'width:13px; height:2px;'});
- 47 		this.splitter.show().setRight( (Ext.isIE) ? 1 : 2 );
- 48 		this.splitter.show().setTop(10);
- 49 
- 50 		this.proxy = this.trigger.createProxy('', this.splitter, true);
- 51 		this.proxy.addClass("x-form-spinner-proxy");
- 52 		this.proxy.setStyle('left','0px');  
- 53 		this.proxy.setSize(14, 1);
- 54 		this.proxy.hide();
- 55 		this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {dragElId: this.proxy.id});
- 56 
- 57 		this.initSpinner();
- 58 	},
- 59 
- 60 	//private
- 61 	initTrigger : function(){
- 62 		this.trigger.addClassOnOver('x-form-trigger-over');
- 63 		this.trigger.addClassOnClick('x-form-trigger-click');
- 64 	},
- 65 
- 66 	//private
- 67 	initSpinner : function(){
- 68 		this.keyNav = new Ext.KeyNav(this.el, {
- 69 			"up" : function(e){
- 70 				e.preventDefault();
- 71 				this.onSpinUp();
- 72 			},
- 73 
- 74 			"down" : function(e){
- 75 				e.preventDefault();
- 76 				this.onSpinDown();
- 77 			},
- 78 
- 79 			"pageUp" : function(e){
- 80 				e.preventDefault();
- 81 				this.onSpinUpAlternate();
- 82 			},
- 83 
- 84 			"pageDown" : function(e){
- 85 				e.preventDefault();
- 86 				this.onSpinDownAlternate();
- 87 			},
- 88 
- 89 			scope : this
- 90 		});
- 91 
- 92 		this.repeater = new Ext.util.ClickRepeater(this.trigger);
- 93 		this.repeater.on("click", this.onTriggerClick, this, {preventDefault:true});
- 94 		this.trigger.on("mouseover", this.onMouseOver, this, {preventDefault:true});
- 95 		this.trigger.on("mouseout",  this.onMouseOut,  this, {preventDefault:true});
- 96 		this.trigger.on("mousemove", this.onMouseMove, this, {preventDefault:true});
- 97 		this.trigger.on("mousedown", this.onMouseDown, this, {preventDefault:true});
- 98 		this.trigger.on("mouseup",   this.onMouseUp,   this, {preventDefault:true});
- 99 		this.wrap.on("mousewheel",   this.handleMouseWheel, this);
-100 
-101 		this.dd.setXConstraint(0, 0, 10)
-102 		this.dd.setYConstraint(1500, 1500, 10);
-103 		this.dd.endDrag = this.endDrag.createDelegate(this);
-104 		this.dd.startDrag = this.startDrag.createDelegate(this);
-105 		this.dd.onDrag = this.onDrag.createDelegate(this);
-106 
-107         /*
-108         jsakalos suggestion
-109         http://extjs.com/forum/showthread.php?p=121850#post121850 */
-110         if('object' == typeof this.strategy && this.strategy.xtype) {
-111             switch(this.strategy.xtype) {
-112                 case 'number':
-113                     this.strategy = new Ext.ux.form.Spinner.NumberStrategy(this.strategy);
-114 	                break;
-115 
-116                 case 'date':
-117                     this.strategy = new Ext.ux.form.Spinner.DateStrategy(this.strategy);
-118 	                break;
-119 
-120                 case 'time':
-121                     this.strategy = new Ext.ux.form.Spinner.TimeStrategy(this.strategy);
-122                 	break;
-123 
-124                 default:
-125                     delete(this.strategy);
-126                 	break;
-127             }
-128             delete(this.strategy.xtype);
-129         }
-130 
-131 		if(this.strategy == undefined){
-132 			this.strategy = new Ext.ux.form.Spinner.NumberStrategy();
-133 		}
-134 	},
-135 
-136 	//private
-137 	onMouseOver : function(){
-138 		if(this.disabled){
-139 			return;
-140 		}
-141 		var middle = this.getMiddle();
-142 		this.__tmphcls = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
-143 		this.trigger.addClass(this.__tmphcls);
-144 	},
-145 
-146 	//private
-147 	onMouseOut : function(){
-148 		this.trigger.removeClass(this.__tmphcls);
-149 	},
-150 
-151 	//private
-152 	onMouseMove : function(){
-153 		if(this.disabled){
-154 			return;
-155 		}
-156 		var middle = this.getMiddle();
-157 		if( ((Ext.EventObject.getPageY() > middle) && this.__tmphcls == "x-form-spinner-overup") ||
-158 			((Ext.EventObject.getPageY() < middle) && this.__tmphcls == "x-form-spinner-overdown")){
-159 		}
-160 	},
-161 
-162 	//private
-163 	onMouseDown : function(){
-164 		if(this.disabled){
-165 			return;
-166 		}
-167 		var middle = this.getMiddle();
-168 		this.__tmpccls = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
-169 		this.trigger.addClass(this.__tmpccls);
-170 	},
-171 
-172 	//private
-173 	onMouseUp : function(){
-174 		this.trigger.removeClass(this.__tmpccls);
-175 	},
-176 
-177 	//private
-178 	onTriggerClick : function(){
-179 		if(this.disabled || this.getEl().dom.readOnly){
-180 			return;
-181 		}
-182 		var middle = this.getMiddle();
-183 		var ud = (Ext.EventObject.getPageY() < middle) ? 'Up' : 'Down';
-184 		this['onSpin'+ud]();
-185 	},
-186 
-187 	//private
-188 	getMiddle : function(){
-189 		var t = this.trigger.getTop();
-190 		var h = this.trigger.getHeight();
-191 		var middle = t + (h/2);
-192 		return middle;
-193 	},
-194 	
-195 	//private
-196 	//checks if control is allowed to spin
-197 	isSpinnable : function(){
-198 		if(this.disabled || this.getEl().dom.readOnly){
-199 			Ext.EventObject.preventDefault();	//prevent scrolling when disabled/readonly
-200 			return false;
-201 		}
-202 		return true;
-203 	},
-204 
-205 	handleMouseWheel : function(e){
-206 		//disable scrolling when not focused
-207 		if(this.wrap.hasClass('x-trigger-wrap-focus') == false){
-208 			return;
-209 		}
-210 
-211 		var delta = e.getWheelDelta();
-212 		if(delta > 0){
-213 			this.onSpinUp();
-214 			e.stopEvent();
-215 		} else if(delta < 0){
-216 			this.onSpinDown();
-217 			e.stopEvent();
-218 		}
-219 	},
-220 
-221 	//private
-222 	startDrag : function(){
-223 		this.proxy.show();
-224 		this._previousY = Ext.fly(this.dd.getDragEl()).getTop();
-225 	},
-226 
-227 	//private
-228 	endDrag : function(){
-229 		this.proxy.hide();
-230 	},
-231 
-232 	//private
-233 	onDrag : function(){
-234 		if(this.disabled){
-235 			return;
-236 		}
-237 		var y = Ext.fly(this.dd.getDragEl()).getTop();
-238 		var ud = '';
-239 
-240 		if(this._previousY > y){ud = 'Up';}         //up
-241 		if(this._previousY < y){ud = 'Down';}       //down
-242 
-243 		if(ud != ''){
-244 			this['onSpin'+ud]();
-245 		}
-246 
-247 		this._previousY = y;
-248 	},
-249 
-250 	//private
-251 	onSpinUp : function(){
-252 		if(this.isSpinnable() == false) {
-253 			return;
-254 		}
-255 		if(Ext.EventObject.shiftKey == true){
-256 			this.onSpinUpAlternate();
-257 			return;
-258 		}else{
-259 			this.strategy.onSpinUp(this);
-260 		}
-261 		this.fireEvent("spin", this);
-262 		this.fireEvent("spinup", this);
-263 	},
-264 
-265 	//private
-266 	onSpinDown : function(){
-267 		if(this.isSpinnable() == false) {
-268 			return;
-269 		}
-270 		if(Ext.EventObject.shiftKey == true){
-271 			this.onSpinDownAlternate();
-272 			return;
-273 		}else{
-274 			this.strategy.onSpinDown(this);
-275 		}
-276 		this.fireEvent("spin", this);
-277 		this.fireEvent("spindown", this);
-278 	},
-279 
-280 	//private
-281 	onSpinUpAlternate : function(){
-282 		if(this.isSpinnable() == false) {
-283 			return;
-284 		}
-285 		this.strategy.onSpinUpAlternate(this);
-286 		this.fireEvent("spin", this);
-287 		this.fireEvent("spinup", this);
-288 	},
-289 
-290 	//private
-291 	onSpinDownAlternate : function(){
-292 		if(this.isSpinnable() == false) {
-293 			return;
-294 		}
-295 		this.strategy.onSpinDownAlternate(this);
-296 		this.fireEvent("spin", this);
-297 		this.fireEvent("spindown", this);
-298 	}
-299 
-300 });
-301 
-302 Ext.reg('uxspinner', Ext.ux.form.Spinner);
-303 
-304 /**
-305  * Copyright (c) 2008, Steven Chim
-306  * All rights reserved.
-307  * 
-308  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-309  * 
-310  *     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-311  *     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-312  *     * The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
-313  * 
-314  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-315  */
-316 
-317 /***
-318  * Abstract Strategy
-319  */
-320 Ext.ux.form.Spinner.Strategy = function(config){
-321 	Ext.apply(this, config);
-322 };
-323 
-324 Ext.extend(Ext.ux.form.Spinner.Strategy, Ext.util.Observable, {
-325 	defaultValue : 0,
-326 	minValue : undefined,
-327 	maxValue : undefined,
-328 	incrementValue : 1,
-329 	alternateIncrementValue : 5,
-330 	validationTask : new Ext.util.DelayedTask(),
-331 	
-332 	onSpinUp : function(field){
-333 		this.spin(field, false, false);
-334 	},
-335 
-336 	onSpinDown : function(field){
-337 		this.spin(field, true, false);
-338 	},
-339 
-340 	onSpinUpAlternate : function(field){
-341 		this.spin(field, false, true);
-342 	},
-343 
-344 	onSpinDownAlternate : function(field){
-345 		this.spin(field, true, true);
-346 	},
-347 
-348 	spin : function(field, down, alternate){
-349 		this.validationTask.delay(500, function(){field.validate()});
-350 		//extend
-351 	},
-352 
-353 	fixBoundries : function(value){
-354 		return value;
-355 		//overwrite
-356 	}
-357 	
-358 });
-359 
-360 /***
-361  * Concrete Strategy: Numbers
-362  */
-363 Ext.ux.form.Spinner.NumberStrategy = function(config){
-364 	Ext.ux.form.Spinner.NumberStrategy.superclass.constructor.call(this, config);
-365 };
-366 
-367 Ext.extend(Ext.ux.form.Spinner.NumberStrategy, Ext.ux.form.Spinner.Strategy, {
-368 
-369     allowDecimals : true,
-370     decimalPrecision : 2,
-371     
-372 	spin : function(field, down, alternate){
-373 		Ext.ux.form.Spinner.NumberStrategy.superclass.spin.call(this, field, down, alternate);
-374 
-375 		var v = parseFloat(field.getValue());
-376 		var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
-377 
-378 		(down == true) ? v -= incr : v += incr ;
-379 		v = (isNaN(v)) ? this.defaultValue : v;
-380 		v = this.fixBoundries(v);
-381 		field.setRawValue(v);
-382 	},
-383 
-384 	fixBoundries : function(value){
-385 		var v = value;
-386 
-387 		if(this.minValue != undefined && v < this.minValue){
-388 			v = this.minValue;
-389 		}
-390 		if(this.maxValue != undefined && v > this.maxValue){
-391 			v = this.maxValue;
-392 		}
-393 
-394 		return this.fixPrecision(v);
-395 	},
-396 	
-397     // private
-398     fixPrecision : function(value){
-399         var nan = isNaN(value);
-400         if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
-401             return nan ? '' : value;
-402         }
-403         return value.toFixed(this.decimalPrecision);
-404     }
-405 });
-406 
-407 
-408 /***
-409  * Concrete Strategy: Date
-410  */
-411 Ext.ux.form.Spinner.DateStrategy = function(config){
-412 	Ext.ux.form.Spinner.DateStrategy.superclass.constructor.call(this, config);
-413 };
-414 
-415 Ext.extend(Ext.ux.form.Spinner.DateStrategy, Ext.ux.form.Spinner.Strategy, {
-416 	defaultValue : new Date(),
-417 	format : "Y-m-d",
-418 	incrementValue : 1,
-419 	incrementConstant : Date.DAY,
-420 	alternateIncrementValue : 1,
-421 	alternateIncrementConstant : Date.MONTH,
-422 
-423 	spin : function(field, down, alternate){
-424 		Ext.ux.form.Spinner.DateStrategy.superclass.spin.call(this);
-425 
-426 		var v = field.getRawValue();
-427 		
-428 		v = Date.parseDate(v, this.format);
-429 		var dir = (down == true) ? -1 : 1 ;
-430 		var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
-431 		var dtconst = (alternate == true) ? this.alternateIncrementConstant : this.incrementConstant;
-432 
-433 		if(typeof this.defaultValue == 'string'){
-434 			this.defaultValue = Date.parseDate(this.defaultValue, this.format);
-435 		}
-436 
-437 		v = (v) ? v.add(dtconst, dir*incr) : this.defaultValue;
-438 
-439 		v = this.fixBoundries(v);
-440 		field.setRawValue(Ext.util.Format.date(v,this.format));
-441 	},
-442 	
-443 	//private
-444 	fixBoundries : function(date){
-445 		var dt = date;
-446 		var min = (typeof this.minValue == 'string') ? Date.parseDate(this.minValue, this.format) : this.minValue ;
-447 		var max = (typeof this.maxValue == 'string') ? Date.parseDate(this.maxValue, this.format) : this.maxValue ;
-448 
-449 		if(this.minValue != undefined && dt < min){
-450 			dt = min;
-451 		}
-452 		if(this.maxValue != undefined && dt > max){
-453 			dt = max;
-454 		}
-455 
-456 		return dt;
-457 	}
-458 
-459 });
-460 
-461 /***
-462  * Concrete Strategy: Time
-463  */
-464 Ext.ux.form.Spinner.TimeStrategy = function(config){
-465 	Ext.ux.form.Spinner.TimeStrategy.superclass.constructor.call(this, config);
-466 };
-467 
-468 Ext.extend(Ext.ux.form.Spinner.TimeStrategy, Ext.ux.form.Spinner.DateStrategy, {
-469 	format : "H:i",
-470 	incrementValue : 1,
-471 	incrementConstant : Date.MINUTE,
-472 	alternateIncrementValue : 1,
-473 	alternateIncrementConstant : Date.HOUR
-474 });
-475 
-476 Ext.tree.ColumnTree = Ext.extend(Ext.tree.TreePanel, {
-477     lines:false,
-478     borderWidth: Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell
-479     cls:'x-column-tree',
-480     
-481     onRender : function(){
-482         Ext.tree.ColumnTree.superclass.onRender.apply(this, arguments);
-483         this.headers = this.body.createChild(
-484             {cls:'x-tree-headers'},this.innerCt.dom);
-485 
-486         var cols = this.columns, c;
-487         var totalWidth = 0;
-488 
-489         for(var i = 0, len = cols.length; i < len; i++){
-490              c = cols[i];
-491              totalWidth += c.width;
-492              this.headers.createChild({
-493                  cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''),
-494                  cn: {
-495                      cls:'x-tree-hd-text',
-496                      html: c.header
-497                  },
-498                  style:'width:'+(c.width-this.borderWidth)+'px;'
-499              });
-500         }
-501         this.headers.createChild({cls:'x-clear'});
-502         // prevent floats from wrapping when clipped
-503         this.headers.setWidth(totalWidth);
-504         this.innerCt.setWidth(totalWidth);
-505     }
-506 });
-507 
-508 Ext.tree.ColumnTreeNode = Ext.extend(Ext.tree.TreeNode, {
-509 	
-510 	setColumnValue: function(index, value) {
-511 		var t = this.getOwnerTree();
-512 		var oldValue = this[t.columns[index].dataIndex];
-513 		this[t.columns[index].dataIndex] = value;
-514 		this.attributes[[t.columns[index].dataIndex]] = value;
-515 		if (this.rendered) {
-516 			this.ui.onColumnValueChange(this, index, value, oldValue);
-517 		}
-518 		this.fireEvent('columnvaluechange', this, index, value, oldValue);
-519 	}
-520 });
-521 
-522 Ext.tree.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
-523     focus: Ext.emptyFn, // prevent odd scrolling behavior
-524 	
-525 	onColumnValueChange: function(n, colIndex, value, oldValue) {
-526 		if (this.rendered) {
-527 			var c = n.getOwnerTree().columns[colIndex];
-528 			this.columnNodes[colIndex].innerHTML = (c.renderer ? c.renderer(value, n, null) : value);
-529 		}
-530 	},
-531 
-532     renderElements : function(n, a, targetNode, bulkRender){
-533         this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
-534 
-535         var t = n.getOwnerTree();
-536         var cols = t.columns;
-537         var bw = t.borderWidth;
-538         var c = cols[0];
-539         
-540         var cb = typeof a.checked == 'boolean';
-541 		var href = a.href ? a.href : Ext.isGecko ? "" : "#";
-542 
-543         var buf = [
-544              '<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.cls,'" unselectable="on">',
-545                 '<div class="x-tree-col" style="width:',c.width-bw,'px;">',
-546                     '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
-547                     '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow">',
-548                     '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
-549                     cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '',
-550                     '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',
-551                     a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '>',
-552                     '<span unselectable="on">', n.text || (c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</span></a>",
-553                 "</div>"];
-554          for(var i = 1, len = cols.length; i < len; i++){
-555              c = cols[i];
-556 
-557              buf.push('<div class="x-tree-col ',(c.cls?c.cls:''),'" style="width:',c.width-bw,'px;">',
-558                         '<div class="x-tree-col-text">',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"</div>",
-559                       "</div>");
-560          }
-561          buf.push(
-562             '<div class="x-clear"></div></div>',
-563             '<ul class="x-tree-node-ct" style="display:none;"></ul>',
-564             "</li>");
-565 
-566         if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){
-567             this.wrap = Ext.DomHelper.insertHtml("beforeBegin",
-568                                 n.nextSibling.ui.getEl(), buf.join(""));
-569         }else{
-570             this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join(""));
-571         }
-572 
-573         this.elNode = this.wrap.childNodes[0];
-574         this.ctNode = this.wrap.childNodes[1];
-575         var cs = this.elNode.firstChild.childNodes;
-576         this.indentNode = cs[0];
-577         this.ecNode = cs[1];
-578         this.iconNode = cs[2];
-579 		var index = 3;
-580         if(cb){
-581             this.checkbox = cs[3];
-582 			// fix for IE6
-583 			this.checkbox.defaultChecked = this.checkbox.checked;			
-584             index++;
-585         }
-586         this.anchor = cs[index];
-587 		this.columnNodes = [cs[index].firstChild];
-588 		for(var i = 1, len = cols.length; i < len; i++){
-589 			this.columnNodes[i] = this.elNode.childNodes[i].firstChild;
-590 		}
-591     }
-592 });
-593 
-594 Ext.form.FileUploadField = Ext.extend(Ext.form.TextField,  {
-595     /**
-596      * @cfg {String} buttonText The button text to display on the upload button (defaults to
-597      * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
-598      * value will be used instead if available.
-599      */
-600     buttonText: 'Browse...',
-601     /**
-602      * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
-603      * text field (defaults to false).  If true, all inherited TextField members will still be available.
-604      */
-605     buttonOnly: false,
-606     /**
-607      * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
-608      * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
-609      */
-610     buttonOffset: 3,
-611     /**
-612      * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.
-613      */
-614 
-615     // private
-616     readOnly: true,
-617     
-618     /**
-619      * @hide 
-620      * @method autoSize
-621      */
-622     autoSize: Ext.emptyFn,
-623     
-624     // private
-625     initComponent: function(){
-626         Ext.form.FileUploadField.superclass.initComponent.call(this);
-627         
-628         this.addEvents(
-629             /**
-630              * @event fileselected
-631              * Fires when the underlying file input field's value has changed from the user
-632              * selecting a new file from the system file selection dialog.
-633              * @param {Ext.form.FileUploadField} this
-634              * @param {String} value The file value returned by the underlying file input field
-635              */
-636             'fileselected'
-637         );
-638     },
-639     
-640     // private
-641     onRender : function(ct, position){
-642         Ext.form.FileUploadField.superclass.onRender.call(this, ct, position);
-643         
-644         this.wrap = this.el.wrap({cls:'x-form-field-wrap x-form-file-wrap'});
-645         this.el.addClass('x-form-file-text');
-646         this.el.dom.removeAttribute('name');
-647         
-648         this.fileInput = this.wrap.createChild({
-649             id: this.getFileInputId(),
-650             name: this.name||this.getId(),
-651             cls: 'x-form-file',
-652             tag: 'input', 
-653             type: 'file',
-654             size: 1
-655         });
-656         
-657         var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
-658             text: this.buttonText
-659         });
-660         this.button = new Ext.Button(Ext.apply(btnCfg, {
-661             renderTo: this.wrap
-662         }));
-663         
-664         if(this.buttonOnly){
-665             this.el.hide();
-666             this.wrap.setWidth(this.button.getEl().getWidth());
-667         }
-668         
-669         this.fileInput.on('change', function(){
-670             var v = this.fileInput.dom.value;
-671             this.setValue(v);
-672             this.fireEvent('fileselected', this, v);
-673         }, this);
-674     },
-675     
-676     // private
-677     getFileInputId: function(){
-678         return this.id+'-file';
-679     },
-680     
-681     // private
-682     onResize : function(w, h){
-683         Ext.form.FileUploadField.superclass.onResize.call(this, w, h);
-684         
-685         this.wrap.setWidth(w);
-686         
-687         if(!this.buttonOnly){
-688             var w = this.wrap.getWidth() - this.button.getEl().getWidth() - this.buttonOffset;
-689             this.el.setWidth(w);
-690         }
-691     },
-692     
-693     // private
-694     preFocus : Ext.emptyFn,
-695     
-696     // private
-697     getResizeEl : function(){
-698         return this.wrap;
-699     },
-700 
-701     // private
-702     getPositionEl : function(){
-703         return this.wrap;
-704     },
-705 
-706     // private
-707     alignErrorIcon : function(){
-708         this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
-709     }
-710     
-711 });
-712 Ext.reg('fileuploadfield', Ext.form.FileUploadField);
-713 
-714 /**
-715   * Ext.ux.FullProgressBar Class
-716   *
-717   * @author Damien Churchill <damoxc@gmail.com>
-718   * @version 1.2
-719   *
-720   * @class Ext.deluge.ProgressBar
-721   * @extends Ext.ProgressBar
-722   * @constructor
-723   * @param {Object} config Configuration options
-724   */
-725 Ext.ux.FullProgressBar = Ext.extend(Ext.ProgressBar, {
-726 	initComponent: function() {
-727 		Ext.ux.FullProgressBar.superclass.initComponent.call(this);
-728 	},
-729 	
-730 	updateProgress: function(value, text, animate) {
-731 		this.value = value || 0;
-732 		if (text) {
-733 			this.updateText(text);
-734 		}
-735 		
-736 		if (this.rendered) {
-737 			var w = Math.floor(value*this.el.dom.firstChild.offsetWidth / 100.0);
-738 	        this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
-739 	        if (this.textTopEl) {
-740 	            //textTopEl should be the same width as the bar so overflow will clip as the bar moves
-741 	            this.textTopEl.removeClass('x-hidden').setWidth(w);
-742 	        }
-743 		}
-744 		this.fireEvent('update', this, value, text);
-745 		return this;
-746 	}
-747 });
-748 Ext.reg('fullprogressbar', Ext.ux.FullProgressBar);
-749 
-750 
-751 // Allow radiogroups to be treated as a single form element.
-752 Ext.override(Ext.form.RadioGroup, {
-753 
-754 	afterRender: function() {
-755 		var that = this;
-756 		this.items.each(function(i) {
-757 			that.relayEvents(i, ['check']);
-758 		});
-759 		Ext.form.RadioGroup.superclass.afterRender.call(this)
-760 	},
-761 
-762 	getName: function() {
-763 		return this.items.first().getName();
-764 	},
-765 
-766 	getValue: function() {
-767 		var v;
-768 
-769 		this.items.each(function(item) {
-770 			v = item.getRawValue();
-771 			return !item.getValue();
-772 		});
-773 
-774 		return v;
-775 	},
-776 
-777 	setValue: function(v) {
-778 		if (!this.items.each) return;
-779 		this.items.each(function(item) {
-780 			item.setValue((item.getRawValue() === 'true') == v);
-781 		});
-782 	}
-783 });
-784 
\ No newline at end of file