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
|
||||
// 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'))
|
||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
|
||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiselect'))
|
||||
{
|
||||
print '<!-- JS CODE FOR multiselect -->
|
||||
<script type="text/javascript">
|
||||
@ -4190,15 +4190,16 @@ class Form
|
||||
}
|
||||
|
||||
// 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'))
|
||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
|
||||
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiple-select'))
|
||||
{
|
||||
print '<!-- JS CODE FOR multiple-select -->
|
||||
<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(\'#'.$htmlname.'\').multipleSelect();
|
||||
$(\'#'.$htmlname.'\').multipleSelect({
|
||||
filter: true
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
|
||||
@ -4,10 +4,9 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
|
||||
require '../../main.inc.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;
|
||||
}
|
||||
$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) -->
|
||||
<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" />
|
||||
<?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" 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 -->
|
||||
<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>
|
||||
<?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>
|
||||
|
||||
<body style="margin: 4px;">
|
||||
<body style="padding: 10px;">
|
||||
|
||||
<div data-role="page">
|
||||
|
||||
<?php
|
||||
@ -54,24 +58,23 @@ else
|
||||
//---------
|
||||
?>
|
||||
|
||||
|
||||
<br>
|
||||
This page is a sample of page using tables. To make test with<br>
|
||||
- css (edit page to change)<br>
|
||||
- jmobile (edit page to enable/disable)<br>
|
||||
<h1>
|
||||
This page is a sample of page using tables. It is designed to make test with<br>
|
||||
- css (edit page to change to test another css)<br>
|
||||
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)<br>
|
||||
- dataTables<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>
|
||||
|
||||
|
||||
<div class="tagtable centpercent">
|
||||
<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>
|
||||
</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>
|
||||
</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 -->
|
||||
<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 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>
|
||||
</div>
|
||||
</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 -->
|
||||
<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 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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,48 +1,31 @@
|
||||
<?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('REQUIRE_JQUERY_MULTISELECT','multiple-select');
|
||||
|
||||
require '../../main.inc.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;
|
||||
}
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<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>
|
||||
<h1>
|
||||
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>
|
||||
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
<!-- Output to test html.form.class.php -->
|
||||
<?php
|
||||
<?php
|
||||
$form=new Form($db);
|
||||
|
||||
// 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";
|
||||
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
|
||||
|
||||
?>
|
||||
print '<br><br>'."\n";
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
// Test4: a multiselect
|
||||
print "Test 4: a multiselect<br>\n";
|
||||
$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