1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-16 01:30:09 +00:00
qBittorrent/src/webui/www/private/views/transferlist.html
Thomas Piccirello 1439bcc864 Move JavaScript code into explicit namespaces
This cleans up the global namespace by explicitly exporting shared values. All html and JavaScript files have been converted to use explicit exports except for client.js and mocha-init.js
2019-09-14 18:24:53 -07:00

113 lines
3.4 KiB
HTML

<div id="torrentsTableFixedHeaderDiv" class="dynamicTableFixedHeaderDiv">
<table class="dynamicTable unselectable" style="position:relative;">
<thead>
<tr class="dynamicTableHeader"></tr>
</thead>
</table>
</div>
<div id="torrentsTableDiv" class="dynamicTableDiv">
<table class="dynamicTable unselectable">
<thead>
<tr class="dynamicTableHeader"></tr>
</thead>
<tbody></tbody>
</table>
</div>
<script>
'use strict';
if (window.qBittorrent === undefined) {
window.qBittorrent = {};
}
window.qBittorrent.TransferList = (function() {
const exports = function() {
return {
contextMenu: contextMenu,
};
};
//create a context menu
const contextMenu = new window.qBittorrent.ContextMenu.TorrentsTableContextMenu({
targets: '.torrentsTableContextMenuTarget',
menu: 'torrentsTableMenu',
actions: {
start: function(element, ref) {
startFN();
},
pause: function(element, ref) {
pauseFN();
},
forceStart: function(element, ref) {
setForceStartFN();
},
delete: function(element, ref) {
deleteFN();
},
setLocation: function(element, ref) {
setLocationFN();
},
rename: function(element, ref) {
renameFN();
},
queueTop: function(element, ref) {
setQueuePositionFN('topPrio');
},
queueUp: function(element, ref) {
setQueuePositionFN('increasePrio');
},
queueDown: function(element, ref) {
setQueuePositionFN('decreasePrio');
},
queueBottom: function(element, ref) {
setQueuePositionFN('bottomPrio');
},
downloadLimit: function(element, ref) {
downloadLimitFN();
},
uploadLimit: function(element, ref) {
uploadLimitFN();
},
shareRatio: function(element, ref) {
shareRatioFN();
},
sequentialDownload: function(element, ref) {
toggleSequentialDownloadFN();
},
firstLastPiecePrio: function(element, ref) {
toggleFirstLastPiecePrioFN();
},
autoTorrentManagement: function(element, ref) {
autoTorrentManagementFN();
},
forceRecheck: function(element, ref) {
recheckFN();
},
forceReannounce: function(element, ref) {
reannounceFN();
},
superSeeding: function(element, ref) {
setSuperSeedingFN(!ref.getItemChecked('superSeeding'));
}
},
offsets: {
x: -15,
y: 2
}
});
torrentsTable.setup('torrentsTableDiv', 'torrentsTableFixedHeaderDiv', contextMenu);
return exports();
})();
</script>