diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php
index 398ca6e008f..aa96b46a859 100644
--- a/htdocs/core/tpl/ajaxrow.tpl.php
+++ b/htdocs/core/tpl/ajaxrow.tpl.php
@@ -16,6 +16,8 @@
* along with this program. If not, see .
*
* Javascript code to activate drag and drop on lines
+ * You can use this if you want to be abale to drag and drop rows of a table.
+ * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0
*/
?>
@@ -26,6 +28,7 @@ $fk_element=$object->fk_element;
$table_element_line=$object->table_element_line;
$nboflines=(isset($object->lines)?count($object->lines):(isset($tasksarray)?count($tasksarray):0));
$forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1;
+$tagidfortablednd=(empty($tagidfortablednd)?'tablelines':$tagidfortablednd);
if (GETPOST('action') != 'editline' && $nboflines > 1) { ?>
+
@@ -37,32 +39,43 @@ if (empty($conf->global->MAIN_FEATURES_LEVEL))
This page is a sample of page using tables. To make test with
- css (edit page to change)
- jmobile (edit page to enable/disable)
-- dataTables.
+- dataTables
+- tablednd
-
Example 1 : Table using tags: div.tagtable+form+div or div.tagtable+div.tagtr+div.tagtd
+use_javascript_ajax) && $object->statut == 0) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
+?>
-