mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove paper inputs
This commit is contained in:
parent
4a296d5125
commit
0ffbd3d563
12 changed files with 445 additions and 456 deletions
|
@ -11,7 +11,7 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* Remove select styling */
|
/* Remove select styling */
|
||||||
/* Font size must the 16px or larger to prevent iOS page zoom on focus */
|
/* Font size must the 16px or larger to prevent iOS page zoom on focus */
|
||||||
font-size: inherit;
|
font-size: 110%;
|
||||||
/* General select styles: change as needed */
|
/* General select styles: change as needed */
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
.inputLabel-float {
|
.inputLabel-float {
|
||||||
transform-origin: left top;
|
transform-origin: left top;
|
||||||
transform: scale(1.3,1.3) translateY(86%);
|
transform: scale(1.25,1.25) translateY(94%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputLabelFocused {
|
.inputLabelFocused {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
label.classList.add('inputLabel');
|
label.classList.add('inputLabel');
|
||||||
label.classList.add('inputLabelUnfocused');
|
label.classList.add('inputLabelUnfocused');
|
||||||
|
|
||||||
var instanceSupportsFloat = supportsFloatingLabel && this.type != 'date';
|
var instanceSupportsFloat = supportsFloatingLabel && this.type != 'date' && this.type != 'time';
|
||||||
|
|
||||||
label.htmlFor = this.id;
|
label.htmlFor = this.id;
|
||||||
parentNode.insertBefore(label, this);
|
parentNode.insertBefore(label, this);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* Remove select styling */
|
/* Remove select styling */
|
||||||
/* Font size must the 16px or larger to prevent iOS page zoom on focus */
|
/* Font size must the 16px or larger to prevent iOS page zoom on focus */
|
||||||
font-size: inherit;
|
font-size: 110%;
|
||||||
/* General select styles: change as needed */
|
/* General select styles: change as needed */
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['jQuery','paper-checkbox', 'listViewStyle', 'paper-input', 'paper-checkbox'], function ($) {
|
define(['jQuery','paper-checkbox', 'listViewStyle', 'emby-input', 'emby-select'], function ($) {
|
||||||
|
|
||||||
return function (page, providerId, options) {
|
return function (page, providerId, options) {
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@
|
||||||
<!-- Terrible, but this hidden field prevents the yellow background in chrome -->
|
<!-- Terrible, but this hidden field prevents the yellow background in chrome -->
|
||||||
<div style="height:0; overflow: hidden;"><input type="text" name="fakeusernameremembered" tabindex="-1" /><input type="password" name="fakepasswordremembered" tabindex="-1" /></div>
|
<div style="height:0; overflow: hidden;"><input type="text" name="fakeusernameremembered" tabindex="-1" /><input type="password" name="fakepasswordremembered" tabindex="-1" /></div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<br/>
|
||||||
<paper-input class="txtUser" label="${LabelUsername}" required="required" autocomplete="off"></paper-input>
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" class="txtUser" label="${LabelUsername}" required="required" autocomplete="off"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input class="txtPass" label="${LabelPassword}" required="required" autocomplete="off" type="password"></paper-input>
|
<input is="emby-input" class="txtPass" label="${LabelPassword}" required="required" autocomplete="off" type="password"/>
|
||||||
</div>
|
</div>
|
||||||
<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 submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -39,21 +39,17 @@
|
||||||
</div>
|
</div>
|
||||||
<form class="formListings">
|
<form class="formListings">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div class="selectContainer">
|
||||||
<br />
|
<br />
|
||||||
<label for="selectCountry" class="selectLabel">${LabelCountry}</label>
|
<select is="emby-select" id="selectCountry" data-mini="true" required="required" label="${LabelCountry}"></select>
|
||||||
<select id="selectCountry" data-mini="true" required="required"></select>
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" class="txtZipCode" label="${LabelZipCode}" required="required"/>
|
||||||
|
</div>
|
||||||
|
<div class="selectContainer">
|
||||||
|
<select is="emby-select" id="selectListing" data-mini="true" required="required" label="${LabelLineup}"></select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<paper-input class="txtZipCode" label="${LabelZipCode}" required="required"></paper-input>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<br />
|
|
||||||
<label for="selectListing" class="selectLabel">${LabelLineup}</label>
|
|
||||||
<select id="selectListing" data-mini="true" required="required"></select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<br />
|
|
||||||
<paper-checkbox class="chkAllTuners">${OptionEnableForAllTuners}</paper-checkbox>
|
<paper-checkbox class="chkAllTuners">${OptionEnableForAllTuners}</paper-checkbox>
|
||||||
<div class="selectTunersSection hide">
|
<div class="selectTunersSection hide">
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
|
@ -1,54 +1,62 @@
|
||||||
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="jqmlistview,scripts/livetvsettings,paper-checkbox,paper-input,emby-collapse,emby-button">
|
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvsettings,paper-checkbox,emby-input,emby-select,emby-collapse,emby-button">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<form class="liveTvSettingsForm">
|
<form class="liveTvSettingsForm">
|
||||||
<ul data-role="listview" class="ulForm">
|
<div class="selectContainer">
|
||||||
<li>
|
<select is="emby-select" id="selectGuideDays" label="${LabelNumberOfGuideDays}">
|
||||||
<label for="selectGuideDays" class="selectLabel">${LabelNumberOfGuideDays}</label>
|
<option value="">${OptionAutomatic}</option>
|
||||||
<select id="selectGuideDays" data-mini="true">
|
<option value="1">1</option>
|
||||||
<option value="">${OptionAutomatic}</option>
|
<option value="2">2</option>
|
||||||
<option value="1">1</option>
|
<option value="3">3</option>
|
||||||
<option value="2">2</option>
|
<option value="4">4</option>
|
||||||
<option value="3">3</option>
|
<option value="5">5</option>
|
||||||
<option value="4">4</option>
|
<option value="6">6</option>
|
||||||
<option value="5">5</option>
|
<option value="7">7</option>
|
||||||
<option value="6">6</option>
|
<option value="8">8</option>
|
||||||
<option value="7">7</option>
|
<option value="9">9</option>
|
||||||
<option value="8">8</option>
|
<option value="10">10</option>
|
||||||
<option value="9">9</option>
|
<option value="11">11</option>
|
||||||
<option value="10">10</option>
|
<option value="12">12</option>
|
||||||
<option value="11">11</option>
|
<option value="13">13</option>
|
||||||
<option value="12">12</option>
|
<option value="14">14</option>
|
||||||
<option value="13">13</option>
|
</select>
|
||||||
<option value="14">14</option>
|
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
||||||
</select>
|
</div>
|
||||||
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="paperCheckboxList">
|
<div class="paperCheckboxList">
|
||||||
<label>${LabelEnableInternetMetadataForTvPrograms}</label>
|
<label>${LabelEnableInternetMetadataForTvPrograms}</label>
|
||||||
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
|
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<br />
|
||||||
<br />
|
<div class="inputContainer">
|
||||||
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
<div style="display: flex; align-items: center;">
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
<div style="flex-grow:1;">
|
||||||
|
<input is="emby-input" id="txtRecordingPath" label="${LabelRecordingPath}" required="required" autocomplete="off" />
|
||||||
|
</div>
|
||||||
|
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||||
|
</div>
|
||||||
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<div>
|
<div>
|
||||||
<paper-checkbox id="chkEnableRecordingSubfolders">${OptionEnableRecordingSubfolders}</paper-checkbox>
|
<paper-checkbox id="chkEnableRecordingSubfolders">${OptionEnableRecordingSubfolders}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<br />
|
|
||||||
<paper-input id="txtMovieRecordingPath" label="${LabelMovieRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectMovieRecordingPath" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<paper-input id="txtSeriesRecordingPath" label="${LabelSeriesRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectSeriesRecordingPath" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
|
||||||
</div>
|
|
||||||
<br />
|
<br />
|
||||||
|
<br />
|
||||||
|
<div class="inputContainer">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<div style="flex-grow:1;">
|
||||||
|
<input is="emby-input" id="txtMovieRecordingPath" label="${LabelMovieRecordingPath}" required="required" autocomplete="off" />
|
||||||
|
</div>
|
||||||
|
<button type="button" is="paper-icon-button-light" id="btnSelectMovieRecordingPath" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<div style="flex-grow:1;">
|
||||||
|
<input is="emby-input" id="txtSeriesRecordingPath" label="${LabelSeriesRecordingPath}" required="required" autocomplete="off" />
|
||||||
|
</div>
|
||||||
|
<button type="button" is="paper-icon-button-light" id="btnSelectSeriesRecordingPath" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<paper-checkbox id="chkOrganize">${OptionSendRecordingsToAutoOrganize}</paper-checkbox>
|
<paper-checkbox id="chkOrganize">${OptionSendRecordingsToAutoOrganize}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,23 +73,19 @@
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${OptionConvertRecordingPreserveAudioHelp}</div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${OptionConvertRecordingPreserveAudioHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
|
||||||
<div>
|
<div>
|
||||||
<h1>${HeaderDefaultPadding}</h1>
|
<h1>${HeaderDefaultPadding}</h1>
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPostPaddingMinutes}"></paper-input>
|
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPostPaddingMinutes}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<div>
|
||||||
<ul data-role="listview" class="ulForm">
|
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
<li>
|
</div>
|
||||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,42 +1,36 @@
|
||||||
<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,paper-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,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
<div class="readOnlyContent" style="margin-top: 2em;">
|
<form>
|
||||||
|
|
||||||
<h1>HD Homerun</h1>
|
<h1>HD Homerun</h1>
|
||||||
|
|
||||||
<form>
|
<div class="inputContainer">
|
||||||
<div>
|
<input is="emby-input" class="txtDevicePath" label="${LabelTunerIpAddress}" required="required" />
|
||||||
<div>
|
</div>
|
||||||
<paper-input class="txtDevicePath" label="${LabelTunerIpAddress}" required="required"></paper-input>
|
<div>
|
||||||
</div>
|
<paper-checkbox class="chkEnabled" checked>${LabelEnableThisTuner}</paper-checkbox>
|
||||||
<div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableThisTunerHelp}</div>
|
||||||
<br />
|
</div>
|
||||||
<paper-checkbox class="chkEnabled" checked>${LabelEnableThisTuner}</paper-checkbox>
|
<div>
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${LabelEnableThisTunerHelp}</div>
|
<br />
|
||||||
</div>
|
<paper-checkbox class="chkFavorite">${LabelImportOnlyFavoriteChannels}</paper-checkbox>
|
||||||
<div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${ImportFavoriteChannelsHelp}</div>
|
||||||
<br />
|
</div>
|
||||||
<paper-checkbox class="chkFavorite">${LabelImportOnlyFavoriteChannels}</paper-checkbox>
|
<div>
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${ImportFavoriteChannelsHelp}</div>
|
<br />
|
||||||
</div>
|
<paper-checkbox class="chkTranscode">${LabelAllowHWTranscoding}</paper-checkbox>
|
||||||
<div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${AllowHWTranscodingHelp}</div>
|
||||||
<br />
|
</div>
|
||||||
<paper-checkbox class="chkTranscode">${LabelAllowHWTranscoding}</paper-checkbox>
|
<br />
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${AllowHWTranscodingHelp}</div>
|
<p>${DrmChannelsNotImported}</p>
|
||||||
</div>
|
<br />
|
||||||
<br />
|
<div>
|
||||||
<p>${DrmChannelsNotImported}</p>
|
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
<br />
|
<button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
||||||
<div>
|
</div>
|
||||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
</form>
|
||||||
<button is="emby-button" type="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,26 +1,24 @@
|
||||||
<div id="liveTvTunerProviderM3UPage" data-role="page" class="page type-interior liveTvSettingsPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvtunerprovider-m3u,paper-input,emby-button">
|
<div id="liveTvTunerProviderM3UPage" data-role="page" class="page type-interior liveTvSettingsPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvtunerprovider-m3u,emby-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
<div class="readOnlyContent" style="margin-top: 2em;">
|
<form>
|
||||||
|
|
||||||
<h1>M3U Setup</h1>
|
<h1>M3U Setup</h1>
|
||||||
|
|
||||||
<form>
|
<div class="inputContainer">
|
||||||
<div>
|
<div style="display: flex; align-items: center;">
|
||||||
<div>
|
<div style="flex-grow:1;">
|
||||||
<paper-input class="txtDevicePath" label="${LabelFileOrUrl}" required="required" style="width:85%;display:inline-block;"></paper-input>
|
<input is="emby-input" class="txtDevicePath" label="${LabelFileOrUrl}" required="required" autocomplete="off" />
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectPath" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<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="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button type="button" is="paper-icon-button-light" id="btnSelectPath" class="autoSize"><i class="md-icon">search</i></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</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="button" class="raised cancel block btnCancel" onclick="history.back();"><i class="md-icon">close</i><span>${ButtonCancel}</span></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="emby-collapse,scripts/metadataimagespage,paper-checkbox,emby-button">
|
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="emby-collapse,scripts/metadataimagespage,paper-checkbox,emby-button,emby-input,emby-select">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
@ -6,12 +6,10 @@
|
||||||
|
|
||||||
<div class="tabContent">
|
<div class="tabContent">
|
||||||
<form class="metadataImagesConfigurationForm">
|
<form class="metadataImagesConfigurationForm">
|
||||||
<div>
|
<div class="selectContainer">
|
||||||
<label for="selectItemType" class="selectLabel">${LabelCustomizeOptionsPerMediaType}</label>
|
<select is="emby-select" id="selectItemType" data-mini="true" label="${LabelCustomizeOptionsPerMediaType}"></select>
|
||||||
<select id="selectItemType" data-mini="true"></select>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
|
||||||
<div class="metadataReaders" style="margin-bottom: 2em;">
|
<div class="metadataReaders" style="margin-bottom: 2em;">
|
||||||
</div>
|
</div>
|
||||||
<div class="metadataSavers" style="margin-bottom: 2em;">
|
<div class="metadataSavers" style="margin-bottom: 2em;">
|
||||||
|
@ -24,22 +22,21 @@
|
||||||
<div is="emby-collapse" title="${HeaderImageSettings}">
|
<div is="emby-collapse" title="${HeaderImageSettings}">
|
||||||
<div class="collapseContent">
|
<div class="collapseContent">
|
||||||
<div class="backdropFields" style="margin-bottom: 2em; display: none;">
|
<div class="backdropFields" style="margin-bottom: 2em; display: none;">
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input type="number" id="txtMaxBackdrops" pattern="[0-9]*" required="required" min="0" label="${LabelMaxBackdropsPerItem}"></paper-input>
|
<input is="emby-input" type="number" id="txtMaxBackdrops" pattern="[0-9]*" required="required" min="0" label="${LabelMaxBackdropsPerItem}"/>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<div class="inputContainer">
|
||||||
<div>
|
<input is="emby-input" type="number" id="txtMinBackdropDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinBackdropDownloadWidth}"/>
|
||||||
<paper-input type="number" id="txtMinBackdropDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinBackdropDownloadWidth}"></paper-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="screenshotFields" style="margin-bottom: 2em; display: none;">
|
<div class="screenshotFields" style="margin-bottom: 2em; display: none;">
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input type="number" id="txtMaxScreenshots" pattern="[0-9]*" required="required" min="0" label="${LabelMaxScreenshotsPerItem}"></paper-input>
|
<input is="emby-input" type="number" id="txtMaxScreenshots" pattern="[0-9]*" required="required" min="0" label="${LabelMaxScreenshotsPerItem}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="inputContainer">
|
||||||
<paper-input type="number" id="txtMinScreenshotDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinScreenshotDownloadWidth}"></paper-input>
|
<input is="emby-input" type="number" id="txtMinScreenshotDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinScreenshotDownloadWidth}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="scheduledTaskPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks" data-require="jQuery,jqmpopup,scripts/scheduledtaskpage,paper-input,emby-button">
|
<div id="scheduledTaskPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks" data-require="jQuery,jqmpopup,scripts/scheduledtaskpage,emby-input,emby-button,emby-select">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
|
@ -25,67 +25,60 @@
|
||||||
<h3>${HeaderAddScheduledTaskTrigger}</h3>
|
<h3>${HeaderAddScheduledTaskTrigger}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<br />
|
<div class="selectContainer">
|
||||||
<ul data-role="listview" class="ulForm">
|
<select is="emby-select" id="selectTriggerType" name="selectTriggerType" label="${LabelTriggerType}" onchange="ScheduledTaskPage.refreshTriggerFields(this.value);">
|
||||||
<li>
|
<option value="DailyTrigger">${OptionDaily}</option>
|
||||||
<label for="selectTriggerType" class="selectLabel">${LabelTriggerType}</label>
|
<option value="WeeklyTrigger">${OptionWeekly}</option>
|
||||||
<select id="selectTriggerType" name="selectTriggerType" onchange="ScheduledTaskPage.refreshTriggerFields(this.value);">
|
<option value="IntervalTrigger">${OptionOnInterval}</option>
|
||||||
<option value="DailyTrigger">${OptionDaily}</option>
|
<option value="StartupTrigger">${OptionOnAppStartup}</option>
|
||||||
<option value="WeeklyTrigger">${OptionWeekly}</option>
|
<option value="SystemEventTrigger">${OptionAfterSystemEvent}</option>
|
||||||
<option value="IntervalTrigger">${OptionOnInterval}</option>
|
</select>
|
||||||
<option value="StartupTrigger">${OptionOnAppStartup}</option>
|
</div>
|
||||||
<option value="SystemEventTrigger">${OptionAfterSystemEvent}</option>
|
<div id="fldDayOfWeek" class="selectContainer">
|
||||||
</select>
|
<select is="emby-select" id="selectDayOfWeek" name="selectDayOfWeek" label="${LabelDay}">
|
||||||
</li>
|
<option value="Sunday">${OptionSunday}</option>
|
||||||
<li id="fldDayOfWeek">
|
<option value="Monday">${OptionMonday}</option>
|
||||||
<label for="selectDayOfWeek" class="selectLabel">${LabelDay}</label>
|
<option value="Tuesday">${OptionTuesday}</option>
|
||||||
<select id="selectDayOfWeek" name="selectDayOfWeek">
|
<option value="Wednesday">${OptionWednesday}</option>
|
||||||
<option value="Sunday">${OptionSunday}</option>
|
<option value="Thursday">${OptionThursday}</option>
|
||||||
<option value="Monday">${OptionMonday}</option>
|
<option value="Friday">${OptionFriday}</option>
|
||||||
<option value="Tuesday">${OptionTuesday}</option>
|
<option value="Saturday">${OptionSaturday}</option>
|
||||||
<option value="Wednesday">${OptionWednesday}</option>
|
</select>
|
||||||
<option value="Thursday">${OptionThursday}</option>
|
</div>
|
||||||
<option value="Friday">${OptionFriday}</option>
|
<div id="fldTimeOfDay" class="inputContainer">
|
||||||
<option value="Saturday">${OptionSaturday}</option>
|
<input is="emby-input" type="time" id="txtTimeOfDay" name="txtTimeOfDay" required="required" label="${LabelTime}"/>
|
||||||
</select>
|
<div class="fieldDescription timeFieldExample"></div>
|
||||||
</li>
|
</div>
|
||||||
<li id="fldTimeOfDay">
|
<div id="fldSelectSystemEvent" class="selectContainer">
|
||||||
<paper-input type="time" id="txtTimeOfDay" name="txtTimeOfDay" required="required" label="${LabelTime}"></paper-input>
|
<select is="emby-select" id="selectSystemEvent" name="selectSystemEvent" label="${LabelEvent}">
|
||||||
<div class="fieldDescription timeFieldExample"></div>
|
<option value="WakeFromSleep">${OptionWakeFromSleep}</option>
|
||||||
</li>
|
</select>
|
||||||
<li id="fldSelectSystemEvent">
|
</div>
|
||||||
<label for="selectSystemEvent" class="selectLabel">${LabelEvent}</label>
|
<div id="fldSelectInterval" class="selectContainer">
|
||||||
<select id="selectSystemEvent" name="selectSystemEvent">
|
<select is="emby-select" id="selectInterval" label="${LabelEveryXMinutes}">
|
||||||
<option value="WakeFromSleep">${OptionWakeFromSleep}</option>
|
<option value="9000000000">15 minutes</option>
|
||||||
</select>
|
<option value="18000000000">30 minutes</option>
|
||||||
</li>
|
<option value="27000000000">45 minutes</option>
|
||||||
<li id="fldSelectInterval">
|
<option value="36000000000">1 hour</option>
|
||||||
<label for="selectInterval" class="selectLabel">${LabelEveryXMinutes}</label>
|
<option value="72000000000">2 hours</option>
|
||||||
<select id="selectInterval">
|
<option value="108000000000">3 hours</option>
|
||||||
<option value="9000000000">15 minutes</option>
|
<option value="144000000000">4 hours</option>
|
||||||
<option value="18000000000">30 minutes</option>
|
<option value="216000000000">6 hours</option>
|
||||||
<option value="27000000000">45 minutes</option>
|
<option value="288000000000">8 hours</option>
|
||||||
<option value="36000000000">1 hour</option>
|
<option value="432000000000">12 hours</option>
|
||||||
<option value="72000000000">2 hours</option>
|
</select>
|
||||||
<option value="108000000000">3 hours</option>
|
</div>
|
||||||
<option value="144000000000">4 hours</option>
|
<div class="inputContainer">
|
||||||
<option value="216000000000">6 hours</option>
|
<input is="emby-input" id="txtTimeLimit" type="number" pattern="[0-9]*" min="1" step=".5" label="${LabelTimeLimitHours}"/>
|
||||||
<option value="288000000000">8 hours</option>
|
</div>
|
||||||
<option value="432000000000">12 hours</option>
|
<div>
|
||||||
</select>
|
<button type="submit" data-theme="b" data-icon="check">
|
||||||
</li>
|
${ButtonAdd}
|
||||||
<li>
|
</button>
|
||||||
<paper-input id="txtTimeLimit" type="number" pattern="[0-9]*" min="1" step=".5" label="${LabelTimeLimitHours}"></paper-input>
|
<button type="button" data-icon="delete" onclick="$(this).parents('.popup').popup('close');">
|
||||||
</li>
|
${ButtonCancel}
|
||||||
<li>
|
</button>
|
||||||
<button type="submit" data-theme="b" data-icon="check">
|
</div>
|
||||||
${ButtonAdd}
|
|
||||||
</button>
|
|
||||||
<button type="button" data-icon="delete" onclick="$(this).parents('.popup').popup('close');">
|
|
||||||
${ButtonCancel}
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,333 +1,340 @@
|
||||||
// Array Remove - By John Resig (MIT Licensed)
|
define(['jQuery'], function ($) {
|
||||||
Array.prototype.remove = function (from, to) {
|
|
||||||
var rest = this.slice((to || from) + 1 || this.length);
|
|
||||||
this.length = from < 0 ? this.length + from : from;
|
|
||||||
return this.push.apply(this, rest);
|
|
||||||
};
|
|
||||||
|
|
||||||
var ScheduledTaskPage = {
|
// Array Remove - By John Resig (MIT Licensed)
|
||||||
|
Array.prototype.remove = function (from, to) {
|
||||||
|
var rest = this.slice((to || from) + 1 || this.length);
|
||||||
|
this.length = from < 0 ? this.length + from : from;
|
||||||
|
return this.push.apply(this, rest);
|
||||||
|
};
|
||||||
|
|
||||||
refreshScheduledTask: function () {
|
window.ScheduledTaskPage = {
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
refreshScheduledTask: function () {
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
var id = getParameterByName('id');
|
||||||
|
|
||||||
|
|
||||||
ApiClient.getScheduledTask(id).then(ScheduledTaskPage.loadScheduledTask);
|
ApiClient.getScheduledTask(id).then(ScheduledTaskPage.loadScheduledTask);
|
||||||
},
|
},
|
||||||
|
|
||||||
loadScheduledTask: function (task) {
|
loadScheduledTask: function (task) {
|
||||||
|
|
||||||
var page = $($.mobile.activePage)[0];
|
var page = $($.mobile.activePage)[0];
|
||||||
|
|
||||||
$('.taskName', page).html(task.Name);
|
$('.taskName', page).html(task.Name);
|
||||||
|
|
||||||
$('#pTaskDescription', page).html(task.Description);
|
$('#pTaskDescription', page).html(task.Description);
|
||||||
|
|
||||||
require(['listViewStyle'], function () {
|
require(['listViewStyle'], function () {
|
||||||
ScheduledTaskPage.loadTaskTriggers(page, task);
|
ScheduledTaskPage.loadTaskTriggers(page, task);
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
},
|
},
|
||||||
|
|
||||||
loadTaskTriggers: function (context, task) {
|
loadTaskTriggers: function (context, task) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<div class="paperList">';
|
html += '<div class="paperList">';
|
||||||
|
|
||||||
for (var i = 0, length = task.Triggers.length; i < length; i++) {
|
for (var i = 0, length = task.Triggers.length; i < length; i++) {
|
||||||
|
|
||||||
var trigger = task.Triggers[i];
|
var trigger = task.Triggers[i];
|
||||||
|
|
||||||
html += '<div class="listItem">';
|
html += '<div class="listItem">';
|
||||||
|
|
||||||
html += '<i class="md-icon listItemIcon">schedule</i>';
|
html += '<i class="md-icon listItemIcon">schedule</i>';
|
||||||
|
|
||||||
html += '<div class="listItemBody two-line">';
|
if (trigger.MaxRuntimeMs) {
|
||||||
|
html += '<div class="listItemBody two-line">';
|
||||||
html += "<div class='listItemBodyText'>" + ScheduledTaskPage.getTriggerFriendlyName(trigger) + "</div>";
|
|
||||||
|
|
||||||
if (trigger.MaxRuntimeMs) {
|
|
||||||
html += '<div class="listItemBodyText secondary">';
|
|
||||||
|
|
||||||
var hours = trigger.MaxRuntimeMs / 3600000;
|
|
||||||
|
|
||||||
if (hours == 1) {
|
|
||||||
html += Globalize.translate('ValueTimeLimitSingleHour');
|
|
||||||
} else {
|
} else {
|
||||||
html += Globalize.translate('ValueTimeLimitMultiHour', hours);
|
html += '<div class="listItemBody">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html += "<div class='listItemBodyText'>" + ScheduledTaskPage.getTriggerFriendlyName(trigger) + "</div>";
|
||||||
|
|
||||||
|
if (trigger.MaxRuntimeMs) {
|
||||||
|
html += '<div class="listItemBodyText secondary">';
|
||||||
|
|
||||||
|
var hours = trigger.MaxRuntimeMs / 3600000;
|
||||||
|
|
||||||
|
if (hours == 1) {
|
||||||
|
html += Globalize.translate('ValueTimeLimitSingleHour');
|
||||||
|
} else {
|
||||||
|
html += Globalize.translate('ValueTimeLimitMultiHour', hours);
|
||||||
|
}
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '<button type="button" is="paper-icon-button-light" title="' + Globalize.translate('ButtonDelete') + '" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');"><i class="md-icon">delete</i></button>';
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<button type="button" is="paper-icon-button-light" title="' + Globalize.translate('ButtonDelete') + '" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');"><i class="md-icon">delete</i></button>';
|
context.querySelector('.taskTriggers').innerHTML = html;
|
||||||
|
},
|
||||||
|
|
||||||
html += '</div>';
|
getTriggerFriendlyName: function (trigger) {
|
||||||
}
|
|
||||||
|
|
||||||
html += '</div>';
|
if (trigger.Type == 'DailyTrigger') {
|
||||||
|
return 'Daily at ' + ScheduledTaskPage.getDisplayTime(trigger.TimeOfDayTicks);
|
||||||
context.querySelector('.taskTriggers').innerHTML = html;
|
|
||||||
},
|
|
||||||
|
|
||||||
getTriggerFriendlyName: function (trigger) {
|
|
||||||
|
|
||||||
if (trigger.Type == 'DailyTrigger') {
|
|
||||||
return 'Daily at ' + ScheduledTaskPage.getDisplayTime(trigger.TimeOfDayTicks);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trigger.Type == 'WeeklyTrigger') {
|
|
||||||
|
|
||||||
return trigger.DayOfWeek + 's at ' + ScheduledTaskPage.getDisplayTime(trigger.TimeOfDayTicks);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trigger.Type == 'SystemEventTrigger') {
|
|
||||||
|
|
||||||
if (trigger.SystemEvent == 'WakeFromSleep') {
|
|
||||||
return 'On wake from sleep';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trigger.Type == 'IntervalTrigger') {
|
|
||||||
|
|
||||||
var hours = trigger.IntervalTicks / 36000000000;
|
|
||||||
|
|
||||||
if (hours == .25) {
|
|
||||||
return "Every 15 minutes";
|
|
||||||
}
|
|
||||||
if (hours == .5) {
|
|
||||||
return "Every 30 minutes";
|
|
||||||
}
|
|
||||||
if (hours == .75) {
|
|
||||||
return "Every 45 minutes";
|
|
||||||
}
|
|
||||||
if (hours == 1) {
|
|
||||||
return "Every hour";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'Every ' + hours + ' hours';
|
if (trigger.Type == 'WeeklyTrigger') {
|
||||||
}
|
|
||||||
|
|
||||||
if (trigger.Type == 'StartupTrigger') {
|
return trigger.DayOfWeek + 's at ' + ScheduledTaskPage.getDisplayTime(trigger.TimeOfDayTicks);
|
||||||
return 'On application startup';
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return trigger.Type;
|
if (trigger.Type == 'SystemEventTrigger') {
|
||||||
},
|
|
||||||
|
|
||||||
getDisplayTime: function (ticks) {
|
if (trigger.SystemEvent == 'WakeFromSleep') {
|
||||||
|
return 'On wake from sleep';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var hours = ticks / 36000000000;
|
if (trigger.Type == 'IntervalTrigger') {
|
||||||
|
|
||||||
if (hours < 1) {
|
var hours = trigger.IntervalTicks / 36000000000;
|
||||||
hours = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
hours = Math.floor(hours);
|
if (hours == .25) {
|
||||||
|
return "Every 15 minutes";
|
||||||
|
}
|
||||||
|
if (hours == .5) {
|
||||||
|
return "Every 30 minutes";
|
||||||
|
}
|
||||||
|
if (hours == .75) {
|
||||||
|
return "Every 45 minutes";
|
||||||
|
}
|
||||||
|
if (hours == 1) {
|
||||||
|
return "Every hour";
|
||||||
|
}
|
||||||
|
|
||||||
ticks -= (hours * 36000000000);
|
return 'Every ' + hours + ' hours';
|
||||||
|
}
|
||||||
|
|
||||||
var minutes = Math.floor((ticks / 600000000));
|
if (trigger.Type == 'StartupTrigger') {
|
||||||
|
return 'On application startup';
|
||||||
|
}
|
||||||
|
|
||||||
var suffix = "am";
|
return trigger.Type;
|
||||||
|
},
|
||||||
|
|
||||||
if (hours > 11) {
|
getDisplayTime: function (ticks) {
|
||||||
suffix = "pm";
|
|
||||||
}
|
|
||||||
|
|
||||||
hours = hours % 12;
|
var hours = ticks / 36000000000;
|
||||||
|
|
||||||
if (hours == 0) {
|
if (hours < 1) {
|
||||||
hours = 12;
|
hours = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minutes < 10) {
|
hours = Math.floor(hours);
|
||||||
minutes = '0' + minutes;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hours + ':' + minutes + ' ' + suffix;
|
ticks -= (hours * 36000000000);
|
||||||
},
|
|
||||||
|
|
||||||
showAddTriggerPopup: function () {
|
var minutes = Math.floor((ticks / 600000000));
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
var suffix = "am";
|
||||||
|
|
||||||
$('#selectTriggerType', page).val('DailyTrigger').trigger('change');
|
if (hours > 11) {
|
||||||
|
suffix = "pm";
|
||||||
|
}
|
||||||
|
|
||||||
$('#popupAddTrigger', page).on("popupafteropen", function () {
|
hours = hours % 12;
|
||||||
$('#addTriggerForm input:first', this).focus();
|
|
||||||
}).popup("open").on("popupafterclose", function () {
|
|
||||||
|
|
||||||
$('#addTriggerForm', page).off("submit");
|
if (hours == 0) {
|
||||||
$(this).off("popupafterclose");
|
hours = 12;
|
||||||
});
|
}
|
||||||
},
|
|
||||||
|
|
||||||
confirmDeleteTrigger: function (index) {
|
if (minutes < 10) {
|
||||||
|
minutes = '0' + minutes;
|
||||||
|
}
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
return hours + ':' + minutes + ' ' + suffix;
|
||||||
confirm(Globalize.translate('MessageDeleteTaskTrigger'), Globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
|
},
|
||||||
ScheduledTaskPage.deleteTrigger(index);
|
|
||||||
|
showAddTriggerPopup: function () {
|
||||||
|
|
||||||
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
|
$('#selectTriggerType', page).val('DailyTrigger').trigger('change');
|
||||||
|
|
||||||
|
$('#popupAddTrigger', page).on("popupafteropen", function () {
|
||||||
|
$('#addTriggerForm input:first', this).focus();
|
||||||
|
}).popup("open").on("popupafterclose", function () {
|
||||||
|
|
||||||
|
$('#addTriggerForm', page).off("submit");
|
||||||
|
$(this).off("popupafterclose");
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
},
|
|
||||||
|
|
||||||
deleteTrigger: function (index) {
|
confirmDeleteTrigger: function (index) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
require(['confirm'], function (confirm) {
|
||||||
|
confirm(Globalize.translate('MessageDeleteTaskTrigger'), Globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
|
||||||
|
ScheduledTaskPage.deleteTrigger(index);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
deleteTrigger: function (index) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
var id = getParameterByName('id');
|
||||||
|
|
||||||
|
|
||||||
ApiClient.getScheduledTask(id).then(function (task) {
|
ApiClient.getScheduledTask(id).then(function (task) {
|
||||||
|
|
||||||
task.Triggers.remove(index);
|
task.Triggers.remove(index);
|
||||||
|
|
||||||
ApiClient.updateScheduledTaskTriggers(task.Id, task.Triggers).then(function () {
|
ApiClient.updateScheduledTaskTriggers(task.Id, task.Triggers).then(function () {
|
||||||
|
|
||||||
ScheduledTaskPage.refreshScheduledTask();
|
ScheduledTaskPage.refreshScheduledTask();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
refreshTriggerFields: function (triggerType) {
|
||||||
|
|
||||||
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
|
if (triggerType == 'DailyTrigger') {
|
||||||
|
|
||||||
|
$('#fldTimeOfDay', page).show();
|
||||||
|
$('#fldDayOfWeek', page).hide();
|
||||||
|
$('#fldSelectSystemEvent', page).hide();
|
||||||
|
$('#fldSelectInterval', page).hide();
|
||||||
|
$('#txtTimeOfDay', page).attr('required', 'required');
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (triggerType == 'WeeklyTrigger') {
|
||||||
|
$('#fldTimeOfDay', page).show();
|
||||||
|
$('#fldDayOfWeek', page).show();
|
||||||
|
$('#fldSelectSystemEvent', page).hide();
|
||||||
|
$('#fldSelectInterval', page).hide();
|
||||||
|
$('#txtTimeOfDay', page).attr('required', 'required');
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (triggerType == 'SystemEventTrigger') {
|
||||||
|
$('#fldTimeOfDay', page).hide();
|
||||||
|
$('#fldDayOfWeek', page).hide();
|
||||||
|
$('#fldSelectSystemEvent', page).show();
|
||||||
|
$('#fldSelectInterval', page).hide();
|
||||||
|
$('#txtTimeOfDay', page).removeAttr('required');
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (triggerType == 'IntervalTrigger') {
|
||||||
|
$('#fldTimeOfDay', page).hide();
|
||||||
|
$('#fldDayOfWeek', page).hide();
|
||||||
|
$('#fldSelectSystemEvent', page).hide();
|
||||||
|
$('#fldSelectInterval', page).show();
|
||||||
|
$('#txtTimeOfDay', page).removeAttr('required');
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (triggerType == 'StartupTrigger') {
|
||||||
|
$('#fldTimeOfDay', page).hide();
|
||||||
|
$('#fldDayOfWeek', page).hide();
|
||||||
|
$('#fldSelectSystemEvent', page).hide();
|
||||||
|
$('#fldSelectInterval', page).hide();
|
||||||
|
$('#txtTimeOfDay', page).removeAttr('required');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getTriggerToAdd: function () {
|
||||||
|
|
||||||
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
|
var trigger = {
|
||||||
|
Type: $('#selectTriggerType', page).val()
|
||||||
|
};
|
||||||
|
|
||||||
|
if (trigger.Type == 'DailyTrigger') {
|
||||||
|
trigger.TimeOfDayTicks = ScheduledTaskPage.getTimeOfDayTicks($('#txtTimeOfDay', page).val());
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (trigger.Type == 'WeeklyTrigger') {
|
||||||
|
trigger.DayOfWeek = $('#selectDayOfWeek', page).val();
|
||||||
|
trigger.TimeOfDayTicks = ScheduledTaskPage.getTimeOfDayTicks($('#txtTimeOfDay', page).val());
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (trigger.Type == 'SystemEventTrigger') {
|
||||||
|
trigger.SystemEvent = $('#selectSystemEvent', page).val();
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (trigger.Type == 'IntervalTrigger') {
|
||||||
|
trigger.IntervalTicks = $('#selectInterval', page).val();
|
||||||
|
}
|
||||||
|
|
||||||
|
var timeLimit = $('#txtTimeLimit', page).val() || '0';
|
||||||
|
timeLimit = parseFloat(timeLimit) * 3600000;
|
||||||
|
|
||||||
|
trigger.MaxRuntimeMs = timeLimit || null;
|
||||||
|
|
||||||
|
return trigger;
|
||||||
|
},
|
||||||
|
|
||||||
|
getTimeOfDayTicks: function (val) {
|
||||||
|
|
||||||
|
var vals = val.split(':');
|
||||||
|
|
||||||
|
var hours = vals[0];
|
||||||
|
var minutes = vals[1].split(' ')[0];
|
||||||
|
|
||||||
|
// Add hours
|
||||||
|
var ticks = hours * 60 * 60 * 1000 * 10000;
|
||||||
|
|
||||||
|
ticks += minutes * 60 * 1000 * 10000;
|
||||||
|
|
||||||
|
return ticks;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
var id = getParameterByName('id');
|
||||||
|
|
||||||
|
ApiClient.getScheduledTask(id).then(function (task) {
|
||||||
|
|
||||||
|
task.Triggers.push(ScheduledTaskPage.getTriggerToAdd());
|
||||||
|
|
||||||
|
ApiClient.updateScheduledTaskTriggers(task.Id, task.Triggers).then(function () {
|
||||||
|
|
||||||
|
$('#popupAddTrigger').popup('close');
|
||||||
|
|
||||||
|
ScheduledTaskPage.refreshScheduledTask();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
return false;
|
||||||
},
|
|
||||||
|
|
||||||
refreshTriggerFields: function (triggerType) {
|
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
|
||||||
|
|
||||||
if (triggerType == 'DailyTrigger') {
|
|
||||||
|
|
||||||
$('#fldTimeOfDay', page).show();
|
|
||||||
$('#fldDayOfWeek', page).hide();
|
|
||||||
$('#fldSelectSystemEvent', page).hide();
|
|
||||||
$('#fldSelectInterval', page).hide();
|
|
||||||
$('#txtTimeOfDay', page).attr('required', 'required');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (triggerType == 'WeeklyTrigger') {
|
$(document).on('pageinit', "#scheduledTaskPage", function () {
|
||||||
$('#fldTimeOfDay', page).show();
|
|
||||||
$('#fldDayOfWeek', page).show();
|
|
||||||
$('#fldSelectSystemEvent', page).hide();
|
|
||||||
$('#fldSelectInterval', page).hide();
|
|
||||||
$('#txtTimeOfDay', page).attr('required', 'required');
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (triggerType == 'SystemEventTrigger') {
|
var page = this;
|
||||||
$('#fldTimeOfDay', page).hide();
|
|
||||||
$('#fldDayOfWeek', page).hide();
|
|
||||||
$('#fldSelectSystemEvent', page).show();
|
|
||||||
$('#fldSelectInterval', page).hide();
|
|
||||||
$('#txtTimeOfDay', page).removeAttr('required');
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (triggerType == 'IntervalTrigger') {
|
$('.addTriggerForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
$('#fldTimeOfDay', page).hide();
|
|
||||||
$('#fldDayOfWeek', page).hide();
|
|
||||||
$('#fldSelectSystemEvent', page).hide();
|
|
||||||
$('#fldSelectInterval', page).show();
|
|
||||||
$('#txtTimeOfDay', page).removeAttr('required');
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (triggerType == 'StartupTrigger') {
|
page.querySelector('.timeFieldExample').innerHTML = Globalize.translate('ValueExample', '1:00 PM');
|
||||||
$('#fldTimeOfDay', page).hide();
|
|
||||||
$('#fldDayOfWeek', page).hide();
|
|
||||||
$('#fldSelectSystemEvent', page).hide();
|
|
||||||
$('#fldSelectInterval', page).hide();
|
|
||||||
$('#txtTimeOfDay', page).removeAttr('required');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getTriggerToAdd: function () {
|
}).on('pageshow', "#scheduledTaskPage", function () {
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
|
||||||
|
|
||||||
var trigger = {
|
|
||||||
Type: $('#selectTriggerType', page).val()
|
|
||||||
};
|
|
||||||
|
|
||||||
if (trigger.Type == 'DailyTrigger') {
|
|
||||||
trigger.TimeOfDayTicks = ScheduledTaskPage.getTimeOfDayTicks($('#txtTimeOfDay', page).val());
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (trigger.Type == 'WeeklyTrigger') {
|
|
||||||
trigger.DayOfWeek = $('#selectDayOfWeek', page).val();
|
|
||||||
trigger.TimeOfDayTicks = ScheduledTaskPage.getTimeOfDayTicks($('#txtTimeOfDay', page).val());
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (trigger.Type == 'SystemEventTrigger') {
|
|
||||||
trigger.SystemEvent = $('#selectSystemEvent', page).val();
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (trigger.Type == 'IntervalTrigger') {
|
|
||||||
trigger.IntervalTicks = $('#selectInterval', page).val();
|
|
||||||
}
|
|
||||||
|
|
||||||
var timeLimit = $('#txtTimeLimit', page).val() || '0';
|
|
||||||
timeLimit = parseFloat(timeLimit) * 3600000;
|
|
||||||
|
|
||||||
trigger.MaxRuntimeMs = timeLimit || null;
|
|
||||||
|
|
||||||
return trigger;
|
|
||||||
},
|
|
||||||
|
|
||||||
getTimeOfDayTicks: function (val) {
|
|
||||||
|
|
||||||
var vals = val.split(':');
|
|
||||||
|
|
||||||
var hours = vals[0];
|
|
||||||
var minutes = vals[1].split(' ')[0];
|
|
||||||
|
|
||||||
// Add hours
|
|
||||||
var ticks = hours * 60 * 60 * 1000 * 10000;
|
|
||||||
|
|
||||||
ticks += minutes * 60 * 1000 * 10000;
|
|
||||||
|
|
||||||
return ticks;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
|
|
||||||
function onSubmit() {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
|
||||||
|
|
||||||
ApiClient.getScheduledTask(id).then(function (task) {
|
|
||||||
|
|
||||||
task.Triggers.push(ScheduledTaskPage.getTriggerToAdd());
|
|
||||||
|
|
||||||
ApiClient.updateScheduledTaskTriggers(task.Id, task.Triggers).then(function () {
|
|
||||||
|
|
||||||
$('#popupAddTrigger').popup('close');
|
|
||||||
|
|
||||||
ScheduledTaskPage.refreshScheduledTask();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
ScheduledTaskPage.refreshScheduledTask();
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
})();
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on('pageinit', "#scheduledTaskPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
$('.addTriggerForm').off('submit', onSubmit).on('submit', onSubmit);
|
|
||||||
|
|
||||||
page.querySelector('.timeFieldExample').innerHTML = Globalize.translate('ValueExample', '1:00 PM');
|
|
||||||
|
|
||||||
}).on('pageshow', "#scheduledTaskPage", function () {
|
|
||||||
|
|
||||||
ScheduledTaskPage.refreshScheduledTask();
|
|
||||||
});
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
|
});
|
|
@ -2247,7 +2247,7 @@
|
||||||
"ButtonLocalRefresh": "Local refresh",
|
"ButtonLocalRefresh": "Local refresh",
|
||||||
"ButtonAddMissingData": "Add missing data only",
|
"ButtonAddMissingData": "Add missing data only",
|
||||||
"ButtonFullRefresh": "Full refresh",
|
"ButtonFullRefresh": "Full refresh",
|
||||||
"ValueExample": "1:00 PM",
|
"ValueExample": "Example: {0}",
|
||||||
"OptionEnableAnonymousUsageReporting": "Enable anonymous usage reporting",
|
"OptionEnableAnonymousUsageReporting": "Enable anonymous usage reporting",
|
||||||
"OptionEnableAnonymousUsageReportingHelp": "Allow Emby to collect anonymous data such as installed plugins, the version numbers of your Emby apps, etc. This information is only used for the purpose of improving the software.",
|
"OptionEnableAnonymousUsageReportingHelp": "Allow Emby to collect anonymous data such as installed plugins, the version numbers of your Emby apps, etc. This information is only used for the purpose of improving the software.",
|
||||||
"LabelFileOrUrl": "File or url:",
|
"LabelFileOrUrl": "File or url:",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue