Clean code

This commit is contained in:
Laurent Destailleur 2020-05-11 11:53:13 +02:00
parent 02ec282812
commit a8dcd2d09b
2 changed files with 7 additions and 21 deletions

View File

@ -690,8 +690,6 @@ class Conf
$this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on. $this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on.
} }
if (!isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0;
if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com';

View File

@ -4523,15 +4523,17 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
} }
if ($page > 0) if ($page > 0)
{ {
print '<li class="pagination"><a class="paginationprevious" href="'.$file.'?page='.($page - 1).$options.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>'; print '<li class="pagination paginationpage"><a class="paginationprevious" href="'.$file.'?page='.($page - 1).$options.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
} }
if ($betweenarrows) if ($betweenarrows)
{ {
print '<!--<div class="betweenarrows nowraponall inline-block">-->';
print $betweenarrows; print $betweenarrows;
print '<!--</div>-->';
} }
if ($nextpage > 0) if ($nextpage > 0)
{ {
print '<li class="pagination"><a class="paginationnext" href="'.$file.'?page='.($page + 1).$options.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>'; print '<li class="pagination paginationpage"><a class="paginationnext" href="'.$file.'?page='.($page + 1).$options.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
} }
if ($afterarrows) if ($afterarrows)
{ {
@ -8623,11 +8625,8 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
} }
$class = 'btnTitle'; $class = 'btnTitle';
if ($iconClass == 'fa fa-plus-circle') $class .= ' btnTitlePlus';
// hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew';
}
if (!empty($params['morecss'])) $class .= ' '.$params['morecss']; if (!empty($params['morecss'])) $class .= ' '.$params['morecss'];
$attr = array( $attr = array(
@ -8642,11 +8641,6 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
if ($status <= 0) { if ($status <= 0) {
$attr['class'] .= ' refused'; $attr['class'] .= ' refused';
// hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$attr['class'] = 'butActionNewRefused';
}
$attr['href'] = ''; $attr['href'] = '';
if ($status == -1) { // disable if ($status == -1) { // disable
@ -8698,18 +8692,12 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$tag = (empty($attr['href']) ? 'span' : 'a'); $tag = (empty($attr['href']) ? 'span' : 'a');
$button = '<'.$tag.' '.$compiledAttributes.' >'; $button = '';
$button .= '<'.$tag.' '.$compiledAttributes.' >';
$button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>'; $button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>';
$button .= '<span class="valignmiddle text-plus-circle btnTitle-label'.(empty($params['forcenohideoftext']) ? ' hideonsmartphone' : '').'">'.$label.'</span>'; $button .= '<span class="valignmiddle text-plus-circle btnTitle-label'.(empty($params['forcenohideoftext']) ? ' hideonsmartphone' : '').'">'.$label.'</span>';
$button .= '</'.$tag.'>'; $button .= '</'.$tag.'>';
// hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$button = '<'.$tag.' '.$compiledAttributes.' ><span class="text-plus-circle">'.$label.'</span>';
$button .= '<span class="'.$iconClass.' valignmiddle"></span>';
$button .= '</'.$tag.'>';
}
return $button; return $button;
} }