mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update list components
This commit is contained in:
parent
902a5f062e
commit
ba214a02af
88 changed files with 230 additions and 107 deletions
1
dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js
vendored
Normal file
1
dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
define(["require","dialogHelper","loading","apphost","layoutManager","connectionManager","appRouter","globalize","userSettings","emby-checkbox","emby-input","paper-icon-button-light","emby-select","material-icons","css!./../formdialog","emby-button","emby-linkbutton","flexStyles"],function(require,dialogHelper,loading,appHost,layoutManager,connectionManager,appRouter,globalize,userSettings){"use strict";function onSubmit(e){return e.preventDefault(),!1}function initEditor(context,settings){context.querySelector("form").addEventListener("submit",onSubmit),context.querySelector("#chkShowTitle").checked=settings.showTitle||!1,context.querySelector("#chkShowYear").checked=settings.showYear||!1,context.querySelector(".selectImageType").value=settings.imageType||""}function saveValues(context,settings,settingsKey){userSettings.set(settingsKey+"-showtitle",context.querySelector("#chkShowTitle").checked),userSettings.set(settingsKey+"-showyear",context.querySelector("#chkShowYear").checked),userSettings.set(settingsKey+"-imagetype",context.querySelector(".selectImageType").value)}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function ViewSettings(){}return ViewSettings.prototype.show=function(options){return new Promise(function(resolve,reject){require(["text!./viewsettings.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="small";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+='<div class="formDialogHeader">',html+='<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon"></i></button>',html+='<h3 class="formDialogHeaderTitle">${Settings}</h3>',html+="</div>",html+=template,dlg.innerHTML=globalize.translateDocument(html,"sharedcomponents");for(var settingElements=dlg.querySelectorAll(".viewSetting"),i=0,length=settingElements.length;i<length;i++)options.visibleSettings.indexOf(settingElements[i].getAttribute("data-settingname"))===-1?settingElements[i].classList.add("hide"):settingElements[i].classList.remove("hide");initEditor(dlg,options.settings),dlg.querySelector(".btnCancel").addEventListener("click",function(){dialogHelper.close(dlg)}),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0);var submitted;dlg.querySelector("form").addEventListener("change",function(){submitted=!0},!0),dialogHelper.open(dlg).then(function(){return layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),submitted?(saveValues(dlg,options.settings,options.settingsKey),void resolve()):void reject()})})})},ViewSettings});
|
36
dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.template.html
vendored
Normal file
36
dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.template.html
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
<div class="formDialogContent smoothScrollY">
|
||||
<div class="dialogContentInner dialog-content-centered">
|
||||
<form style="margin:auto;">
|
||||
|
||||
<div class="verticalSection">
|
||||
|
||||
<h2 class="sectionTitle">
|
||||
${HeaderPosterOptions}
|
||||
</h2>
|
||||
|
||||
<div class="selectContainer viewSetting hide" data-settingname="imagetype">
|
||||
<select is="emby-select" label="${LabelImageType}" class="selectImageType">
|
||||
<option value="">${Primary}</option>
|
||||
<option value="banner">${Banner}</option>
|
||||
<option value="disc">${Disc}</option>
|
||||
<option value="thumb">${Thumb}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer viewSetting hide" data-settingname="showtitle">
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkShowTitle" />
|
||||
<span>${ShowTitle}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer viewSetting hide" data-settingname="showyear">
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkShowYear" />
|
||||
<span>${ShowYear}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue