1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

migrate legacy dashboard functions to main object

This commit is contained in:
dkanada 2020-06-06 15:54:24 +09:00
parent 10aad88956
commit 11528d1a93
2 changed files with 22 additions and 25 deletions

View file

@ -1,24 +0,0 @@
Dashboard.confirm = function(message, title, callback) {
'use strict';
require(['confirm'], function(confirm) {
confirm(message, title).then(function() {
callback(!0);
}).catch(function() {
callback(!1);
});
});
};
Dashboard.showLoadingMsg = function() {
'use strict';
require(['loading'], function(loading) {
loading.show();
});
};
Dashboard.hideLoadingMsg = function() {
'use strict';
require(['loading'], function(loading) {
loading.hide();
});
};

View file

@ -228,6 +228,28 @@ var Dashboard = {
} else {
Dashboard.navigate('selectserver.html');
}
},
hideLoadingMsg: function() {
'use strict';
require(['loading'], function(loading) {
loading.hide();
});
},
showLoadingMsg: function() {
'use strict';
require(['loading'], function(loading) {
loading.show();
});
},
confirm: function(message, title, callback) {
'use strict';
require(['confirm'], function(confirm) {
confirm(message, title).then(function() {
callback(!0);
}).catch(function() {
callback(!1);
});
});
}
};
@ -737,7 +759,6 @@ var AppInfo = {};
// define legacy features
// TODO delete the rest of these
define('fnchecked', ['legacy/fnchecked'], returnFirstDependency);
define('legacyDashboard', ['legacy/dashboard'], returnFirstDependency);
define('legacySelectMenu', ['legacy/selectmenu'], returnFirstDependency);
// there are several objects that need to be instantiated