Fix: When box is removed, it is added into combo box of available boxes.
This commit is contained in:
parent
3c5520f418
commit
cce857d6ee
@ -71,7 +71,8 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
$text = $langs->trans("BoxInvoicesPerMonth",$max);
|
$text = $langs->trans("BoxInvoicesPerMonth",$max);
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $text,
|
'text' => $text,
|
||||||
'limit'=> dol_strlen($text)
|
'limit'=> dol_strlen($text),
|
||||||
|
'graph'=> 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
|
|||||||
@ -168,7 +168,9 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
|
|||||||
// 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
|
// 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
|
||||||
print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle hideonsmartphone" style="cursor:move;"');
|
print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle hideonsmartphone" style="cursor:move;"');
|
||||||
print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"');
|
print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"');
|
||||||
print '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($head['text']).'">';
|
$label=$head['text'];
|
||||||
|
if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')';
|
||||||
|
print '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($label).'">';
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -957,7 +957,7 @@ class FormOther
|
|||||||
var boxid=self.id.substring(8);
|
var boxid=self.id.substring(8);
|
||||||
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
||||||
jQuery(\'#boxto_\'+boxid).remove();
|
jQuery(\'#boxto_\'+boxid).remove();
|
||||||
// TODO Add id, label into combo list
|
if (boxid > 0) jQuery(\'#boxcombo\').append(new Option(label, boxid));
|
||||||
updateBoxOrder(1);
|
updateBoxOrder(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user