diff --git a/dashboard-ui/legacy/fnchecked.js b/dashboard-ui/legacy/fnchecked.js index 2a88682a57..f4e61982d2 100644 --- a/dashboard-ui/legacy/fnchecked.js +++ b/dashboard-ui/legacy/fnchecked.js @@ -1,12 +1,15 @@ -// TODO: This needs to be deprecated, but it's used heavily -$.fn.checked = function (value) { - if (value === true || value === false) { - // Set the value of the checkbox - return $(this).each(function () { - this.checked = value; - }); - } else { - // Return check state - return this.length && this[0].checked; - } -}; \ No newline at end of file +define(['jQuery'], function ($) { + + // TODO: This needs to be deprecated, but it's used heavily + $.fn.checked = function (value) { + if (value === true || value === false) { + // Set the value of the checkbox + return $(this).each(function () { + this.checked = value; + }); + } else { + // Return check state + return this.length && this[0].checked; + } + }; +}); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index f0a3626d52..f9ab6f1266 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1495,13 +1495,15 @@ var AppInfo = {}; define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () { - require(['legacy/fnchecked']); + require(['fnchecked']); if (window.ApiClient) { jQuery.ajax = ApiClient.ajax; } return jQuery; }); + define("fnchecked", ['legacy/fnchecked']); + define("dialogHelper", [embyWebComponentsBowerPath + "/dialoghelper/dialoghelper"], function (dialoghelper) { dialoghelper.setOnOpen(onDialogOpen); diff --git a/dashboard-ui/scripts/usernew.js b/dashboard-ui/scripts/usernew.js index 1e4610d75c..2efd3d4a54 100644 --- a/dashboard-ui/scripts/usernew.js +++ b/dashboard-ui/scripts/usernew.js @@ -1,12 +1,12 @@ -define(['jQuery'], function ($) { +define(['jQuery', 'fnchecked', 'emby-checkbox'], function ($) { function loadMediaFolders(page, mediaFolders) { var html = ''; - html += '