From 2632b8e25bb7a2b2e31ebe43927974a88f7450e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Mar 2015 21:26:13 +0100 Subject: [PATCH] Update test page to prepare datatables architecture. --- htdocs/public/test/test_arrays.php | 110 +++++++++++++++-------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index ea0791dc984..7cbd9898204 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -113,47 +113,27 @@ This page is a sample of page using tables. It is designed to make test with
-


Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this for tables that are edited forms (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)

+


Example 1 : Standard table => Use this if you need the drag and drop for lines
+ use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +$sortfield='aaa'; +$sortorder='ASC'; +$tasksarray=array(1,2,3); // To force having several lines +$tagidfortablednd='tablelines3'; +if (! empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; ?> -
-
-
line3
-
dfsdf
-
ffdsfsd
-
aaaa
-
-
-
line4
-
dfsdf
-
-
bbbb
-
-
-
line5
-
dfsdf
-
-
bbbb
-
- - -
+ + +trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?> +trans('title2'),0,$_SERVER["PHP_SELF"],'bbb','','','align="right"',$sortfield,$sortorder); ?> +trans('title3'),0,$_SERVER["PHP_SELF"],'ccc','','','align="center"',$sortfield,$sortorder); ?> + + + +
a1b1c1
a2b2c2
+
@@ -312,25 +292,49 @@ $('xxxth').replaceWith(
-


Example 3 : Standard table => Use this if you need the drag and drop for lines
+


Example 3 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this, but AVOID IT if possible, for tables that need to have a different form for each line (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)

+ use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + $tasksarray=array(1,2,3); // To force having several lines + $tagidfortablednd='tablelines'; + if (! empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; ?> - - -trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?> -trans('title2'),0,$_SERVER["PHP_SELF"],'bbb','','','align="right"',$sortfield,$sortorder); ?> -trans('title3'),0,$_SERVER["PHP_SELF"],'ccc','','','align="center"',$sortfield,$sortorder); ?> - - - -
a1b1c1
a2b2c2
-
+
+
+
line3
+
dfsdf
+
ffdsfsd
+
aaaa
+
+
+
line4
+
dfsdf
+
+
bbbb
+
+
+
line5
+
dfsdf
+
+
bbbb
+
+ + +
+ +