Fix: Screen page tests. Page tests are now ok with 3.7.
This commit is contained in:
parent
a3ab22e27d
commit
a46a6cccaf
@ -4168,7 +4168,7 @@ class Form
|
|||||||
// Add code for jquery to use multiselect
|
// Add code for jquery to use multiselect
|
||||||
// Note: Plugin "multiselect" is no more provided by Dolibarr. You must include it and load it into your module to use it.
|
// Note: Plugin "multiselect" is no more provided by Dolibarr. You must include it and load it into your module to use it.
|
||||||
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiselect'))
|
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiselect'))
|
||||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
|
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiselect'))
|
||||||
{
|
{
|
||||||
print '<!-- JS CODE FOR multiselect -->
|
print '<!-- JS CODE FOR multiselect -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -4190,15 +4190,16 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add code for jquery to use multiple-select
|
// Add code for jquery to use multiple-select
|
||||||
// Note: Plugin "multiselect" is no more provided by Dolibarr. You must include it and load it into your module to use it.
|
|
||||||
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiple-select'))
|
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiple-select'))
|
||||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
|
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiple-select'))
|
||||||
{
|
{
|
||||||
print '<!-- JS CODE FOR multiple-select -->
|
print '<!-- JS CODE FOR multiple-select -->
|
||||||
<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
|
<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(\'#'.$htmlname.'\').multipleSelect();
|
$(\'#'.$htmlname.'\').multipleSelect({
|
||||||
|
filter: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,10 +4,9 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|||||||
|
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
if ($_SERVER['HTTP_HOST'] != 'localhost')
|
||||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
|
||||||
{
|
{
|
||||||
print "Page available onto dev environment only";
|
print "Page available only with url http://localhost/...";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$usedolheader=0; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
|
$usedolheader=0; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
|
||||||
@ -30,16 +29,21 @@ if (empty($usedolheader))
|
|||||||
<!-- Includes for JQuery (Ajax library) -->
|
<!-- Includes for JQuery (Ajax library) -->
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
||||||
|
<?php if ($_GET["dol_use_jmobile"] == 1) { ?>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />
|
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=1&dol_optimize_smallscreen=1" />
|
<?php } ?>
|
||||||
|
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php<?php echo ($_GET["dol_use_jmobile"] == 1)?'?dol_use_jmobile=1&dol_optimize_smallscreen=1':''; ?>" />
|
||||||
<!-- Includes JS for JQuery -->
|
<!-- Includes JS for JQuery -->
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>
|
<?php if ($_GET["dol_use_jmobile"] == 1) { ?>
|
||||||
|
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>--
|
||||||
|
<?php } ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="margin: 4px;">
|
<body style="padding: 10px;">
|
||||||
|
|
||||||
<div data-role="page">
|
<div data-role="page">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -54,24 +58,23 @@ else
|
|||||||
//---------
|
//---------
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<h1>
|
||||||
<br>
|
This page is a sample of page using tables. It is designed to make test with<br>
|
||||||
This page is a sample of page using tables. To make test with<br>
|
- css (edit page to change to test another css)<br>
|
||||||
- css (edit page to change)<br>
|
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)<br>
|
||||||
- jmobile (edit page to enable/disable)<br>
|
|
||||||
- dataTables<br>
|
- dataTables<br>
|
||||||
- tablednd<br>
|
- tablednd<br>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<br><hr><br>Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form<br>
|
<br><hr><br>Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form<br>
|
||||||
|
|
||||||
|
|
||||||
<div class="tagtable centpercent">
|
<div class="tagtable centpercent">
|
||||||
<div class="tagtr">
|
<div class="tagtr">
|
||||||
<div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -84,7 +87,7 @@ This page is a sample of page using tables. To make test with<br>
|
|||||||
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -97,7 +100,7 @@ This page is a sample of page using tables. To make test with<br>
|
|||||||
<td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</td>
|
</td>
|
||||||
<td class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
<td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||||
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -1,48 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
//define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||||
|
define('REQUIRE_JQUERY_MULTISELECT','multiple-select');
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_FEATURES_LEVEL))
|
if ($_SERVER['HTTP_HOST'] != 'localhost')
|
||||||
{
|
{
|
||||||
print "Page available onto dev environment only";
|
print "Page available only with url http://localhost/...";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<h1>
|
||||||
<html>
|
This page is a sample of page using html methods. It is designed to make test with<br>
|
||||||
|
- css (edit page to change to test another css)<br>
|
||||||
<head>
|
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)<br>
|
||||||
<meta name="robots" content="noindex,nofollow" />
|
|
||||||
<meta name="author" content="Dolibarr Development Team">
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/img/favicon.ico"/>
|
|
||||||
<title>Test page</title>
|
|
||||||
<!-- Includes for JQuery (Ajax library) -->
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
|
||||||
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" /> -->
|
|
||||||
<!-- <link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=1" /> -->
|
|
||||||
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=0" />
|
|
||||||
<!-- Includes JS for JQuery -->
|
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
|
||||||
<!-- <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script> -->
|
|
||||||
</head>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<body style="margin: 4px;">
|
|
||||||
<div data-role="page">
|
|
||||||
<br>
|
|
||||||
This page is a sample of page using html methods.<br>
|
|
||||||
<br>
|
<br>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<!-- Output to test html.form.class.php -->
|
<!-- Output to test html.form.class.php -->
|
||||||
<?php
|
<?php
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
// Test1: form->select_date using tzuser date
|
// Test1: form->select_date using tzuser date
|
||||||
@ -64,8 +47,14 @@ print '<br><br>'."\n";
|
|||||||
print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory)<br>\n";
|
print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory)<br>\n";
|
||||||
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
|
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
|
||||||
|
|
||||||
?>
|
print '<br><br>'."\n";
|
||||||
|
|
||||||
</div>
|
// Test4: a multiselect
|
||||||
</body>
|
print "Test 4: a multiselect<br>\n";
|
||||||
</html>
|
$array=array(1=>'Value 1',2=>'Value 2',3=>'Value 3');
|
||||||
|
$arrayselected=array(1,3);
|
||||||
|
print $form->multiselectarray('testmulti', $array, $arrayselected, '', 0, '', 0, 250);
|
||||||
|
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user