small code formatting changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -9,28 +8,27 @@
|
||||
<div id="ExamplePluginConfigurationPage" 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">
|
||||
<div class="selectContainer">
|
||||
<label class="selectLabel" for="Options">Options:</label>
|
||||
<label class="selectLabel" for="Options">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">AnotherOption</option>
|
||||
<option id="optAnotherOption" value="AnotherOption">Another Option</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputeLabel inputLabelUnfocused" for="AnInteger">An Integer:</label>
|
||||
<input id="AnInteger" name="AnInteger" type="number" is="emby-input" min="0"/>
|
||||
<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>
|
||||
<div class="checkboxContainer checkboxContainer-withDescripton">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="TrueFalseSetting" name="TrueFalseCheckBox" type="checkbox" is="emby-checkbox"/>
|
||||
<input id="TrueFalseSetting" name="TrueFalseCheckBox" type="checkbox" is="emby-checkbox" />
|
||||
<span>True or False</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputeLabel inputLabelUnfocused" for="AString">A String:</label>
|
||||
<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>
|
||||
@@ -42,38 +40,23 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ExamplePluginConfigurationPage =
|
||||
{
|
||||
pluginUniqueId: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1",
|
||||
|
||||
virtualFolders: [],
|
||||
physicalFolders: [],
|
||||
|
||||
var ExamplePluginConfigurationPage = {
|
||||
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1',
|
||||
loadConfiguration: function() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
$('#Options', page).val(config.Options).change();
|
||||
$('#AnInteger', page).val(config.AnInteger).change();
|
||||
$('#TrueFalseSetting', page).checked(config.TrueFalseSetting).checkboxradio("refresh");
|
||||
$('#AString', page).val(config.AString).change();
|
||||
|
||||
$('#Options').val(config.Options).change();
|
||||
$('#AnInteger').val(config.AnInteger).change();
|
||||
$('#TrueFalseSetting').checked(config.TrueFalseSetting).checkboxradio("refresh");
|
||||
$('#AString').val(config.AString).change();
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
},
|
||||
|
||||
saveConfiguration: function() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function(config) {
|
||||
|
||||
config.Options = $('#Options', page).val();
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
config.Options = $('#Options').val();
|
||||
config.AnInteger = $('#AnInteger').val();
|
||||
config.TrueFalseSetting = $('#TrueFalseSetting').prop('checked');
|
||||
config.AString = $('#AString').val();
|
||||
@@ -81,7 +64,7 @@
|
||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
$('#ExamplePluginConfigurationPage').on('pageshow', function () {
|
||||
@@ -94,5 +77,5 @@
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user