fix indentation and move load and submit out of plugin object
This commit is contained in:
parent
de5fa4b8ea
commit
b4e85a0196
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>ExamplePlugin Configuration</title>
|
||||
<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">
|
||||
@ -42,8 +42,10 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var ExamplePluginConfigurationPage = {
|
||||
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1',
|
||||
loadConfiguration: function() {
|
||||
pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1'
|
||||
};
|
||||
|
||||
$('#ExamplePluginConfigurationPage').on('pageshow', function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
$('#Options').val(config.Options).change();
|
||||
@ -52,8 +54,9 @@
|
||||
$('#AString').val(config.AString).change();
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
},
|
||||
saveConfiguration: function() {
|
||||
});
|
||||
|
||||
$('#ExamplePluginConfigurationForm').on('submit', function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
ApiClient.getPluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId).then(function (config) {
|
||||
config.Options = $('#Options').val();
|
||||
@ -64,15 +67,6 @@
|
||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$('#ExamplePluginConfigurationPage').on('pageshow', function () {
|
||||
ExamplePluginConfigurationPage.loadConfiguration();
|
||||
});
|
||||
|
||||
$('#ExamplePluginConfigurationForm').on('submit', function () {
|
||||
ExamplePluginConfigurationPage.saveConfiguration();
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user