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'; +?> -
-
-
snake
+
+ +
line1
-
snagfdgfd gd fgf ke
+
line2
dfsdf
-
+
-
snagfdgfd gd fgf ke
+
line3
dfsdf
-
+
+
+
+
line4
+
dfsdf
+
+
@@ -133,68 +146,89 @@ $('xxxth').replaceWith( - snagfdgfd gd fgf ke + line1 dfsdf xxx - snagfdgfd gd fgf ke + line2 dfsdf xxx - snagfdgfd gd fgf ke + line3 dfsdf xxx - snagfdgfd gd fgf ke + line4 dfsdf xxx - snagfdgfd gd fgf ke + line5 dfsdf xxx - snagfdgfd gd fgf ke + line6 dfsdf xxx - snagfdgfd gd fgf ke + line7 dfsdf xxx - snagfdgfd gd fgf ke + line8 dfsdf xxx - snagfdgfd gd fgf ke + line9 dfsdf xxx - snagfdgfd gd fgf ke + line10 dfsdf xxx - snagfdgfd gd fgf ke + line11 dfsdf xxx - snagfdgfd gd fgf ke + line12 dfsdf xxx + +

+ + + +
+Example 3 : Standard table
+use_javascript_ajax) && $object->statut == 0) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +?> + + + + + +
title1title2
a1b1
a2b2
+
+ +
diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index beafd1c8d2f..4b5a40eee82 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -374,6 +374,7 @@ td.showDragHandle { } .tdlineupdown { white-space: nowrap; + min-width: 10px; } /* ============================================================================== */ diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 22d0a5292a2..6e70faf60dd 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -256,6 +256,7 @@ td.showDragHandle { } .tdlineupdown { white-space: nowrap; + min-width: 10px; } diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 8cbf8829ac8..d0f3185cee9 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -282,6 +282,7 @@ td.showDragHandle { } .tdlineupdown { white-space: nowrap; + min-width: 10px; } diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index a3311ac2566..a6631db8e6e 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -256,6 +256,7 @@ td.showDragHandle { } .tdlineupdown { white-space: nowrap; + min-width: 10px; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index aeaabc585c5..209ce753814 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -426,6 +426,7 @@ td.showDragHandle { } .tdlineupdown { white-space: nowrap; + min-width: 10px; }