hide menu options based on user policies

This commit is contained in:
Luke Pulverenti 2017-11-15 16:06:00 -05:00
parent ac45515b89
commit 1fa4109086
26 changed files with 72 additions and 68 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
<form style="margin: 0 auto;">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${Display}
</h1>
</h2>
<div class="selectContainer languageSection hide">
<select id="selectLanguage" is="emby-select" label="${LabelDisplayLanguage}">
<option value="">${Auto}</option>
@ -150,21 +150,21 @@
<select is="emby-select" class="selectSoundEffects" label="${LabelSoundEffects}"></select>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<div class="checkboxContainer checkboxContainer-withDescription fldBackdrops hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkBackdrops" />
<span>${EnableBackdrops}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnableBackdropsHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<div class="checkboxContainer checkboxContainer-withDescription fldThemeSong hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkThemeSong" />
<span>${EnableThemeSongs}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnableThemeSongsHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<div class="checkboxContainer checkboxContainer-withDescription fldThemeVideo hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkThemeVideo" />
<span>${EnableThemeVideos}</span>
@ -179,7 +179,7 @@
</label>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<div class="checkboxContainer checkboxContainer-withDescription fldDisplayMissingEpisodes hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkDisplayMissingEpisodes" />
<span>${DisplayMissingEpisodesWithinSeasons}</span>

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
<form style="margin:0 auto;">
<div class="verticalSection">
<div class="verticalSection verticalSection-extrabottompadding">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${HeaderHomeScreen}
</h1>
</h2>
<div class="selectContainer">
<select is="emby-select" id="selectHomeSection1" label="{section1label}">
@ -113,21 +113,21 @@
</div>
</div>
<div class="verticalSection">
<div class="verticalSection verticalSection-extrabottompadding">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${HeaderLibraryOrder}
</h1>
</h2>
<div class="paperList viewOrderList">
</div>
</div>
<div class="verticalSection">
<h1 class="sectionTitle">
<div class="verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle">
${HeaderHomeScreenContent}
</h1>
</h2>
<p>${LabelSelectHomeScreenItemsFolders}</p>
<div class="latestItemsList">
@ -141,21 +141,21 @@
</div>
<div class="verticalSection landingScreensSection hide">
<div class="verticalSection verticalSection-extrabottompadding landingScreensSection hide">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${HeaderLandingScreens}
</h1>
</h2>
<p>${LandingScreensHelp}</p>
<div class="landingScreens">
</div>
</div>
<div class="verticalSection">
<h1 class="sectionTitle">
<div class="verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle">
${HeaderLibraryFolders}
</h1>
</h2>
<div>
<p>${LabelSelectFolderGroups}</p>
<div class="folderGroupList"></div>

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
<div id="imagesContainer">
<div class="imageEditor-buttons first-imageEditor-buttons">
<h1 style="margin:0;">${Images}</h1>
<h2 style="margin:0;">${Images}</h2>
<button type="button" is="emby-button" class="btnBrowseAllImages fab mini autoSize" style="margin-left: 1em;">
<i class="md-icon">&#xE8B6;</i>
</button>
@ -25,7 +25,7 @@
<div id="backdropsContainer" class="hide">
<div class="imageEditor-buttons">
<h1 style="margin:0;">${Backdrops}</h1>
<h2 style="margin:0;">${Backdrops}</h2>
<button type="button" is="emby-button" class="btnBrowseAllImages fab mini autoSize" style="margin-left: 1em;" data-imagetype="Backdrop">
<i class="md-icon">&#xE8B6;</i>
</button>
@ -40,7 +40,7 @@
<div id="screenshotsContainer" class="hide">
<div class="imageEditor-buttons">
<h1 style="margin: 0;">${Screenshots}</h1>
<h2 style="margin: 0;">${Screenshots}</h2>
<button type="button" is="emby-button" class="btnBrowseAllImages fab mini autoSize" style="margin-left: 1em;" data-imagetype="Screenshot">
<i class="md-icon">&#xE8B6;</i>
</button>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["apphost","globalize"],function(appHost,globalize){"use strict";function getDisplayName(item,options){if(!item)throw new Error("null item passed into getDisplayName");options=options||{},"Timer"===item.Type&&(item=item.ProgramInfo||item);var name=("Program"!==item.Type&&"Recording"!==item.Type||!item.IsSeries&&!item.EpisodeTitle?item.Name:item.EpisodeTitle)||"";if("TvChannel"===item.Type)return item.ChannelNumber?item.ChannelNumber+" "+name:name;if("Episode"===item.Type&&0===item.ParentIndexNumber)name=globalize.translate("sharedcomponents#ValueSpecialEpisodeName",name);else if(("Episode"===item.Type||"Program"===item.Type)&&null!=item.IndexNumber&&null!=item.ParentIndexNumber&&options.includeIndexNumber!==!1){var displayIndexNumber=item.IndexNumber,number=displayIndexNumber,nameSeparator=" - ";options.includeParentInfo!==!1?number="S"+item.ParentIndexNumber+":E"+number:nameSeparator=". ",item.IndexNumberEnd&&(displayIndexNumber=item.IndexNumberEnd,number+="-"+displayIndexNumber),number&&(name=name?number+nameSeparator+name:number)}return name}function supportsAddingToCollection(item){var invalidTypes=["Person","Genre","MusicGenre","Studio","GameGenre","BoxSet","Playlist","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"];return("Recording"!==item.Type||"Completed"===item.Status)&&(!item.CollectionType&&invalidTypes.indexOf(item.Type)===-1&&"Photo"!==item.MediaType)}function supportsAddingToPlaylist(item){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&("Photo"!==item.MediaType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(item.MediaType||item.IsFolder||"Genre"===item.Type||"MusicGenre"===item.Type||"MusicArtist"===item.Type))))))}function canEdit(user,item){var itemType=item.Type;return"UserRootFolder"!==itemType&&"UserView"!==itemType&&("Program"!==itemType&&(("Recording"!==item.Type||"Completed"===item.Status)&&user.Policy.IsAdministrator))}function isLocalItem(item){return!(!item||!item.Id||0!==item.Id.indexOf("local"))}return{getDisplayName:getDisplayName,supportsAddingToCollection:supportsAddingToCollection,supportsAddingToPlaylist:supportsAddingToPlaylist,isLocalItem:isLocalItem,canIdentify:function(user,itemType){return!("Movie"!==itemType&&"Trailer"!==itemType&&"Series"!==itemType&&"Game"!==itemType&&"BoxSet"!==itemType&&"Person"!==itemType&&"Book"!==itemType&&"MusicAlbum"!==itemType&&"MusicArtist"!==itemType||!user.Policy.IsAdministrator)},canEdit:canEdit,canEditImages:function(user,item){var itemType=item.Type;return"Photo"!==item.MediaType&&("UserView"===itemType?!!user.Policy.IsAdministrator:("Recording"!==item.Type||"Completed"===item.Status)&&("Timer"!==itemType&&"SeriesTimer"!==itemType&&canEdit(user,item)))},canSync:function(user,item){return!(user&&!user.Policy.EnableContentDownloading)&&item.SupportsSync},canShare:function(item,user){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&(("Recording"!==item.Type||"Completed"===item.Status)&&(user.Policy.EnablePublicSharing&&appHost.supports("sharing"))))))},enableDateAddedDisplay:function(item){return!item.IsFolder&&item.MediaType&&"Program"!==item.Type&&"TvChannel"!==item.Type&&"Trailer"!==item.Type},canMarkPlayed:function(item){if("Program"===item.Type)return!1;if("Video"===item.MediaType){if("TvChannel"!==item.Type)return!0}else if("Audio"===item.MediaType){if("AudioPodcast"===item.Type)return!0;if("AudioBook"===item.Type)return!0}return"Series"===item.Type||"Season"===item.Type||"BoxSet"===item.Type||"Game"===item.MediaType||"Book"===item.MediaType||"Recording"===item.MediaType},canRate:function(item){return"Program"!==item.Type&&"Timer"!==item.Type&&"SeriesTimer"!==item.Type},supportsMediaSourceSelection:function(item){return"Video"===item.MediaType&&("TvChannel"!==item.Type&&(!item.SourceType||"Library"===item.SourceType))}}});
define(["apphost","globalize"],function(appHost,globalize){"use strict";function getDisplayName(item,options){if(!item)throw new Error("null item passed into getDisplayName");options=options||{},"Timer"===item.Type&&(item=item.ProgramInfo||item);var name=("Program"!==item.Type&&"Recording"!==item.Type||!item.IsSeries&&!item.EpisodeTitle?item.Name:item.EpisodeTitle)||"";if("TvChannel"===item.Type)return item.ChannelNumber?item.ChannelNumber+" "+name:name;if("Episode"===item.Type&&0===item.ParentIndexNumber)name=globalize.translate("sharedcomponents#ValueSpecialEpisodeName",name);else if(("Episode"===item.Type||"Program"===item.Type)&&null!=item.IndexNumber&&null!=item.ParentIndexNumber&&options.includeIndexNumber!==!1){var displayIndexNumber=item.IndexNumber,number=displayIndexNumber,nameSeparator=" - ";options.includeParentInfo!==!1?number="S"+item.ParentIndexNumber+":E"+number:nameSeparator=". ",item.IndexNumberEnd&&(displayIndexNumber=item.IndexNumberEnd,number+="-"+displayIndexNumber),number&&(name=name?number+nameSeparator+name:number)}return name}function supportsAddingToCollection(item){var invalidTypes=["Person","Genre","MusicGenre","Studio","GameGenre","BoxSet","Playlist","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"];return("Recording"!==item.Type||"Completed"===item.Status)&&(!item.CollectionType&&invalidTypes.indexOf(item.Type)===-1&&"Photo"!==item.MediaType&&!isLocalItem(item))}function supportsAddingToPlaylist(item){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&("Photo"!==item.MediaType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&(item.MediaType||item.IsFolder||"Genre"===item.Type||"MusicGenre"===item.Type||"MusicArtist"===item.Type)))))))}function canEdit(user,item){var itemType=item.Type;return"UserRootFolder"!==itemType&&"UserView"!==itemType&&("Program"!==itemType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&user.Policy.IsAdministrator)))}function isLocalItem(item){return!(!item||!item.Id||0!==item.Id.indexOf("local"))}return{getDisplayName:getDisplayName,supportsAddingToCollection:supportsAddingToCollection,supportsAddingToPlaylist:supportsAddingToPlaylist,isLocalItem:isLocalItem,canIdentify:function(user,item){var itemType=item.Type;return!("Movie"!==itemType&&"Trailer"!==itemType&&"Series"!==itemType&&"Game"!==itemType&&"BoxSet"!==itemType&&"Person"!==itemType&&"Book"!==itemType&&"MusicAlbum"!==itemType&&"MusicArtist"!==itemType||!user.Policy.IsAdministrator||isLocalItem(item))},canEdit:canEdit,canEditImages:function(user,item){var itemType=item.Type;return"Photo"!==item.MediaType&&("UserView"===itemType?!!user.Policy.IsAdministrator:("Recording"!==item.Type||"Completed"===item.Status)&&("Timer"!==itemType&&"SeriesTimer"!==itemType&&canEdit(user,item)&&!isLocalItem(item)))},canSync:function(user,item){return!(user&&!user.Policy.EnableContentDownloading)&&(!isLocalItem(item)&&item.SupportsSync)},canShare:function(item,user){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&(user.Policy.EnablePublicSharing&&appHost.supports("sharing")))))))},enableDateAddedDisplay:function(item){return!item.IsFolder&&item.MediaType&&"Program"!==item.Type&&"TvChannel"!==item.Type&&"Trailer"!==item.Type},canMarkPlayed:function(item){if("Program"===item.Type)return!1;if("Video"===item.MediaType){if("TvChannel"!==item.Type)return!0}else if("Audio"===item.MediaType){if("AudioPodcast"===item.Type)return!0;if("AudioBook"===item.Type)return!0}return"Series"===item.Type||"Season"===item.Type||"BoxSet"===item.Type||"Game"===item.MediaType||"Book"===item.MediaType||"Recording"===item.MediaType},canRate:function(item){return"Program"!==item.Type&&"Timer"!==item.Type&&"SeriesTimer"!==item.Type},supportsMediaSourceSelection:function(item){return"Video"===item.MediaType&&("TvChannel"!==item.Type&&(!item.SourceType||"Library"===item.SourceType))}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
<form style="margin: 0 auto;">
<div class="verticalSection">
<h1 class="sectionTitle">
<div class="verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle">
${HeaderAudioSettings}
</h1>
</h2>
<div class="selectContainer">
<select is="emby-select" id="selectAudioLanguage" label="${LabelAudioLanguagePreference}"></select>
</div>
@ -14,10 +14,10 @@
</div>
<div class="qualitySections hide">
<div class="verticalSection">
<h1 class="sectionTitle">
<div class="verticalSection verticalSection-extrabottompadding videoQualitySection hide">
<h2 class="sectionTitle">
${HeaderVideoQuality}
</h1>
</h2>
<div class="selectContainer fldVideoInNetworkQuality hide">
<select is="emby-select" class="selectVideoInNetworkQuality" label="${LabelHomeNetworkQuality}"></select>
</div>
@ -29,20 +29,20 @@
</div>
</div>
<div class="verticalSection musicQualitySection hide">
<h1>
<div class="verticalSection verticalSection-extrabottompadding musicQualitySection hide">
<h2>
${HeaderMusicQuality}
</h1>
</h2>
<div class="selectContainer">
<select is="emby-select" class="selectMusicInternetQuality" label="${LabelInternetQuality}"></select>
</div>
</div>
</div>
<div class="verticalSection">
<h1 class="sectionTitle">
<div class="verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle">
${Advanced}
</h1>
</h2>
<div class="checkboxContainer checkboxContainer-withDescription cinemaModeOptions">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnableCinemaMode" />
@ -50,11 +50,13 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${CinemaModeConfigurationHelp}</div>
</div>
<label class="checkboxContainer">
<div class="checkboxContainer fldEpisodeAutoPlay hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEpisodeAutoPlay" />
<span>${PlayNextEpisodeAutomatically}</span>
</label>
<div class="checkboxContainer checkboxContainer-withDescription">
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldEnableNextVideoOverlay hide">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnableNextVideoOverlay" />
<span>${EnableNextVideoInfoOverlay}</span>

View File

@ -162,6 +162,7 @@
"VoiceInput": "Voice Input",
"LabelContentType": "Content type:",
"LabelPath": "Path:",
"Playlists": "Playlists",
"LabelTitle": "Title:",
"LabelOriginalTitle": "Original title:",
"LabelSortTitle": "Sort title:",
@ -170,6 +171,7 @@
"LabelStatus": "Status:",
"LabelArtists": "Artists:",
"LabelArtistsHelp": "Separate multiple using ;",
"HeaderAlbumArtists": "Album Artists",
"LabelAlbumArtists": "Album artists:",
"LabelAlbum": "Album:",
"Artists": "Artists",

File diff suppressed because one or more lines are too long

View File

@ -2,9 +2,9 @@
<div class="verticalSection">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${HeaderSubtitleSettings}
</h1>
</h2>
<div class="selectContainer">
<select is="emby-select" id="selectSubtitleLanguage" label="${LabelPreferredSubtitleLanguage}"></select>
@ -35,9 +35,9 @@
<div class="verticalSection subtitleAppearanceSection hide">
<h1 class="sectionTitle">
<h2 class="sectionTitle">
${HeaderSubtitleAppearance}
</h1>
</h2>
<div style="margin: 2em 0 2em;">
<div class="subtitleappearance-preview flex align-items-center justify-content-center" style="border: 1px solid gray; color: black; background: lightblue url(https://github.com/MediaBrowser/Emby.Resources/raw/master/images/subtitles/previewbg.jpg) no-repeat center center; background-size: cover; min-height: 4em;padding:1em;">

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["globalize","shell","browser","apphost"],function(globalize,shell,browser,appHost){"use strict";function getProductInfo(feature){return null}function beginPurchase(feature,email){appHost.supports("externalpremium")?shell.openUrl("https://emby.media/premiere"):require(["alert"],function(alert){alert("Learn more about Emby Premiere on the Emby website.")})}function restorePurchase(id){return Promise.reject()}function getSubscriptionOptions(){var options=[];return options.push({id:"embypremiere",title:globalize.translate("sharedcomponents#HeaderBecomeProjectSupporter"),requiresEmail:!1}),Promise.resolve(options)}function isUnlockedByDefault(feature,options){return"playback"===feature||"livetv"===feature?Promise.resolve():Promise.reject()}function getAdminFeatureName(feature){return feature}function getRestoreButtonText(){return globalize.translate("sharedcomponents#HeaderAlreadyPaid")}function getPeriodicMessageIntervalMs(feature){return"playback"===feature?browser.tv||browser.mobile?864e5:3456e5:0}return{getProductInfo:getProductInfo,beginPurchase:beginPurchase,restorePurchase:restorePurchase,getSubscriptionOptions:getSubscriptionOptions,isUnlockedByDefault:isUnlockedByDefault,getAdminFeatureName:getAdminFeatureName,getRestoreButtonText:getRestoreButtonText,getPeriodicMessageIntervalMs:getPeriodicMessageIntervalMs}});
define(["globalize","shell","browser","apphost"],function(globalize,shell,browser,appHost){"use strict";function getProductInfo(feature){return null}function beginPurchase(feature,email){appHost.supports("externalpremium")?shell.openUrl("https://emby.media/premiere"):require(["alert"],function(alert){alert("Learn more about Emby Premiere on the Emby website.")})}function restorePurchase(id){return Promise.reject()}function getSubscriptionOptions(){var options=[];return options.push({id:"embypremiere",title:globalize.translate("sharedcomponents#HeaderBecomeProjectSupporter"),requiresEmail:!1}),Promise.resolve(options)}function isUnlockedByDefault(feature,options){return"playback"===feature||"livetv"===feature?Promise.resolve():Promise.reject()}function getAdminFeatureName(feature){return feature}function getRestoreButtonText(){return globalize.translate("sharedcomponents#HeaderAlreadyPaid")}function getPeriodicMessageIntervalMs(feature){if("playback"===feature){var oneDay=864e5;return browser.tv?oneDay:browser.mobile?2*oneDay:4*oneDay}return 0}return{getProductInfo:getProductInfo,beginPurchase:beginPurchase,restorePurchase:restorePurchase,getSubscriptionOptions:getSubscriptionOptions,isUnlockedByDefault:isUnlockedByDefault,getAdminFeatureName:getAdminFeatureName,getRestoreButtonText:getRestoreButtonText,getPeriodicMessageIntervalMs:getPeriodicMessageIntervalMs}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["displaySettings","userSettingsBuilder","userSettings"],function(DisplaySettings,userSettingsBuilder,currentUserSettings){"use strict";return function(view,params){var settingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){settingsInstance||(settingsInstance=new DisplaySettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})),settingsInstance.loadData()}),view.addEventListener("viewbeforehide",function(){autoSave&&settingsInstance&&settingsInstance.submit()}),view.addEventListener("viewdestroy",function(){settingsInstance&&(settingsInstance.destroy(),settingsInstance=null)})}});
define(["displaySettings","userSettingsBuilder","userSettings"],function(DisplaySettings,userSettingsBuilder,currentUserSettings){"use strict";return function(view,params){var settingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){settingsInstance?settingsInstance.loadData():settingsInstance=new DisplaySettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})}),view.addEventListener("viewbeforehide",function(){autoSave&&settingsInstance&&settingsInstance.submit()}),view.addEventListener("viewdestroy",function(){settingsInstance&&(settingsInstance.destroy(),settingsInstance=null)})}});

