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:
parent
8592cd2e53
commit
4f2f01ea36
@ -38,6 +38,10 @@
|
||||
var maxFpsInput = document.querySelector('.max-fps-input');
|
||||
maxFpsInput.value = pskl.UserSettings.get(pskl.UserSettings.MAX_FPS);
|
||||
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) {
|
||||
@ -72,4 +76,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
ns.ApplicationSettingsController.prototype.onFormSubmit_ = function (evt) {
|
||||
evt.preventDefault();
|
||||
$.publish(Events.CLOSE_SETTINGS_DRAWER);
|
||||
};
|
||||
|
||||
})();
|
@ -1,4 +1,5 @@
|
||||
<div class="settings-section">
|
||||
<form action="" method="POST" name="application-settings-form">
|
||||
<div class="settings-section">
|
||||
<div class="settings-title">
|
||||
General
|
||||
</div>
|
||||
@ -29,9 +30,9 @@
|
||||
<option value="4">4px</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<div class="settings-section">
|
||||
<div class="settings-title">
|
||||
Preview
|
||||
</div>
|
||||
@ -47,5 +48,8 @@
|
||||
<label for="tiled-preview">Maximum FPS </label>
|
||||
<input type="text" class="textfield textfield-small max-fps-input" name="max-fps"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="button button-primary" value="Save" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user