mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
update
This commit is contained in:
parent
72f2c2e1d1
commit
9adb343cf5
|
|
@ -729,8 +729,6 @@ export class Form
|
|||
|
||||
formActionCancel (self, event, id, elementIndex)
|
||||
{
|
||||
jsOMS.preventAll(event);
|
||||
|
||||
const ele = document.getElementById(id);
|
||||
if (ele.getAttribute('data-update-form') === null && ele.tagName.toLowerCase() !== 'form') {
|
||||
this.formActionCancelInline(self, event, id, elementIndex);
|
||||
|
|
@ -974,6 +972,7 @@ export class Form
|
|||
} else if ((elementIndex = Array.from(self.forms[id].getSave()).indexOf(event.target)) !== -1) {
|
||||
this.formActionSave(self, event, id, elementIndex);
|
||||
} else if ((elementIndex = Array.from(self.forms[id].getCancel()).indexOf(event.target)) !== -1) {
|
||||
jsOMS.preventAll(event);
|
||||
// @todo currently only handling update cancel, what about add cancel?
|
||||
this.formActionCancel(self, event, id, elementIndex);
|
||||
} else if ((elementIndex = Array.from(self.forms[id].getUpdate()).indexOf(event.target)) !== -1) {
|
||||
|
|
|
|||
|
|
@ -236,11 +236,16 @@ export class FormView
|
|||
const parent = e === null ? document : e;
|
||||
|
||||
return parent.querySelectorAll(
|
||||
'button[form=' + this.id + '].cancel-form, '
|
||||
'#' + this.id + ' input[type=reset], '
|
||||
+ 'button[form=' + this.id + '][type=reset], '
|
||||
+ 'input[form=' + this.id + '][type=reset], '
|
||||
+ '#' + this.id + ' button[type=reset], '
|
||||
+ 'button[form=' + this.id + '].cancel-form, '
|
||||
+ '.cancel-form[data-form=' + this.id + '], '
|
||||
+ '#' + this.id + ' .cancel-form, '
|
||||
+ '[form="' + this.id + '"].cancel-form'
|
||||
+ (e !== null ? ', .cancel-form' : '')
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user