Fix: css problem

New: add change year and month in jQuery datepicker
This commit is contained in:
Regis Houssin 2011-10-31 18:38:17 +01:00
parent d9eb4cbeb9
commit 9f4ab4c1b1
5 changed files with 24 additions and 29 deletions

View File

@ -117,6 +117,9 @@ var tradDaysMin = <?php echo json_encode($tradDaysMin) ?>;
// For JQuery date picker
$(document).ready(function() {
$.datepicker.setDefaults({
autoSize: true,
changeMonth: true,
changeYear: true,
altField: '#timeStamp',
altFormat: '@' // Gives a timestamp dateformat
});
@ -124,15 +127,15 @@ $(document).ready(function() {
jQuery(function($){
$.datepicker.regional['<?php echo $langs->defaultlang ?>'] = {
closeText: '<?php echo $langs->trans("Close") ?>',
closeText: '<?php echo $langs->trans("Close2") ?>',
prevText: '<?php echo $langs->trans("Previous") ?>',
nextText: '<?php echo $langs->trans("Next") ?>',
currentText: '<?php echo $langs->trans("Now") ?>',
monthNames: tradMonths,
monthNamesShort: tradMonthsShort,
dayNames: tradDays,
dayNamesShort: tradDaysMin,
dayNamesMin: tradDaysShort,
dayNamesShort: tradDaysShort,
dayNamesMin: tradDaysMin,
weekHeader: '<?php echo $langs->trans("Week"); ?>',
dateFormat: '<?php echo $langs->trans("FormatDateShortJQuery"); ?>',
firstDay: <?php echo (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'); ?>,

View File

@ -1462,16 +1462,9 @@ opacity: 1;
/* Calendar */
/* ============================================================================== */
.ui-datepicker-title {
margin: 0 !important;
line-height: 28px;
}
.ui-datepicker-month {
margin: 0 !important;
padding: 0 !important;
}
.ui-datepicker-header {
height: 28px !important;
.ui-datepicker-trigger {
vertical-align: middle;
cursor: pointer;
}
.bodyline {
@ -1632,7 +1625,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */
/* ============================================================================== */
.edit_textarea:hover, .edit_text:hover, .edit_numeric:hover {
.edit_textarea:hover, .edit_ckeditor:hover, .edit_text:hover, .edit_numeric:hover, .edit_select:hover {
background: white url(<?php echo dol_buildpath($path.'/theme/auguria/img/edit.png',1) ?>) right center no-repeat;
cursor: pointer;
}

View File

@ -1680,6 +1680,12 @@ opacity: 1;
/* ============================================================================== */
/* Calendar */
/* ============================================================================== */
.ui-datepicker-trigger {
vertical-align: middle;
cursor: pointer;
}
.bodyline {
-moz-border-radius:8px;
border: 1px #E4ECEC outset;
@ -1838,7 +1844,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */
/* ============================================================================== */
.edit_textarea:hover, .edit_text:hover, .edit_numeric:hover {
.edit_textarea:hover, .edit_ckeditor:hover, .edit_text:hover, .edit_numeric:hover, .edit_select:hover {
background: white url(<?php echo dol_buildpath($path.'/theme/bureau2crea/img/edit.png',1) ?>) right center no-repeat;
cursor: pointer;
}

View File

@ -1574,6 +1574,12 @@ border-radius:6px;
/* ============================================================================== */
/* Calendar */
/* ============================================================================== */
.ui-datepicker-trigger {
vertical-align: middle;
cursor: pointer;
}
.bodyline {
padding: 0px;
margin-bottom: 5px;
@ -1782,7 +1788,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */
/* ============================================================================== */
.edit_textarea:hover, .edit_text:hover, .edit_numeric:hover {
.edit_textarea:hover, .edit_ckeditor:hover, .edit_text:hover, .edit_numeric:hover, .edit_select:hover {
background: white url(<?php echo dol_buildpath($path.'/theme/cameleo/img/edit.png',1) ?>) right center no-repeat;
cursor: pointer;
}

View File

@ -1495,19 +1495,6 @@ border-radius: 6px;
/* Calendar */
/* ============================================================================== */
.ui-datepicker-title {
margin: 0 !important;
line-height: 28px;
z-index: 3000;
}
.ui-datepicker-month {
margin: 0 !important;
padding: 0 !important;
}
.ui-datepicker-header {
height: 28px !important;
}
.ui-datepicker-trigger {
vertical-align: middle;
cursor: pointer;