diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 15:05:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 15:05:49 +0000 |
commit | d395bd510fa4f4376dc5237ab2f8d190a920d35d (patch) | |
tree | 3e3b16b44064938be801aede14381562bae14f6a /deluge/ui/web/js/deluge-all/add/FilesTab.js | |
parent | Adding upstream version 2.0.3. (diff) | |
download | deluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.tar.xz deluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.zip |
Adding upstream version 2.1.1.upstream/2.1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/ui/web/js/deluge-all/add/FilesTab.js')
-rw-r--r-- | deluge/ui/web/js/deluge-all/add/FilesTab.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/deluge/ui/web/js/deluge-all/add/FilesTab.js b/deluge/ui/web/js/deluge-all/add/FilesTab.js index a433ad6..d712c02 100644 --- a/deluge/ui/web/js/deluge-all/add/FilesTab.js +++ b/deluge/ui/web/js/deluge-all/add/FilesTab.js @@ -28,13 +28,14 @@ Deluge.add.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, { header: _('Filename'), width: 295, dataIndex: 'filename', + tpl: new Ext.XTemplate('{filename:htmlEncode}'), }, { header: _('Size'), width: 60, dataIndex: 'size', tpl: new Ext.XTemplate('{size:this.fsize}', { - fsize: function(v) { + fsize: function (v) { return fsize(v); }, }), @@ -44,7 +45,7 @@ Deluge.add.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, { width: 65, dataIndex: 'download', tpl: new Ext.XTemplate('{download:this.format}', { - format: function(v) { + format: function (v) { return ( '<div rel="chkbox" class="x-grid3-check-col' + (v ? '-on' : '') + @@ -55,21 +56,21 @@ Deluge.add.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, { }, ], - initComponent: function() { + initComponent: function () { Deluge.add.FilesTab.superclass.initComponent.call(this); this.on('click', this.onNodeClick, this); }, - clearFiles: function() { + clearFiles: function () { var root = this.getRootNode(); if (!root.hasChildNodes()) return; - root.cascade(function(node) { + root.cascade(function (node) { if (!node.parentNode || !node.getOwnerTree()) return; node.remove(); }); }, - setDownload: function(node, value, suppress) { + setDownload: function (node, value, suppress) { node.attributes.download = value; node.ui.updateColumns(); @@ -79,7 +80,7 @@ Deluge.add.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, { } } else { var nodes = [node]; - node.cascade(function(n) { + node.cascade(function (n) { n.attributes.download = value; n.ui.updateColumns(); nodes.push(n); @@ -90,7 +91,7 @@ Deluge.add.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, { } }, - onNodeClick: function(node, e) { + onNodeClick: function (node, e) { var el = new Ext.Element(e.target); if (el.getAttribute('rel') == 'chkbox') { this.setDownload(node, !node.attributes.download); |