mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
switch to emby components
This commit is contained in:
parent
5c12589db7
commit
a1b46992f0
4 changed files with 40 additions and 36 deletions
|
@ -1,4 +1,6 @@
|
||||||
// TODO: This needs to be deprecated, but it's used heavily
|
define(['jQuery'], function ($) {
|
||||||
|
|
||||||
|
// TODO: This needs to be deprecated, but it's used heavily
|
||||||
$.fn.checked = function (value) {
|
$.fn.checked = function (value) {
|
||||||
if (value === true || value === false) {
|
if (value === true || value === false) {
|
||||||
// Set the value of the checkbox
|
// Set the value of the checkbox
|
||||||
|
@ -10,3 +12,4 @@ $.fn.checked = function (value) {
|
||||||
return this.length && this[0].checked;
|
return this.length && this[0].checked;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
});
|
|
@ -1495,13 +1495,15 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () {
|
define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () {
|
||||||
|
|
||||||
require(['legacy/fnchecked']);
|
require(['fnchecked']);
|
||||||
if (window.ApiClient) {
|
if (window.ApiClient) {
|
||||||
jQuery.ajax = ApiClient.ajax;
|
jQuery.ajax = ApiClient.ajax;
|
||||||
}
|
}
|
||||||
return jQuery;
|
return jQuery;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
define("fnchecked", ['legacy/fnchecked']);
|
||||||
|
|
||||||
define("dialogHelper", [embyWebComponentsBowerPath + "/dialoghelper/dialoghelper"], function (dialoghelper) {
|
define("dialogHelper", [embyWebComponentsBowerPath + "/dialoghelper/dialoghelper"], function (dialoghelper) {
|
||||||
|
|
||||||
dialoghelper.setOnOpen(onDialogOpen);
|
dialoghelper.setOnOpen(onDialogOpen);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
define(['jQuery'], function ($) {
|
define(['jQuery', 'fnchecked', 'emby-checkbox'], function ($) {
|
||||||
|
|
||||||
function loadMediaFolders(page, mediaFolders) {
|
function loadMediaFolders(page, mediaFolders) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<div class="paperListLabel">' + Globalize.translate('HeaderLibraries') + '</div>';
|
html += '<h3 class="checkboxListLabel">' + Globalize.translate('HeaderLibraries') + '</h3>';
|
||||||
|
|
||||||
html += '<div class="paperCheckboxList paperList" style="padding:.5em 1em;">';
|
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||||
|
|
||||||
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
var checkedAttribute = ' checked="checked"';
|
var checkedAttribute = ' checked="checked"';
|
||||||
|
|
||||||
html += '<paper-checkbox class="chkFolder" data-id="' + folder.Id + '"' + checkedAttribute + '>' + folder.Name + '</paper-checkbox>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '"' + checkedAttribute + '/><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<div class="paperListLabel">' + Globalize.translate('HeaderChannels') + '</div>';
|
html += '<h3 class="checkboxListLabel">' + Globalize.translate('HeaderChannels') + '</h3>';
|
||||||
|
|
||||||
html += '<div class="paperCheckboxList paperList" style="padding:.5em 1em;">';
|
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||||
|
|
||||||
for (var i = 0, length = channels.length; i < length; i++) {
|
for (var i = 0, length = channels.length; i < length; i++) {
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
var checkedAttribute = ' checked="checked"';
|
var checkedAttribute = ' checked="checked"';
|
||||||
|
|
||||||
html += '<paper-checkbox class="chkChannel" data-id="' + folder.Id + '"' + checkedAttribute + '>' + folder.Name + '</paper-checkbox>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '"' + checkedAttribute + '/><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmlistview,scripts/usernew,emby-input,paper-checkbox,emby-button">
|
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/usernew,emby-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
@ -11,40 +11,39 @@
|
||||||
|
|
||||||
<div class="folderAccessContainer">
|
<div class="folderAccessContainer">
|
||||||
<h1>${HeaderLibraryAccess}</h1>
|
<h1>${HeaderLibraryAccess}</h1>
|
||||||
<div>
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<paper-checkbox id="chkEnableAllFolders">${OptionEnableAccessToAllLibraries}</paper-checkbox>
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" id="chkEnableAllFolders" />
|
||||||
|
<span>${OptionEnableAccessToAllLibraries}</span>
|
||||||
|
</label>
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${LibraryAccessHelp}</div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${LibraryAccessHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="folderAccessListContainer">
|
<div class="folderAccessListContainer">
|
||||||
<br />
|
|
||||||
<div class="folderAccess">
|
<div class="folderAccess">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<div class="channelAccessContainer" style="display:none;">
|
<div class="channelAccessContainer" style="display:none;">
|
||||||
<h1>${HeaderChannelAccess}</h1>
|
<h1>${HeaderChannelAccess}</h1>
|
||||||
<div>
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<paper-checkbox id="chkEnableAllChannels">${OptionEnableAccessToAllChannels}</paper-checkbox>
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" id="chkEnableAllChannels" />
|
||||||
|
<span>${OptionEnableAccessToAllChannels}</span>
|
||||||
|
</label>
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${ChannelAccessHelp}</div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${ChannelAccessHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="channelAccessListContainer">
|
<div class="channelAccessListContainer">
|
||||||
<br />
|
|
||||||
<div class="channelAccess">
|
<div class="channelAccess">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<div>
|
||||||
<ul data-role="listview" class="ulForm">
|
|
||||||
<li>
|
|
||||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
|
|
||||||
<button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
<button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue