Add double click to submit, addtional form buttons
Rename form template variable 'form_class' to 'form_css_classes' Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -156,6 +156,7 @@ class MayanApp {
|
||||
|
||||
this.setupAJAXSpinner();
|
||||
this.setupAutoSubmit();
|
||||
this.setupFormHotkeys();
|
||||
this.setupFullHeightResizing();
|
||||
this.setupItemsSelector();
|
||||
this.setupNavbarCollapse();
|
||||
@@ -195,6 +196,21 @@ class MayanApp {
|
||||
});
|
||||
}
|
||||
|
||||
setupFormHotkeys () {
|
||||
$('body').on('keypress', '.form-hotkey-enter', function (e) {
|
||||
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
|
||||
$(this).find('.btn-hotkey-default').click();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$('body').on('dblclick', '.form-hotkey-double-click', function (e) {
|
||||
$(this).find('.btn-hotkey-default').click();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
setupFullHeightResizing () {
|
||||
var self = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user