Clean code. Fix nojs=1
This commit is contained in:
parent
efb32c7d0b
commit
e9f9c46cd6
@ -98,7 +98,7 @@ class Conf
|
|||||||
public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
|
public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
|
||||||
public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
|
public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
|
||||||
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
|
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
|
||||||
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
|
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url. 0=default, 1=to say we use app from a webview app, 2=to say we use app from a webview app and keep ajax
|
||||||
|
|
||||||
public $liste_limit;
|
public $liste_limit;
|
||||||
|
|
||||||
|
|||||||
@ -6480,6 +6480,11 @@ class Form
|
|||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
|
if ($addjscombo < 0) {
|
||||||
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $addjscombo = 1;
|
||||||
|
else $addjscombo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Add code for jquery to use multiselect
|
// Add code for jquery to use multiselect
|
||||||
if ($addjscombo && $jsbeautify) {
|
if ($addjscombo && $jsbeautify) {
|
||||||
// Enhance with select2
|
// Enhance with select2
|
||||||
|
|||||||
@ -1010,8 +1010,6 @@ if ((!empty($conf->browser->layout) && $conf->browser->layout == 'phone')
|
|||||||
{
|
{
|
||||||
$conf->dol_optimize_smallscreen = 1;
|
$conf->dol_optimize_smallscreen = 1;
|
||||||
}
|
}
|
||||||
// If we force to use jmobile, then we reenable javascript
|
|
||||||
if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1;
|
|
||||||
// Replace themes bugged with jmobile with eldy
|
// Replace themes bugged with jmobile with eldy
|
||||||
if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea', 'cameleo', 'amarok')))
|
if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea', 'cameleo', 'amarok')))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,6 +12,7 @@ if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not check a
|
|||||||
//if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library
|
//if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library
|
||||||
if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
|
if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
|
||||||
|
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
if ($dolibarr_main_prod) {
|
if ($dolibarr_main_prod) {
|
||||||
@ -86,14 +87,14 @@ if (empty($usedolheader))
|
|||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
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. It is designed to make test with<br>
|
||||||
|
</h2>
|
||||||
|
<div class="wordbreak">
|
||||||
- css (add parameter &theme=newtheme to test another theme or edit css of current theme)<br>
|
- css (add parameter &theme=newtheme to test another theme or edit css of current theme)<br>
|
||||||
- jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=4&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=4&dol_optimize_smallscreen=1</a> and switch to small screen < 1000 to enable view with jmobile)<br>
|
|
||||||
- jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=1&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=1&dol_optimize_smallscreen=1</a> and switch to small screen < 570 to enable with emulated jmobile)<br>
|
- jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=1&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=1&dol_optimize_smallscreen=1</a> and switch to small screen < 570 to enable with emulated jmobile)<br>
|
||||||
- no javascript / usage for bind people (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?nojs=1'; ?>">nojs=1</a> to force disable javascript)<br>
|
- no javascript / usage for bind people (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?nojs=1'; ?>">nojs=1</a> to force disable javascript)<br>
|
||||||
- tablednd<br>
|
- tablednd<br>
|
||||||
</h2>
|
</div>
|
||||||
|
|
||||||
<?php ?>
|
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
@ -134,7 +135,6 @@ This page is a sample of page using tables. It is designed to make test with<br>
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php ?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -187,31 +187,30 @@ $nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$
|
|||||||
$nav .= '</form>';
|
$nav .= '</form>';
|
||||||
|
|
||||||
$limit = 10;
|
$limit = 10;
|
||||||
print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 500, '', 0, $nav, '', $limit);
|
print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 500, '', 0, $nav, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
|
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('This is a select list for a filter A').': ';
|
$moreforfilter .= $langs->trans('This is a select list for a filter A (no combo forced)').': ';
|
||||||
$cate_arbo = array('field1'=>'value1a into the select list A', 'field2'=>'value2a');
|
$cate_arbo = array('field1'=>'value1a into the select list A', 'field2'=>'value2a');
|
||||||
$moreforfilter .= $form->selectarray('search_aaa', $cate_arbo, '', 1); // List without js combo
|
$moreforfilter .= $form->selectarray('search_aaa', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 0); // List with no js combo
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('This is a select list for a filter B').': ';
|
$moreforfilter .= $langs->trans('This is a select list for a filter B (auto combo)').': ';
|
||||||
$cate_arbo = array('field1'=>'value1b into the select list B', 'field2'=>'value2b');
|
$cate_arbo = array('field1'=>'value1b into the select list B', 'field2'=>'value2b');
|
||||||
$moreforfilter .= $form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
|
$moreforfilter .= $form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', -1); // List with js combo auto
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('This is a select list for a filter C').': ';
|
$moreforfilter .= $langs->trans('This is a select list for a filter C (combo forced)').': ';
|
||||||
$cate_arbo = array('field1'=>'value1c into the select list C', 'field2'=>'value2c');
|
$cate_arbo = array('field1'=>'value1c into the select list C', 'field2'=>'value2c');
|
||||||
$moreforfilter .= $form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
|
$moreforfilter .= $form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('This is a select list for a filter D').': ';
|
$moreforfilter .= $langs->trans('This is a select list for a filter D (combo forced)').': ';
|
||||||
$cate_arbo = array('field1'=>'value1d into the select list D', 'field2'=>'value2d');
|
$cate_arbo = array('field1'=>'value1d into the select list D', 'field2'=>'value2d');
|
||||||
$moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
|
$moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
|
|
||||||
if (!empty($moreforfilter))
|
if (!empty($moreforfilter))
|
||||||
@ -248,8 +247,6 @@ if (!empty($moreforfilter))
|
|||||||
<!--
|
<!--
|
||||||
<br><hr><br>Example 1b : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables<br>
|
<br><hr><br>Example 1b : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables<br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#idtableexample2').dataTable( {
|
$('#idtableexample2').dataTable( {
|
||||||
@ -293,7 +290,6 @@ $(document).ready(function(){
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
@ -315,13 +311,13 @@ $(document).ready(function(){
|
|||||||
<div class="pair tagtr">
|
<div class="pair tagtr">
|
||||||
<div class="tagtd">line4<input type="hidden" name="cartitem" value="3"></div>
|
<div class="tagtd">line4<input type="hidden" name="cartitem" value="3"></div>
|
||||||
<div class="tagtd">dfsdf</div>
|
<div class="tagtd">dfsdf</div>
|
||||||
<div class="tagtd"><input name="count" value="4"></div>
|
<div class="tagtd"><input name="count" value="4" class="maxwidth50"></div>
|
||||||
<div class="tagtd tdlineupdown">bbbb</div>
|
<div class="tagtd tdlineupdown">bbbb</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="impair tagtr">
|
<div class="impair tagtr">
|
||||||
<div class="tagtd">line5<input type="hidden" name="cartitemb" value="3"></div>
|
<div class="tagtd">line5<input type="hidden" name="cartitemb" value="3"></div>
|
||||||
<div class="tagtd">dfsdf</div>
|
<div class="tagtd">dfsdf</div>
|
||||||
<div class="tagtd"><input name="countb" value="4"></div>
|
<div class="tagtd"><input name="countb" value="4" class="maxwidth50"></div>
|
||||||
<div class="tagtd tdlineupdown">bbbb</div>
|
<div class="tagtd tdlineupdown">bbbb</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pair tagtr">
|
<div class="pair tagtr">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user