New: Add class for calendar picto link

This commit is contained in:
Laurent Destailleur 2011-12-29 23:50:02 +01:00
parent 963df8f59d
commit 6d6231aad9
3 changed files with 10 additions and 7 deletions

View File

@ -3236,7 +3236,7 @@ class Form
{ {
$retstring.='<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"'; $retstring.='<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
$base=DOL_URL_ROOT.'/core/'; $base=DOL_URL_ROOT.'/core/';
$retstring.=' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');">'.img_object($langs->trans("SelectDate"),'calendarday').'</button>'; $retstring.=' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');">'.img_object($langs->trans("SelectDate"),'calendarday','class="datecallink"').'</button>';
} }
$retstring.='<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n"; $retstring.='<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
@ -3401,7 +3401,7 @@ class Form
// If reset_scripts is not empty, print the button with the reset_scripts in OnClick // If reset_scripts is not empty, print the button with the reset_scripts in OnClick
if ($reset_scripts) if ($reset_scripts)
{ {
$retstring.='<button class="dpInvisibleButtons" id="'.$prefix.'ButtonNow" type="button" name="_useless" value="Now" onClick="'.$reset_scripts.'">'; $retstring.='<button class="dpInvisibleButtons datenowlink" id="'.$prefix.'ButtonNow" type="button" name="_useless" value="Now" onClick="'.$reset_scripts.'">';
$retstring.=$langs->trans("Now"); $retstring.=$langs->trans("Now");
$retstring.='</button> '; $retstring.='</button> ';
} }

View File

@ -1722,7 +1722,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo
* @param string $alt Text of alt on image * @param string $alt Text of alt on image
* @param string $picto Name of image to show object_picto (example: user, group, action, bill, contract, propal, product, ...) * @param string $picto Name of image to show object_picto (example: user, group, action, bill, contract, propal, product, ...)
* For external modules use imagename@mymodule to search into directory "img" of module. * For external modules use imagename@mymodule to search into directory "img" of module.
* @param string $options Add more attribute on img tag * @param string $options Add more attribute on img tag (ie: class="datecallink")
* @param int $pictoisfullpath If 1, image path is a full path * @param int $pictoisfullpath If 1, image path is a full path
* @return string Return img tag * @return string Return img tag
* @see #img_picto, #img_picto_common * @see #img_picto, #img_picto_common

View File

@ -1540,6 +1540,8 @@ border-radius: 6px;
/* Calendar */ /* Calendar */
/* ============================================================================== */ /* ============================================================================== */
img.datecallink { padding-left: 2px !important; padding-right: 2px !important;}
.ui-datepicker-trigger { .ui-datepicker-trigger {
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
@ -1617,6 +1619,7 @@ cursor: pointer;
} }
/* ============================================================================== */ /* ============================================================================== */
/* Afficher/cacher */ /* Afficher/cacher */
/* ============================================================================== */ /* ============================================================================== */