New: Now the box are draggable only if catch is done on the "drag picture"

This commit is contained in:
Laurent Destailleur 2008-05-18 16:11:54 +00:00
parent 2a4ad74480
commit cb47f20a71
4 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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 '</td><td class="nocellnopadd" width="14">';
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 '</td></tr></table>';
}
print '</td>';

View File

@ -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";

View File

@ -839,8 +839,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/default.css">'."\n";
// Only this css should be required
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/alert.css">'."\n";
// Scriptaculous used by PWC
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/effects.js"></script>'."\n";
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/controls.js"></script>'."\n";
// PWC
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/pwc/window.js"></script>'."\n";
}
}