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

reduce uses of paper-checkbox

This commit is contained in:
Luke Pulverenti 2016-09-11 17:02:32 -04:00
parent 7a2ba6f131
commit 47e35cc5dc
21 changed files with 141 additions and 524 deletions

View file

@ -1,4 +1,4 @@
define(['jQuery'], function ($) {
define(['jQuery', 'fnchecked', 'jqmlistview'], function ($) {
var currentProfile;
@ -41,10 +41,10 @@
$('.chkMediaType', page).each(function () {
this.checked = (profile.SupportedMediaTypes || '').split(',').indexOf(this.getAttribute('data-value')) != -1;
}).checkboxradio('refresh');
});
$('#chkEnableAlbumArtInDidl', page).checked(profile.EnableAlbumArtInDidl).checkboxradio('refresh');
$('#chkEnableSingleImageLimit', page).checked(profile.EnableSingleAlbumArtLimit).checkboxradio('refresh');
$('#chkEnableAlbumArtInDidl', page).checked(profile.EnableAlbumArtInDidl);
$('#chkEnableSingleImageLimit', page).checked(profile.EnableSingleAlbumArtLimit);
renderXmlDocumentAttributes(page, profile.XmlRootAttributes || []);
@ -78,13 +78,13 @@
$('#txtIconMaxWidth', page).val(profile.MaxIconWidth || '');
$('#txtIconMaxHeight', page).val(profile.MaxIconHeight || '');
$('#chkIgnoreTranscodeByteRangeRequests', page).checked(profile.IgnoreTranscodeByteRangeRequests).checkboxradio('refresh');
$('#chkIgnoreTranscodeByteRangeRequests', page).checked(profile.IgnoreTranscodeByteRangeRequests);
$('#txtMaxAllowedBitrate', page).val(profile.MaxStreamingBitrate || '');
$('#txtMusicStreamingTranscodingBitrate', page).val(profile.MusicStreamingTranscodingBitrate || '');
$('#chkRequiresPlainFolders', page).checked(profile.RequiresPlainFolders).checkboxradio('refresh');
$('#chkRequiresPlainVideoItems', page).checked(profile.RequiresPlainVideoItems).checkboxradio('refresh');
$('#chkRequiresPlainFolders', page).checked(profile.RequiresPlainFolders);
$('#chkRequiresPlainVideoItems', page).checked(profile.RequiresPlainVideoItems);
$('#txtProtocolInfo', page).val(profile.ProtocolInfo || '');
$('#txtXDlnaCap', page).val(profile.XDlnaCap || '');
@ -500,9 +500,9 @@
$('#txtTranscodingVideoCodec', popup).val(transcodingProfile.VideoCodec || '');
$('#selectTranscodingProtocol', popup).val(transcodingProfile.Protocol || 'Http');
$('#chkEnableMpegtsM2TsMode', popup).checked(transcodingProfile.EnableMpegtsM2TsMode || false).checkboxradio('refresh');
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false).checkboxradio('refresh');
$('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes').checkboxradio('refresh');
$('#chkEnableMpegtsM2TsMode', popup).checked(transcodingProfile.EnableMpegtsM2TsMode || false);
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false);
$('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes');
$('.radioTabButton:first', popup).trigger('click');

View file

@ -1,4 +1,4 @@
define(['jQuery'], function ($) {
define(['jQuery', 'fnchecked'], function ($) {
function loadPage(page, config, users) {

View file

@ -456,7 +456,7 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
$('.chkVideoTypeFilter', page).each(function () {
@ -466,7 +466,7 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
$('.chkStatus', page).each(function () {
@ -475,7 +475,7 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
$('.chkAirDays', page).each(function () {
@ -484,33 +484,33 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
$('#chk3D', page).checked(query.Is3D == true).checkboxradio('refresh');
$('#chkHD', page).checked(query.IsHD == true).checkboxradio('refresh');
$('#chkSD', page).checked(query.IsHD == false).checkboxradio('refresh');
$('#chk3D', page).checked(query.Is3D == true);
$('#chkHD', page).checked(query.IsHD == true);
$('#chkSD', page).checked(query.IsHD == false);
$('#chkSubtitle', page).checked(query.HasSubtitles == true).checkboxradio('refresh');
$('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh');
$('#chkMissingTrailer', page).checked(query.HasTrailer == false).checkboxradio('refresh');
$('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true).checkboxradio('refresh');
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh');
$('#chkSubtitle', page).checked(query.HasSubtitles == true);
$('#chkTrailer', page).checked(query.HasTrailer == true);
$('#chkMissingTrailer', page).checked(query.HasTrailer == false);
$('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true);
$('#chkThemeSong', page).checked(query.HasThemeSong == true);
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true);
$('#selectPageSize', page).val(query.Limit);
//Management
$('#chkMissingRating', page).checked(query.HasOfficialRating == false).checkboxradio('refresh');
$('#chkMissingOverview', page).checked(query.HasOverview == false).checkboxradio('refresh');
$('#chkIsLocked', page).checked(query.IsLocked == true).checkboxradio('refresh');
$('#chkMissingImdbId', page).checked(query.HasImdbId == false).checkboxradio('refresh');
$('#chkMissingTmdbId', page).checked(query.HasTmdbId == false).checkboxradio('refresh');
$('#chkMissingTvdbId', page).checked(query.HasTvdbId == false).checkboxradio('refresh');
$('#chkMissingRating', page).checked(query.HasOfficialRating == false);
$('#chkMissingOverview', page).checked(query.HasOverview == false);
$('#chkIsLocked', page).checked(query.IsLocked == true);
$('#chkMissingImdbId', page).checked(query.HasImdbId == false);
$('#chkMissingTmdbId', page).checked(query.HasTmdbId == false);
$('#chkMissingTvdbId', page).checked(query.HasTvdbId == false);
//Episodes
$('#chkSpecialEpisode', page).checked(query.ParentIndexNumber == 0).checkboxradio('refresh');
$('#chkMissingEpisode', page).checked(query.IsMissing == true).checkboxradio('refresh');
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
$('#chkSpecialEpisode', page).checked(query.ParentIndexNumber == 0);
$('#chkMissingEpisode', page).checked(query.IsMissing == true);
$('#chkFutureEpisode', page).checked(query.IsUnaired == true);
$('#selectIncludeItemTypes').val(query.IncludeItemTypes);

View file

@ -1337,8 +1337,6 @@ var AppInfo = {};
define("jqmcollapsible", ['jqmbase', "jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.collapsible", 'css!thirdparty/jquerymobile-1.4.5/jqm.collapsible.css']);
define("jqmcheckbox", ['jqmbase', "jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.checkbox", 'css!thirdparty/jquerymobile-1.4.5/jqm.checkbox.css']);
define("jqmpanel", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
@ -1410,7 +1408,6 @@ var AppInfo = {};
define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () {
require(['fnchecked']);
if (window.ApiClient) {
jQuery.ajax = ApiClient.ajax;
}
@ -1937,7 +1934,7 @@ var AppInfo = {};
defineRoute({
path: '/dashboardhosting.html',
dependencies: ['paper-checkbox', 'emby-input', 'emby-button'],
dependencies: ['emby-input', 'emby-button'],
autoFocus: false,
roles: 'admin',
controller: 'dashboard/dashboardhosting'