change some variable names
This commit is contained in:
parent
a9166247a6
commit
125d002197
@ -5,12 +5,12 @@
|
||||
<title>Template</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ExamplePluginConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
||||
<div id="TemplateConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<form id="ExamplePluginConfigurationForm">
|
||||
<form id="TemplateConfigForm">
|
||||
<div class="selectContainer">
|
||||
<label class="selectLabel" for="Options">Options</label>
|
||||
<label class="selectLabel" for="Options">Several Options</label>
|
||||
<select is="emby-select" id="Options" name="Options" class="emby-select-withcolor emby-select">
|
||||
<option id="optOneOption" value="OneOption">One Option</option>
|
||||
<option id="optAnotherOption" value="AnotherOption">Another Option</option>
|
||||
@ -19,18 +19,18 @@
|
||||
<div class="inputContainer">
|
||||
<label class="inputeLabel inputLabelUnfocused" for="AnInteger">An Integer</label>
|
||||
<input id="AnInteger" name="AnInteger" type="number" is="emby-input" min="0" />
|
||||
<div class="fieldDescription">Numbers go here</div>
|
||||
<div class="fieldDescription">A Description</div>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescripton">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="TrueFalseSetting" name="TrueFalseCheckBox" type="checkbox" is="emby-checkbox" />
|
||||
<span>True or False</span>
|
||||
<span>A Checkbox</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputeLabel inputLabelUnfocused" for="AString">A String</label>
|
||||
<input id="AString" name="AString" type="text" is="emby-input" />
|
||||
<div class="fieldDescription">Words go here</div>
|
||||
<div class="fieldDescription">Another Description</div>
|
||||
</div>
|
||||
<div>
|
||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||
@ -41,13 +41,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var ExamplePluginConfigurationPage = {
|
||||
var TemplateConfig = {
|
||||
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1'
|
||||
};
|
||||
|
||||
$('#ExamplePluginConfigurationPage').on('pageshow', function () {
|
||||
$('#TemplateConfigPage').on('pageshow', function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
||||
$('#Options').val(config.Options).change();
|
||||
$('#AnInteger').val(config.AnInteger).change();
|
||||
$('#TrueFalseSetting').checked(config.TrueFalseSetting).checkboxradio("refresh");
|
||||
@ -56,9 +56,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#ExamplePluginConfigurationForm').on('submit', function () {
|
||||
$('#TemplateConfigForm').on('submit', function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
||||
config.Options = $('#Options').val();
|
||||
config.AnInteger = $('#AnInteger').val();
|
||||
config.TrueFalseSetting = $('#TrueFalseSetting').prop('checked');
|
||||
|
Loading…
x
Reference in New Issue
Block a user