View File

@ -1 +1 @@
define(["homescreenSettings","userSettingsBuilder","dom","globalize","loading","userSettings","listViewStyle"],function(HomescreenSettings,userSettingsBuilder,dom,globalize,loading,currentUserSettings){"use strict";return function(view,params){var homescreenSettingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){homescreenSettingsInstance||(homescreenSettingsInstance=new HomescreenSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".homeScreenSettingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})),homescreenSettingsInstance.loadData()}),view.addEventListener("viewbeforehide",function(){autoSave&&homescreenSettingsInstance&&homescreenSettingsInstance.submit()}),view.addEventListener("viewdestroy",function(){homescreenSettingsInstance&&(homescreenSettingsInstance.destroy(),homescreenSettingsInstance=null)})}});
define(["homescreenSettings","userSettingsBuilder","dom","globalize","loading","userSettings","listViewStyle"],function(HomescreenSettings,userSettingsBuilder,dom,globalize,loading,currentUserSettings){"use strict";return function(view,params){var homescreenSettingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){homescreenSettingsInstance?homescreenSettingsInstance.loadData():homescreenSettingsInstance=new HomescreenSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".homeScreenSettingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})}),view.addEventListener("viewbeforehide",function(){autoSave&&homescreenSettingsInstance&&homescreenSettingsInstance.submit()}),view.addEventListener("viewdestroy",function(){homescreenSettingsInstance&&(homescreenSettingsInstance.destroy(),homescreenSettingsInstance=null)})}});

View File

@ -1 +1 @@
define(["playbackSettings","userSettingsBuilder","dom","globalize","loading","userSettings","listViewStyle"],function(PlaybackSettings,userSettingsBuilder,dom,globalize,loading,currentUserSettings){"use strict";return function(view,params){var settingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){settingsInstance||(settingsInstance=new PlaybackSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})),settingsInstance.loadData()}),view.addEventListener("viewbeforehide",function(){autoSave&&settingsInstance&&settingsInstance.submit()}),view.addEventListener("viewdestroy",function(){settingsInstance&&(settingsInstance.destroy(),settingsInstance=null)})}});
define(["playbackSettings","userSettingsBuilder","dom","globalize","loading","userSettings","listViewStyle"],function(PlaybackSettings,userSettingsBuilder,dom,globalize,loading,currentUserSettings){"use strict";return function(view,params){var settingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){settingsInstance?settingsInstance.loadData():settingsInstance=new PlaybackSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})}),view.addEventListener("viewbeforehide",function(){autoSave&&settingsInstance&&settingsInstance.submit()}),view.addEventListener("viewdestroy",function(){settingsInstance&&(settingsInstance.destroy(),settingsInstance=null)})}});

View File

@ -1 +1 @@
define(["subtitleSettings","userSettingsBuilder","userSettings"],function(SubtitleSettings,userSettingsBuilder,currentUserSettings){"use strict";return function(view,params){var subtitleSettingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){subtitleSettingsInstance||(subtitleSettingsInstance=new SubtitleSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})),subtitleSettingsInstance.loadData()}),view.addEventListener("viewbeforehide",function(){autoSave&&subtitleSettingsInstance&&subtitleSettingsInstance.submit()}),view.addEventListener("viewdestroy",function(){subtitleSettingsInstance&&(subtitleSettingsInstance.destroy(),subtitleSettingsInstance=null)})}});
define(["subtitleSettings","userSettingsBuilder","userSettings"],function(SubtitleSettings,userSettingsBuilder,currentUserSettings){"use strict";return function(view,params){var subtitleSettingsInstance,userId=params.userId||ApiClient.getCurrentUserId(),userSettings=userId===ApiClient.getCurrentUserId()?currentUserSettings:new userSettingsBuilder,autoSave=!0;view.addEventListener("viewshow",function(){subtitleSettingsInstance?subtitleSettingsInstance.loadData():subtitleSettingsInstance=new SubtitleSettings({serverId:ApiClient.serverId(),userId:userId,element:view.querySelector(".settingsContainer"),userSettings:userSettings,enableSaveButton:!autoSave,enableSaveConfirmation:!autoSave})}),view.addEventListener("viewbeforehide",function(){autoSave&&subtitleSettingsInstance&&subtitleSettingsInstance.submit()}),view.addEventListener("viewdestroy",function(){subtitleSettingsInstance&&(subtitleSettingsInstance.destroy(),subtitleSettingsInstance=null)})}});