Vulcan/packages/telescope-settings/lib/client/templates/settings_form.js

30 lines
702 B
JavaScript
Raw Normal View History

2015-03-28 18:30:26 +09:00
AutoForm.addHooks(['updateSettingsForm', 'insertSettingsForm'], {
onSuccess: function(operation, result) {
this.template.$('button[type=submit]').removeClass('loading');
},
onError: function(operation, result, template) {
this.template.$('button[type=submit]').removeClass('loading');
}
});
2014-12-27 18:34:01 +09:00
AutoForm.hooks({
updateSettingsForm: {
before: {
2015-03-11 08:34:44 +09:00
update: function(modifier) {
this.template.$('button[type=submit]').addClass('loading');
2014-12-27 18:34:01 +09:00
return modifier;
}
}
},
2014-12-27 18:34:01 +09:00
insertSettingsForm: {
before: {
2015-03-11 08:34:44 +09:00
insert: function(doc) {
this.template.$('button[type=submit]').addClass('loading');
2014-12-27 18:34:01 +09:00
return doc;
}
}
}
2015-03-28 18:30:26 +09:00
});