NEW Can use dol_fiche_end without showing bottom border.

This commit is contained in:
Laurent Destailleur 2017-03-15 11:13:30 +01:00
parent 76db6c9f18
commit 888675016d
8 changed files with 39 additions and 38 deletions

View File

@ -159,7 +159,7 @@ if ($action == 'create')
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>'; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat" name="url" size="50" value="'.$url.'"></td><td class="hideonsmartphone">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat" name="url" class="quatrevingtpercent" value="'.$url.'"></td><td class="hideonsmartphone">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</td></tr>';
print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>'; print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>';
$liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow")); $liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow"));
@ -221,6 +221,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -297,6 +299,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
print '</table>'; print '</table>';
print '</div>';
dol_fiche_end(); dol_fiche_end();
if ($action == 'edit') if ($action == 'edit')

View File

@ -2414,7 +2414,6 @@ if ($action == 'create')
print '</div>'; print '</div>';
} }
print "<br>\n";
//Select mail models is same action as presend //Select mail models is same action as presend
if (GETPOST('modelselected')) $action = 'presend'; if (GETPOST('modelselected')) $action = 'presend';

View File

@ -164,7 +164,7 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<br>'; //print '<br>';
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';

View File

@ -780,7 +780,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
* @param array $links Array of tabs. Currently initialized by calling a function xxx_admin_prepare_head * @param array $links Array of tabs. Currently initialized by calling a function xxx_admin_prepare_head
* @param string $active Active tab name (document', 'info', 'ldap', ....) * @param string $active Active tab name (document', 'info', 'ldap', ....)
* @param string $title Title * @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header. If you set this to 1, using dol_fiche_end() to close tab is not required. * @param int $notab -1 or 0=Add tab header, 1=no tab header. If you set this to 1, using dol_fiche_end() to close tab is not required.
* @param string $picto Add a picto on tab title * @param string $picto Add a picto on tab title
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto. * @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @return void * @return void
@ -796,7 +796,7 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto
* @param array $links Array of tabs * @param array $links Array of tabs
* @param string $active Active tab name * @param string $active Active tab name
* @param string $title Title * @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header. If you set this to 1, using dol_fiche_end() to close tab is not required. * @param int $notab -1 or 0=Add tab header, 1=no tab header. If you set this to 1, using dol_fiche_end() to close tab is not required.
* @param string $picto Add a picto on tab title * @param string $picto Add a picto on tab title
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto. * @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @return string * @return string
@ -926,7 +926,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
$out.="</div>\n"; $out.="</div>\n";
if (! $notab) $out.="\n".'<div class="tabBar">'."\n"; if (! $notab || $notab == -1) $out.="\n".'<div class="tabBar'.($notab == -1 ? '' : ' tabBarWithBottom').'">'."\n";
$parameters=array('tabname' => $active, 'out' => $out); $parameters=array('tabname' => $active, 'out' => $out);
$reshook=$hookmanager->executeHooks('printTabsHead',$parameters); // This hook usage is called just before output the head of tabs. Take also a look at "completeTabsHead" $reshook=$hookmanager->executeHooks('printTabsHead',$parameters); // This hook usage is called just before output the head of tabs. Take also a look at "completeTabsHead"
@ -941,7 +941,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
/** /**
* Show tab footer of a card * Show tab footer of a card
* *
* @param int $notab 0=Add tab footer, 1=no tab footer * @param int $notab -1 or 0=Add tab footer, 1=no tab footer
* @return void * @return void
*/ */
function dol_fiche_end($notab=0) function dol_fiche_end($notab=0)
@ -952,12 +952,12 @@ function dol_fiche_end($notab=0)
/** /**
* Return tab footer of a card * Return tab footer of a card
* *
* @param int $notab 0=Add tab footer, 1=no tab footer * @param int $notab -1 or 0=Add tab footer, 1=no tab footer
* @return string * @return string
*/ */
function dol_get_fiche_end($notab=0) function dol_get_fiche_end($notab=0)
{ {
if (! $notab) return "\n</div>\n"; if (! $notab || $notab == -1) return "\n</div>\n";
else return ''; else return '';
} }

View File

@ -1773,7 +1773,6 @@ if ($action == 'create')
print '</div>'; print '</div>';
} }
print "<br>\n";
if ($action != 'presend') if ($action != 'presend')
{ {

View File

@ -1878,20 +1878,21 @@ div.tabBar {
color: #<?php echo $colortextbacktab; ?>; color: #<?php echo $colortextbacktab; ?>;
padding-top: 16px; padding-top: 16px;
padding-left: 0px; padding-right: 0px; padding-left: 0px; padding-right: 0px;
padding-bottom: 14px; padding-bottom: 2px;
margin: 0px 0px 14px 0px; margin: 0px 0px 16px 0px;
border-top: 1px solid #BBB; border-top: 1px solid #BBB;
border-bottom: 1px solid #AAA; /* border-bottom: 1px solid #AAA; */
width: auto; width: auto;
background: rgb(<?php echo $colorbacktabcard1; ?>); background: rgb(<?php echo $colorbacktabcard1; ?>);
/*<?php if (empty($dol_optimize_smallscreen)) { ?>
-moz-box-shadow: 3px 3px 4px #DDD;
-webkit-box-shadow: 3px 3px 4px #DDD;
box-shadow: 3px 3px 4px #DDD;
<?php } ?>*/
} }
div.tabBarWithBottom {
padding-bottom: 18px;
border-bottom: 1px solid #aaa;
}
div.tabBar table.tableforservicepart2:last-child {
border-bottom: 1px solid #aaa;
}
div.popuptabset { div.popuptabset {
padding: 6px; padding: 6px;
background: #fff; background: #fff;
@ -1904,7 +1905,7 @@ div.popuptab {
padding-right: 5px; padding-right: 5px;
} }
div.tabsAction { div.tabsAction {
margin: 20px 0em 10px 0em; margin: 20px 0em 25px 0em;
padding: 0em 0em; padding: 0em 0em;
text-align: right; text-align: right;
} }

View File

@ -1883,30 +1883,28 @@ div.tabBar {
padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px; padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px; padding-left: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px; padding-right: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px; padding-bottom: <?php echo ($dol_optimize_smallscreen?'2':'2'); ?>px;
margin: 0px 0px 14px 0px; margin: 0px 0px 16px 0px;
-moz-border-radius:3px; -moz-border-radius:3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
border-right: 1px solid #BBB; border-right: 1px solid #BBB;
border-bottom: 1px solid #BBB; /* border-bottom: 1px solid #BBB; */
border-left: 1px solid #BBB; border-left: 1px solid #BBB;
border-top: 1px solid #CCC; border-top: 1px solid #CCC;
width: auto; width: auto;
background: rgb(<?php echo $colorbacktabcard1; ?>); background: rgb(<?php echo $colorbacktabcard1; ?>);
}
/* div.tabBarWithBottom {
<?php if (empty($dol_optimize_smallscreen)) { ?> padding-bottom: 18px;
-moz-box-shadow: 3px 3px 4px #f4f4f4; border-bottom: 1px solid #aaa;
-webkit-box-shadow: 3px 3px 4px #f4f4f4; }
box-shadow: 3px 3px 4px #f4f4f4; div.tabBar table.tableforservicepart2:last-child {
<?php } ?> border-bottom: 1px solid #aaa;
*/
} }
div.tabsAction { div.tabsAction {
margin: 20px 0em 10px 0em; margin: 20px 0em 25px 0em;
padding: 0em 0em; padding: 0em 0em;
text-align: right; text-align: right;
} }