mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
web: rebuild the compressed javascript
There were a few changes when upgrading to ext 3.4 so rebuild and compress the javascript files
This commit is contained in:
parent
2e0e0fb6b5
commit
d60b436fcb
4 changed files with 168 additions and 140 deletions
|
@ -251,13 +251,7 @@ Ext.namespace('Deluge.details');
|
||||||
*/
|
*/
|
||||||
Deluge.details.DetailsPanel = Ext.extend(Ext.TabPanel, {
|
Deluge.details.DetailsPanel = Ext.extend(Ext.TabPanel, {
|
||||||
|
|
||||||
region: 'south',
|
|
||||||
id: 'torrentDetails',
|
id: 'torrentDetails',
|
||||||
split: true,
|
|
||||||
height: 210,
|
|
||||||
minSize: 100,
|
|
||||||
collapsible: true,
|
|
||||||
margins: '0 5 5 5',
|
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
|
@ -1734,6 +1728,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
|
||||||
xtype: 'fileuploadfield',
|
xtype: 'fileuploadfield',
|
||||||
id: 'torrentFile',
|
id: 'torrentFile',
|
||||||
width: 280,
|
width: 280,
|
||||||
|
height: 24,
|
||||||
emptyText: _('Select a torrent'),
|
emptyText: _('Select a torrent'),
|
||||||
fieldLabel: _('File'),
|
fieldLabel: _('File'),
|
||||||
name: 'file',
|
name: 'file',
|
||||||
|
@ -3068,7 +3063,7 @@ Deluge.preferences.InstallPluginWindow = Ext.extend(Ext.Window, {
|
||||||
|
|
||||||
onInstall: function(field, e) {
|
onInstall: function(field, e) {
|
||||||
this.form.getForm().submit({
|
this.form.getForm().submit({
|
||||||
url: '/upload',
|
url: deluge.config.base + 'upload',
|
||||||
waitMsg: _('Uploading your plugin...'),
|
waitMsg: _('Uploading your plugin...'),
|
||||||
success: this.onUploadSuccess,
|
success: this.onUploadSuccess,
|
||||||
scope: this
|
scope: this
|
||||||
|
@ -6794,6 +6789,26 @@ Deluge.Formatters = {
|
||||||
return bytes.toFixed(1) + ' GiB'
|
return bytes.toFixed(1) + ' GiB'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats the bytes value into a string with K, M or G units.
|
||||||
|
*
|
||||||
|
* @param {Number} bytes the filesize in bytes
|
||||||
|
* @param {Boolean} showZero pass in true to displays 0 values
|
||||||
|
* @return {String} formatted string with K, M or G units.
|
||||||
|
*/
|
||||||
|
sizeShort: function(bytes, showZero) {
|
||||||
|
if (!bytes && !showZero) return '';
|
||||||
|
bytes = bytes / 1024.0;
|
||||||
|
|
||||||
|
if (bytes < 1024) { return bytes.toFixed(1) + ' K'; }
|
||||||
|
else { bytes = bytes / 1024; }
|
||||||
|
|
||||||
|
if (bytes < 1024) { return bytes.toFixed(1) + ' M'; }
|
||||||
|
else { bytes = bytes / 1024; }
|
||||||
|
|
||||||
|
return bytes.toFixed(1) + ' G'
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats a string to display a transfer speed utilizing {@link #size}
|
* Formats a string to display a transfer speed utilizing {@link #size}
|
||||||
*
|
*
|
||||||
|
@ -6862,6 +6877,7 @@ Deluge.Formatters = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var fsize = Deluge.Formatters.size;
|
var fsize = Deluge.Formatters.size;
|
||||||
|
var fsize_short = Deluge.Formatters.sizeShort;
|
||||||
var fspeed = Deluge.Formatters.speed;
|
var fspeed = Deluge.Formatters.speed;
|
||||||
var ftime = Deluge.Formatters.timeRemaining;
|
var ftime = Deluge.Formatters.timeRemaining;
|
||||||
var fdate = Deluge.Formatters.date;
|
var fdate = Deluge.Formatters.date;
|
||||||
|
@ -7128,7 +7144,7 @@ Deluge.LoginWindow = Ext.extend(Ext.Window, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
this.passwordField.focus(true, true);
|
this.passwordField.focus(true, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*!
|
/*!
|
||||||
|
@ -8102,7 +8118,7 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
|
||||||
layout: 'accordion',
|
layout: 'accordion',
|
||||||
split: true,
|
split: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
minSize: 175,
|
minSize: 100,
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
margins: '5 0 0 5',
|
margins: '5 0 0 5',
|
||||||
cmargins: '5 0 0 5'
|
cmargins: '5 0 0 5'
|
||||||
|
@ -8562,9 +8578,16 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
items: [
|
items: [
|
||||||
|
{
|
||||||
|
id: 'tbar-deluge-text',
|
||||||
|
disabled: true,
|
||||||
|
text: _('Deluge'),
|
||||||
|
iconCls: 'x-deluge-main-panel',
|
||||||
|
}, new Ext.Toolbar.Separator(),
|
||||||
{
|
{
|
||||||
id: 'create',
|
id: 'create',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
hidden: true,
|
||||||
text: _('Create'),
|
text: _('Create'),
|
||||||
iconCls: 'icon-create',
|
iconCls: 'icon-create',
|
||||||
handler: this.onTorrentAction
|
handler: this.onTorrentAction
|
||||||
|
@ -8580,7 +8603,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
text: _('Remove'),
|
text: _('Remove'),
|
||||||
iconCls: 'icon-remove',
|
iconCls: 'icon-remove',
|
||||||
handler: this.onTorrentAction
|
handler: this.onTorrentAction
|
||||||
},'|',{
|
}, new Ext.Toolbar.Separator(),{
|
||||||
id: 'pause',
|
id: 'pause',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
text: _('Pause'),
|
text: _('Pause'),
|
||||||
|
@ -8592,7 +8615,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
text: _('Resume'),
|
text: _('Resume'),
|
||||||
iconCls: 'icon-resume',
|
iconCls: 'icon-resume',
|
||||||
handler: this.onTorrentAction
|
handler: this.onTorrentAction
|
||||||
},'|',{
|
}, new Ext.Toolbar.Separator(),{
|
||||||
id: 'up',
|
id: 'up',
|
||||||
cls: 'x-btn-text-icon',
|
cls: 'x-btn-text-icon',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
@ -8605,7 +8628,7 @@ Deluge.Toolbar = Ext.extend(Ext.Toolbar, {
|
||||||
text: _('Down'),
|
text: _('Down'),
|
||||||
iconCls: 'icon-down',
|
iconCls: 'icon-down',
|
||||||
handler: this.onTorrentAction
|
handler: this.onTorrentAction
|
||||||
},'|',{
|
}, new Ext.Toolbar.Separator(),{
|
||||||
id: 'preferences',
|
id: 'preferences',
|
||||||
text: _('Preferences'),
|
text: _('Preferences'),
|
||||||
iconCls: 'x-deluge-preferences',
|
iconCls: 'x-deluge-preferences',
|
||||||
|
@ -8764,7 +8787,7 @@ deluge.toolbar = new Deluge.Toolbar();
|
||||||
value = new Number(value);
|
value = new Number(value);
|
||||||
var progress = value;
|
var progress = value;
|
||||||
var text = r.data['state'] + ' ' + value.toFixed(2) + '%';
|
var text = r.data['state'] + ' ' + value.toFixed(2) + '%';
|
||||||
var width = new Number(this.style.match(/\w+:\s*(\d+)\w+/)[1]);
|
var width = new Number(p.style.match(/\w+:\s*(\d+)\w+/)[1]);
|
||||||
return Deluge.progressBar(value, width - 8, text);
|
return Deluge.progressBar(value, width - 8, text);
|
||||||
}
|
}
|
||||||
function seedsRenderer(value, p, r) {
|
function seedsRenderer(value, p, r) {
|
||||||
|
@ -9127,15 +9150,31 @@ deluge.ui = {
|
||||||
deluge.sidebar = new Deluge.Sidebar();
|
deluge.sidebar = new Deluge.Sidebar();
|
||||||
deluge.statusbar = new Deluge.Statusbar();
|
deluge.statusbar = new Deluge.Statusbar();
|
||||||
|
|
||||||
|
this.detailsPanel = new Ext.Panel({
|
||||||
|
id: 'detailsPanel',
|
||||||
|
cls: 'detailsPanel',
|
||||||
|
region: 'south',
|
||||||
|
split: true,
|
||||||
|
height: 215,
|
||||||
|
minSize: 100,
|
||||||
|
collapsible: true,
|
||||||
|
margins: '0 5 5 5',
|
||||||
|
cmargins: '0 5 5 5',
|
||||||
|
layout: 'fit',
|
||||||
|
items: [
|
||||||
|
deluge.details
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
this.MainPanel = new Ext.Panel({
|
this.MainPanel = new Ext.Panel({
|
||||||
id: 'mainPanel',
|
id: 'mainPanel',
|
||||||
iconCls: 'x-deluge-main-panel',
|
iconCls: 'x-deluge-main-panel',
|
||||||
title: 'Deluge',
|
|
||||||
layout: 'border',
|
layout: 'border',
|
||||||
|
border: false,
|
||||||
tbar: deluge.toolbar,
|
tbar: deluge.toolbar,
|
||||||
items: [
|
items: [
|
||||||
deluge.sidebar,
|
deluge.sidebar,
|
||||||
deluge.details,
|
this.detailsPanel,
|
||||||
deluge.torrents
|
deluge.torrents
|
||||||
],
|
],
|
||||||
bbar: deluge.statusbar
|
bbar: deluge.statusbar
|
||||||
|
@ -9239,9 +9278,9 @@ deluge.ui = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deluge.config.show_session_speed) {
|
if (deluge.config.show_session_speed) {
|
||||||
document.title = this.originalTitle +
|
document.title = 'D: ' + fsize_short(data['stats'].download_rate, true) +
|
||||||
' (Down: ' + fspeed(data['stats'].download_rate, true) +
|
' U: ' + fsize_short(data['stats'].upload_rate, true) + ' - ' +
|
||||||
' Up: ' + fspeed(data['stats'].upload_rate, true) + ')';
|
this.originalTitle;
|
||||||
}
|
}
|
||||||
if (Ext.areObjectsEqual(this.filters, this.oldFilters)) {
|
if (Ext.areObjectsEqual(this.filters, this.oldFilters)) {
|
||||||
deluge.torrents.update(data['torrents']);
|
deluge.torrents.update(data['torrents']);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2284,10 +2284,10 @@ Ext.ux.Spinner = Ext.extend(Ext.util.Observable, {
|
||||||
//backwards compat
|
//backwards compat
|
||||||
Ext.form.Spinner = Ext.ux.Spinner;
|
Ext.form.Spinner = Ext.ux.Spinner;
|
||||||
/*!
|
/*!
|
||||||
* Ext JS Library 3.1.0
|
* Ext JS Library 3.4.0
|
||||||
* Copyright(c) 2006-2009 Ext JS, LLC
|
* Copyright(c) 2006-2011 Sencha Inc.
|
||||||
* licensing@extjs.com
|
* licensing@sencha.com
|
||||||
* http://www.extjs.com/license
|
* http://www.sencha.com/license
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @class Ext.ux.StatusBar
|
* @class Ext.ux.StatusBar
|
||||||
|
@ -2493,18 +2493,7 @@ sb.setStatus({
|
||||||
this.insert(0, this.statusEl);
|
this.insert(0, this.statusEl);
|
||||||
this.insert(1, '->');
|
this.insert(1, '->');
|
||||||
}
|
}
|
||||||
|
this.doLayout();
|
||||||
// this.statusEl = td.createChild({
|
|
||||||
// cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''),
|
|
||||||
// html: this.text || this.defaultText || ''
|
|
||||||
// });
|
|
||||||
// this.statusEl.unselectable();
|
|
||||||
|
|
||||||
// this.spacerEl = td.insertSibling({
|
|
||||||
// tag: 'td',
|
|
||||||
// style: 'width:100%',
|
|
||||||
// cn: [{cls:'ytb-spacer'}]
|
|
||||||
// }, right ? 'before' : 'after');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue