mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 08:43:08 -07:00
WebUI: migrate away from MooTools deprecated functions
https://mootools.net/core/docs/1.6.0/Core/Core#Deprecated-Functions
This commit is contained in:
parent
4945ed576a
commit
1c7ecb7371
3 changed files with 10 additions and 15 deletions
|
@ -130,8 +130,8 @@ let toggleFilterDisplay = function() {};
|
|||
window.addEventListener("DOMContentLoaded", function() {
|
||||
const saveColumnSizes = function() {
|
||||
const filters_width = $('Filters').getSize().x;
|
||||
const properties_height_rel = $('propertiesPanel').getSize().y / Window.getSize().y;
|
||||
LocalPreferences.set('filters_width', filters_width);
|
||||
const properties_height_rel = $('propertiesPanel').getSize().y / Window.getSize().y;
|
||||
LocalPreferences.set('properties_height_rel', properties_height_rel);
|
||||
};
|
||||
|
||||
|
@ -149,11 +149,7 @@ window.addEventListener("DOMContentLoaded", function() {
|
|||
MochaUI.Desktop.initialize();
|
||||
|
||||
const buildTransfersTab = function() {
|
||||
let filt_w = LocalPreferences.get('filters_width');
|
||||
if ($defined(filt_w))
|
||||
filt_w = filt_w.toInt();
|
||||
else
|
||||
filt_w = 120;
|
||||
const filt_w = Number(LocalPreferences.get('filters_width', 120));
|
||||
new MochaUI.Column({
|
||||
id: 'filtersColumn',
|
||||
placement: 'left',
|
||||
|
@ -161,7 +157,6 @@ window.addEventListener("DOMContentLoaded", function() {
|
|||
width: filt_w,
|
||||
resizeLimit: [1, 300]
|
||||
});
|
||||
|
||||
new MochaUI.Column({
|
||||
id: 'mainColumn',
|
||||
placement: 'main'
|
||||
|
@ -1350,7 +1345,7 @@ window.addEventListener("DOMContentLoaded", function() {
|
|||
height: null
|
||||
});
|
||||
let prop_h = LocalPreferences.get('properties_height_rel');
|
||||
if ($defined(prop_h))
|
||||
if (prop_h !== null)
|
||||
prop_h = prop_h.toFloat() * Window.getSize().y;
|
||||
else
|
||||
prop_h = Window.getSize().y / 2.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue