Commit 26322c4f authored by Carsten  Rose's avatar Carsten Rose
Browse files

F6249-subrecord-dnd: add update of fe.ord value via AJAX

parent 41506f2e
Pipeline #762 passed with stage
in 2 minutes and 3 seconds
...@@ -1408,7 +1408,7 @@ class QuickFormQuery { ...@@ -1408,7 +1408,7 @@ class QuickFormQuery {
]; ];
$dragAndDrop = new DragAndDrop($dummyFormSpec); $dragAndDrop = new DragAndDrop($dummyFormSpec);
$dragAndDrop->process(); $json = $dragAndDrop->process();
} else { } else {
// User-defined DragAndDrop // User-defined DragAndDrop
$json = $this->doForm(FORM_DRAG_AND_DROP); $json = $this->doForm(FORM_DRAG_AND_DROP);
......
...@@ -52,6 +52,7 @@ class DragAndDrop { ...@@ -52,6 +52,7 @@ class DragAndDrop {
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
* @throws UserFormException * @throws UserFormException
* @throws UserReportException
*/ */
public function __construct(array $formSpec = array(), $phpUnit = false) { public function __construct(array $formSpec = array(), $phpUnit = false) {
......
...@@ -235,7 +235,7 @@ VALUES ...@@ -235,7 +235,7 @@ VALUES
'', '', '', 4, '', '', '', 'none', 'no', ''), '', '', '', 4, '', '', '', 'none', 'no', ''),
(1, '', 'FormElements', 'show', 'subrecord', 'all', 'native', 510, 0, 0, '', '', '', (1, '', 'FormElements', 'show', 'subrecord', 'all', 'native', 510, 0, 0, '', '', '',
'{{!SELECT IF( fe.enabled="yes", IF( fe.enabled="yes" AND fe.feIdContainer=0 AND !ISNULL(feCX.id) AND fe.class="native", "danger", IF( fe.class="container", "text-info", IF( fe.class="action", "text-success", ""))), "text-muted") AS _rowClass, IF( fe.enabled="yes", IF(fe.feIdContainer=0 AND !ISNULL(feCX.id) AND fe.class="native", "Please choose a container for this formelement", fe.class), "Disabled") AS _rowTitle, fe.id AS _id, CONCAT(fe.ord, ''<br><small class="text-muted">'',fe.id, ''</small>'') AS ''Ord|nostrip'', CONCAT( IFNULL( CONCAT( feC.name, " (", fe.feIdContainer, ")"),"")) AS Container, fe.name AS "Name|50", fe.label AS Label, fe.mode AS Mode, fe.class AS Class, fe.type AS Type, IF(fe.dynamicUpdate="yes", \'<span class="glyphicon glyphicon-random"></span>\',"") AS "Dyn|nostrip" FROM FormElement AS fe LEFT JOIN FormElement AS feC ON feC.id=fe.feIdContainer AND feC.formId=fe.formId LEFT JOIN FormElement AS feCX ON feCX.class="container" AND feCX.enabled="yes" AND feCX.formId=fe.formId WHERE fe.formId={{id:R0}} GROUP BY fe.id ORDER BY fe.ord, fe.id}}', '{{!SELECT IF( fe.enabled="yes", IF( fe.enabled="yes" AND fe.feIdContainer=0 AND !ISNULL(feCX.id) AND fe.class="native", "danger", IF( fe.class="container", "text-info", IF( fe.class="action", "text-success", ""))), "text-muted") AS _rowClass, IF( fe.enabled="yes", IF(fe.feIdContainer=0 AND !ISNULL(feCX.id) AND fe.class="native", "Please choose a container for this formelement", fe.class), "Disabled") AS _rowTitle, fe.id AS _id, CONCAT(''<span id="qfq-dnd-ord-id-'', fe.id,''">'', fe.ord, ''</span><br><small class="text-muted">'',fe.id, ''</small>'') AS ''Ord|nostrip'', CONCAT( IFNULL( CONCAT( feC.name, " (", fe.feIdContainer, ")"),"")) AS Container, fe.name AS "Name|50", fe.label AS Label, fe.mode AS Mode, fe.class AS Class, fe.type AS Type, IF(fe.dynamicUpdate="yes", \'<span class="glyphicon glyphicon-random"></span>\',"") AS "Dyn|nostrip" FROM FormElement AS fe LEFT JOIN FormElement AS feC ON feC.id=fe.feIdContainer AND feC.formId=fe.formId LEFT JOIN FormElement AS feCX ON feCX.class="container" AND feCX.enabled="yes" AND feCX.formId=fe.formId WHERE fe.formId={{id:R0}} GROUP BY fe.id ORDER BY fe.ord, fe.id}}',
'form=formElement\ndetail=id:formId', 5, 'form=formElement\ndetail=id:formId', 5,
'new,edit,delete', '', '', 'none', 'no', 'new,edit,delete', '', '', 'none', 'no',
''); '');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment