Author: damoxc
Revision: 4883
Log:
begin implementation of the SideBar
Diff:
Modified: trunk/deluge/ui/web/js/deluge-bars.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-bars.js 2009-03-17 09:16:35 UTC (rev
4882)
+++ trunk/deluge/ui/web/js/deluge-bars.js 2009-03-17 10:33:51 UTC (rev
4883)
@@ -183,20 +183,6 @@
listeners: {'render': Deluge.ToolBar.onToolbarRender, scope:
Deluge.ToolBar}
});
-
-
-Deluge.SideBar = {
- region: 'west',
- id: 'sidebar',
- cls: 'deluge-sidebar',
- title: _('Sidebar'),
- split: true,
- width: 200,
- minSize: 175,
- collapsible: true,
- margins: '5 0 0 5'
-};
-
Deluge.StatusBar = {
onRender: function() {
this.bound = {
@@ -341,4 +327,34 @@
defaultIconCls: 'x-not-connected',
defaultText: _('Not Connected'),
listeners: {'render': {scope: Deluge.StatusBar, fn:
Deluge.StatusBar.onRender}}
-});
\ No newline at end of file
+});
+
+Deluge.SideBar = {
+
+ onRender: function(bar) {
+ this.Bar = bar;
+ Deluge.Events.on("disconnect", this.onDisconnect);
+ },
+
+ onDisconnect: function() {
+
+ },
+
+ update: function(filters) {
+
+ }
+};
+
+Deluge.SideBar.Config = {
+ region: 'west',
+ id: 'sidebar',
+ cls: 'deluge-sidebar',
+ title: _('Sidebar'),
+ layout: 'accordion',
+ split: true,
+ width: 200,
+ minSize: 175,
+ collapsible: true,
+ margins: '5 0 0 5',
+ listeners: {'render': {scope: Deluge.SideBar, fn:
Deluge.SideBar.onRender}}
+}
\ No newline at end of file
Modified: trunk/deluge/ui/web/js/deluge-ui.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-ui.js 2009-03-17 09:16:35 UTC (rev 4882)
+++ trunk/deluge/ui/web/js/deluge-ui.js 2009-03-17 10:33:51 UTC (rev 4883)
@@ -32,7 +32,11 @@
title: 'Deluge',
layout: 'border',
tbar: Deluge.ToolBar.Bar,
- items: [Deluge.SideBar, Deluge.Details.Panel,
Deluge.Torrents.Grid],
+ items: [
+ Deluge.SideBar.Config,
+ Deluge.Details.Panel,
+ Deluge.Torrents.Grid
+ ],
bbar: Deluge.StatusBar.Bar
});
@@ -45,8 +49,6 @@
Deluge.Events.on("connect", this.onConnect.bindWithEvent(this));
Deluge.Events.on("disconnect",
this.onDisconnect.bindWithEvent(this));
Deluge.Client = new JSON.RPC('/json');
-
- Deluge.SideBar = this.MainPanel.items.get('sidebar');
},
update: function() {
@@ -101,6 +103,7 @@
});
Deluge.Torrents.Store.loadData(torrents);
Deluge.StatusBar.update(data['stats']);
+ Deluge.SideBar.update(data['filters']);
this.errorCount = 0;
},
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---