More font awesome picto instead of img
This commit is contained in:
parent
106fb87d0a
commit
1e0a660d24
@ -261,17 +261,17 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
{
|
||||
$sublink='';
|
||||
if (! empty($head['sublink'])) $sublink.= '<a href="'.$head['sublink'].'"'.(empty($head['target'])?'':' target="'.$head['target'].'"').'>';
|
||||
if (! empty($head['subpicto'])) $sublink.= img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"');
|
||||
if (! empty($head['subpicto'])) $sublink.= img_picto($head['subtext'], $head['subpicto'], 'class="opacitymedium '.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"');
|
||||
if (! empty($head['sublink'])) $sublink.= '</a>';
|
||||
|
||||
$out.= '<td class="nocellnopadd boxclose right nowraponall">';
|
||||
$out.=$sublink;
|
||||
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
||||
$out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone cursormove"');
|
||||
$out.= img_picto($langs->trans("CloseBox",$this->box_id),'close_title','class="boxclose cursorpointer" rel="x:y" id="imgclose'.$this->box_id.'"');
|
||||
$out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="opacitymedium boxhandle hideonsmartphone cursormove"');
|
||||
$out.= img_picto($langs->trans("CloseBox",$this->box_id),'close_title','class="opacitymedium boxclose cursorpointer" rel="x:y" id="imgclose'.$this->box_id.'"');
|
||||
$label=$head['text'];
|
||||
//if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')';
|
||||
if (! empty($head['graph'])) $label.=' <span class="fa fa-bar-chart"></span>';
|
||||
if (! empty($head['graph'])) $label.=' <span class="opacitymedium fa fa-bar-chart"></span>';
|
||||
$out.= '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($label).'">';
|
||||
$out.= '</td></tr></table>';
|
||||
}
|
||||
|
||||
@ -5908,7 +5908,7 @@ class Form
|
||||
</a>
|
||||
<input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$listcheckedstring.'">
|
||||
</dt>
|
||||
<dd class="dropowndd">
|
||||
<dd class="dropdowndd">
|
||||
<div class="multiselectcheckbox'.$htmlname.'">
|
||||
<ul class="ul'.$htmlname.'">
|
||||
'.$lis.'
|
||||
@ -6032,13 +6032,13 @@ class Form
|
||||
foreach($object->linkedObjects as $objecttype => $objects)
|
||||
{
|
||||
$tplpath = $element = $subelement = $objecttype;
|
||||
|
||||
|
||||
// to display inport button on tpl
|
||||
$showImportButton=false;
|
||||
if(!empty($compatibleImportElementsList) && in_array($element,$compatibleImportElementsList)){
|
||||
$showImportButton=true;
|
||||
}
|
||||
|
||||
|
||||
if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs))
|
||||
{
|
||||
$element = $regs[1];
|
||||
@ -6098,7 +6098,7 @@ class Form
|
||||
global $noMoreLinkedObjectBlockAfter;
|
||||
$noMoreLinkedObjectBlockAfter=1;
|
||||
}
|
||||
|
||||
|
||||
$res=@include dol_buildpath($reldir.'/'.$tplname.'.tpl.php');
|
||||
if ($res)
|
||||
{
|
||||
@ -6114,13 +6114,13 @@ class Form
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
if(!empty($compatibleImportElementsList))
|
||||
{
|
||||
$res=@include dol_buildpath('core/tpl/ajax/objectlinked_lineimport.tpl.php');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
return $nbofdifferenttypes;
|
||||
|
||||
@ -3089,7 +3089,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
||||
|
||||
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (empty($srconly) && in_array($pictowithoutext, array('bank', 'delete', 'edit', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'switch_off', 'switch_on', 'unlink', 'uparrow'))) {
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
'bank', 'close_title', 'delete', 'edit', 'filter', 'grip_title', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'switch_off', 'switch_on', 'unlink', 'uparrow')
|
||||
)) {
|
||||
$fakey = $pictowithoutext;
|
||||
$facolor = '';
|
||||
$fasize = '';
|
||||
@ -3115,6 +3118,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$fakey = 'fa-bank';
|
||||
$facolor = '#444';
|
||||
}
|
||||
elseif ($pictowithoutext == 'close_title') {
|
||||
$fakey = 'fa-window-close';
|
||||
}
|
||||
elseif ($pictowithoutext == 'delete') {
|
||||
$fakey = 'fa-trash';
|
||||
$facolor = '#444';
|
||||
@ -3123,6 +3129,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$fakey = 'fa-pencil';
|
||||
$facolor = '#444';
|
||||
}
|
||||
elseif ($pictowithoutext == 'filter') {
|
||||
$fakey = 'fa-'.$pictowithoutext;
|
||||
}
|
||||
elseif ($pictowithoutext == 'grip_title') {
|
||||
$fakey = 'fa-arrows';
|
||||
}
|
||||
elseif ($pictowithoutext == 'printer') {
|
||||
$fakey = 'fa-print';
|
||||
$fasize = '1.2em';
|
||||
|
||||
@ -4841,6 +4841,9 @@ dl.dropdown {
|
||||
display:inline-block;
|
||||
padding: 0 3px 2px 0;
|
||||
}
|
||||
.dropdown span.value {
|
||||
display:none;
|
||||
}
|
||||
.dropdown dd ul {
|
||||
background-color: #FFF;
|
||||
border: 1px solid #888;
|
||||
@ -4853,13 +4856,12 @@ dl.dropdown {
|
||||
max-height: 264px;
|
||||
overflow: auto;
|
||||
}
|
||||
.dropdown span.value {
|
||||
display:none;
|
||||
}
|
||||
.dropdown dd ul li {
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
padding: 2px;
|
||||
/* color: rgb(<?php print $colortext; ?>); */
|
||||
color: #000;
|
||||
}
|
||||
.dropdown dd ul li input[type="checkbox"] {
|
||||
margin-<?php echo $right; ?>: 3px;
|
||||
|
||||
@ -4744,6 +4744,9 @@ dl.dropdown {
|
||||
display:inline-block;
|
||||
padding: 0 3px 2px 0;
|
||||
}
|
||||
.dropdown span.value {
|
||||
display:none;
|
||||
}
|
||||
.dropdown dd ul {
|
||||
background-color: #FFF;
|
||||
border: 1px solid #888;
|
||||
@ -4756,13 +4759,11 @@ dl.dropdown {
|
||||
max-height: 264px;
|
||||
overflow: auto;
|
||||
}
|
||||
.dropdown span.value {
|
||||
display:none;
|
||||
}
|
||||
.dropdown dd ul li {
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
padding: 2px;
|
||||
color: #000;
|
||||
}
|
||||
.dropdown dd ul li input[type="checkbox"] {
|
||||
margin-right: 3px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user