|
@@ -1042,8 +1042,8 @@ class FormOther
|
|
|
|
|
|
// To update list of activated boxes
|
|
|
function updateBoxOrder(closing) {
|
|
|
- var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
|
|
- var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
|
|
+ var left_list = cleanSerialize(jQuery("#boxhalfleft").sortable("serialize"));
|
|
|
+ var right_list = cleanSerialize(jQuery("#boxhalfright").sortable("serialize"));
|
|
|
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
|
|
if (boxorder==\'A:A-B:B\' && closing == 1) // There is no more boxes on screen, and we are after a delete of a box so we must hide title
|
|
|
{
|
|
@@ -1067,8 +1067,8 @@ class FormOther
|
|
|
jQuery("#boxcombo").change(function() {
|
|
|
var boxid=jQuery("#boxcombo").val();
|
|
|
if (boxid > 0) {
|
|
|
- var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
|
|
- var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
|
|
+ var left_list = cleanSerialize(jQuery("#boxhalfleft").sortable("serialize"));
|
|
|
+ var right_list = cleanSerialize(jQuery("#boxhalfright").sortable("serialize"));
|
|
|
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
|
|
jQuery.ajax({
|
|
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
|
@@ -1080,13 +1080,12 @@ class FormOther
|
|
|
if (! count($arrayboxtoactivatelabel)) $selectboxlist.='jQuery("#boxcombo").hide();';
|
|
|
$selectboxlist.='
|
|
|
|
|
|
- jQuery("#left, #right").sortable({
|
|
|
- /* placeholder: \'ui-state-highlight\', */
|
|
|
+ jQuery("#boxhalfleft, #boxhalfright").sortable({
|
|
|
handle: \'.boxhandle\',
|
|
|
revert: \'invalid\',
|
|
|
- items: \'.box\',
|
|
|
- containment: \'.fiche\',
|
|
|
- connectWith: \'.connectedSortable\',
|
|
|
+ items: \'.boxdraggable\',
|
|
|
+ containment: \'document\',
|
|
|
+ connectWith: \'#boxhalfleft, #boxhalfright\',
|
|
|
stop: function(event, ui) {
|
|
|
updateBoxOrder(1); /* 1 to avoid message after a move */
|
|
|
}
|
|
@@ -1118,7 +1117,6 @@ class FormOther
|
|
|
$emptybox=new ModeleBoxes($db);
|
|
|
|
|
|
$boxlista.="\n<!-- Box left container -->\n";
|
|
|
- $boxlista.='<div id="left" class="connectedSortable">'."\n";
|
|
|
|
|
|
// Define $box_max_lines
|
|
|
$box_max_lines=5;
|
|
@@ -1147,11 +1145,9 @@ class FormOther
|
|
|
$emptybox->info_box_contents=array();
|
|
|
$boxlista.= $emptybox->outputBox(array(),array());
|
|
|
}
|
|
|
- $boxlista.= "</div>\n";
|
|
|
$boxlista.= "<!-- End box left container -->\n";
|
|
|
|
|
|
$boxlistb.= "\n<!-- Box right container -->\n";
|
|
|
- $boxlistb.= '<div id="right" class="connectedSortable">'."\n";
|
|
|
|
|
|
$ii=0;
|
|
|
foreach ($boxactivated as $key => $box)
|
|
@@ -1176,7 +1172,7 @@ class FormOther
|
|
|
$emptybox->info_box_contents=array();
|
|
|
$boxlistb.= $emptybox->outputBox(array(),array());
|
|
|
}
|
|
|
- $boxlistb.= "</div>\n";
|
|
|
+
|
|
|
$boxlistb.= "<!-- End box right container -->\n";
|
|
|
|
|
|
}
|