Merge pull request #7603 from hregis/develop_bug5
Fix: force jquery cal if MAIN_POPUP_CALENDAR=eldy (showDP commented)
This commit is contained in:
commit
eb995bb7ad
@ -4750,7 +4750,9 @@ class Form
|
|||||||
|
|
||||||
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
|
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
|
||||||
$usecalendar='combo';
|
$usecalendar='combo';
|
||||||
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) $usecalendar=empty($conf->global->MAIN_POPUP_CALENDAR)?'jquery':$conf->global->MAIN_POPUP_CALENDAR;
|
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
|
||||||
|
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == 'eldy')?'jquery':$conf->global->MAIN_POPUP_CALENDAR);
|
||||||
|
}
|
||||||
//if (! empty($conf->browser->phone)) $usecalendar='combo';
|
//if (! empty($conf->browser->phone)) $usecalendar='combo';
|
||||||
|
|
||||||
if ($d)
|
if ($d)
|
||||||
@ -4795,7 +4797,6 @@ class Form
|
|||||||
{
|
{
|
||||||
$retstring.="<script type='text/javascript'>";
|
$retstring.="<script type='text/javascript'>";
|
||||||
$retstring.="$(function(){ $('#".$prefix."').datepicker({
|
$retstring.="$(function(){ $('#".$prefix."').datepicker({
|
||||||
dateFormat: '".$langs->trans("FormatDateShortJQueryInput")."',
|
|
||||||
autoclose: true,
|
autoclose: true,
|
||||||
todayHighlight: true,";
|
todayHighlight: true,";
|
||||||
if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS))
|
if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS))
|
||||||
|
|||||||
@ -106,7 +106,7 @@ $langs->trans("SaturdayMin")
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
// For eldy and jQuery date picker
|
// For jQuery date picker
|
||||||
var tradMonths = <?php echo json_encode($tradMonths) ?>;
|
var tradMonths = <?php echo json_encode($tradMonths) ?>;
|
||||||
var tradMonthsShort = <?php echo json_encode($tradMonthsShort) ?>;
|
var tradMonthsShort = <?php echo json_encode($tradMonthsShort) ?>;
|
||||||
var tradDays = <?php echo json_encode($tradDays) ?>;
|
var tradDays = <?php echo json_encode($tradDays) ?>;
|
||||||
@ -140,8 +140,8 @@ jQuery(function($){
|
|||||||
dateFormat: '<?php echo $langs->trans("FormatDateShortJQuery"); ?>',
|
dateFormat: '<?php echo $langs->trans("FormatDateShortJQuery"); ?>',
|
||||||
firstDay: <?php echo (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'); ?>,
|
firstDay: <?php echo (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'); ?>,
|
||||||
isRTL: <?php echo ($langs->trans("DIRECTION")=='rtl'?'true':'false'); ?>,
|
isRTL: <?php echo ($langs->trans("DIRECTION")=='rtl'?'true':'false'); ?>,
|
||||||
showMonthAfterYear: false, // TODO add specific to country
|
showMonthAfterYear: false, /* TODO add specific to country */
|
||||||
yearSuffix: '' // TODO add specific to country
|
yearSuffix: '' /* TODO add specific to country */
|
||||||
};
|
};
|
||||||
$.datepicker.setDefaults($.datepicker.regional['<?php echo $langs->defaultlang ?>']);
|
$.datepicker.setDefaults($.datepicker.regional['<?php echo $langs->defaultlang ?>']);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1322,11 +1322,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<!-- Includes JS of Dolibarr -->'."\n";
|
print '<!-- Includes JS of Dolibarr -->'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
|
||||||
|
|
||||||
// Add datepicker default options
|
// Add datepicker default options (needed by jquery datepicker!)
|
||||||
/*if (! defined('DISABLE_DATE_PICKER'))
|
if (! defined('DISABLE_DATE_PICKER'))
|
||||||
{
|
{
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// JS forced by modules (relative url starting with /)
|
// JS forced by modules (relative url starting with /)
|
||||||
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
|
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user