New: Add class for calendar picto link
This commit is contained in:
parent
963df8f59d
commit
6d6231aad9
@ -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> ';
|
||||||
}
|
}
|
||||||
@ -3547,7 +3547,7 @@ class Form
|
|||||||
$yes="1";
|
$yes="1";
|
||||||
$no="0";
|
$no="0";
|
||||||
}
|
}
|
||||||
|
|
||||||
$disabled = ($disabled ? ' disabled="disabled"' : '');
|
$disabled = ($disabled ? ' disabled="disabled"' : '');
|
||||||
|
|
||||||
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
|
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (! function_exists('json_decode'))
|
|||||||
* Function to return value of a static property when class
|
* Function to return value of a static property when class
|
||||||
* name is dynamically defined (not hard coded).
|
* name is dynamically defined (not hard coded).
|
||||||
* This is because $myclass::$myvar works from PHP 5.3.0+ only
|
* This is because $myclass::$myvar works from PHP 5.3.0+ only
|
||||||
*
|
*
|
||||||
* @param string $class Class name
|
* @param string $class Class name
|
||||||
* @param string $member Name of property
|
* @param string $member Name of property
|
||||||
* @return string Return value of static property.
|
* @return string Return value of static property.
|
||||||
@ -159,7 +159,7 @@ function getStaticMember($class, $member)
|
|||||||
if (is_object($class)) $class = get_class($class);
|
if (is_object($class)) $class = get_class($class);
|
||||||
$classObj = new ReflectionClass($class);
|
$classObj = new ReflectionClass($class);
|
||||||
$result = null;
|
$result = null;
|
||||||
|
|
||||||
foreach($classObj->getStaticProperties() as $prop => $value)
|
foreach($classObj->getStaticProperties() as $prop => $value)
|
||||||
{
|
{
|
||||||
if($prop == $member)
|
if($prop == $member)
|
||||||
@ -168,7 +168,7 @@ function getStaticMember($class, $member)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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
|
||||||
|
|||||||
@ -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 */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user