mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-20 16:31:51 +01:00
Fix collapse/expand on extrafields
This commit is contained in:
@@ -8162,7 +8162,8 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// Output value of the current field
|
// Output value of the current field
|
||||||
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') {
|
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') {
|
||||||
$extrafields_collapse_num = '';
|
$extrafields_collapse_num = $key;
|
||||||
|
/*
|
||||||
$extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key];
|
$extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key];
|
||||||
if (!empty($extrafield_param) && is_array($extrafield_param)) {
|
if (!empty($extrafield_param) && is_array($extrafield_param)) {
|
||||||
$extrafield_param_list = array_keys($extrafield_param['options']);
|
$extrafield_param_list = array_keys($extrafield_param['options']);
|
||||||
@@ -8176,6 +8177,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// if colspan=0 or 1, the second column is not extended, so the separator must be on 2 columns
|
// if colspan=0 or 1, the second column is not extended, so the separator must be on 2 columns
|
||||||
$out .= $extrafields->showSeparator($key, $this, ($colspan ? $colspan + 1 : 2), $display_type, $mode);
|
$out .= $extrafields->showSeparator($key, $this, ($colspan ? $colspan + 1 : 2), $display_type, $mode);
|
||||||
|
|||||||
@@ -53,9 +53,11 @@ trait CommonSocialNetworks
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($nbofnetworks > 1) {
|
if ($nbofnetworks > 1) {
|
||||||
print '<tr><td><br><a class="paddingtop paddingbottom socialnetworklnk" id="socialnetworklnk" href="javascript:toogleSocialNetwork(true)"></a></td>';
|
print '<tr><td><br><a class="paddingtop paddingbottom socialnetworklnk" colspan="'.$colspan.'" id="socialnetworklnk" href="#"></a>';
|
||||||
print '<td'.($colspan ? ' colspan="'.($colspan-1).'"' : '').'>';
|
//print '</td>';
|
||||||
print '<br><a class="paddingtop paddingbottom socialnetworklnk" href="javascript:toogleSocialNetwork(true)"><span class="badge badge-secondary socialnetworklnk">'.$nbactive.'</span></a>';
|
//print '<td'.($colspan ? ' colspan="'.($colspan-1).'"' : '').'>';
|
||||||
|
//print '<br>';
|
||||||
|
print ' <a class="paddingtop paddingbottom socialnetworklnk" href="#"><span class="badge badge-secondary socialnetworklnk">'.$nbactive.'</span></a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -80,7 +82,7 @@ trait CommonSocialNetworks
|
|||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
$("document").ready(function() { toogleSocialNetwork(false); });
|
$("document").ready(function() { toogleSocialNetwork(false); });
|
||||||
|
|
||||||
jQuery(".socialnetworklnk").onClick(function() {
|
jQuery(".socialnetworklnk").click(function() {
|
||||||
console.log("Click on link");
|
console.log("Click on link");
|
||||||
toogleSocialNetwork(true);
|
toogleSocialNetwork(true);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user