parent
45eaf0e987
commit
5c53f9a3ba
|
@ -467,7 +467,10 @@ class ExtensibleSetElement extends BaseElement
|
||||||
{
|
{
|
||||||
return $this->createRelatedAction(
|
return $this->createRelatedAction(
|
||||||
'add',
|
'add',
|
||||||
$this->name,
|
// This would interfere with how PHP resolves _POST arrays. So we
|
||||||
|
// use a fake name for now, that way the button will be ignored and
|
||||||
|
// behave similar to an auto-submission
|
||||||
|
'X_' . $this->name,
|
||||||
$this->translate('Add a new entry'),
|
$this->translate('Add a new entry'),
|
||||||
'plus'
|
'plus'
|
||||||
);
|
);
|
||||||
|
|
|
@ -505,16 +505,18 @@
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
} else if (el.name.match(/__MOVE_REMOVE$/)) {
|
} else if (el.name.match(/__REMOVE$/)) {
|
||||||
// TODO: skipping for now, wasn't able to prevent web2 form
|
$li = $(el).closest('li');
|
||||||
// submission once removed
|
if ($li.find('.autosubmit').length) {
|
||||||
/*
|
// Autosubmit element, let the server handle this
|
||||||
var $li = $(el).closest('li').remove();
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$li.remove();
|
||||||
this.fixRelatedActions($li.closest('ul'));
|
this.fixRelatedActions($li.closest('ul'));
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
*/
|
|
||||||
} else if (el.name.match(/__DROP_DOWN$/)) {
|
} else if (el.name.match(/__DROP_DOWN$/)) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
|
Loading…
Reference in New Issue