commit
2ba7427a6a
@ -1,75 +1,75 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Template</title>
|
<title>Template</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="TemplateConfigPage" 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 data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<form id="TemplateConfigForm">
|
<form id="TemplateConfigForm">
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<label class="selectLabel" for="Options">Several Options</label>
|
<label class="selectLabel" for="Options">Several Options</label>
|
||||||
<select is="emby-select" id="Options" name="Options" class="emby-select-withcolor emby-select">
|
<select is="emby-select" id="Options" name="Options" class="emby-select-withcolor emby-select">
|
||||||
<option id="optOneOption" value="OneOption">One Option</option>
|
<option id="optOneOption" value="OneOption">One Option</option>
|
||||||
<option id="optAnotherOption" value="AnotherOption">Another Option</option>
|
<option id="optAnotherOption" value="AnotherOption">Another Option</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<label class="inputeLabel inputLabelUnfocused" for="AnInteger">An Integer</label>
|
<label class="inputeLabel inputLabelUnfocused" for="AnInteger">An Integer</label>
|
||||||
<input id="AnInteger" name="AnInteger" type="number" is="emby-input" min="0" />
|
<input id="AnInteger" name="AnInteger" type="number" is="emby-input" min="0" />
|
||||||
<div class="fieldDescription">A Description</div>
|
<div class="fieldDescription">A Description</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescripton">
|
<div class="checkboxContainer checkboxContainer-withDescripton">
|
||||||
<label class="emby-checkbox-label">
|
<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>A Checkbox</span>
|
<span>A Checkbox</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<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" />
|
<input id="AString" name="AString" type="text" is="emby-input" />
|
||||||
<div class="fieldDescription">Another Description</div>
|
<div class="fieldDescription">Another Description</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||||
<span>Save</span>
|
<span>Save</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var TemplateConfig = {
|
var TemplateConfig = {
|
||||||
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1'
|
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1'
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#TemplateConfigPage').on('pageshow', function () {
|
$('#TemplateConfigPage').on('pageshow', function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
||||||
$('#Options').val(config.Options).change();
|
$('#Options').val(config.Options).change();
|
||||||
$('#AnInteger').val(config.AnInteger).change();
|
$('#AnInteger').val(config.AnInteger).change();
|
||||||
$('#TrueFalseSetting').checked = config.TrueFalseSetting;
|
document.getElementById('TrueFalseSetting').checked = config.TrueFalseSetting;
|
||||||
$('#AString').val(config.AString).change();
|
$('#AString').val(config.AString).change();
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#TemplateConfigForm').on('submit', function () {
|
$('#TemplateConfigForm').on('submit', function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) {
|
||||||
config.Options = $('#Options').val();
|
config.Options = $('#Options').val();
|
||||||
config.AnInteger = $('#AnInteger').val();
|
config.AnInteger = $('#AnInteger').val();
|
||||||
config.TrueFalseSetting = $('#TrueFalseSetting').checked;
|
config.TrueFalseSetting = document.getElementById('TrueFalseSetting').checked;
|
||||||
config.AString = $('#AString').val();
|
config.AString = $('#AString').val();
|
||||||
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
|
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
|
||||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user