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(['dialogHelper', 'layoutManager', 'scrollHelper', 'globalize', 'require', 'material-icons', 'emby-button', 'paper-icon-button-light', 'emby-input', 'formDialogStyle'], function (dialogHelper, layoutManager, scrollHelper, globalize, require) { define(['dialogHelper', 'layoutManager', 'scrollHelper', 'globalize', 'dom', 'require', 'material-icons', 'emby-button', 'paper-icon-button-light', 'emby-input', 'formDialogStyle'], function (dialogHelper, layoutManager, scrollHelper, globalize, dom, require) {
function setInputProperties(dlg, options) { function setInputProperties(dlg, options) {
var txtInput = dlg.querySelector('#txtInput'); var txtInput = dlg.querySelector('#txtInput');
@ -61,6 +61,8 @@ define(['dialogHelper', 'layoutManager', 'scrollHelper', 'globalize', 'require',
return false; return false;
}); });
dlg.style.minWidth = (Math.min(400, dom.getWindowSize().innerWidth - 50)) + 'px';
return dialogHelper.open(dlg).then(function () { return dialogHelper.open(dlg).then(function () {
if (layoutManager.tv) { if (layoutManager.tv) {

View file

@ -1,4 +1,4 @@
define(['dialogHelper', 'loading', 'connectionManager', 'globalize', 'actionsheet', 'paper-checkbox', 'emby-input', 'paper-icon-button-light', 'emby-button', 'listViewStyle', 'material-icons', 'formDialogStyle'], define(['dialogHelper', 'loading', 'connectionManager', 'globalize', 'actionsheet', 'emby-input', 'paper-icon-button-light', 'emby-button', 'listViewStyle', 'material-icons', 'formDialogStyle'],
function (dialogHelper, loading, connectionManager, globalize, actionsheet) { function (dialogHelper, loading, connectionManager, globalize, actionsheet) {
return function (options) { return function (options) {

View file

@ -1,4 +1,4 @@
define(['dialogHelper', 'jQuery', 'emby-input', 'emby-button', 'emby-collapse', 'paper-checkbox', 'paper-icon-button-light', 'formDialogStyle'], function (dialogHelper, $) { define(['dialogHelper', 'jQuery', 'emby-input', 'emby-button', 'emby-collapse', 'paper-icon-button-light', 'formDialogStyle'], function (dialogHelper, $) {
function updateUserInfo(user, newConnectUsername, actionCallback, noActionCallback) { function updateUserInfo(user, newConnectUsername, actionCallback, noActionCallback) {
var currentConnectUsername = user.ConnectUserName || ''; var currentConnectUsername = user.ConnectUserName || '';

View file

@ -46,11 +46,11 @@ define(['browser'], function (browser) {
if (isPluginpage) { if (isPluginpage) {
dependencies.push('jqmpopup'); dependencies.push('jqmpopup');
dependencies.push('jqmcollapsible'); dependencies.push('jqmcollapsible');
dependencies.push('jqmcheckbox');
dependencies.push('legacy/dashboard'); dependencies.push('legacy/dashboard');
dependencies.push('legacy/selectmenu'); dependencies.push('legacy/selectmenu');
dependencies.push('jqmcontrolgroup'); dependencies.push('jqmcontrolgroup');
dependencies.push('jqmlistview'); dependencies.push('jqmlistview');
dependencies.push('fnchecked');
} }
if (isPluginpage || (newView.classList && newView.classList.contains('type-interior'))) { if (isPluginpage || (newView.classList && newView.classList.contains('type-interior'))) {

View file

@ -1,4 +1,4 @@
define(['jQuery'], function ($) { define(['jQuery', 'fnchecked', 'emby-checkbox'], function ($) {
function onSubmit() { function onSubmit() {
var form = this; var form = this;

View file

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

View file

@ -41,19 +41,25 @@
<div class="fieldDescription">${LabelExternalDDNSHelp}</div> <div class="fieldDescription">${LabelExternalDDNSHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox id="chkEnableHttps">${LabelEnableHttps}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableHttpsHelp}</div> <input type="checkbox" is="emby-checkbox" id="chkEnableHttps" />
<span>${LabelEnableHttps}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableHttpsHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<br /> <label>
<paper-checkbox id="chkEnableUpnp">${LabelEnableAutomaticPortMap}</paper-checkbox> <input type="checkbox" is="emby-checkbox" id="chkEnableUpnp" />
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div> <span>${LabelEnableAutomaticPortMap}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div>
</div> </div>
<br /> <br />
<br />
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button> <button is="emby-button" type="submit" class="raised button-submit block">
<span>${ButtonSave}</span>
</button>
</div> </div>
</form> </form>

View file

@ -1,4 +1,4 @@
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="dashboard/devicesupload,emby-input,paper-checkbox,emby-button"> <div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="dashboard/devicesupload,emby-input,emby-checkbox,emby-button">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
@ -16,15 +16,18 @@
</div> </div>
<div class="fieldDescription">${LabelCameraUploadPathHelp}</div> <div class="fieldDescription">${LabelCameraUploadPathHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<br /> <label>
<paper-checkbox id="chkSubfolder">${LabelCreateCameraUploadSubfolder}</paper-checkbox> <input type="checkbox" is="emby-checkbox" id="chkSubfolder" />
<div class="fieldDescription paperCheckboxFieldDescription">${LabelCreateCameraUploadSubfolderHelp}</div> <span>${LabelCreateCameraUploadSubfolder}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelCreateCameraUploadSubfolderHelp}</div>
</div> </div>
<br /> <br />
<br />
<div> <div>
<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 button-submit block">
<span>${ButtonSave}</span>
</button>
</div> </div>
</form> </form>

View file

@ -1,4 +1,4 @@
<div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jQuery,emby-collapse,jqmpopup,scripts/dlnaprofile,jqmcheckbox,emby-button"> <div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jQuery,emby-collapse,jqmpopup,scripts/dlnaprofile,emby-button">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">

View file

@ -1,57 +1,65 @@
<div id="dlnaSettingsPage" data-role="page" class="page type-interior withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Play%20to" data-require="scripts/dlnasettings,emby-select,emby-input,paper-checkbox,emby-button"> <div id="dlnaSettingsPage" data-role="page" class="page type-interior withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Play%20to" data-require="scripts/dlnasettings,emby-select,emby-input,emby-checkbox,emby-button">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<form class="dlnaSettingsForm"> <form class="dlnaSettingsForm">
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox type="checkbox" id="chkEnablePlayTo">${LabelEnableDlnaPlayTo}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableDlnaPlayToHelp}</div> <input type="checkbox" is="emby-checkbox" id="chkEnablePlayTo" />
<span>${LabelEnableDlnaPlayTo}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableDlnaPlayToHelp}</div>
</div> </div>
<br />
<br /> <div class="checkboxContainer checkboxContainer-withDescription">
<div> <label>
<paper-checkbox type="checkbox" id="chkEnableDlnaDebugLogging">${LabelEnableDlnaDebugLogging}</paper-checkbox> <input type="checkbox" is="emby-checkbox" id="chkEnableDlnaDebugLogging" />
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableDlnaDebugLoggingHelp}</div> <span>${LabelEnableDlnaDebugLogging}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableDlnaDebugLoggingHelp}</div>
</div> </div>
<br />
<br />
<div class="inputContainer"> <div class="inputContainer">
<input is="emby-input" type="number" id="txtClientDiscoveryInterval" min="1" max="300" label="${LabelEnableDlnaClientDiscoveryInterval}"/> <input is="emby-input" type="number" id="txtClientDiscoveryInterval" min="1" max="300" label="${LabelEnableDlnaClientDiscoveryInterval}"/>
<div class="fieldDescription">${LabelEnableDlnaClientDiscoveryIntervalHelp}</div> <div class="fieldDescription">${LabelEnableDlnaClientDiscoveryIntervalHelp}</div>
</div> </div>
<br />
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox id="chkEnableServer">${LabelEnableDlnaServer}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableDlnaServerHelp}</div> <input type="checkbox" is="emby-checkbox" id="chkEnableServer" />
<span>${LabelEnableDlnaServer}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableDlnaServerHelp}</div>
</div> </div>
<br />
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox id="chkBlastAliveMessages">${LabelEnableBlastAliveMessages}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableBlastAliveMessagesHelp}</div> <input type="checkbox" is="emby-checkbox" id="chkBlastAliveMessages" />
<span>${LabelEnableBlastAliveMessages}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableBlastAliveMessagesHelp}</div>
</div> </div>
<br />
<br />
<div class="inputContainer"> <div class="inputContainer">
<input is="emby-input" type="number" id="txtBlastInterval" min="1" max="300" label="${LabelBlastMessageInterval}"/> <input is="emby-input" type="number" id="txtBlastInterval" min="1" max="300" label="${LabelBlastMessageInterval}"/>
<div class="fieldDescription">${LabelBlastMessageIntervalHelp}</div> <div class="fieldDescription">${LabelBlastMessageIntervalHelp}</div>
</div> </div>
<br />
<div class="selectContainer"> <div class="selectContainer">
<select is="emby-select" id="selectUser" data-mini="true" label="${LabelDefaultUser}"></select> <select is="emby-select" id="selectUser" data-mini="true" label="${LabelDefaultUser}"></select>
<div class="fieldDescription">${LabelDefaultUserHelp}</div> <div class="fieldDescription">${LabelDefaultUserHelp}</div>
</div> </div>
<br /> <div class="checkboxContainer checkboxContainer-withDescription">
<div> <label>
<paper-checkbox id="chkEnableMovieFolders">${LabelEnableEnhancedMovies}</paper-checkbox> <input type="checkbox" is="emby-checkbox" id="chkEnableMovieFolders" />
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableEnhancedMoviesHelp}</div> <span>${LabelEnableEnhancedMovies}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableEnhancedMoviesHelp}</div>
</div> </div>
<br />
<br />
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"> <button is="emby-button" type="submit" class="raised button-submit block">
<i class="md-icon">check</i><span>${ButtonSave}</span> <span>${ButtonSave}</span>
</button> </button>
</div> </div>
</form> </form>

View file

@ -12,4 +12,8 @@
return this.length && this[0].checked; return this.length && this[0].checked;
} }
}; };
$.fn.checkboxradio = function () {
return this;
};
}); });

View file

@ -1,4 +1,4 @@
<div id="liveTvTunerProviderHdHomerunPage" data-role="page" class="page type-interior liveTvSettingsPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvtunerprovider-hdhomerun,emby-input,paper-checkbox,emby-button"> <div id="liveTvTunerProviderHdHomerunPage" data-role="page" class="page type-interior liveTvSettingsPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvtunerprovider-hdhomerun,emby-input,emby-checkbox,emby-button">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
@ -9,26 +9,36 @@
<div class="inputContainer"> <div class="inputContainer">
<input is="emby-input" class="txtDevicePath" label="${LabelTunerIpAddress}" required="required" /> <input is="emby-input" class="txtDevicePath" label="${LabelTunerIpAddress}" required="required" />
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<paper-checkbox class="chkEnabled" checked>${LabelEnableThisTuner}</paper-checkbox> <label>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableThisTunerHelp}</div> <input type="checkbox" is="emby-checkbox" class="chkEnabled" checked />
<span>${LabelEnableThisTuner}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableThisTunerHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<br /> <label>
<paper-checkbox class="chkFavorite">${LabelImportOnlyFavoriteChannels}</paper-checkbox> <input type="checkbox" is="emby-checkbox" class="chkFavorite" />
<div class="fieldDescription paperCheckboxFieldDescription">${ImportFavoriteChannelsHelp}</div> <span>${LabelImportOnlyFavoriteChannels}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${ImportFavoriteChannelsHelp}</div>
</div> </div>
<div> <div class="checkboxContainer checkboxContainer-withDescription">
<br /> <label>
<paper-checkbox class="chkTranscode">${LabelAllowHWTranscoding}</paper-checkbox> <input type="checkbox" is="emby-checkbox" class="chkTranscode" />
<div class="fieldDescription paperCheckboxFieldDescription">${AllowHWTranscodingHelp}</div> <span>${LabelAllowHWTranscoding}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${AllowHWTranscodingHelp}</div>
</div> </div>
<br />
<p>${DrmChannelsNotImported}</p> <p>${DrmChannelsNotImported}</p>
<br /> <br />
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button> <button is="emby-button" type="submit" class="raised button-submit block">
<button is="emby-button" type="button" class="raised button-cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button> <span>${ButtonSave}</span>
</button>
<button is="emby-button" type="button" class="raised button-cancel block btnCancel" onclick="history.back();">
<span>${ButtonCancel}</span>
</button>
</div> </div>
</form> </form>
</div> </div>

View file

@ -1,15 +1,14 @@
<div id="pluginCatalogPage" data-role="page" class="page type-interior pluginConfigurationPage withTabs fullWidthContent" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="scripts/plugincatalogpage,emby-checkbox"> <div id="pluginCatalogPage" data-role="page" class="page type-interior pluginConfigurationPage withTabs fullWidthContent" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="scripts/plugincatalogpage,emby-checkbox,emby-select">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div style="display: flex;align-items:center;"> <div style="display: flex;align-items:center; justify-content: flex-end;">
<div> <div class="selectContainer" style="margin:0;">
<label class="selectLabel" for="selectSystem">${LabelDisplayPluginsFor}</label> <select is="emby-select" id="selectSystem" label="${LabelDisplayPluginsFor}">
<select id="selectSystem">
<option value="Server">${TabServer}</option> <option value="Server">${TabServer}</option>
<option value="MBClassic">${PluginTabAppClassic}</option> <option value="MBClassic">${PluginTabAppClassic}</option>
</select> </select>
</div> </div>
<div style="margin-left:auto;" class="optionAdultContainer"> <div style="margin-left:2em;" class="optionAdultContainer">
<label style="width:auto;"> <label style="width:auto;">
<input type="checkbox" is="emby-checkbox" id="chkAdult" /> <input type="checkbox" is="emby-checkbox" id="chkAdult" />
<span>${OptionDisplayAdultContent}</span> <span>${OptionDisplayAdultContent}</span>

View file

@ -1,4 +1,4 @@
<div id="libraryReportManagerPage" data-role="page" class="page libraryPage noSecondaryNavPage reportsPage" data-title="${HeaderReports}" data-require="jQuery,paper-icon-button-light,jqmcheckbox,jqmpanel,jqmcollapsible,jqmtable,scripts/reports,detailtablecss"> <div id="libraryReportManagerPage" data-role="page" class="page libraryPage noSecondaryNavPage reportsPage" data-title="${HeaderReports}" data-require="jQuery,paper-icon-button-light,jqmpanel,jqmcollapsible,jqmtable,scripts/reports,detailtablecss">
<style> <style>
/* Page and overlay */ /* Page and overlay */
.ui-page-theme-b .ui-panel-wrapper { .ui-page-theme-b .ui-panel-wrapper {

View file

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

View file

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

View file

@ -456,7 +456,7 @@
this.checked = filters.indexOf(',' + filterName) != -1; this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh'); });
$('.chkVideoTypeFilter', page).each(function () { $('.chkVideoTypeFilter', page).each(function () {
@ -466,7 +466,7 @@
this.checked = filters.indexOf(',' + filterName) != -1; this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh'); });
$('.chkStatus', page).each(function () { $('.chkStatus', page).each(function () {
@ -475,7 +475,7 @@
this.checked = filters.indexOf(',' + filterName) != -1; this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh'); });
$('.chkAirDays', page).each(function () { $('.chkAirDays', page).each(function () {
@ -484,33 +484,33 @@
this.checked = filters.indexOf(',' + filterName) != -1; this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh'); });
$('#chk3D', page).checked(query.Is3D == true).checkboxradio('refresh'); $('#chk3D', page).checked(query.Is3D == true);
$('#chkHD', page).checked(query.IsHD == true).checkboxradio('refresh'); $('#chkHD', page).checked(query.IsHD == true);
$('#chkSD', page).checked(query.IsHD == false).checkboxradio('refresh'); $('#chkSD', page).checked(query.IsHD == false);
$('#chkSubtitle', page).checked(query.HasSubtitles == true).checkboxradio('refresh'); $('#chkSubtitle', page).checked(query.HasSubtitles == true);
$('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh'); $('#chkTrailer', page).checked(query.HasTrailer == true);
$('#chkMissingTrailer', page).checked(query.HasTrailer == false).checkboxradio('refresh'); $('#chkMissingTrailer', page).checked(query.HasTrailer == false);
$('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true).checkboxradio('refresh'); $('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true);
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh'); $('#chkThemeSong', page).checked(query.HasThemeSong == true);
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh'); $('#chkThemeVideo', page).checked(query.HasThemeVideo == true);
$('#selectPageSize', page).val(query.Limit); $('#selectPageSize', page).val(query.Limit);
//Management //Management
$('#chkMissingRating', page).checked(query.HasOfficialRating == false).checkboxradio('refresh'); $('#chkMissingRating', page).checked(query.HasOfficialRating == false);
$('#chkMissingOverview', page).checked(query.HasOverview == false).checkboxradio('refresh'); $('#chkMissingOverview', page).checked(query.HasOverview == false);
$('#chkIsLocked', page).checked(query.IsLocked == true).checkboxradio('refresh'); $('#chkIsLocked', page).checked(query.IsLocked == true);
$('#chkMissingImdbId', page).checked(query.HasImdbId == false).checkboxradio('refresh'); $('#chkMissingImdbId', page).checked(query.HasImdbId == false);
$('#chkMissingTmdbId', page).checked(query.HasTmdbId == false).checkboxradio('refresh'); $('#chkMissingTmdbId', page).checked(query.HasTmdbId == false);
$('#chkMissingTvdbId', page).checked(query.HasTvdbId == false).checkboxradio('refresh'); $('#chkMissingTvdbId', page).checked(query.HasTvdbId == false);
//Episodes //Episodes
$('#chkSpecialEpisode', page).checked(query.ParentIndexNumber == 0).checkboxradio('refresh'); $('#chkSpecialEpisode', page).checked(query.ParentIndexNumber == 0);
$('#chkMissingEpisode', page).checked(query.IsMissing == true).checkboxradio('refresh'); $('#chkMissingEpisode', page).checked(query.IsMissing == true);
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh'); $('#chkFutureEpisode', page).checked(query.IsUnaired == true);
$('#selectIncludeItemTypes').val(query.IncludeItemTypes); $('#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("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("jqmpanel", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency); define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
@ -1410,7 +1408,6 @@ var AppInfo = {};
define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () { define("jQuery", [bowerPath + '/jquery/dist/jquery.slim.min'], function () {
require(['fnchecked']);
if (window.ApiClient) { if (window.ApiClient) {
jQuery.ajax = ApiClient.ajax; jQuery.ajax = ApiClient.ajax;
} }
@ -1937,7 +1934,7 @@ var AppInfo = {};
defineRoute({ defineRoute({
path: '/dashboardhosting.html', path: '/dashboardhosting.html',
dependencies: ['paper-checkbox', 'emby-input', 'emby-button'], dependencies: ['emby-input', 'emby-button'],
autoFocus: false, autoFocus: false,
roles: 'admin', roles: 'admin',
controller: 'dashboard/dashboardhosting' controller: 'dashboard/dashboardhosting'

View file

@ -1367,7 +1367,7 @@
"PasswordMatchError": "Password and password confirmation must match.", "PasswordMatchError": "Password and password confirmation must match.",
"UninstallPluginHeader": "Uninstall Plugin", "UninstallPluginHeader": "Uninstall Plugin",
"UninstallPluginConfirmation": "Are you sure you wish to uninstall {0}?", "UninstallPluginConfirmation": "Are you sure you wish to uninstall {0}?",
"NoPluginConfigurationMessage": "This plugin has nothing to configure.", "NoPluginConfigurationMessage": "This plugin has no settings to configure.",
"NoPluginsInstalledMessage": "You have no plugins installed.", "NoPluginsInstalledMessage": "You have no plugins installed.",
"BrowsePluginCatalogMessage": "Browse our plugin catalog to view available plugins.", "BrowsePluginCatalogMessage": "Browse our plugin catalog to view available plugins.",
"HeaderNewApiKey": "New Api Key", "HeaderNewApiKey": "New Api Key",

View file

@ -1,52 +0,0 @@
.ui-checkbox,
.ui-radio {
margin: .5em 0;
position: relative;
}
.ui-checkbox .ui-btn,
.ui-radio .ui-btn {
margin: 0;
text-align: left;
white-space: normal; /* Nowrap + ellipsis doesn't work on label. Issue #1419. */
z-index: 2;
}
.ui-controlgroup .ui-checkbox .ui-btn.ui-focus,
.ui-controlgroup .ui-radio .ui-btn.ui-focus {
z-index: 3;
}
.ui-checkbox .ui-btn-icon-top,
.ui-radio .ui-btn-icon-top,
.ui-checkbox .ui-btn-icon-bottom,
.ui-radio .ui-btn-icon-bottom {
text-align: center;
}
.ui-controlgroup-horizontal .ui-checkbox .ui-btn:after,
.ui-controlgroup-horizontal .ui-radio .ui-btn:after {
content: none;
display: none;
}
/* Native input positioning */
.ui-checkbox input,
.ui-radio input {
position: absolute;
left: .466em;
top: 50%;
width: 22px;
height: 22px;
margin: -11px 0 0 0;
outline: 0 !important;
z-index: 1;
}
.ui-controlgroup-horizontal .ui-checkbox input,
.ui-controlgroup-horizontal .ui-radio input {
left: 50%;
margin-left: -9px;
}
.ui-checkbox input:disabled,
.ui-radio input:disabled {
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px,1px,1px,1px);
}

View file

@ -1,360 +0,0 @@
define(['jqmwidget'], function () {
/*
* "checkboxradio" plugin
*/
(function ($, undefined) {
var escapeId = function (hash) {
var hasHash = (hash.substring(0, 1) === "#");
if (hasHash) {
hash = hash.substring(1);
}
return (hasHash ? "#" : "") + hash.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g, "\\$1");
};
$.widget("mobile.checkboxradio", $.extend({
initSelector: "input[type='checkbox']:not([data-role='none']),input[type='radio']:not([data-role='none'])",
options: {
theme: "inherit",
mini: false,
wrapperClass: null,
enhanced: false,
iconpos: "left"
},
_create: function () {
var input = this.element,
o = this.options,
inheritAttr = function (input, dataAttr) {
return input.data(dataAttr) ||
input.closest("form, fieldset").data(dataAttr);
},
label = this.options.enhanced ?
{
element: this.element.siblings("label"),
isParent: false
} :
this._findLabel(),
inputtype = input[0].type,
checkedClass = "ui-" + inputtype + "-on",
uncheckedClass = "ui-" + inputtype + "-off";
if (inputtype !== "checkbox" && inputtype !== "radio") {
return;
}
if (this.element[0].disabled) {
this.options.disabled = true;
}
o.iconpos = inheritAttr(input, "iconpos") ||
label.element.attr("data-iconpos") || o.iconpos,
// Establish options
o.mini = inheritAttr(input, "mini") || o.mini;
// Expose for other methods
$.extend(this, {
input: input,
label: label.element,
labelIsParent: label.isParent,
inputtype: inputtype,
checkedClass: checkedClass,
uncheckedClass: uncheckedClass
});
if (!this.options.enhanced) {
this._enhance();
}
this._on(label.element, {
mouseover: "_handleLabelVMouseOver",
click: "_handleLabelVClick"
});
this._on(input, {
mousedown: "_cacheVals",
click: "_handleInputVClick",
focus: "_handleInputFocus",
blur: "_handleInputBlur"
});
this.refresh();
},
_findLabel: function () {
var parentLabel, label, isParent,
input = this.element,
labelsList = input[0].labels;
if (labelsList && labelsList.length > 0) {
label = $(labelsList[0]);
isParent = $.contains(label[0], input[0]);
} else {
parentLabel = input.closest("label");
isParent = (parentLabel.length > 0);
// NOTE: Windows Phone could not find the label through a selector
// filter works though.
label = isParent ? parentLabel :
$(this.document[0].getElementsByTagName("label"))
.filter("[for='" + escapeId(input[0].id) + "']")
.first();
}
return {
element: label,
isParent: isParent
};
},
_enhance: function () {
this.label.addClass("ui-btn ui-corner-all");
if (this.labelIsParent) {
this.input.add(this.label).wrapAll(this._wrapper());
} else {
//this.element.replaceWith( this.input.add( this.label ).wrapAll( this._wrapper() ) );
this.element.wrap(this._wrapper());
this.element.parent().prepend(this.label);
}
// Wrap the input + label in a div
this._setOptions({
"theme": this.options.theme,
"iconpos": this.options.iconpos,
"mini": this.options.mini
});
},
_wrapper: function () {
return $("<div class='" +
(this.options.wrapperClass ? this.options.wrapperClass : "") +
" ui-" + this.inputtype +
(this.options.disabled ? " ui-state-disabled" : "") + "' ></div>");
},
_handleInputFocus: function () {
this.label.addClass($.mobile.focusClass);
},
_handleInputBlur: function () {
this.label.removeClass($.mobile.focusClass);
},
_handleInputVClick: function () {
// Adds checked attribute to checked input when keyboard is used
this.element.prop("checked", this.element.is(":checked"));
this._getInputSet().not(this.element).prop("checked", false);
this._updateAll(true);
},
_handleLabelVMouseOver: function (event) {
if (this.label.parent().hasClass("ui-state-disabled")) {
event.stopPropagation();
}
},
_handleLabelVClick: function (event) {
var input = this.element;
if (input.is(":disabled")) {
event.preventDefault();
return;
}
this._cacheVals();
input.prop("checked", this.inputtype === "radio" && true || !input.prop("checked"));
// trigger click handler's bound directly to the input as a substitute for
// how label clicks behave normally in the browsers
// TODO: it would be nice to let the browser's handle the clicks and pass them
// through to the associate input. we can swallow that click at the parent
// wrapper element level
input.triggerHandler("click");
// Input set for common radio buttons will contain all the radio
// buttons, but will not for checkboxes. clearing the checked status
// of other radios ensures the active button state is applied properly
this._getInputSet().not(input).prop("checked", false);
this._updateAll();
return false;
},
_cacheVals: function () {
this._getInputSet().each(function () {
$(this).attr("data-cacheVal", this.checked);
});
},
// Returns those radio buttons that are supposed to be in the same group as
// this radio button. In the case of a checkbox or a radio lacking a name
// attribute, it returns this.element.
_getInputSet: function () {
var selector, formId,
radio = this.element[0],
name = radio.name,
form = radio.form,
doc = this.element.parents().last().get(0),
// A radio is always a member of its own group
radios = this.element;
// Only start running selectors if this is an attached radio button with a name
if (name && this.inputtype === "radio" && doc) {
selector = "input[type='radio'][name='" + escapeId(name) + "']";
// If we're inside a form
if (form) {
formId = form.getAttribute("id");
// If the form has an ID, collect radios scattered throught the document which
// nevertheless are part of the form by way of the value of their form attribute
if (formId) {
radios = $(selector + "[form='" + escapeId(formId) + "']", doc);
}
// Also add to those the radios in the form itself
radios = $(form).find(selector).filter(function () {
// Some radios inside the form may belong to some other form by virtue of
// having a form attribute defined on them, so we must filter them out here
return (this.form === form);
}).add(radios);
// If we're outside a form
} else {
// Collect all those radios which are also outside of a form and match our name
radios = $(selector, doc).filter(function () {
return !this.form;
});
}
}
return radios;
},
_updateAll: function (changeTriggered) {
var self = this;
this._getInputSet().each(function () {
var $this = $(this);
if ((this.checked || self.inputtype === "checkbox") && !changeTriggered) {
$this.trigger("change");
}
})
.checkboxradio("refresh");
},
_reset: function () {
this.refresh();
},
// Is the widget supposed to display an icon?
_hasIcon: function () {
var controlgroup, controlgroupWidget,
controlgroupConstructor = $.mobile.controlgroup;
// If the controlgroup widget is defined ...
if (controlgroupConstructor) {
controlgroup = this.element.closest(
":mobile-controlgroup," +
controlgroupConstructor.prototype.initSelector);
// ... and the checkbox is in a controlgroup ...
if (controlgroup.length > 0) {
// ... look for a controlgroup widget instance, and ...
controlgroupWidget = $.data(controlgroup[0], "mobile-controlgroup");
// ... if found, decide based on the option value, ...
return ((controlgroupWidget ? controlgroupWidget.options.type :
// ... otherwise decide based on the "type" data attribute.
controlgroup.attr("data-type")) !== "horizontal");
}
}
// Normally, the widget displays an icon.
return true;
},
refresh: function () {
var isChecked = this.element[0].checked,
active = $.mobile.activeBtnClass,
iconposClass = "ui-btn-icon-" + this.options.iconpos,
addClasses = [],
removeClasses = [];
if (this._hasIcon()) {
removeClasses.push(active);
addClasses.push(iconposClass);
} else {
removeClasses.push(iconposClass);
(isChecked ? addClasses : removeClasses).push(active);
}
if (isChecked) {
addClasses.push(this.checkedClass);
removeClasses.push(this.uncheckedClass);
} else {
addClasses.push(this.uncheckedClass);
removeClasses.push(this.checkedClass);
}
this.widget().toggleClass("ui-state-disabled", this.element.prop("disabled"));
this.label
.addClass(addClasses.join(" "))
.removeClass(removeClasses.join(" "));
},
widget: function () {
return this.label.parent();
},
_setOptions: function (options) {
var label = this.label,
currentOptions = this.options,
outer = this.widget(),
hasIcon = this._hasIcon();
if (options.disabled !== undefined) {
this.input.prop("disabled", !!options.disabled);
outer.toggleClass("ui-state-disabled", !!options.disabled);
}
if (options.mini !== undefined) {
outer.toggleClass("ui-mini", !!options.mini);
}
if (options.theme !== undefined) {
label
.removeClass("ui-btn-" + currentOptions.theme)
.addClass("ui-btn-" + options.theme);
}
if (options.wrapperClass !== undefined) {
outer
.removeClass(currentOptions.wrapperClass)
.addClass(options.wrapperClass);
}
if (options.iconpos !== undefined && hasIcon) {
label.removeClass("ui-btn-icon-" + currentOptions.iconpos).addClass("ui-btn-icon-" + options.iconpos);
} else if (!hasIcon) {
label.removeClass("ui-btn-icon-" + currentOptions.iconpos);
}
this._super(options);
}
}, $.mobile.behaviors.formReset));
})(jQuery);
});