-
This page is a sample of page using tables. It is designed to make test with
-- css (edit page to change to test another css)
-- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)
+- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
+- jmobile (add parameter dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
+- no javascript / usage for bind people (add parameter nojs=1 to force disable javascript)
- dataTables
- tablednd
@@ -111,51 +114,53 @@ 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
+ Example 1 : Standard table/thead/tbody/tr/th-td (no class pair/impair on td) => Use this if you need the drag and drop for lines or for long result tables
+
use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
+include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+$productspecimen=new Product($db);
+$productspecimen->initAsSpecimen();
+
+$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';
+
+$nav='';
+$nav.='';
+
+print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav);
+
?>
-
+
- Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable => Use this for long result tables
+ Example 2 : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables
@@ -238,91 +243,129 @@ $('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 for tables that need to have a different form for each line, but AVOID IT if possible (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';
?>
-
-
title1
title2
-
a1
b1
-
a2
b2
-
-
+
+
+
Title A
+
title B
+
title C
+
title D
+
+
+
line4
+
dfsdf
+
+
bbbb
+
+
+
line5
+
dfsdf
+
+
bbbb
+
+
+
line6
+
jghjgh
+
5
+
lll
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php
index deb3e2fe0c4..c0c81882fe2 100644
--- a/htdocs/public/test/test_forms.php
+++ b/htdocs/public/test/test_forms.php
@@ -6,23 +6,21 @@ define('REQUIRE_JQUERY_MULTISELECT','select2');
require '../../main.inc.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
-if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')
-{
- print "Page available only frome remote address 127.0.0.1";
- exit;
+if ($dolibarr_main_prod) {
+ accessforbidden();
}
-
llxHeader();
?>
This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with
-- css (edit page to change to test another css)
-- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)
-
+- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
+- jmobile (add parameter dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
+- no javascript / usage for bind people (add parameter nojs=1 to force disable javascript)
+
'."\n";
print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory) \n";
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
+/*print '
'."\n";
+
+print "Test 4c: a select with ajax refresh \n";
+//$array=array(0=>'',1=>'Search into xxx',2=>'Search into yyy',3=>'Search into zzz');
+$array=array();
+$selected=-1;
+print $form->selectArrayAjax(DOL_URL_ROOT.'/core/ajax/selecsearchbox.php', 'testselectc', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1);
+*/
+
print '
'."\n";
-// Test4: a multiselect
-print "Test 4: a multiselect \n";
+// Test4: a select
+print "Test 4a: a select \n";
+$array=array(1=>'Value 1',2=>'Value 2',3=>'Value 3 ith a very long text. aze eazeae e ae aeae a e a ea ea ea e a e aea e ae aeaeaeaze.');
+$selected=3;
+print $form->selectarray('testselecta', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1);
+print '