mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00

Switched everything over to use can.* functions from telescope-lib instead of using can* functions from lib/permissions.js, deleted lib/permissions.js, added some tests for permissions, and some other random cleanup like deleting unused code. Conflicts: client/views/comments/comment_form.js
38 lines
No EOL
904 B
JavaScript
38 lines
No EOL
904 B
JavaScript
AutoForm.hooks({
|
|
updateSettingsForm: {
|
|
|
|
before: {
|
|
update: function(docId, modifier, template) {
|
|
template.$('button[type=submit]').addClass('loading');
|
|
return modifier;
|
|
}
|
|
},
|
|
|
|
onSuccess: function(operation, result, template) {
|
|
template.$('button[type=submit]').removeClass('loading');
|
|
},
|
|
|
|
onError: function(operation, result, template) {
|
|
template.$('button[type=submit]').removeClass('loading');
|
|
}
|
|
|
|
},
|
|
insertSettingsForm: {
|
|
|
|
before: {
|
|
insert: function(doc, template) {
|
|
template.$('button[type=submit]').addClass('loading');
|
|
return doc;
|
|
}
|
|
},
|
|
|
|
onSuccess: function(operation, result, template) {
|
|
template.$('button[type=submit]').removeClass('loading');
|
|
},
|
|
|
|
onError: function(operation, result, template) {
|
|
template.$('button[type=submit]').removeClass('loading');
|
|
}
|
|
|
|
}
|
|
}); |