From cb47f20a713c53ae58f42d78440f1d5558b88026 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 May 2008 16:11:54 +0000 Subject: [PATCH] New: Now the box are draggable only if catch is done on the "drag picture" --- COPYRIGHT | 5 +++-- htdocs/includes/boxes/modules_boxes.php | 9 ++++----- htdocs/index.php | 4 +++- htdocs/main.inc.php | 2 ++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 13e77d548bf..5988e854825 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -21,8 +21,9 @@ FPDI 1.2 Apache Software License 2.0 Non GPL3 uniqmt PDF encr MagPieRss 0.72 GPL 2.0 Oui Load RSS NuSoap 0.6.5 LGPL 2.1 Oui Interfaces with third tools PHP_WriteExcel 0.3.0 LGPL 2.1 Oui Excel files generation -Scriptaculous 1.8.1 MIT License Oui Extension Ajax -Prototype 1.6.0.2 MIT License Oui Extension Ajax +Prototype 1.6.0.2 MIT License Oui Ajax library +Scriptaculous 1.8.1 MIT License Oui Ajax library +PWC 1.3 MIT License Oui Ajax library Treemenu 1.1 Perso Oui Tree in HTML pages (like categories) VCard 2.0 GPL 2.0 Oui Fonctions vcard diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index 0727bd0ba36..6dfbe1bc369 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2008 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,15 +15,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ - * - * $Id$ */ /** \file htdocs/includes/boxes/modules_boxes.php \ingroup facture \brief Fichier contenant la classe mère des boites - \version $Revision$ + \version $Id$ */ @@ -141,7 +139,8 @@ class ModeleBoxes if ($conf->use_javascript_ajax) { print ''; - print img_picto($langs->trans("MoveBox",$this->box_id),'uparrow','style="cursor:move;"'); + // 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),'uparrow','class="boxhandle" style="cursor:move;"'); print ''; } print ''; diff --git a/htdocs/index.php b/htdocs/index.php index b702ba4b76d..034d0293876 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -260,7 +260,7 @@ $var=true; // // Nbre actions à faire (en retard) -if ($conf->agenda->enabled) +if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) { include_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); $board=new ActionComm($db); @@ -658,6 +658,7 @@ if ($conf->use_javascript_ajax) print 'tag:\'div\', '."\n"; print 'containment:["left","right"], '."\n"; print 'constraint:false, '."\n"; + print "handle: 'boxhandle',"."\n"; print 'onUpdate:updateOrder'; print "});\n"; @@ -665,6 +666,7 @@ if ($conf->use_javascript_ajax) print 'tag:\'div\', '."\n"; print 'containment:["right","left"], '."\n"; print 'constraint:false, '."\n"; + print "handle: 'boxhandle',"."\n"; print 'onUpdate:updateOrder'; print "});\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7eaebe3822b..f5ec4071763 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -839,8 +839,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; // Only this css should be required print ''."\n"; + // Scriptaculous used by PWC print ''."\n"; print ''."\n"; + // PWC print ''."\n"; } }