Wrapped applicationSettings in FORM

This commit is contained in:
jdescottes
2015-02-23 00:32:34 +01:00
parent 8592cd2e53
commit 4f2f01ea36
2 changed files with 58 additions and 45 deletions

View File

@@ -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);
};
})();