increase the width of the toolbar in the css

migrate the window title of the add window to Deluge.Strings
add code to popup a window for torrent create
This commit is contained in:
Damien Churchill 2008-10-07 19:54:11 +00:00
parent fb8a4d8b89
commit c2c84fd0fa
4 changed files with 28 additions and 2 deletions

View File

@ -50,4 +50,6 @@ Deluge.Strings.add('Force Recheck', '$_('Force Recheck')');
Deluge.Strings.add('Move Storage', '$_('Move Storage')');
// Add Torrents Window //
Deluge.Strings.add('Add Torrents', '$_('Add Torrents')');
Deluge.Strings.add('Create Torrent', '$_('Create Torrent')');
Deluge.Strings.add('Torrents Window', '$_('Torrents Window')');

View File

@ -11,7 +11,7 @@ Deluge.Widgets.AddWindow = new Class({
options: {
width: 400,
height: 200,
title: 'Add Torrents',
title: Deluge.Strings.get('Add Torrents'),
url: '/template/render/html/window_add_torrent.html'
},
@ -30,3 +30,23 @@ Deluge.Widgets.AddWindow = new Class({
}.bindWithEvent(this))
}
});
Deluge.Widgets.CreateWindow = new Class({
Extends: Widgets.Window,
options: {
width: 400,
height: 200,
title: Deluge.Strings.get('Create Torrent'),
url: '/templates/render/html/window_create_torrent.html'
},
initialize: function() {
this.parent();
this.addEvent('loaded', this.loaded.bindWithEvent(this));
},
loaded: function(event) {
}
});

View File

@ -34,6 +34,7 @@ Deluge.UI = {
this.toolbar = new Deluge.Widgets.Toolbar();
this.addWindow = new Deluge.Widgets.AddWindow();
this.createWindow = new Deluge.Widgets.CreateWindow();
if (Browser.Engine.name != 'trident') {
this.prefsWindow = new Deluge.Widgets.PreferencesWindow();
}
@ -254,6 +255,9 @@ Deluge.UI = {
client.set_torrent_auto_managed(torrentId, value);
});
break;
case 'create':
this.createWindow.show();
break;
case 'add':
this.addWindow.show();
break;

View File

@ -42,7 +42,7 @@ body {
background: url('/static/images/simple_logo.jpg') no-repeat;
height: 71px;
padding-left: 60px;
width: 320px;
width: 360px;
}
#toolbar #buttons li {