mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Wrapped applicationSettings in FORM
This commit is contained in:
@@ -38,6 +38,10 @@
|
|||||||
var maxFpsInput = document.querySelector('.max-fps-input');
|
var maxFpsInput = document.querySelector('.max-fps-input');
|
||||||
maxFpsInput.value = pskl.UserSettings.get(pskl.UserSettings.MAX_FPS);
|
maxFpsInput.value = pskl.UserSettings.get(pskl.UserSettings.MAX_FPS);
|
||||||
this.addEventListener(maxFpsInput, 'change', this.onMaxFpsChange_);
|
this.addEventListener(maxFpsInput, 'change', this.onMaxFpsChange_);
|
||||||
|
|
||||||
|
// Form
|
||||||
|
this.applicationSettingsForm = document.querySelector('[name="application-settings-form"]');
|
||||||
|
this.addEventListener(this.applicationSettingsForm, 'submit', this.onFormSubmit_);
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.ApplicationSettingsController.prototype.onGridWidthChange_ = function (evt) {
|
ns.ApplicationSettingsController.prototype.onGridWidthChange_ = function (evt) {
|
||||||
@@ -72,4 +76,9 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.ApplicationSettingsController.prototype.onFormSubmit_ = function (evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
$.publish(Events.CLOSE_SETTINGS_DRAWER);
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<form action="" method="POST" name="application-settings-form">
|
||||||
<div class="settings-section">
|
<div class="settings-section">
|
||||||
<div class="settings-title">
|
<div class="settings-title">
|
||||||
General
|
General
|
||||||
@@ -47,5 +48,8 @@
|
|||||||
<label for="tiled-preview">Maximum FPS </label>
|
<label for="tiled-preview">Maximum FPS </label>
|
||||||
<input type="text" class="textfield textfield-small max-fps-input" name="max-fps"/>
|
<input type="text" class="textfield textfield-small max-fps-input" name="max-fps"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<input type="submit" class="button button-primary" value="Save" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user