mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-29 14:15:31 +00:00
rebuild the non-dev scripts
This commit is contained in:
parent
3368c4c67d
commit
a89d0d42aa
4 changed files with 64 additions and 55 deletions
|
@ -119,10 +119,12 @@ Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||||
// _('High Priority')
|
// _('High Priority')
|
||||||
// _('Highest Priority')
|
// _('Highest Priority')
|
||||||
FILE_PRIORITY = {
|
FILE_PRIORITY = {
|
||||||
|
9: 'Mixed',
|
||||||
0: 'Do Not Download',
|
0: 'Do Not Download',
|
||||||
1: 'Normal Priority',
|
1: 'Normal Priority',
|
||||||
2: 'High Priority',
|
2: 'High Priority',
|
||||||
5: 'Highest Priority',
|
5: 'Highest Priority',
|
||||||
|
'Mixed': 9,
|
||||||
'Do Not Download': 0,
|
'Do Not Download': 0,
|
||||||
'Normal Priority': 1,
|
'Normal Priority': 1,
|
||||||
'High Priority': 2,
|
'High Priority': 2,
|
||||||
|
@ -130,6 +132,7 @@ FILE_PRIORITY = {
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE_PRIORITY_CSS = {
|
FILE_PRIORITY_CSS = {
|
||||||
|
9: 'x-mixed-download',
|
||||||
0: 'x-no-download',
|
0: 'x-no-download',
|
||||||
1: 'x-normal-download',
|
1: 'x-normal-download',
|
||||||
2: 'x-high-download',
|
2: 'x-high-download',
|
||||||
|
@ -201,6 +204,7 @@ Deluge.Formatters = {
|
||||||
* @returns {string} formatted string with KiB, MiB or GiB units.
|
* @returns {string} formatted string with KiB, MiB or GiB units.
|
||||||
*/
|
*/
|
||||||
size: function(bytes) {
|
size: function(bytes) {
|
||||||
|
if (!bytes) return '';
|
||||||
bytes = bytes / 1024.0;
|
bytes = bytes / 1024.0;
|
||||||
|
|
||||||
if (bytes < 1024) { return bytes.toFixed(1) + ' KiB'; }
|
if (bytes < 1024) { return bytes.toFixed(1) + ' KiB'; }
|
||||||
|
@ -2007,7 +2011,7 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
|
||||||
this.url.show();
|
this.url.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Deluge.Add = new Ext.deluge.add.AddWindow();
|
//Deluge.Add = new Ext.deluge.add.AddWindow();
|
||||||
/*
|
/*
|
||||||
Script: Deluge.Add.File.js
|
Script: Deluge.Add.File.js
|
||||||
Contains the Add Torrent by file window.
|
Contains the Add Torrent by file window.
|
||||||
|
@ -3023,7 +3027,7 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
|
||||||
Ext.deluge.details.StatusTab.superclass.onRender.call(this, ct, position);
|
Ext.deluge.details.StatusTab.superclass.onRender.call(this, ct, position);
|
||||||
|
|
||||||
this.progressBar = this.add({
|
this.progressBar = this.add({
|
||||||
xtype: 'fullprogressbar',
|
xtype: 'progress',
|
||||||
cls: 'x-deluge-status-progressbar'
|
cls: 'x-deluge-status-progressbar'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3227,13 +3231,14 @@ Copyright:
|
||||||
/* Renderers for the column tree */
|
/* Renderers for the column tree */
|
||||||
function fileProgressRenderer(value) {
|
function fileProgressRenderer(value) {
|
||||||
var progress = value * 100;
|
var progress = value * 100;
|
||||||
return Deluge.progressBar(progress, this.width - 50, progress.toFixed(2) + '%', 0);
|
return Deluge.progressBar(progress, this.col.width, progress.toFixed(2) + '%', 0);
|
||||||
}
|
}
|
||||||
function priorityRenderer(value) {
|
function priorityRenderer(value) {
|
||||||
|
if (isNaN(value)) return '';
|
||||||
return String.format('<div class="{0}">{1}</div>', FILE_PRIORITY_CSS[value], _(FILE_PRIORITY[value]));
|
return String.format('<div class="{0}">{1}</div>', FILE_PRIORITY_CSS[value], _(FILE_PRIORITY[value]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.deluge.details.FilesTab = Ext.extend(Ext.tree.ColumnTree, {
|
Ext.deluge.details.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, {
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
|
@ -3247,16 +3252,19 @@ Copyright:
|
||||||
width: 330,
|
width: 330,
|
||||||
dataIndex: 'filename'
|
dataIndex: 'filename'
|
||||||
}, {
|
}, {
|
||||||
|
xtype: 'tgrendercolumn',
|
||||||
header: _('Size'),
|
header: _('Size'),
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: 'size',
|
dataIndex: 'size',
|
||||||
renderer: fsize
|
renderer: fsize
|
||||||
}, {
|
}, {
|
||||||
|
xtype: 'tgrendercolumn',
|
||||||
header: _('Progress'),
|
header: _('Progress'),
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: 'progress',
|
dataIndex: 'progress',
|
||||||
renderer: fileProgressRenderer
|
renderer: fileProgressRenderer
|
||||||
}, {
|
}, {
|
||||||
|
xtype: 'tgrendercolumn',
|
||||||
header: _('Priority'),
|
header: _('Priority'),
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: 'priority',
|
dataIndex: 'priority',
|
||||||
|
@ -3267,8 +3275,14 @@ Copyright:
|
||||||
text: 'Files'
|
text: 'Files'
|
||||||
})
|
})
|
||||||
}, config);
|
}, config);
|
||||||
|
|
||||||
Ext.deluge.details.FilesTab.superclass.constructor.call(this, config);
|
Ext.deluge.details.FilesTab.superclass.constructor.call(this, config);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initComponent: function() {
|
||||||
|
|
||||||
|
Ext.deluge.details.FilesTab.superclass.initComponent.call(this);
|
||||||
|
},
|
||||||
|
|
||||||
onRender: function(ct, position) {
|
onRender: function(ct, position) {
|
||||||
Ext.deluge.details.FilesTab.superclass.onRender.call(this, ct, position);
|
Ext.deluge.details.FilesTab.superclass.onRender.call(this, ct, position);
|
||||||
|
@ -3359,37 +3373,38 @@ Copyright:
|
||||||
|
|
||||||
onRequestComplete: function(files, options) {
|
onRequestComplete: function(files, options) {
|
||||||
function walk(files, parent) {
|
function walk(files, parent) {
|
||||||
for (var file in files) {
|
for (var file in files.contents) {
|
||||||
var item = files[file];
|
var item = files.contents[file];
|
||||||
var child = parent.findChild('id', file);
|
var child = parent.findChild('id', file);
|
||||||
if (Ext.type(item) == 'object') {
|
if (item.type == 'dir') {
|
||||||
if (!child) {
|
if (!child) {
|
||||||
child = new Ext.tree.TreeNode({
|
child = new Ext.tree.TreeNode({
|
||||||
id: file,
|
id: file,
|
||||||
text: file
|
text: file,
|
||||||
|
filename: file,
|
||||||
|
size: item['size'],
|
||||||
|
progress: item['progress'],
|
||||||
|
priority: item['priority']
|
||||||
});
|
});
|
||||||
parent.appendChild(child);
|
parent.appendChild(child);
|
||||||
}
|
}
|
||||||
walk(item, child);
|
walk(item, child);
|
||||||
} else {
|
} else {
|
||||||
if (!child) {
|
if (!child) {
|
||||||
child = new Ext.tree.ColumnTreeNode({
|
child = new Ext.tree.TreeNode({
|
||||||
id: file,
|
id: file,
|
||||||
filename: file,
|
filename: file,
|
||||||
text: file, // this needs to be here for sorting
|
text: file, // this needs to be here for sorting
|
||||||
fileIndex: item[0],
|
fileIndex: item['index'],
|
||||||
size: item[1],
|
size: item['size'],
|
||||||
progress: item[2],
|
progress: item['progress'],
|
||||||
priority: item[3],
|
priority: item['priority'],
|
||||||
leaf: true,
|
leaf: true,
|
||||||
iconCls: 'x-deluge-file',
|
iconCls: 'x-deluge-file',
|
||||||
uiProvider: Ext.tree.ColumnNodeUI
|
uiProvider: Ext.ux.tree.TreeGridNodeUI
|
||||||
});
|
});
|
||||||
parent.appendChild(child);
|
parent.appendChild(child);
|
||||||
}
|
}
|
||||||
child.setColumnValue(1, item[1]);
|
|
||||||
child.setColumnValue(2, item[2]);
|
|
||||||
child.setColumnValue(3, item[3]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3625,7 +3640,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
*/
|
*/
|
||||||
this.fieldsets.bandwidth = this.add({
|
this.fieldsets.bandwidth = this.add({
|
||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
bodyStyle: 'padding: 5px',
|
bodyStyle: 'padding: 5px',
|
||||||
|
|
||||||
layout: 'table',
|
layout: 'table',
|
||||||
|
@ -3776,7 +3791,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.fields.stop_ratio = this.fieldsets.queue.add({
|
this.fields.stop_ratio = this.fieldsets.queue.add({
|
||||||
xtype: 'uxspinner',
|
xtype: 'spinnerfield',
|
||||||
id: 'stop_ratio',
|
id: 'stop_ratio',
|
||||||
name: 'stop_ratio',
|
name: 'stop_ratio',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
@ -3819,7 +3834,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
border: false,
|
border: false,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
style: 'margin-left: 5px',
|
style: 'margin-left: 5px',
|
||||||
width: 200
|
width: 210
|
||||||
});
|
});
|
||||||
|
|
||||||
this.fieldsets.general = this.rightColumn.add({
|
this.fieldsets.general = this.rightColumn.add({
|
||||||
|
@ -3854,24 +3869,15 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
* Buttons
|
* Buttons
|
||||||
*/
|
*/
|
||||||
this.buttonPanel = this.rightColumn.add({
|
this.buttonPanel = this.rightColumn.add({
|
||||||
layout: 'column',
|
layout: 'hbox',
|
||||||
xtype: 'panel',
|
xtype: 'panel',
|
||||||
border: false
|
border: false
|
||||||
});
|
});
|
||||||
|
|
||||||
// The buttons below are required to be added to a panel
|
|
||||||
// first as simply adding them to the column layout throws an
|
|
||||||
// error c.getSize() does not exist. This could be intentional
|
|
||||||
// or it may possible be a bug in ext-js. Take care when upgrading
|
|
||||||
// to ext-js 3.0.
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Edit Trackers button
|
* Edit Trackers button
|
||||||
*/
|
*/
|
||||||
this.buttonPanel.add({
|
this.buttonPanel.add({
|
||||||
xtype: 'panel',
|
|
||||||
border: false
|
|
||||||
}).add({
|
|
||||||
id: 'edit_trackers',
|
id: 'edit_trackers',
|
||||||
xtype: 'button',
|
xtype: 'button',
|
||||||
text: _('Edit Trackers'),
|
text: _('Edit Trackers'),
|
||||||
|
@ -3887,9 +3893,6 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
* Apply button
|
* Apply button
|
||||||
*/
|
*/
|
||||||
this.buttonPanel.add({
|
this.buttonPanel.add({
|
||||||
xtype: 'panel',
|
|
||||||
border: false
|
|
||||||
}).add({
|
|
||||||
id: 'apply',
|
id: 'apply',
|
||||||
xtype: 'button',
|
xtype: 'button',
|
||||||
text: _('Apply'),
|
text: _('Apply'),
|
||||||
|
@ -4920,12 +4923,13 @@ Ext.deluge.preferences.Downloads = Ext.extend(Ext.FormPanel, {
|
||||||
labelWidth: 1,
|
labelWidth: 1,
|
||||||
defaultType: 'radiogroup',
|
defaultType: 'radiogroup',
|
||||||
style: 'margin-bottom: 5px; margin-top: 0; padding-bottom: 5px; padding-top: 0;',
|
style: 'margin-bottom: 5px; margin-top: 0; padding-bottom: 5px; padding-top: 0;',
|
||||||
width: 240
|
width: 240,
|
||||||
});
|
});
|
||||||
optMan.bind('compact_allocation', fieldset.add({
|
optMan.bind('compact_allocation', fieldset.add({
|
||||||
name: 'compact_allocation',
|
name: 'compact_allocation',
|
||||||
width: 200,
|
width: 200,
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
|
disabled: true,
|
||||||
defaults: {
|
defaults: {
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 22,
|
height: 22,
|
||||||
|
@ -5373,7 +5377,7 @@ Ext.deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
|
||||||
border: false,
|
border: false,
|
||||||
title: _('Global Bandwidth Usage'),
|
title: _('Global Bandwidth Usage'),
|
||||||
labelWidth: 200,
|
labelWidth: 200,
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
||||||
autoHeight: true
|
autoHeight: true
|
||||||
});
|
});
|
||||||
|
@ -5478,7 +5482,7 @@ Ext.deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
|
||||||
border: false,
|
border: false,
|
||||||
title: _('Per Torrent Bandwidth Usage'),
|
title: _('Per Torrent Bandwidth Usage'),
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
labelWidth: 200,
|
labelWidth: 200,
|
||||||
autoHeight: true
|
autoHeight: true
|
||||||
});
|
});
|
||||||
|
@ -5666,7 +5670,7 @@ Ext.deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||||
style: 'margin-top: 0px; padding-top: 0px; margin-bottom: 0px; padding-bottom: 0px',
|
style: 'margin-top: 0px; padding-top: 0px; margin-bottom: 0px; padding-bottom: 0px',
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
labelWidth: 110,
|
labelWidth: 110,
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
defaults: {
|
defaults: {
|
||||||
width: 80,
|
width: 80,
|
||||||
}
|
}
|
||||||
|
@ -5953,7 +5957,7 @@ Ext.deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
|
||||||
border: false,
|
border: false,
|
||||||
title: _('Port'),
|
title: _('Port'),
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
defaultType: 'uxspinner'
|
defaultType: 'spinnerfield'
|
||||||
});
|
});
|
||||||
optMan.bind('daemon_port', fieldset.add({
|
optMan.bind('daemon_port', fieldset.add({
|
||||||
fieldLabel: _('Daemon port'),
|
fieldLabel: _('Daemon port'),
|
||||||
|
@ -6073,7 +6077,7 @@ Ext.deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
title: _('Active Torrents'),
|
title: _('Active Torrents'),
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
labelWidth: 150,
|
labelWidth: 150,
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
style: 'margin-bottom: 0px; padding-bottom: 0px;',
|
||||||
});
|
});
|
||||||
optMan.bind('max_active_limit', fieldset.add({
|
optMan.bind('max_active_limit', fieldset.add({
|
||||||
|
@ -6126,7 +6130,7 @@ Ext.deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
title: _('Seeding'),
|
title: _('Seeding'),
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
labelWidth: 150,
|
labelWidth: 150,
|
||||||
defaultType: 'uxspinner',
|
defaultType: 'spinnerfield',
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;',
|
style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;',
|
||||||
});
|
});
|
||||||
optMan.bind('share_ratio_limit', fieldset.add({
|
optMan.bind('share_ratio_limit', fieldset.add({
|
||||||
|
@ -6189,7 +6193,7 @@ Ext.deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
optMan.bind('stop_seed_at_ratio', this.stopAtRatio);
|
optMan.bind('stop_seed_at_ratio', this.stopAtRatio);
|
||||||
|
|
||||||
this.stopRatio = fieldset.add({
|
this.stopRatio = fieldset.add({
|
||||||
xtype: 'uxspinner',
|
xtype: 'spinnerfield',
|
||||||
name: 'stop_seed_ratio',
|
name: 'stop_seed_ratio',
|
||||||
ctCls: 'x-deluge-indent-checkbox',
|
ctCls: 'x-deluge-indent-checkbox',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
@ -6299,7 +6303,7 @@ Ext.deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.port = this.add({
|
this.port = this.add({
|
||||||
xtype: 'uxspinner',
|
xtype: 'spinnerfield',
|
||||||
name: 'port',
|
name: 'port',
|
||||||
fieldLabel: _('Port'),
|
fieldLabel: _('Port'),
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -6454,13 +6458,8 @@ Ext.deluge.preferences.Proxy = Ext.extend(Ext.form.FormPanel, {
|
||||||
this.fireEvent('change', this, newValues, oldValues);
|
this.fireEvent('change', this, newValues, oldValues);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Deluge.Preferences.addPage(new Ext.deluge.preferences.Proxy());/*Deluge.Preferences.addPage(_('Notification'), {
|
Deluge.Preferences.addPage(new Ext.deluge.preferences.Proxy());
|
||||||
border: false,
|
/*
|
||||||
xtype: 'form',
|
|
||||||
layout: 'form',
|
|
||||||
items: []
|
|
||||||
});
|
|
||||||
*//*
|
|
||||||
Script: Deluge.Preferences.Cache.js
|
Script: Deluge.Preferences.Cache.js
|
||||||
The cache preferences page.
|
The cache preferences page.
|
||||||
|
|
||||||
|
@ -6515,7 +6514,7 @@ Ext.deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, {
|
||||||
title: _('Settings'),
|
title: _('Settings'),
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
labelWidth: 180,
|
labelWidth: 180,
|
||||||
defaultType: 'uxspinner'
|
defaultType: 'spinnerfield'
|
||||||
});
|
});
|
||||||
optMan.bind('cache_size', fieldset.add({
|
optMan.bind('cache_size', fieldset.add({
|
||||||
fieldLabel: _('Cache Size (16 KiB Blocks)'),
|
fieldLabel: _('Cache Size (16 KiB Blocks)'),
|
||||||
|
@ -6543,7 +6542,8 @@ Ext.deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Deluge.Preferences.addPage(new Ext.deluge.preferences.Cache());/*
|
Deluge.Preferences.addPage(new Ext.deluge.preferences.Cache());
|
||||||
|
/*
|
||||||
Script: Deluge.Preferences.Plugins.js
|
Script: Deluge.Preferences.Plugins.js
|
||||||
The plugins preferences page.
|
The plugins preferences page.
|
||||||
|
|
||||||
|
@ -7213,7 +7213,7 @@ Copyright:
|
||||||
});
|
});
|
||||||
Deluge.Sidebar = new Ext.deluge.Sidebar();
|
Deluge.Sidebar = new Ext.deluge.Sidebar();
|
||||||
})();
|
})();
|
||||||
Ext.deluge.Statusbar = Ext.extend(Ext.Toolbar, {
|
Ext.deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
id: 'deluge-statusbar',
|
id: 'deluge-statusbar',
|
||||||
|
@ -7617,7 +7617,6 @@ Copyright:
|
||||||
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]) - 8;
|
|
||||||
return Deluge.progressBar(value, this.width - 8, text);
|
return Deluge.progressBar(value, this.width - 8, text);
|
||||||
}
|
}
|
||||||
function seedsRenderer(value, p, r) {
|
function seedsRenderer(value, p, r) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1828,6 +1828,16 @@ Ext.ux.tree.TreeGridLoader = Ext.extend(Ext.tree.TreeLoader, {
|
||||||
Ext.reg('tgdatecolumn', Ext.tree.DateColumn);
|
Ext.reg('tgdatecolumn', Ext.tree.DateColumn);
|
||||||
Ext.reg('tgbooleancolumn', Ext.tree.BooleanColumn);
|
Ext.reg('tgbooleancolumn', Ext.tree.BooleanColumn);
|
||||||
})();
|
})();
|
||||||
|
Ext.tree.RenderColumn = Ext.extend(Ext.tree.Column, {
|
||||||
|
|
||||||
|
constructor: function(c) {
|
||||||
|
c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');
|
||||||
|
c.tpl.format = c.renderer;
|
||||||
|
c.tpl.col = this;
|
||||||
|
Ext.tree.RenderColumn.superclass.constructor.call(this, c);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Ext.reg('tgrendercolumn', Ext.tree.RenderColumn);
|
||||||
/*!
|
/*!
|
||||||
* Ext JS Library 3.1.0
|
* Ext JS Library 3.1.0
|
||||||
* Copyright(c) 2006-2009 Ext JS, LLC
|
* Copyright(c) 2006-2009 Ext JS, LLC
|
||||||
|
|
|
@ -67,7 +67,7 @@ Ext.ux.tree.TreeGridLoader=Ext.extend(Ext.tree.TreeLoader,{createNode:function(a
|
||||||
* licensing@extjs.com
|
* licensing@extjs.com
|
||||||
* http://www.extjs.com/license
|
* http://www.extjs.com/license
|
||||||
*/
|
*/
|
||||||
(function(){Ext.override(Ext.list.Column,{init:function(){if(!this.type){this.type="auto"}var a=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=a[this.sortType]}if(!this.sortType){switch(this.type){case"string":this.sortType=a.asUCString;break;case"date":this.sortType=a.asDate;break;default:this.sortType=a.none}}}});Ext.tree.Column=Ext.extend(Ext.list.Column,{});Ext.tree.NumberColumn=Ext.extend(Ext.list.NumberColumn,{});Ext.tree.DateColumn=Ext.extend(Ext.list.DateColumn,{});Ext.tree.BooleanColumn=Ext.extend(Ext.list.BooleanColumn,{});Ext.reg("tgcolumn",Ext.tree.Column);Ext.reg("tgnumbercolumn",Ext.tree.NumberColumn);Ext.reg("tgdatecolumn",Ext.tree.DateColumn);Ext.reg("tgbooleancolumn",Ext.tree.BooleanColumn)})();
|
(function(){Ext.override(Ext.list.Column,{init:function(){if(!this.type){this.type="auto"}var a=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=a[this.sortType]}if(!this.sortType){switch(this.type){case"string":this.sortType=a.asUCString;break;case"date":this.sortType=a.asDate;break;default:this.sortType=a.none}}}});Ext.tree.Column=Ext.extend(Ext.list.Column,{});Ext.tree.NumberColumn=Ext.extend(Ext.list.NumberColumn,{});Ext.tree.DateColumn=Ext.extend(Ext.list.DateColumn,{});Ext.tree.BooleanColumn=Ext.extend(Ext.list.BooleanColumn,{});Ext.reg("tgcolumn",Ext.tree.Column);Ext.reg("tgnumbercolumn",Ext.tree.NumberColumn);Ext.reg("tgdatecolumn",Ext.tree.DateColumn);Ext.reg("tgbooleancolumn",Ext.tree.BooleanColumn)})();Ext.tree.RenderColumn=Ext.extend(Ext.tree.Column,{constructor:function(a){a.tpl=a.tpl||new Ext.XTemplate("{"+a.dataIndex+":this.format}");a.tpl.format=a.renderer;a.tpl.col=this;Ext.tree.RenderColumn.superclass.constructor.call(this,a)}});Ext.reg("tgrendercolumn",Ext.tree.RenderColumn);
|
||||||
/*
|
/*
|
||||||
* Ext JS Library 3.1.0
|
* Ext JS Library 3.1.0
|
||||||
* Copyright(c) 2006-2009 Ext JS, LLC
|
* Copyright(c) 2006-2009 Ext JS, LLC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue