Look and feel v14
This commit is contained in:
parent
a16f70ca09
commit
38f3693fc7
@ -1549,7 +1549,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
if ($picto) {
|
||||
$out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
||||
}
|
||||
$out .= '<span class="tabTitleText">'.dol_trunc($title, $limittitle).'</span>';
|
||||
$out .= '<span class="tabTitleText">'.dol_escape_htmltag(dol_trunc($title, $limittitle)).'</span>';
|
||||
$out .= '</a>';
|
||||
}
|
||||
|
||||
@ -1594,7 +1594,9 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
}
|
||||
|
||||
if ($i < $limittoshow || $isactive) {
|
||||
// Add a new entry
|
||||
$out .= '<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((!$isactive && !empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT)) ? ' hideonprint' : '').'"><!-- id tab = '.(empty($links[$i][2]) ? '' : $links[$i][2]).' -->';
|
||||
|
||||
if (isset($links[$i][2]) && $links[$i][2] == 'image') {
|
||||
if (!empty($links[$i][0])) {
|
||||
$out .= '<a class="tabimage'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||
@ -1603,16 +1605,18 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
}
|
||||
} elseif (!empty($links[$i][1])) {
|
||||
//print "x $i $active ".$links[$i][2]." z";
|
||||
if ($isactive) {
|
||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tabactive tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
||||
$out .= $links[$i][1];
|
||||
$out .= '</a>'."\n";
|
||||
} else {
|
||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tabunactive tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
||||
$out .= $links[$i][1];
|
||||
$out .= '<div class="tab tab'.($isactive?'active':'unactive').'" style="margin: 0 !important">';
|
||||
if (!empty($links[$i][0])) {
|
||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'">';
|
||||
}
|
||||
$out .= $links[$i][1];
|
||||
if (!empty($links[$i][0])) {
|
||||
$out .= '</a>'."\n";
|
||||
}
|
||||
$out .= empty($links[$i][4]) ? '' : $links[$i][4];
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
$out .= '</div>';
|
||||
} else {
|
||||
// The popup with the other tabs
|
||||
|
||||
@ -133,7 +133,9 @@ IncludeDocGeneration=I want to generate some documents from the object
|
||||
IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record.
|
||||
ShowOnCombobox=Show value into combobox
|
||||
KeyForTooltip=Key for tooltip
|
||||
CSSClass=CSS Class
|
||||
CSSClass=CSS for edit/create form
|
||||
CSSViewClass=CSS for read form
|
||||
CSSListClass=CSS for list
|
||||
NotEditable=Not editable
|
||||
ForeignKey=Foreign key
|
||||
TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example)
|
||||
|
||||
@ -746,7 +746,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray',
|
||||
* 'position' is the sort order of field.
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200'
|
||||
* 'help' is a string visible as a tooltip on field
|
||||
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||
@ -1708,10 +1708,9 @@ $head[$h][2] = 'initmodule';
|
||||
$h++;
|
||||
|
||||
$linktoenabledisable = '';
|
||||
$modulestatusinfo = '';
|
||||
|
||||
if (is_array($listofmodules) && count($listofmodules) > 0) {
|
||||
// Define $linktoenabledisable and $modulestatusinfo
|
||||
// Define $linktoenabledisable
|
||||
$modulelowercase = strtolower($module);
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper($module);
|
||||
|
||||
@ -1732,6 +1731,8 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
|
||||
$linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1);
|
||||
$linktoenabledisable .= '</a>';
|
||||
|
||||
$linktoenabledisable .= $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning');
|
||||
|
||||
$objMod = $moduleobj;
|
||||
$backtourlparam = '';
|
||||
$backtourlparam .= ($backtourlparam ? '&' : '?').'module='.$module; // No urlencode here, done later
|
||||
@ -1751,38 +1752,33 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
|
||||
} else {
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
|
||||
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
|
||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||
} else {
|
||||
// Case standard admin page (not a page provided by the
|
||||
// module but a page provided by dolibarr)
|
||||
$urltouse = DOL_URL_ROOT.'/admin/'.$urlpage;
|
||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
||||
$linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) {
|
||||
$linktoenabledisable .= ' <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
|
||||
$linktoenabledisable .= ' <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
|
||||
}
|
||||
} else {
|
||||
$linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">';
|
||||
$linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', '', false, 0, 0, '', 'classfortooltip', 1);
|
||||
$linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1);
|
||||
$linktoenabledisable .= "</a>\n";
|
||||
}
|
||||
|
||||
if (!empty($conf->$modulelowercase->enabled)) {
|
||||
$modulestatusinfo = $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning');
|
||||
}
|
||||
|
||||
// Loop to show tab of each module
|
||||
foreach ($listofmodules as $tmpmodule => $tmpmodulearray) {
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?module='.$tmpmodulearray['modulenamewithcase'].($forceddirread ? '@'.$dirread : '');
|
||||
$head[$h][1] = $tmpmodulearray['modulenamewithcase'];
|
||||
$head[$h][2] = $tmpmodulearray['modulenamewithcase'];
|
||||
|
||||
/*if ($tmpmodule == $modulelowercase) {
|
||||
$head[$h][1] .= ' '.$modulestatusinfo;
|
||||
$head[$h][1] .= ' '.$linktoenabledisable;
|
||||
}*/
|
||||
if ($tmpmodulearray['modulenamewithcase'] == $module) {
|
||||
$head[$h][4] = '<span class="inline-block">'.$linktoenabledisable.'</span>';
|
||||
}
|
||||
|
||||
$h++;
|
||||
}
|
||||
@ -1793,6 +1789,7 @@ $head[$h][1] = $langs->trans("DangerZone");
|
||||
$head[$h][2] = 'deletemodule';
|
||||
$h++;
|
||||
|
||||
|
||||
print dol_get_fiche_head($head, $module, '', -1, '', 0, $infomodulesfound, '', 8); // Modules
|
||||
|
||||
if ($module == 'initmodule') {
|
||||
@ -1830,6 +1827,11 @@ if ($module == 'initmodule') {
|
||||
$head2 = array();
|
||||
$h = 0;
|
||||
|
||||
$head2[$h][0] = '';
|
||||
$head2[$h][1] = $morehtmlleft;
|
||||
$head2[$h][2] = '';
|
||||
$h++;
|
||||
|
||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=description&module='.$module.($forceddirread ? '@'.$dirread : '');
|
||||
$head2[$h][1] = $langs->trans("Description");
|
||||
$head2[$h][2] = 'description';
|
||||
@ -1905,10 +1907,6 @@ if ($module == 'initmodule') {
|
||||
$head2[$h][2] = 'buildpackage';
|
||||
$h++;
|
||||
|
||||
// Link to enable / disable
|
||||
print '<div class="center">'.$modulestatusinfo;
|
||||
print ' '.$linktoenabledisable.'</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Note module is inside $dirread
|
||||
@ -2608,6 +2606,7 @@ if ($module == 'initmodule') {
|
||||
print '<th class="center">'.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).'</th>';
|
||||
print '<th class="center">'.$langs->trans("CSSClass").'</th>';
|
||||
print '<th class="center">'.$langs->trans("CSSViewClass").'</th>';
|
||||
print '<th class="center">'.$langs->trans("CSSListClass").'</th>';
|
||||
print '<th class="center">'.$langs->trans("KeyForTooltip").'</th>';
|
||||
print '<th class="center">'.$langs->trans("ShowOnCombobox").'</th>';
|
||||
//print '<th class="center">'.$langs->trans("Disabled").'</th>';
|
||||
@ -2639,6 +2638,7 @@ if ($module == 'initmodule') {
|
||||
print '<td class="center"><input class="text" size="2" name="propisameasure" value="'.dol_escape_htmltag(GETPOST('propisameasure', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propcss" value="'.dol_escape_htmltag(GETPOST('propcss', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propcssview" value="'.dol_escape_htmltag(GETPOST('propcssview', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propcsslist" value="'.dol_escape_htmltag(GETPOST('propcsslist', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="prophelp" value="'.dol_escape_htmltag(GETPOST('prophelp', 'alpha')).'"></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propshowoncombobox" value="'.dol_escape_htmltag(GETPOST('propshowoncombobox', 'alpha')).'"></td>';
|
||||
//print '<td class="center"><input class="text" size="2" name="propdisabled" value="'.dol_escape_htmltag(GETPOST('propdisabled', 'alpha')).'"></td>';
|
||||
@ -2679,6 +2679,7 @@ if ($module == 'initmodule') {
|
||||
$propisameasure = $propval['isameasure'];
|
||||
$propcss = $propval['css'];
|
||||
$propcssview = $propval['cssview'];
|
||||
$propcsslist = $propval['csslist'];
|
||||
$prophelp = $propval['help'];
|
||||
$propshowoncombobox = $propval['showoncombobox'];
|
||||
//$propdisabled=$propval['disabled'];
|
||||
@ -2738,6 +2739,9 @@ if ($module == 'initmodule') {
|
||||
print '<td class="center">';
|
||||
print $propcssview ? dol_escape_htmltag($propcssview) : '';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propcsslist ? dol_escape_htmltag($propcsslist) : '';
|
||||
print '</td>';
|
||||
print '<td class="tdoverflowmax200">';
|
||||
print $prophelp ? dol_escape_htmltag($prophelp) : '';
|
||||
print '</td>';
|
||||
|
||||
@ -3092,16 +3092,9 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
|
||||
/*border-right: 1px solid #ddd;
|
||||
border-left: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd; */
|
||||
border-right: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 0px !important;
|
||||
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
.tabactive, a.tab#active {
|
||||
color: var(--colortextbacktab); !important;
|
||||
background: var(--colorbacktabcard1) !important;
|
||||
@ -3111,6 +3104,12 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
border-left: 1px solid #CCC !important;
|
||||
border-top: 3px solid var(--colorbackhmenu1) !important;
|
||||
}
|
||||
.tabunactive, a.tab#unactive {
|
||||
border-right: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 0px !important;*/
|
||||
}
|
||||
a.tab:hover
|
||||
{
|
||||
/*
|
||||
|
||||
@ -3111,12 +3111,6 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
|
||||
.tabunactive { /* We add some border on tabunactive to avoid change of position of title when switching tabs (border of tabunactive = border of tabactive) */
|
||||
border-right: 1px solid rgb(<?php echo $colorbackbody; ?>);
|
||||
border-left: 1px solid rgb(<?php echo $colorbackbody; ?>);
|
||||
}
|
||||
|
||||
.tabactive, a.tab#active {
|
||||
color: #<?php echo $colortextbacktab; ?> !important;
|
||||
background: rgb(<?php echo $colorbacktabcard1; ?>) !important;
|
||||
@ -3125,6 +3119,13 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
border-left: 1px solid #AAA !important;
|
||||
border-top: 2px solid #111 !important;
|
||||
}
|
||||
.tabunactive, a.tab#unactive {
|
||||
border-right: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 0px !important;*/
|
||||
}
|
||||
|
||||
a.tab:hover
|
||||
{
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user