cvsimport

This commit is contained in:
Laurent Destailleur 2011-07-02 17:33:24 +00:00
commit 0c112052b3
89 changed files with 2774 additions and 982 deletions

View File

@ -22,14 +22,15 @@ FPDF_TPL 1.1.5 Apache Software License 2.0 No GPL3 only PDF temp
FPDI 1.3.4 Apache Software License 2.0 No GPL3 only PDF templates management
FPDI_Protection 1.0.3 Apache Software License 2.0 No GPL3 only PDF encryption (8 files)
GeoIP x.x Yes GeoIP Maxmind conversion
JCrop 0.9.8 MIT Licence Yes JS library (to crop images)
jQuery 1.6.1 GPL and MIT Licence Yes JS library
jQuery UI 1.8.14 GPL and MIT Licence Yes JS library plugin UI
jQuery JCrop 0.9.8 MIT Licence Yes JS library plugin Crop (to crop images)
jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.12)
jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows)
jQuery jNotify 1.1.00 Apache Software License 2.0 No GPL3 only JS library plugin jNotify (to use ajax popups)
jQuery Mobile 1.0b1 GPL and MIT Licence Yes JS library for smartphone (not used)
JSGantt 1.2 BSD Licence Yes JS library (ot build Gantt reports)
jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips
JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports)
MagPieRss 0.72 GPL 2.0 Yes Load RSS
NuSoap 0.9.5 LGPL 2.1 Yes Interfaces with third tools
OdtPHP 1.0.1 GPL 2.0 Yes Library to build/edit ODT files

View File

@ -1,31 +1,31 @@
--------------------------------------------------------------
English Dolibarr ChangeLog
$Id: ChangeLog,v 1.420 2011/06/29 22:42:42 eldy Exp $
$Id: ChangeLog,v 1.421 2011/07/02 11:28:03 eldy Exp $
--------------------------------------------------------------
***** ChangeLog for 3.1 compared to 3.0 *****
For users:
- New: War against number of clicks:
- When adding a free bank transaction, form to add next one is still
visible (save one click).
- task #10969 : Add checkbox to close automatically invoice if
payment is complete (save 3 clicks).
- Reduce a step into supplier order workflow to save time. If user
has permission to approve, order is approved when order is validated.
(Save 2 clicks).
- In commercial main menu, left menu are already opened. This save one click
to open a proposal or order.
- Can add a discount for third party, during invoice edition (and we
saved clicks again).
- When creating a contract, sales representative are preset to user. This save
4 clicks.
- Can edit several fields in bank transaction line page into one update.
- Creation of contacts from third party page go back to third party.
- Preselect model if there is only one. This save 2 clicks.
- When adding a free bank transaction, form to add next one is still
visible (save one click).
- task #10969 : Add checkbox to close automatically invoice if
payment is complete (save 3 clicks).
- Reduce a step into supplier order workflow to save time. If user
has permission to approve, order is approved when order is validated.
(Save 2 clicks).
- In commercial main menu, left menu are already opened. This save one click
to open a proposal or order.
- Can add a discount for third party, during invoice edition (and we
saved clicks again).
- When creating a contract, sales representative are preset to user. This save
4 clicks.
- Can edit several fields in bank transaction line page into one update.
- Creation of contacts from third party page go back to third party.
- Preselect model if there is only one. This save 2 clicks.
- Can remove a project if project has tasks. No need to delete task one by one.
- New: Enhance donation module. Add a status "canceled".
- New: Add filters on statistics page reports.
- New: Usage of Jquery Notify to show result or error messages on action.
- New: If a service contains subproducts, subrpoducts are decrease when service
- New: Add filters on all statistics report pages.
- New: If a service contains subproducts, subpoducts are decrease when service
is decrease.
- New: Add status for third parties to disable a third party.
- New: Can send interventions cards by email.
@ -34,14 +34,14 @@ For users:
letters for names and firstname.
- New: Can filter of payment type in bank transaction list.
- New: Status of users is visible into user list.
- New: Support BSB code for bank account in australia.
- New: Support BSB code for bank account in Australia.
- New: Can set date of payment for autocreate invoice/payment when
creating a foundation subscription.
- New: Can edit note of payment.
- New: Login is not mandatory in member module.
- New: Option to make login not mandatory in member module.
- New: Add box for last members for foundation module.
- New: A specialized menu can now be used when using smartphones.
- New: Can add information on current user on odt generation
- New: Can add information on current user on ODT generation.
- New: Prefix on third party is not used by default. Hidden option
SOCIETE_USEPREFIX can restore old feature.
- New: Standing orders module use bank account from banks module.
@ -57,21 +57,23 @@ For users:
- New: Add subscriptions/country/region/town statistics for member module.
- New: Can define a proxy for external web access.
- New: task #11003: checkbox on checks for deposit.
- New: Add status into export. Add default language into export.
- New: Can remove a project if project has tasks.
- New: Add status into export. Add third party default language into export.
- New: Can filter on date and bank account when building check receipts.
- New: Paypal module can show paypal list of transaction and convert one
into an order.
- New: task #10958 : Add link to cheque receipts into bank transaction
line if exists
- New: Can import external ical url into dolibarr agenda view.
- New: Minor look enhancements into agenda view.
- New: Can add a logo on third parties card.
- New: task #11194 : Can delete uploaded photos
- New: task #9744 : Add the barcode to select products on Point of Sale module
- New: Subscription/Unsubscription to mailman mailing-list can be done on
validate/resiliate in foundation module.
- New: Can use extrafields on third parties.
- New: Add chart to report counts by status on element home area pages.
- New: Look: Usage of Jquery Notify to show result or error messages on action.
- New: Look: Minor enhancements into agenda view.
- New: Look: Nicer tooltips with transparency and shadow.
- Fix: Better Postgresql compatibility.
- Fix: Numbering module for invoices use same number for invoice
and credit note if mask is same.
@ -79,19 +81,19 @@ For users:
For developers:
- New: External modules can add tabs on agenda views.
- New: External modules can also remove default tabs.
- New: External modules can force skin directory so force their own skins.
- New: External modules can add their own menu manager.
- New: External modules can remove tabs.
- New: External modules can force menu manager.
- New: External modules can overwrite all default language files by
forcing priority on langs directories on its own lang directory.
- New: External modules can show export list with an "enabled" condition.
- New: Support a backtopage parameter on contact creation page
- New: Add id on div to show logo
- New: Install wizard can activate a module during install.
- New: Support a backtopage parameter on contact creation page.
- New: Add id on div to show logo.
- New: Install wizard can activate a module at end of install.
- New: Dictionnary setup works with very large external dictionnaries (Add
page navigation).
- New: Add function to draw graphics with javascript (using Jquery Flot).
- New: Add api to draw graphics with javascript (using Jquery Flot).
- New: Can add user login into menu urls added by modules.
For translators:

View File

@ -20,7 +20,7 @@
/**
* \file htdocs/admin/mails.php
* \brief Page to setup emails sending
* \version $Id$
* \version $Id: mails.php,v 1.70 2011/07/02 16:48:31 eldy Exp $
*/
require("../main.inc.php");
@ -218,7 +218,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'sendhtml')
if ($result)
{
$message='<div class="ok">'.$langs->trans("MailSuccessfulySent",$email_from,$sendto).'</div>';
$message='<div class="ok">'.$langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2)).'</div>';
}
else
{
@ -746,5 +746,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:31 $ - $Revision: 1.70 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/comm/mailing/fiche.php
* \ingroup mailing
* \brief Fiche mailing, onglet general
* \version $Id$
* \version $Id: fiche.php,v 1.121 2011/07/02 16:48:32 eldy Exp $
*/
require("../../main.inc.php");
@ -351,7 +351,7 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"]))
$result=$mailfile->sendfile();
if ($result)
{
$message='<div class="ok">'.$langs->trans("MailSuccessfulySent",$mil->email_from,$mil->sendto).'</div>';
$message='<div class="ok">'.$langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($mil->email_from,2),$mailfile->getValidAddress($mil->sendto,2)).'</div>';
}
else
{
@ -1073,5 +1073,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.121 $');
?>

View File

@ -27,7 +27,7 @@
* \file htdocs/comm/propal.php
* \ingroup propale
* \brief Page of commercial proposals card and list
* \version $Id: propal.php,v 1.606 2011/06/30 13:27:21 hregis Exp $
* \version $Id: propal.php,v 1.607 2011/07/02 16:48:32 eldy Exp $
*/
require("../main.inc.php");
@ -536,7 +536,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile']
$result=$mailfile->sendfile();
if ($result)
{
$mesg=$langs->trans('MailSuccessfulySent',$from,$sendto); // Must not contain "
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "
$error=0;
@ -1021,7 +1021,7 @@ if ($id > 0 || ! empty($ref))
/*
* Show object in view mode
*/
dol_htmloutput_mesg($mesg,$mesgs);
$object->fetch($id,$ref);
@ -1975,6 +1975,6 @@ else
}
$db->close();
llxFooter('$Date: 2011/06/30 13:27:21 $ - $Revision: 1.606 $');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.607 $');
?>

View File

@ -26,7 +26,7 @@
* \file htdocs/commande/fiche.php
* \ingroup commande
* \brief Page to show customer order
* \version $Id: fiche.php,v 1.521 2011/06/30 13:27:21 hregis Exp $
* \version $Id: fiche.php,v 1.523 2011/07/02 16:48:32 eldy Exp $
*/
require("../main.inc.php");
@ -90,7 +90,7 @@ if (! empty($object->hooks))
$reshook+=$module->doActions($object);
if (! empty($module->error) || (! empty($module->errors) && sizeof($module->errors) > 0))
{
$mesg=$module->error; $mesgs[]=$module->errors;
$mesg=$module->error; $mesgs=$module->errors;
if ($action=='add') $action='create';
if ($action=='update') $action='edit';
}
@ -1054,7 +1054,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
$result=$mailfile->sendfile();
if ($result)
{
$mesg=$langs->trans('MailSuccessfulySent',$from,$sendto); // Must not contains "
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contains "
$error=0;
@ -2134,5 +2134,5 @@ else
$db->close();
llxFooter('$Date: 2011/06/30 13:27:21 $ - $Revision: 1.521 $');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.523 $');
?>

View File

@ -0,0 +1,83 @@
<?php
/* Copyright (C) 2011 Auguria <anthony.poiret@auguria.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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/compta/ajaxpayment.php
* \brief File to return Ajax response on payment breakdown process
* \version ajaxpayment.php,v 1.0
*/
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
require('../main.inc.php');
//print_r($_POST);
// Getting the posted keys=>values, sanitize the ones who are from text inputs
// from text inputs : total amount
$amountPayment = price2num($_POST['amountPayment']);
$amountPayment = is_numeric($amountPayment)? $amountPayment : 0; // is a value
// from text inputs : invoice amount payment
$amounts = $_POST['amounts']; // is an array (need a foreach)
foreach ($amounts as $key => $value)
{
$value = price2num($value);
if (!is_numeric($value)) unset($amounts[$key]);
}
// from dolibarr's object (no need to check)
$remains = $_POST['remains'];
// from DOM elements : imgId (equals invoice id)
$currentInvId = $_POST['imgClicked'];
// Treatment
$result = $amountPayment - array_sum($amounts); // Remaining amountPayment
$toJsonArray = array();
if($currentInvId) // Here to breakdown
{
// Get the current amount (from form) and the corresponding remainToPay (from invoice)
$currentAmount = $amounts['amount_'.$currentInvId];
$currentRemain = $remains['remain_'.$currentInvId];
// Reset the substraction for this amount
$result += price2num($currentAmount);
$currentAmount = 0;
if($result >= 0) // then we need to calculate the amount to breakdown
{
$amountToBreakdown = ($result - $currentRemain >= 0 ?
$currentRemain : // Remain can be fully paid
$currentRemain + ($result - $currentRemain)); // Remain can only partially be paid
$currentAmount = $amountToBreakdown; // In both cases, amount will take breakdown value
$result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown
} // else there's no need to calc anything, just reset the field (result is still < 0)
$toJsonArray['amount_'.$currentInvId] = price2num($currentAmount).""; // Param will exist only if an img has been clicked
}
// Encode to JSON to return
$toJsonArray['result'] = price2num($result)."";
echo json_encode($toJsonArray); // Printing the call's result
?>

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/compta/deplacement/list.php
* \brief Page list of expenses
* \version $Id: list.php,v 1.1 2011/06/29 17:55:33 eldy Exp $
* \version $Id: list.php,v 1.2 2011/06/30 21:53:02 eldy Exp $
*/
require("../../main.inc.php");
@ -49,6 +49,8 @@ if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="d.dated";
$limit = $conf->liste_limit;
$search_ref=GETPOST('search_ref');
/*
* View
@ -59,7 +61,7 @@ $tripandexpense_static=new Deplacement($db);
llxHeader();
$sql = "SELECT s.nom, s.rowid as socid,"; // Ou
$sql.= " d.rowid, d.type, d.dated as dd, d.km, "; // Comment
$sql.= " d.rowid, d.type, d.dated as dd, d.km,"; // Comment
$sql.= " u.name, u.firstname"; // Qui
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= ", ".MAIN_DB_PREFIX."deplacement as d";
@ -69,6 +71,10 @@ $sql.= " WHERE d.fk_user = u.rowid";
$sql.= " AND d.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
if (trim($search_ref) != '')
{
$sql.= ' AND d.rowid LIKE \'%'.$db->escape(trim($search_ref)) . '%\'';
}
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1 ,$offset);
@ -81,6 +87,7 @@ if ($resql)
print_barre_liste($langs->trans("ListOfFees"), $page, $_SERVER["PHP_SELF"],"&socid=$socid",$sortfield,$sortorder,'',$num);
$i = 0;
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","","&socid=$socid",'',$sortfield,$sortorder);
@ -92,6 +99,29 @@ if ($resql)
print_liste_field_titre('',$_SERVER["PHP_SELF"], '');
print "</tr>\n";
// Filters lines
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
print '</td>';
print '<td class="liste_titre">';
//print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
print '</td>';
print '<td class="liste_titre">';
//print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '&nbsp;';
print '</td>';
print '<td class="liste_titre" align="right">';
print '&nbsp;';
print '</td>';
print '<td class="liste_titre" align="right">';
print '&nbsp;';
print '</td>';
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print "</td></tr>\n";
$var=true;
while ($i < min($num,$limit))
{
@ -117,6 +147,7 @@ if ($resql)
}
print "</table>";
print "</form>\n";
$db->free($resql);
}
else
@ -125,5 +156,5 @@ else
}
$db->close();
llxFooter('$Date: 2011/06/29 17:55:33 $ - $Revision: 1.1 $');
llxFooter('$Date: 2011/06/30 21:53:02 $ - $Revision: 1.2 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/compta/dons/liste.php
* \ingroup don
* \brief Page de liste des dons
* \version $Id$
* \version $Id: liste.php,v 1.34 2011/06/30 21:53:02 eldy Exp $
*/
require("../../main.inc.php");
@ -43,6 +43,9 @@ if (! $sortfield) $sortfield="d.datedon";
$limit = $conf->liste_limit;
$statut=isset($_GET["statut"])?$_GET["statut"]:"-1";
$search_ref=GETPOST('search_ref');
$search_company=GETPOST('search_company');
$search_name=GETPOST('search_name');
@ -66,6 +69,18 @@ if ($statut >= 0)
{
$sql .= " AND d.fk_statut = ".$statut;
}
if (trim($search_ref) != '')
{
$sql.= ' AND d.rowid LIKE \'%'.$db->escape(trim($search_ref)) . '%\'';
}
if (trim($search_company) != '')
{
$sql.= ' AND d.societe LIKE \'%'.$db->escape(trim($search_company)) . '%\'';
}
if (trim($search_name) != '')
{
$sql.= ' AND d.nom LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.prenom LIKE \'%'.$db->escape(trim($search_name)) . '%\'';
}
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1, $offset);
@ -89,6 +104,7 @@ if ($result)
}
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","&page=$page&statut=$statut","","",$sortfield,$sortorder);
@ -104,12 +120,38 @@ if ($result)
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.fk_statut","&page=$page&statut=$statut","",'align="right"',$sortfield,$sortorder);
print "</tr>\n";
// Filters lines
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
print '</td>';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '&nbsp;';
print '</td>';
if ($conf->projet->enabled)
{
print '<td class="liste_titre" align="right">';
print '&nbsp;';
print '</td>';
}
print '<td class="liste_titre" align="right">';
print '&nbsp;';
print '</td>';
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print "</td></tr>\n";
$var=True;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($result);
$var=!$var;
print "<tr $bc[$var]>";
print "<tr ".$bc[$var].">";
$donationstatic->id=$objp->rowid;
$donationstatic->ref=$objp->rowid;
$donationstatic->nom=$objp->nom;
@ -140,6 +182,8 @@ if ($result)
$i++;
}
print "</table>";
print "</form>\n";
$db->free($resql);
}
else
{
@ -149,5 +193,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/06/30 21:53:02 $ - $Revision: 1.34 $');
?>

View File

@ -26,7 +26,7 @@
* \file htdocs/compta/facture.php
* \ingroup facture
* \brief Page to create/see an invoice
* \version $Id: facture.php,v 1.841 2011/06/30 13:27:21 hregis Exp $
* \version $Id: facture.php,v 1.845 2011/07/02 17:02:00 eldy Exp $
*/
require('../main.inc.php');
@ -61,6 +61,7 @@ $action=GETPOST('action');
$confirm=GETPOST('confirm');
$lineid=GETPOST('lineid');
$userid=GETPOST('userid');
$search_ref=GETPOST('sf_ref')?GETPOST('sf_ref'):GETPOST('search_ref');
// Security check
$fieldid = isset($_GET["ref"])?'facnumber':'rowid';
@ -100,7 +101,7 @@ if (! empty($object->hooks))
$reshook+=$module->doActions($object);
if (! empty($module->error) || (! empty($module->errors) && sizeof($module->errors) > 0))
{
$mesg=$module->error; $mesgs[]=$module->errors;
$mesg=$module->error; $mesgs=$module->errors;
if ($action=='add') $action='create';
if ($action=='update') $action='edit';
}
@ -248,8 +249,8 @@ if ($action == 'valid')
if ($action == 'set_thirdparty')
{
$object->updateObjectField('facture',$id,'fk_soc',$socid);
$object->updateObjectField('facture',$id,'fk_soc',$socid);
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
exit;
}
@ -712,6 +713,7 @@ if ($action == 'add' && $user->rights->facture->creer)
if ($element == 'order') { $element = $subelement = 'commande'; }
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
if ($element == 'contract') { $element = $subelement = 'contrat'; }
if ($element == 'inter') { $element = $subelement = 'ficheinter'; }
$object->origin = $_POST['origin'];
$object->origin_id = $_POST['originid'];
@ -1306,7 +1308,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$result=$mailfile->sendfile();
if ($result)
{
$mesg=$langs->trans('MailSuccessfulySent',$from,$sendto); // Must not contain "
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "
$error=0;
@ -1440,7 +1442,7 @@ if ($action == 'create')
print_fiche_titre($langs->trans('NewBill'));
if ($mesg) print $mesg;
dol_htmloutput_mesg($mesg);
$soc = new Societe($db);
if ($socid) $res=$soc->fetch($socid);
@ -3052,9 +3054,9 @@ else
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
}
if ($_POST['sf_ref'])
if (trim($search_ref) != '')
{
$sql.= ' AND f.facnumber LIKE \'%'.$db->escape(trim($_POST['sf_ref'])) . '%\'';
$sql.= ' AND f.facnumber LIKE \'%'.$db->escape(trim($search_ref)) . '%\'';
}
if ($sall)
{
@ -3106,17 +3108,17 @@ else
//print '<td class="liste_titre">&nbsp;</td>';
print '</tr>';
// Lignes des champs de filtre
// Filters lines
print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$_GET['search_ref'].'">';
print '<td class="liste_titre" colspan="1" align="center">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
print '</td>';
print '<td class="liste_titre" align="center">';
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
//print '&nbsp;'.$langs->trans('Year').': ';
$syear = $year;
//print '&nbsp;'.$langs->trans('Year').': '.$syear;
//print 'xx'.$syear.'zz';
//if ($syear == '') $syear = date("Y");
$htmlother->select_year($syear,'year',1, 20, 5);
$htmlother->select_year($syear?$syear:-1,'year',1, 20, 5);
print '</td>';
print '<td class="liste_titre" align="left">&nbsp;</td>';
print '<td class="liste_titre" align="left">';
@ -3234,5 +3236,5 @@ else
$db->close();
llxFooter('$Date: 2011/06/30 13:27:21 $ - $Revision: 1.841 $');
llxFooter('$Date: 2011/07/02 17:02:00 $ - $Revision: 1.845 $');
?>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -22,7 +22,7 @@
* \file htdocs/compta/index.php
* \ingroup compta
* \brief Main page of accountancy area
* \version $Id: index.php,v 1.181 2011/06/29 17:55:34 eldy Exp $
* \version $Id: index.php,v 1.182 2011/06/30 21:53:02 eldy Exp $
*/
require('../main.inc.php');
@ -111,7 +111,7 @@ $max=3;
/*
* Find invoices
* Search invoices
*/
if ($conf->facture->enabled && $user->rights->facture->lire)
{
@ -127,6 +127,9 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
print "</table></form><br>";
}
/*
* Search supplier invoices
*/
if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)
{
print '<form method="post" action="'.DOL_URL_ROOT.'/fourn/facture/index.php">';
@ -141,6 +144,39 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)
print "</table></form><br>";
}
/*
* Search donations
*/
if ($conf->don->enabled && $user->rights->don->lire)
{
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/dons/liste.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchADonation").'</td></tr>';
print "<tr ".$bc[0].">";
print "<td>".$langs->trans("Ref").':</td><td><input type="text" name="search_ref" class="flat" size="18"></td>';
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
//print "<tr ".$bc[0]."><td>".$langs->trans("Other").':</td><td><input type="text" name="sall" class="flat" size="18"></td>';
print '</tr>';
print "</table></form><br>";
}
/*
* Search expenses
*/
if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
{
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/deplacement/list.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchATripAndExpense").'</td></tr>';
print "<tr ".$bc[0].">";
print "<td>".$langs->trans("Ref").':</td><td><input type="text" name="search_ref" class="flat" size="18"></td>';
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
//print "<tr ".$bc[0]."><td>".$langs->trans("Other").':</td><td><input type="text" name="sall" class="flat" size="18"></td>';
print '</tr>';
print "</table></form><br>";
}
/**
* Draft customers invoices
@ -1009,5 +1045,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/06/29 17:55:34 $ - $Revision: 1.181 $');
llxFooter('$Date: 2011/06/30 21:53:02 $ - $Revision: 1.182 $');
?>

View File

@ -24,7 +24,7 @@
* \file htdocs/compta/paiement.php
* \ingroup compta
* \brief Page to create a payment
* \version $Id$
* \version $Id: paiement.php,v 1.108 2011/07/01 16:18:10 hregis Exp $
*/
require('../main.inc.php');
@ -253,7 +253,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (! empty($conf->global->PAYPAL_BANK_ACCOUNT)) $accountid=$conf->global->PAYPAL_BANK_ACCOUNT;
$paymentnum=$facture->ref_int;
}
if ($conf->use_javascript_ajax)
{
print "\n".'<script type="text/javascript" language="javascript">';
@ -272,17 +271,78 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
jQuery(\'.fieldrequireddyn\').removeClass(\'fieldrequired\');
}
});';
print 'jQuery("#amountpayment").keyup(function() {
alter_amount_payment();
});';
print 'jQuery("#amountpayment").change(function() {
alter_amount_payment();
});';
print 'alter_amount_payment();';
print '});';
});
});
</script>'."\n";
}
if (! empty($conf->global->MAIN_JS_ON_PAYMENT))
{
print "\n".'<script type="text/javascript" language="javascript">';
print 'jQuery(document).ready(function () {
function elemToJson(selector)
{
var subJson = {};
jQuery.map(selector.serializeArray(), function(n,i)
{
subJson[n["name"]] = n["value"];
});
return subJson;
}
function callForResult(imgId)
{
var json = {};
var form = jQuery("#payment_form");
json["amountPayment"] = jQuery("#amountpayment").attr("value");
json["amounts"] = elemToJson(form.find("input[name*=\"amount_\"]"));
json["remains"] = elemToJson(form.find("input[name*=\"remain_\"]"));
if(imgId != null)json["imgClicked"] = imgId;
jQuery.post("ajaxpayment.php", json, function(data)
{
json = jQuery.parseJSON(data);
form.data(json);
for(var key in json)
{
if(key == "result") {
jQuery("#"+key).text(json[key]);
if(json[key] < 0) {
jQuery("#"+key).css("color", "red");
} else {
jQuery("#"+key).removeAttr("style");
}
} else {
form.find("input[name*=\""+key+"\"]").each(function() {
jQuery(this).attr("value", json[key]);
});
}
}
});
}
function callToBreakdown(imgSelector) {
var form = jQuery("#payment_form"), imgId;
imgId = imgSelector.attr("id");
callForResult(imgId);
}
print '</script>'."\n";
jQuery("#payment_form").find("img").click(function() {
callToBreakdown(jQuery(this));
});
jQuery("#payment_form").find("input[name*=\"amount_\"]").change(function() {
callForResult();
});
jQuery("#amountpayment").change(function() {
callForResult();
});
});
</script>'."\n";
}
print '<form name="add_paiement" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -314,7 +374,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$html->select_types_paiements((GETPOST('paiementcode')?GETPOST('paiementcode'):$facture->mode_reglement_code),'paiementcode','',2);
print "</td>\n";
print '<td rowspan="'.$rowspan.'" valign="top">';
print '<textarea name="comment" wrap="soft" cols="60" rows="'.ROWS_4.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td>';
print '<textarea name="comment" wrap="soft" cols="60" rows="'.ROWS_5.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td>';
print '</tr>';
// Payment amount
@ -407,115 +467,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
print '<td align="right">&nbsp;</td>';
print "</tr>\n";
// FIXME Does not work yet because :
// - Does not support non , and non . decimal separator.
// - Does not use dolibarr param rounding
// - Other minor bugs
if (! empty($conf->global->MAIN_JS_ON_PAYMENT))
{
print '<script type="text/javascript" language="javascript">
// This Array is used to get and store Array containing (String format):
// [0]-> the $namef of the linked text field (in order to get and set ElementsById)
// [1]-> the linked invoice amount
// [2]-> the linked amount payed (in order to calculate the remaining payment amount)
var amountInput = new Array();
var totalAmount = 0;
var paymentRemaining = 0;
// This function is used to round floats to monetary format
function roundNumber(num,dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}
// This function is used to parse php Strings(floats with coma) to javascript floats (with stops)
function convertFloat(str)
{
return parseFloat(str.replace(/,/, \'.\').split(\' \').join(\'\'));
}
// This function is used to convert javascript floats (stored as String) to coma floats (as String too)
function toComaStr(str)
{
return str.replace(/\./, ",");
}
// This function is called onclick of the buttons linked to the invoices. It refreshes the linked payed amount
// contained by the corresponding array, and the text field linked to the corresponding invoice
function calcRemind(index)
{
invoiceAmount = convertFloat(amountInput[index][1]);
var payedAmount = amountInput[index][2] != 0 ? convertFloat(amountInput[index][2]) : 0;
paymentRemaining = paymentRemaining + payedAmount;
payedAmount = 0;
if(paymentRemaining - invoiceAmount < 0)
{
payedAmount = paymentRemaining;
paymentRemaining = 0;
}else
{
paymentRemaining -= invoiceAmount;
payedAmount = invoiceAmount;
}
if(payedAmount < 0)
{
paymentRemaining += payedAmount;
payedAmount = 0;
}
amountInput[index][2] = payedAmount.toString();
document.getElementById(amountInput[index][0]).value = toComaStr(roundNumber(payedAmount,2).toString());
changeSumAmount();
}
// This function is called when the payment\'s amount is change. It refreshes the array containing
// the amounts payed (from the text fields linked to invoices)
function alter_amount_payment()
{
totalAmount = document.add_paiement.amountpayment.value != 0 ? convertFloat(document.add_paiement.amountpayment.value) : 0;
totalAmount = isNaN(totalAmount) ? 0 : totalAmount;
paymentRemaining = totalAmount;
for(var ii=0; ii<amountInput.length; ii++)
{
if(isNaN(convertFloat(document.getElementById(amountInput[ii][0]).value)))
amountInput[ii][2] = 0;
else
paymentRemaining -= convertFloat(document.getElementById(amountInput[ii][0]).value);
}
changeSumAmount();
}
// This function is called when a change occurs on the text fields link to the invoices amount
// to pay
function changeAmount(index)
{
var oldAmount = amountInput[index][2];
var newAmount = isNaN(document.getElementById(amountInput[index][0]).value) ? 0 : document.getElementById(amountInput[index][0]).value;
paymentRemaining += oldAmount - newAmount ;
amountInput[index][2] = newAmount;
changeSumAmount();
}
// This function is called when any change occurs on the amounts objects to print the remaining
// amount of the payment to divide into invoices amount
function changeSumAmount(t)
{
var dispatchRemaining = totalAmount;
for(var ii = 0; ii < amountInput.length; ii++)
{
dispatchRemaining -= amountInput[ii][2] != 0 ? convertFloat(amountInput[ii][2]) : 0;
}
if(dispatchRemaining < 0)
document.getElementById("amount_sum_payment").style.setProperty("color","#ff0000","");
else
document.getElementById("amount_sum_payment").style.removeProperty("color");
document.getElementById("amount_sum_payment").innerHTML= "'.$langs->trans('RemainToDivide').' "+toComaStr(roundNumber(dispatchRemaining,2).toString());
}
</script>';
}
print "</tr>\n";
$var=True;
$total=0;
@ -563,8 +515,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// Add remind amount
$namef = 'amount_'.$objp->facid;
$nameRemain = 'remain_'.$objp->facid;
$namef = 'amount_'.$objp->facid;
if ($action != 'add_paiement')
{
if (! empty($conf->global->MAIN_JS_ON_PAYMENT))
@ -614,7 +566,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
print '</b></td>';
print '<td align="right"><b>'.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits,'MT')).'</b></td>';
print '<td align="right" id="amount_sum_payment" style="font-weight:bold;"></td>';
print '<td align="right" id="result" style="font-weight:bold;"></td>';
print '<td align="center">&nbsp;</td>';
print "</tr>\n";
}
@ -730,5 +682,5 @@ if (! GETPOST('action'))
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/01 16:18:10 $ - $Revision: 1.108 $');
?>

View File

@ -24,7 +24,7 @@
* \file htdocs/contact/fiche.php
* \ingroup societe
* \brief Card of a contact
* \version $Id: fiche.php,v 1.215 2011/06/30 13:25:32 hregis Exp $
* \version $Id: fiche.php,v 1.220 2011/07/02 14:53:42 eldy Exp $
*/
require("../main.inc.php");
@ -68,37 +68,61 @@ else
$result = restrictedArea($user, 'contact', $id, 'socpeople'); // If we create a contact with no company (shared contacts), no check on write permission
}
// Instantiate hooks of thirdparty module
if (is_array($conf->hooks_modules) && !empty($conf->hooks_modules))
{
$object->callHooks('contactcard');
}
/*
* Actions
*/
$reshook=0;
// Hook of actions. After that, reshook is 0 if we need to process standard actions, >0 otherwise.
if (! empty($object->hooks))
{
foreach($object->hooks as $hook)
{
if (! empty($hook['modules']))
{
foreach($hook['modules'] as $module)
{
if (method_exists($module,'doActions'))
{
$resaction+=$module->doActions($object,$action,$id); // object is deprecated, action can be changed by method (to go back to other action for example), id can be changed/set by method (during creation for example)
if ($resaction < 0 || ! empty($module->error) || (! empty($module->errors) && sizeof($module->errors) > 0))
{
$error=$module->error; $errors=$module->errors;
if ($action=='add') $action='create';
if ($action=='update') $action='edit';
}
else $reshook+=$resaction;
}
}
}
}
}
// ---------- start deprecated. Use hook to hook actions.
// If canvas actions are defined, because on url, or because contact was created with canvas feature on, we use the canvas feature.
// If canvas actions are not defined, we use standard feature.
if (method_exists($objcanvas->control,'doActions'))
{
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
$objcanvas->doActions($id);
if (empty($objcanvas->error) && (empty($objcanvas->errors) || sizeof($objcanvas->errors) == 0))
{
if ($action=='add') { $objcanvas->action='create'; $action='create'; }
if ($action=='update') { $objcanvas->action='view'; $action='view'; }
}
else
if (! empty($objcanvas->error) || (! empty($objcanvas->errors) && sizeof($objcanvas->errors) > 0))
{
$error=$objcanvas->error; $errors=$objcanvas->errors;
if ($action=='add') { $objcanvas->action='create'; $action='create'; }
if ($action=='update') { $objcanvas->action='edit'; $action='edit'; }
}
}
else
{
// -----------------------------------------
// When used in standard mode
// -----------------------------------------
// ---------- end deprecated.
if (empty($reshook))
{
// Creation utilisateur depuis contact
if ($_POST["action"] == 'confirm_create_user' && $_POST["confirm"] == 'yes' && $user->rights->user->user->creer)
{
@ -303,26 +327,26 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
// -----------------------------------------
if ($action == 'create')
{
$objcanvas->assign_post(); // Assign POST data
$objcanvas->assign_post(); // TODO: Put code of assign_post into assign_values to keep only assign_values
$objcanvas->assign_values($action); // Set value for templates
$objcanvas->display_canvas($action); // Show template
}
else if ($action == 'edit')
{
$objcanvas->control->object=$objcanvas->getObject($id); // Load object
$objcanvas->control->object=$objcanvas->getObject($id); // TODO: Getting and storing object should be done into assign_values (for template with no code) or into tpl
if (empty($objcanvas->control->object))
{
$object = new Contact($db);
$object->fetch($id,$user);
$objcanvas->control->object=$object;
}
$objcanvas->assign_post(); // Assign POST data
$objcanvas->assign_post(); // TODO: Put code of assign_post into assign_values to keep only assign_values
$objcanvas->assign_values($action); // Set value for templates
$objcanvas->display_canvas($action); // Show template
}
else
{
$objcanvas->control->object=$objcanvas->getObject($id); // Load object
$objcanvas->control->object=$objcanvas->getObject($id); // TODO: Getting and storing object should be done into assign_values (for template with no code) or into tpl
if (empty($objcanvas->control->object))
{
$object = new Contact($db);
@ -950,5 +974,5 @@ else
$db->close();
llxFooter('$Date: 2011/06/30 13:25:32 $ - $Revision: 1.215 $');
llxFooter('$Date: 2011/07/02 14:53:42 $ - $Revision: 1.220 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/core/class/canvas.class.php
* \ingroup core
* \brief File of class to manage canvas
* \version $Id$
* \version $Id: canvas.class.php,v 1.44 2011/07/02 14:51:26 eldy Exp $
*/
@ -135,7 +135,8 @@ class Canvas
/**
* Execute actions
* @param id Id of object (may be empty for creation)
* @param id Id of object (may be empty for creation)
* @deprecated Use actions with hooks instead
*/
function doActions($id)
{
@ -229,11 +230,12 @@ class Canvas
/**
* Display canvas
* @param mode 'create', 'view', 'edit'
* @param id Id of object to show
*/
function display_canvas($mode='view')
function display_canvas($mode='view',$id=0)
{
global $db, $conf, $langs, $user, $canvas;
global $form, $formfile;
global $id, $form, $formfile;
//print $this->template_dir.$this->card.'_'.$mode.'.tpl.php';exit;
include($this->template_dir.$this->card.'_'.$mode.'.tpl.php'); // Include native PHP template

View File

@ -22,7 +22,7 @@
* \file htdocs/core/class/commonobject.class.php
* \ingroup core
* \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...)
* \version $Id: commonobject.class.php,v 1.140 2011/06/30 13:27:20 hregis Exp $
* \version $Id: commonobject.class.php,v 1.143 2011/07/01 23:05:39 eldy Exp $
*/
@ -1281,12 +1281,13 @@ class CommonObject
$classpath = $element.'/class';
// To work with non standard path
if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; }
if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; }
if ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; }
if ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; }
if ($objecttype == 'invoice_supplier') { $classpath = 'fourn/class'; }
if ($objecttype == 'order_supplier') { $classpath = 'fourn/class'; }
if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; }
if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; }
if ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; }
if ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; }
if ($objecttype == 'invoice_supplier') { $classpath = 'fourn/class'; }
if ($objecttype == 'order_supplier') { $classpath = 'fourn/class'; }
if ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $subelement ='fichinter'; $module ='ficheinter'; }
$classfile = strtolower($subelement); $classname = ucfirst($subelement);
if ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; }
@ -1430,15 +1431,15 @@ class CommonObject
/**
* Instantiate hooks of thirdparty module
* @param $type Type of hook
* Init array this->hooks with instantiated controler and/or dao
* @param arraytype Array list of hooked tab/features. For example: thirdpartytab, ...
*/
function callHooks($arraytype)
{
global $conf;
if (! is_array($arraytype)) $arraytype=array($arraytype);
$i=0;
foreach($conf->hooks_modules as $module => $hooks)
@ -1453,13 +1454,15 @@ class CommonObject
$actionfile = 'actions_'.$module.'.class.php';
$daofile = 'dao_'.$module.'.class.php';
$pathroot = '';
$this->hooks[$i]['type']=$type;
// Include actions class (controller)
//print 'include '.$path.$actionfile."\n";
$resaction=dol_include_once($path.$actionfile);
// Include dataservice class (model)
//print 'include '.$path.$daofile."\n";
$resdao=dol_include_once($path.$daofile);
// Instantiate actions class (controller)
@ -1470,13 +1473,14 @@ class CommonObject
$this->hooks[$i]['modules'][$objModule->module_number] = $objModule;
}
// FIXME storing dao is useless here. It's goal of controller to known which dao to manage
if ($resdao)
{
// Instantiate dataservice class (model)
$modelclassname = 'Dao'.ucfirst($module);
$this->hooks[$i]['modules'][$objModule->module_number]->object = new $modelclassname($this->db);
}
$i++;
}
}

View File

@ -25,7 +25,7 @@
* \ingroup core
* \brief Fichier de la classe de stockage de la config courante
* \remarks La config est stockee dans le fichier conf/conf.php
* \version $Id$
* \version $Id: conf.class.php,v 1.59 2011/07/01 23:06:06 eldy Exp $
*/
@ -153,7 +153,7 @@ class Conf
$modulename = strtolower($reg[1]);
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/';
}
// If this is constant for hook activated by a module
// If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
{
$modulename = strtolower($reg[1]);

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Meos
/* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Meos
*
* 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
@ -125,7 +125,7 @@ if ($_POST["action"] == 'confirm_crop')
* View
*/
llxHeader($head, $langs->trans("Image"), '', '', 0, 0, array('/includes/jcrop/js/jquery.Jcrop.min.js','/lib/lib_photosresize.js'), array('/includes/jcrop/css/jquery.Jcrop.css'));
llxHeader($head, $langs->trans("Image"), '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js','/lib/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
print_fiche_titre($langs->trans("ImageEditor"));
@ -201,5 +201,5 @@ print '</fieldset>';
}
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 01:26:30 $ - $Revision: 1.13 $');
?>

View File

@ -25,7 +25,7 @@
* \file htdocs/expedition/fiche.php
* \ingroup expedition
* \brief Fiche descriptive d'une expedition
* \version $Id$
* \version $Id: fiche.php,v 1.208 2011/07/02 16:48:32 eldy Exp $
*/
require("../main.inc.php");
@ -398,7 +398,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
$result=$mailfile->sendfile();
if ($result)
{
$_SESSION['mesg']=$langs->trans('MailSuccessfulySent',$from,$sendto);
$_SESSION['mesg']=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
$error=0;
@ -1381,5 +1381,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.208 $');
?>

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -21,7 +22,7 @@
/** \file htdocs/fichinter/class/fichinter.class.php
* \ingroup ficheinter
* \brief Fichier de la classe des gestion des fiches interventions
* \version $Id$
* \version $Id: fichinter.class.php,v 1.19 2011/07/02 17:02:00 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
@ -50,7 +51,7 @@ class Fichinter extends CommonObject
var $datev;
var $datem;
var $duree;
var $statut; // 0=draft, 1=validated
var $statut; // 0=draft, 1=validated, 2=invoiced
var $description;
var $note_private;
var $note_public;
@ -75,8 +76,10 @@ class Fichinter extends CommonObject
// List of language codes for status
$this->statuts[0]='Draft';
$this->statuts[1]='Validated';
$this->statuts[2]='Invoiced';
$this->statuts_short[0]='Draft';
$this->statuts_short[1]='Validated';
$this->statuts_short[2]='Invoiced';
}
@ -166,10 +169,10 @@ class Fichinter extends CommonObject
}
/*
* \brief Met a jour une intervention
* \return int <0 si ko, >0 si ok
* Met a jour une intervention
* @return int <0 if KO, >0 if OK
*/
function update($id)
function update($user)
{
global $conf;
@ -183,7 +186,7 @@ class Fichinter extends CommonObject
$sql.= ", description = '".$this->db->escape($this->description)."'";
$sql.= ", duree = ".$this->duree;
$sql.= ", fk_projet = ".$this->fk_project;
$sql.= " WHERE rowid = ".$id;
$sql.= " WHERE rowid = ".$this->id;
$sql.= " AND entity = ".$conf->entity;
dol_syslog("Fichinter::update sql=".$sql);
@ -237,6 +240,14 @@ class Fichinter extends CommonObject
if ($this->statut == 0) $this->brouillon = 1;
/*
* Lines
*/
$result=$this->fetch_lines();
if ($result < 0)
{
return -3;
}
$this->db->free($resql);
return 1;
}
@ -338,6 +349,31 @@ class Fichinter extends CommonObject
}
}
/**
* set intervetnion as billed
* @return int <0 si ko, >0 si ok
*/
function setBilled()
{
global $conf;
$sql = 'UPDATE '.MAIN_DB_PREFIX.'fichinter SET fk_statut = 2';
$sql.= ' WHERE rowid = '.$this->id;
$sql.= " AND entity = ".$conf->entity;
$sql.= " AND fk_statut = 1";
if ($this->db->query($sql) )
{
return 1;
}
else
{
dol_print_error($this->db);
return -1;
}
}
/**
* \brief Retourne le libelle du statut
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
@ -369,22 +405,26 @@ class Fichinter extends CommonObject
if ($mode == 2)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]);
if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6').' '.$langs->trans('StatusOrderProcessed');
}
if ($mode == 3)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6');
}
if ($mode == 4)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6').' '.$langs->trans('StatusInterInvoiced');
}
if ($mode == 5)
{
if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
if ($statut==2) return $langs->trans('StatusInterInvoiced').' '.img_picto($langs->trans('StatusInterInvoiced'),'statut6');
}
}
@ -523,17 +563,29 @@ class Fichinter extends CommonObject
$this->db->begin();
if (! $error)
// Delete linked object
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_element";
$sql.= " WHERE fk_target = ".$this->id;
$sql.= " AND targettype = '".$this->element."'";
dol_syslog("Fichinter::delete sql=".$sql);
if (! $this->db->query($sql) )
{
// Delete linked contacts
$res = $this->delete_linked_contact();
if ($res < 0)
{
$this->error='ErrorFailToDeleteLinkedContact';
//$error++;
$this->db->rollback();
return 0;
}
dol_syslog("Fichinter::delete error", LOG_ERR);
$error++;
}
// Delete linked contacts
$res = $this->delete_linked_contact();
if ($res < 0)
{
$this->error='ErrorFailToDeleteLinkedContact';
$error++;
}
if ($err > 0)
{
$this->db->rollback();
return -1;
}
$sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet";
@ -761,13 +813,13 @@ class Fichinter extends CommonObject
}
/**
* \brief Initialise la fiche intervention avec valeurs fictives aleatoire
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo
* \return int <0 OK, >0 KO
* Initialise la fiche intervention avec valeurs fictives aleatoire
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo
* @return int <0 OK, >0 KO
*/
function fetch_lines()
{
$sql = 'SELECT rowid';
$sql = 'SELECT rowid, description, duree, date, rang';
$sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet';
$sql.= ' where fk_fichinter = '.$this->id;
@ -775,21 +827,26 @@ class Fichinter extends CommonObject
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($result);
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$objp = $this->db->fetch_object($result);
$objp = $this->db->fetch_object($resql);
$line = new FichinterLigne($this->db);
$line->id = $objp->rowid;
//...
$line->desc = $objp->description;
//For invoicing we calculing hours
$line->qty = round($objp->duree/3600,2);
$line->date = $this->db->jdate($objp->date);
$line->rang = $objp->rang;
$line->product_type = 1;
$this->lines[$i] = $line;
$i++;
}
$this->db->free($result);
$this->db->free($resql);
return 1;
}

View File

@ -25,7 +25,7 @@
* \file htdocs/fichinter/document.php
* \ingroup fichinter
* \brief Page des documents joints sur les contrats
* \version $Id$
* \version $Id: document.php,v 1.20 2011/07/02 17:33:24 eldy Exp $
*/
require("../main.inc.php");
@ -37,6 +37,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
$langs->load("other");
$langs->load("fichinter");
$langs->load("companies");
$langs->load("interventions");
$fichinterid = GETPOST("id");
$action = GETPOST("action");
@ -173,5 +174,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 17:33:24 $ - $Revision: 1.20 $');
?>

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -22,7 +23,7 @@
* \file htdocs/fichinter/fiche.php
* \brief Fichier fiche intervention
* \ingroup ficheinter
* \version $Id$
* \version $Id: fiche.php,v 1.165 2011/07/02 17:14:58 eldy Exp $
*/
require("../main.inc.php");
@ -44,22 +45,24 @@ if (! empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."
$langs->load("companies");
$langs->load("interventions");
$id=GETPOST('id');
$action=GETPOST("action");
$mesg=GETPOST("msg");
// Load object if defined
$fichinterid=0;
$fichinter = new Fichinter($db);
if ($_GET["id"] > 0 || ! empty($_GET["ref"]))
$object = new Fichinter($db);
if ($id > 0 || ! empty($_GET["ref"]))
{
$result=$fichinter->fetch($_GET["id"],$_GET["ref"]);
$result=$object->fetch($id,$_GET["ref"]);
if (! $result > 0)
{
dol_print_error($db);
exit;
}
$fichinterid=$fichinter->id;
$fichinterid=$object->id;
}
$mesg=GETPOST("msg");
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
@ -70,145 +73,145 @@ $result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
* Actions
*/
if ($_REQUEST["action"] != 'create' && $_REQUEST["action"] != 'add' && ! ($_REQUEST["id"] > 0) && empty($_REQUEST["ref"]))
if ($action != 'create' && $action != 'add' && $action != 'classifybilled' && ! ($_REQUEST["id"] > 0) && empty($_REQUEST["ref"]))
{
Header("Location: index.php");
return;
exit;
}
if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes')
if ($action == 'confirm_validate' && $_REQUEST['confirm'] == 'yes')
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET["id"]);
$fichinter->fetch_thirdparty();
$object = new Fichinter($db);
$object->fetch($id);
$object->fetch_thirdparty();
$result = $fichinter->setValid($user, $conf->fichinter->outputdir);
$result = $object->setValid($user, $conf->fichinter->outputdir);
if ($result >= 0)
{
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$result=fichinter_create($db, $fichinter, $_REQUEST['model'], $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$fichinter->id);
$result=fichinter_create($db, $object, $_REQUEST['model'], $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
exit;
}
else
{
$mesg='<div class="error">'.$fichinter->error.'</div>';
$mesg='<div class="error">'.$object->error.'</div>';
}
}
if ($_REQUEST['action'] == 'confirm_modify' && $_REQUEST['confirm'] == 'yes')
if ($action == 'confirm_modify' && $_REQUEST['confirm'] == 'yes')
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET["id"]);
$fichinter->fetch_thirdparty();
$object = new Fichinter($db);
$object->fetch($id);
$object->fetch_thirdparty();
$result = $fichinter->setDraft($user);
$result = $object->setDraft($user);
if ($result >= 0)
{
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$result=fichinter_create($db, $fichinter, (empty($_REQUEST['model'])?$fichinter->model:$_REQUEST['model']), $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$fichinter->id);
$result=fichinter_create($db, $object, (empty($_REQUEST['model'])?$object->model:$_REQUEST['model']), $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
exit;
}
else
{
$mesg='<div class="error">'.$fichinter->error.'</div>';
$mesg='<div class="error">'.$object->error.'</div>';
}
}
if ($_POST["action"] == 'add')
{
$fichinter = new Fichinter($db);
$object = new Fichinter($db);
$fichinter->socid = $_POST["socid"];
$fichinter->duree = $_POST["duree"];
$fichinter->fk_project = $_POST["projectid"];
$fichinter->author = $user->id;
$fichinter->description = $_POST["description"];
$fichinter->ref = $_POST["ref"];
$fichinter->modelpdf = $_POST["model"];
$object->socid = $_POST["socid"];
$object->duree = $_POST["duree"];
$object->fk_project = $_POST["projectid"];
$object->author = $user->id;
$object->description = $_POST["description"];
$object->ref = $_POST["ref"];
$object->modelpdf = $_POST["model"];
if ($fichinter->socid > 0)
if ($object->socid > 0)
{
$result = $fichinter->create();
$result = $object->create();
if ($result > 0)
{
$_GET["id"]=$result; // Force raffraichissement sur fiche venant d'etre cree
$id=$result; // Force raffraichissement sur fiche venant d'etre cree
$fichinterid=$result;
}
else
{
$langs->load("errors");
$mesg='<div class="error">'.$langs->trans($fichinter->error).'</div>';
$_GET["action"] = 'create';
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
$action = 'create';
$_GET["socid"] = $_POST["socid"];
}
}
else
{
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("ThirdParty")).'</div>';
$_GET["action"] = 'create';
$action = 'create';
}
}
if ($_POST["action"] == 'update')
{
$fichinter = new Fichinter($db);
$object = new Fichinter($db);
$object->fetch($id);
$fichinter->socid = $_POST["socid"];
$fichinter->fk_project = $_POST["projectid"];
$fichinter->author = $user->id;
$fichinter->description = $_POST["description"];
$fichinter->ref = $_POST["ref"];
$object->socid = $_POST["socid"];
$object->fk_project = $_POST["projectid"];
$object->author = $user->id;
$object->description = $_POST["description"];
$object->ref = $_POST["ref"];
$fichinter->update($_POST["id"]);
$_GET["id"]=$_POST["id"]; // Force raffraichissement sur fiche venant d'etre creee
$object->update($user);
}
/*
* Build doc
*/
if ($_REQUEST['action'] == 'builddoc') // En get ou en post
if ($action == 'builddoc') // En get ou en post
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$fichinter->fetch_thirdparty();
$fichinter->fetch_lines();
$object = new Fichinter($db);
$object->fetch($id);
$object->fetch_thirdparty();
$object->fetch_lines();
if ($_REQUEST['model'])
{
$fichinter->setDocModel($user, $_REQUEST['model']);
$object->setDocModel($user, $_REQUEST['model']);
}
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$result=fichinter_create($db, $fichinter, $_REQUEST['model'], $outputlangs);
$result=fichinter_create($db, $object, $_REQUEST['model'], $outputlangs);
if ($result <= 0)
{
dol_print_error($db,$result);
@ -217,48 +220,48 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
}
// Set into a project
if ($_POST['action'] == 'classin')
if ($action == 'classin')
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$result=$fichinter->setProject($_POST['projectid']);
if ($result < 0) dol_print_error($db,$fichinter->error);
$object = new Fichinter($db);
$object->fetch($id);
$result=$object->setProject($_POST['projectid']);
if ($result < 0) dol_print_error($db,$object->error);
}
if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
if ($action == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
{
if ($user->rights->ficheinter->supprimer)
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$fichinter->delete($user);
$object = new Fichinter($db);
$object->fetch($id);
$object->delete($user);
}
Header('Location: index.php?leftmenu=ficheinter');
exit;
}
if ($_POST['action'] == 'setdescription')
if ($action == 'setdescription')
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$result=$fichinter->set_description($user,$_POST['description']);
if ($result < 0) dol_print_error($db,$fichinter->error);
$object = new Fichinter($db);
$object->fetch($id);
$result=$object->set_description($user,$_POST['description']);
if ($result < 0) dol_print_error($db,$object->error);
}
// Add line
if ($_POST['action'] == "addline" && $user->rights->ficheinter->creer)
if ($action == "addline" && $user->rights->ficheinter->creer)
{
if ($_POST['np_desc'] && ($_POST['durationhour'] || $_POST['durationmin']))
{
$fichinter = new Fichinter($db);
$ret=$fichinter->fetch($_POST['fichinterid']);
$fichinter->fetch_thirdparty();
$object = new Fichinter($db);
$ret=$object->fetch($_POST['fichinterid']);
$object->fetch_thirdparty();
$desc=$_POST['np_desc'];
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
$duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']);
$fichinter->addline(
$object->addline(
$_POST['fichinterid'],
$desc,
$date_intervention,
@ -269,22 +272,39 @@ if ($_POST['action'] == "addline" && $user->rights->ficheinter->creer)
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
exit;
}
}
// Classify Billed
if ($action == 'classifybilled')
{
$object = new Fichinter($db);
$object->fetch($id);
$result=$object->setBilled();
if ($result > 0)
{
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
exit;
}
else
{
$mesg='<div class="error">'.$object->error.'</div>';
}
}
/*
* Mise a jour d'une ligne d'intervention
*/
if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_POST["save"] == $langs->trans("Save"))
if ($action == 'updateligne' && $user->rights->ficheinter->creer && $_POST["save"] == $langs->trans("Save"))
{
$fichinterline = new FichinterLigne($db);
if ($fichinterline->fetch($_POST['ligne']) <= 0)
@ -293,13 +313,13 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P
exit;
}
$fichinter = new Fichinter($db);
if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0)
$object = new Fichinter($db);
if ($object->fetch($fichinterline->fk_fichinter) <= 0)
{
dol_print_error($db);
exit;
}
$fichinter->fetch_thirdparty();
$object->fetch_thirdparty();
$desc=$_POST['np_desc'];
$date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
@ -319,13 +339,13 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
unset($_POST['dihour']);
unset($_POST['dimin']);
@ -342,7 +362,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->ficheinter->creer && $_P
/*
* Supprime une ligne d'intervention AVEC confirmation
*/
if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes')
if ($action == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes')
{
if ($user->rights->ficheinter->creer)
{
@ -353,8 +373,8 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes'
exit;
}
$result=$fichinterline->deleteline();
$fichinter = new Fichinter($db);
if ($fichinter->fetch($fichinterline->fk_fichinter) <= 0)
$object = new Fichinter($db);
if ($object->fetch($fichinterline->fk_fichinter) <= 0)
{
dol_print_error($db);
exit;
@ -364,15 +384,15 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes'
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
}
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_GET['id']);
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
}
@ -380,66 +400,66 @@ if ($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes'
* Ordonnancement des lignes
*/
if ($_GET['action'] == 'up' && $user->rights->ficheinter->creer)
if ($action == 'up' && $user->rights->ficheinter->creer)
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$fichinter->fetch_thirdparty();
$fichinter->line_up($_GET['rowid']);
$object = new Fichinter($db);
$object->fetch($id);
$object->fetch_thirdparty();
$object->line_up($_GET['rowid']);
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'#'.$_GET['rowid']);
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
exit;
}
if ($_GET['action'] == 'down' && $user->rights->ficheinter->creer)
if ($action == 'down' && $user->rights->ficheinter->creer)
{
$fichinter = new Fichinter($db);
$fichinter->fetch($_GET['id']);
$fichinter->fetch_thirdparty();
$fichinter->line_down($_GET['rowid']);
$object = new Fichinter($db);
$object->fetch($id);
$object->fetch_thirdparty();
$object->line_down($_GET['rowid']);
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$fichinter->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
fichinter_create($db, $fichinter, $fichinter->modelpdf, $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'#'.$_GET['rowid']);
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
exit;
}
/*
* Send mail
*/
if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send))
if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send))
{
$langs->load('mails');
$fichinter = new Fichinter($db);
if ( $fichinter->fetch($_POST['fichinter_id']) )
$object = new Fichinter($db);
if ( $object->fetch($_POST['fichinter_id']) )
{
$ficheinterref = dol_sanitizeFileName($fichinter->ref);
$ficheinterref = dol_sanitizeFileName($object->ref);
$file = $conf->ficheinter->dir_output . '/' . $ficheinterref . '/' . $ficheinterref . '.pdf';
if (is_readable($file))
{
$fichinter->fetch_thirdparty();
$object->fetch_thirdparty();
if ($_POST['sendto'])
{
@ -452,12 +472,12 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
// Le destinataire a ete fourni via la liste deroulante
if ($_POST['receiver'] < 0) // Id du tiers
{
$sendto = $fichinter->client->email;
$sendto = $object->client->email;
$sendtoid = 0;
}
else // Id du contact
{
$sendto = $fichinter->client->contact_get_email($_POST['receiver']);
$sendto = $object->client->contact_get_email($_POST['receiver']);
$sendtoid = $_POST['receiver'];
}
}
@ -472,10 +492,10 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
$sendtocc = $_POST['sendtocc'];
$deliveryreceipt = $_POST['deliveryreceipt'];
if ($_POST['action'] == 'send')
if ($action == 'send')
{
if (strlen($_POST['subject'])) $subject = $_POST['subject'];
else $subject = $langs->transnoentities('Intervention').' '.$fichinter->ref;
else $subject = $langs->transnoentities('Intervention').' '.$object->ref;
$actiontypecode='AC_FICH';
$actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto.".\n";
if ($message)
@ -508,22 +528,22 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
$result=$mailfile->sendfile();
if ($result)
{
$mesg='<div class="ok">'.$langs->trans('MailSuccessfulySent',$from,$sendto).'.</div>';
$mesg='<div class="ok">'.$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'.</div>';
$error=0;
// Initialisation donnees
$fichinter->sendtoid = $sendtoid;
$fichinter->actiontypecode = $actiontypecode;
$fichinter->actionmsg = $actionmsg;
$fichinter->actionmsg2 = $actionmsg2;
$fichinter->fk_element = $fichinter->id;
$fichinter->elementtype = $fichinter->element;
$object->sendtoid = $sendtoid;
$object->actiontypecode = $actiontypecode;
$object->actionmsg = $actionmsg;
$object->actionmsg2 = $actionmsg2;
$object->fk_element = $object->id;
$object->elementtype = $object->element;
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($db);
$result=$interface->run_triggers('FICHEINTER_SENTBYMAIL',$fichinter,$user,$langs,$conf);
$result=$interface->run_triggers('FICHEINTER_SENTBYMAIL',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
@ -535,7 +555,7 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
{
// Redirect here
// This avoid sending mail twice if going out and then back to page
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&msg='.urlencode($mesg));
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&msg='.urlencode($mesg));
exit;
}
}
@ -576,6 +596,8 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
$mesg='<div class="error">'.$langs->trans('ErrorFailedToReadEntity',$langs->trans("Intervention")).'</div>';
dol_syslog('Impossible de lire les donnees de l\'intervention. Le fichier intervention n\'a peut-etre pas ete genere.');
}
$action='presend';
}
@ -588,7 +610,7 @@ $formfile = new FormFile($db);
llxHeader();
if ($_GET["action"] == 'create')
if ($action == 'create')
{
/*
* Mode creation
@ -603,7 +625,7 @@ if ($_GET["action"] == 'create')
print_fiche_titre($langs->trans("AddIntervention"));
if ($mesg) print $mesg.'<br>';
dol_htmloutput_mesg($mesg);
if (! $conf->global->FICHEINTER_ADDON)
{
@ -697,44 +719,44 @@ elseif ($fichinterid)
/*
* Affichage en mode visu
*/
$fichinter->fetch_thirdparty();
$object->fetch_thirdparty();
$societe=new Societe($db);
$societe->fetch($fichinter->socid);
$societe->fetch($object->socid);
dol_htmloutput_errors($mesg);
dol_htmloutput_mesg($mesg);
$head = fichinter_prepare_head($fichinter);
$head = fichinter_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), 0, 'intervention');
// Confirmation de la suppression de la fiche d'intervention
if ($_GET['action'] == 'delete')
if ($action == 'delete')
{
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1);
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1);
if ($ret == 'html') print '<br>';
}
// Confirmation validation
if ($_GET['action'] == 'validate')
if ($action == 'validate')
{
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id, $langs->trans('ValidateIntervention'), $langs->trans('ConfirmValidateIntervention'), 'confirm_validate','',0,1);
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $langs->trans('ConfirmValidateIntervention'), 'confirm_validate','',0,1);
if ($ret == 'html') print '<br>';
}
// Confirmation de la validation de la fiche d'intervention
if ($_GET['action'] == 'modify')
if ($action == 'modify')
{
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1);
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1);
if ($ret == 'html') print '<br>';
}
// Confirmation de la suppression d'une ligne d'intervention
if ($_GET['action'] == 'ask_deleteline')
if ($action == 'ask_deleteline')
{
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&ligne='.$_GET["ligne"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.$_GET["ligne"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
if ($ret == 'html') print '<br>';
}
@ -742,16 +764,16 @@ elseif ($fichinterid)
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>';
print $html->showrefnav($fichinter,'ref','',1,'ref','ref');
print $html->showrefnav($object,'ref','',1,'ref','ref');
print '</td></tr>';
// Third party
print "<tr><td>".$langs->trans("Company")."</td><td>".$fichinter->client->getNomUrl(1)."</td></tr>";
print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
// Duration
print '<tr><td>'.$langs->trans("TotalDuration").'</td>';
//print $fichinter->duree.'-'.$conf->global->MAIN_DURATION_OF_WORKDAY;
print '<td>'.ConvertSecondToTime($fichinter->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
//print $object->duree.'-'.$conf->global->MAIN_DURATION_OF_WORKDAY;
print '<td>'.ConvertSecondToTime($object->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
//print '<td>'.ConvertSecondToTime(90000,'all',$conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
print '</tr>';
@ -760,21 +782,21 @@ elseif ($fichinterid)
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Description');
print '</td>';
if ($_GET['action'] != 'editdescription' && $fichinter->statut == 0) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdescription&amp;id='.$fichinter->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
if ($action != 'editdescription' && $object->statut == 0) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdescription&amp;id='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($_GET['action'] == 'editdescription')
if ($action == 'editdescription')
{
print '<form name="editdescription" action="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'" method="post">';
print '<form name="editdescription" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setdescription">';
print '<textarea name="description" wrap="soft" cols="70" rows="'.ROWS_3.'">'.dol_htmlentitiesbr_decode($fichinter->description).'</textarea><br>';
print '<textarea name="description" wrap="soft" cols="70" rows="'.ROWS_3.'">'.dol_htmlentitiesbr_decode($object->description).'</textarea><br>';
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
}
else
{
print nl2br($fichinter->description);
print dol_nl2br($object->description);
}
print '</td>';
print '</tr>';
@ -789,28 +811,28 @@ elseif ($fichinterid)
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($_GET['action'] != 'classin')
if ($action != 'classin')
{
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classin&amp;id='.$fichinter->id.'">';
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classin&amp;id='.$object->id.'">';
print img_edit($langs->trans('SetProject'),1);
print '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="3">';
if ($_GET['action'] == 'classin')
if ($action == 'classin')
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$fichinter->id, $fichinter->socid, $fichinter->fk_project,'projectid');
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid');
}
else
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$fichinter->id, $fichinter->socid, $fichinter->fk_project,'none');
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none');
}
print '</td>';
print '</tr>';
}
// Statut
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$fichinter->getLibStatut(4).'</td></tr>';
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
print "</table>";
@ -847,7 +869,7 @@ elseif ($fichinterid)
$var=!$var;
// Ligne en mode visu
if ($_GET['action'] != 'editline' || $_GET['ligne'] != $objp->rowid)
if ($action != 'editline' || $_GET['ligne'] != $objp->rowid)
{
print '<tr '.$bc[$var].'>';
print '<td>';
@ -864,15 +886,15 @@ elseif ($fichinterid)
// Icone d'edition et suppression
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer)
if ($object->statut == 0 && $user->rights->ficheinter->creer)
{
print '<td align="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=editline&amp;ligne='.$objp->rowid.'#'.$objp->rowid.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;ligne='.$objp->rowid.'#'.$objp->rowid.'">';
print img_edit();
print '</a>';
print '</td>';
print '<td align="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=ask_deleteline&amp;ligne='.$objp->rowid.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=ask_deleteline&amp;ligne='.$objp->rowid.'">';
print img_delete();
print '</a></td>';
if ($num > 1)
@ -880,13 +902,13 @@ elseif ($fichinterid)
print '<td align="center">';
if ($i > 0)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=up&amp;rowid='.$objp->rowid.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=up&amp;rowid='.$objp->rowid.'">';
print img_up();
print '</a>';
}
if ($i < $num-1)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=down&amp;rowid='.$objp->rowid.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=down&amp;rowid='.$objp->rowid.'">';
print img_down();
print '</a>';
}
@ -902,12 +924,12 @@ elseif ($fichinterid)
}
// Ligne en mode update
if ($fichinter->statut == 0 && $_GET["action"] == 'editline' && $user->rights->ficheinter->creer && $_GET["ligne"] == $objp->rowid)
if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && $_GET["ligne"] == $objp->rowid)
{
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'#'.$objp->rowid.'" method="post">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$objp->rowid.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="fichinterid" value="'.$fichinter->id.'">';
print '<input type="hidden" name="fichinterid" value="'.$object->id.'">';
print '<input type="hidden" name="ligne" value="'.$_GET["ligne"].'">';
print '<tr '.$bc[$var].'>';
print '<td>';
@ -944,7 +966,7 @@ elseif ($fichinterid)
/*
* Ajouter une ligne
*/
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer && $_GET["action"] <> 'editline')
if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline')
{
if (! $num) print '<br><table class="noborder" width="100%">';
@ -959,9 +981,9 @@ elseif ($fichinterid)
print "</tr>\n";
// Ajout ligne d'intervention
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'#add" name="addinter" method="post">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#add" name="addinter" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="fichinterid" value="'.$fichinter->id.'">';
print '<input type="hidden" name="fichinterid" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="addline">';
$var=false;
@ -1012,43 +1034,63 @@ elseif ($fichinterid)
if ($user->societe_id == 0)
{
if ($_GET['action'] != 'editdescription')
if ($action != 'editdescription')
{
// Validate
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer)
if ($object->statut == 0 && $user->rights->ficheinter->creer)
{
print '<a class="butAction" href="fiche.php?id='.$_GET["id"].'&action=validate"';
print '<a class="butAction" href="fiche.php?id='.$id.'&action=validate"';
print '>'.$langs->trans("Valid").'</a>';
}
// Modify
if ($fichinter->statut == 1 && $user->rights->ficheinter->creer)
if ($object->statut == 1 && $user->rights->ficheinter->creer)
{
print '<a class="butAction" href="fiche.php?id='.$_GET["id"].'&action=modify"';
print '<a class="butAction" href="fiche.php?id='.$id.'&action=modify"';
print '>'.$langs->trans("Modify").'</a>';
}
// Send
if ($fichinter->statut == 1)
if ($object->statut > 0)
{
$ficheinterref = dol_sanitizeFileName($fichinter->ref);
$ficheinterref = dol_sanitizeFileName($object->ref);
$file = $conf->ficheinter->dir_output . '/'.$ficheinterref.'/'.$ficheinterref.'.pdf';
if (file_exists($file))
{
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=presend&amp;mode=init">'.$langs->trans('SendByMail').'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=presend&amp;mode=init">'.$langs->trans('SendByMail').'</a>';
}
else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>';
}
}
// Delete
if (($fichinter->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer)
// Invoicing
if ($conf->facture->enabled && $object->statut > 0)
{
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&amp;action=delete"';
$langs->load("bills");
if ($object->statut < 2)
{
if ($user->rights->facture->creer) print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
else print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CreateBill").'</a>';
}
if (! empty($conf->global->FICHEINTER_CLASSIFY_BILLED))
{
if ($object->statut != 2)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
}
}
}
// Delete
if (($object->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer)
{
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=delete"';
print '>'.$langs->trans('Delete').'</a>';
}
}
}
@ -1058,9 +1100,9 @@ elseif ($fichinterid)
/*
* Action presend
*/
if ($_GET['action'] == 'presend')
if ($action == 'presend')
{
$ref = dol_sanitizeFileName($fichinter->ref);
$ref = dol_sanitizeFileName($object->ref);
$file = $conf->ficheinter->dir_output . '/' . $ref . '/' . $ref . '.pdf';
print '<br>';
@ -1087,18 +1129,18 @@ elseif ($fichinterid)
$formmail->withcancel=1;
// Tableau des substitutions
$formmail->substit['__FICHREF__']=$fichinter->ref;
$formmail->substit['__FICHREF__']=$object->ref;
// Tableau des parametres complementaires
$formmail->param['action']='send';
$formmail->param['models']='fichinter_send';
$formmail->param['fichinter_id']=$fichinter->id;
$formmail->param['returnurl']=DOL_URL_ROOT.'/fichinter/fiche.php?id='.$fichinter->id;
$formmail->param['fichinter_id']=$object->id;
$formmail->param['returnurl']=DOL_URL_ROOT.'/fichinter/fiche.php?id='.$object->id;
// Init list of files
if (! empty($_REQUEST["mode"]) && $_REQUEST["mode"]=='init')
{
$formmail->clear_attached_files();
$formmail->add_attached_files($file,$fichinter->ref.'.pdf','application/pdf');
$formmail->add_attached_files($file,$object->ref.'.pdf','application/pdf');
}
$formmail->show_form();
@ -1111,9 +1153,9 @@ elseif ($fichinterid)
/*
* Built documents
*/
$filename=dol_sanitizeFileName($fichinter->ref);
$filedir=$conf->ficheinter->dir_output . "/".$fichinter->ref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$fichinter->id;
$filename=dol_sanitizeFileName($object->ref);
$filedir=$conf->ficheinter->dir_output . "/".$object->ref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->ficheinter->creer;
$delallowed=$user->rights->ficheinter->supprimer;
$genallowed=1;
@ -1122,8 +1164,12 @@ elseif ($fichinterid)
$var=true;
print "<br>\n";
$somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$fichinter->modelpdf,1,0,0,28,0,'','','',$societe->default_lang);
$somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$societe->default_lang);
/*
* Linked object block
*/
$somethingshown=$object->showLinkedObjectBlock();
print "</td><td>";
print "&nbsp;</td>";
print "</tr></table>\n";
@ -1132,5 +1178,5 @@ elseif ($fichinterid)
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 17:14:58 $ - $Revision: 1.165 $');
?>

View File

@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -23,7 +23,7 @@
* \file htdocs/fichinter/index.php
* \brief List of all interventions
* \ingroup ficheinter
* \version $Id$
* \version $Id: index.php,v 1.65 2011/07/02 16:48:32 eldy Exp $
*/
require("../main.inc.php");
@ -117,10 +117,11 @@ if ($result)
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="8">';
print '</td><td class="liste_titre">';
print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">';
print '</td><td class="liste_titre" colspan="2">';
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="24">';
print '</td><td class="liste_titre">';
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">';
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
print "</tr>\n";
@ -145,7 +146,8 @@ if ($result)
$companystatic->id=$objp->socid;
$companystatic->client=$objp->client;
print $companystatic->getNomUrl(1,'',44);
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->description,20)).'</td>';
print '</td>';
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->description,20)).'</td>';
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->descriptiondetail,20)).'</td>';
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'dayhour')."</td>\n";
print '<td align="right">'.ConvertSecondToTime($objp->duree).'</td>';
@ -171,5 +173,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.65 $');
?>

View File

@ -22,7 +22,7 @@
* \file htdocs/fichinter/info.php
* \ingroup fichinter
* \brief Page d'affichage des infos d'une fiche d'intervention
* \version $Id$
* \version $Id: info.php,v 1.14 2011/07/02 17:33:24 eldy Exp $
*/
require("../main.inc.php");
@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");
$langs->load('companies');
$langs->load("interventions");
$fichinterid = GETPOST("id");
@ -64,5 +65,5 @@ print '</div>';
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 17:33:24 $ - $Revision: 1.14 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/fichinter/note.php
* \ingroup fichinter
* \brief Fiche d'information sur une fiche d'intervention
* \version $Id$
* \version $Id: note.php,v 1.18 2011/07/02 17:33:24 eldy Exp $
*/
require("../main.inc.php");
@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");
$langs->load('companies');
$langs->load("interventions");
$fichinterid = GETPOST("id");
$action=GETPOST("action");
@ -167,5 +168,5 @@ if ($fichinterid)
}
}
$db->close();
llxFooter('$Date$ - $Revision: 1.15 ');
llxFooter('$Date: 2011/07/02 17:33:24 $ - $Revision: 1.15 ');
?>

View File

@ -17,12 +17,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Id: rapport.php,v 1.25 2011/07/02 17:33:24 eldy Exp $
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
$langs->load("interventions");
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
@ -142,5 +144,5 @@ else
}
$db->close();
llxFooter("$Date$ - $Revision$");
llxFooter("$Date: 2011/07/02 17:33:24 $ - $Revision: 1.25 $");
?>

View File

@ -0,0 +1,58 @@
<?php
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: linkedobjectblock.tpl.php,v 1.1 2011/07/01 16:24:44 simnandez Exp $
*/
?>
<!-- BEGIN PHP TEMPLATE -->
<?php
$langs = $GLOBALS['langs'];
$linkedObjectBlock = $GLOBALS['object']->linkedObjectBlock;
$langs->load("interventions");
echo '<br />';
print_titre($langs->trans('RelatedInterventions'));
?>
<table class="noborder" width="100%">
<tr class="liste_titre">
<td><?php echo $langs->trans("Ref"); ?></td>
<td align="center"><?php echo $langs->trans("Date"); ?></td>
<td align="right"><?php echo $langs->trans("Status"); ?></td>
</tr>
<?php
$var=true;
foreach($linkedObjectBlock as $object)
{
$var=!$var;
?>
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
<a href="<?php echo DOL_URL_ROOT.'/fichinter/fiche.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowIntervention"),"intervention").' '.$object->ref; ?></a></td>
<td align="center"><?php echo dol_print_date($object->datev,'day'); ?></td>
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
</tr>
<?php
}
?>
</table>
<!-- END PHP TEMPLATE -->

View File

@ -25,7 +25,7 @@
* \file htdocs/fourn/commande/fiche.php
* \ingroup supplier, order
* \brief Card supplier order
* \version $Id$
* \version $Id: fiche.php,v 1.230 2011/07/02 16:48:32 eldy Exp $
*/
require("../../main.inc.php");
@ -559,7 +559,7 @@ if ($action == 'create')
}
$id=$orderid;
$db->commit();
}
else
@ -685,7 +685,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
$result=$mailfile->sendfile();
if ($result)
{
$mesg=$langs->trans('MailSuccessfulySent',$from,$sendto); // Must not contain "
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "
$error=0;
@ -1545,5 +1545,5 @@ if ($id > 0 || ! empty($ref))
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.230 $');
?>

View File

@ -25,7 +25,7 @@
* \file htdocs/fourn/facture/fiche.php
* \ingroup facture, fournisseur
* \brief Page for supplier invoice card (view, edit, validate)
* \version $Id$
* \version $Id: fiche.php,v 1.259 2011/07/02 16:48:32 eldy Exp $
*/
require("../../main.inc.php");
@ -738,7 +738,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile']
$result=$mailfile->sendfile();
if ($result)
{
$mesg=$langs->trans('MailSuccessfulySent',$from,$sendto); // Must not contain "
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain "
$error=0;
@ -1916,5 +1916,5 @@ else
$db->close();
llxFooter('$Date$ - $Revision$');
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.259 $');
?>

View File

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

View File

@ -48,7 +48,6 @@
padding: 0 5px;
font: bold 1.4em Arial,Helvetica,sans-serif;
line-height: 1em;
color: #fff;
text-decoration: none;
z-index: 3;
cursor: pointer;
@ -59,7 +58,7 @@
z-index: 2;
padding: 20px;
text-align: left;
color: #fff;
color: #446548;
font: bold 1.2em verdana, arial, helvetica;
line-height: 1.2em;
}

View File

@ -0,0 +1,96 @@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
* used when the cookie was set.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// CAUTION: Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};

View File

@ -0,0 +1,99 @@
/*
* jQuery Hotkeys Plugin
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Based upon the plugin by Tzury Bar Yochay:
* http://github.com/tzuryby/hotkeys
*
* Original idea by:
* Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
(function(jQuery){
jQuery.hotkeys = {
version: "0.8",
specialKeys: {
8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
},
shiftNums: {
"`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
"8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
".": ">", "/": "?", "\\": "|"
}
};
function keyHandler( handleObj ) {
// Only care when a possible input has been specified
if ( typeof handleObj.data !== "string" ) {
return;
}
var origHandler = handleObj.handler,
keys = handleObj.data.toLowerCase().split(" ");
handleObj.handler = function( event ) {
// Don't fire in text-accepting inputs that we didn't directly bind to
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
event.target.type === "text") ) {
return;
}
// Keypress represents characters, not special keys
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
character = String.fromCharCode( event.which ).toLowerCase(),
key, modif = "", possible = {};
// check combinations (alt|ctrl|shift+anything)
if ( event.altKey && special !== "alt" ) {
modif += "alt+";
}
if ( event.ctrlKey && special !== "ctrl" ) {
modif += "ctrl+";
}
// TODO: Need to make sure this works consistently across platforms
if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
modif += "meta+";
}
if ( event.shiftKey && special !== "shift" ) {
modif += "shift+";
}
if ( special ) {
possible[ modif + special ] = true;
} else {
possible[ modif + character ] = true;
possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
if ( modif === "shift+" ) {
possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
}
}
for ( var i = 0, l = keys.length; i < l; i++ ) {
if ( possible[ keys[i] ] ) {
return origHandler.apply( this, arguments );
}
}
};
}
jQuery.each([ "keydown", "keyup", "keypress" ], function() {
jQuery.event.special[ this ] = { add: keyHandler };
});
})( jQuery );

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

View File

@ -0,0 +1,61 @@
/*
* jsTree apple theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-apple > ul { background:url("bg.jpg") left top repeat; }
.jstree-apple li,
.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-apple li.jstree-last { background:transparent; }
.jstree-apple .jstree-open > ins { background-position:-72px 0; }
.jstree-apple .jstree-closed > ins { background-position:-54px 0; }
.jstree-apple .jstree-leaf > ins { background-position:-36px 0; }
.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; }
.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
.jstree-apple a .jstree-icon { background-position:-56px -20px; }
.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-apple.jstree-focused { background:white; }
.jstree-apple .jstree-no-dots li,
.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-apple .jstree-no-icons a .jstree-icon { display:none; }
.jstree-apple .jstree-search { font-style:italic; }
.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; }
.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-apple ins { background:transparent !important; }
#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-apple a.jstree-search { color:aqua; }
.jstree-apple .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-apple-context,
#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-apple-context li { }
#vakata-contextmenu.jstree-apple-context a { color:black; }
#vakata-contextmenu.jstree-apple-context a:hover,
#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
/* TODO: IE6 support - the `>` selectors */

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

View File

@ -0,0 +1,77 @@
/*
* jsTree classic theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-classic li,
.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-classic li.jstree-last { background:transparent; }
.jstree-classic .jstree-open > ins { background-position:-72px 0; }
.jstree-classic .jstree-closed > ins { background-position:-54px 0; }
.jstree-classic .jstree-leaf > ins { background-position:-36px 0; }
.jstree-classic .jstree-hovered { background:#e7f4f9; border:1px solid #e7f4f9; padding:0 2px 0 1px; }
.jstree-classic .jstree-clicked { background:navy; border:1px solid navy; padding:0 2px 0 1px; color:white; }
.jstree-classic a .jstree-icon { background-position:-56px -19px; }
.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; }
.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-classic.jstree-focused { background:white; }
.jstree-classic .jstree-no-dots li,
.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-classic .jstree-no-icons a .jstree-icon { display:none; }
.jstree-classic .jstree-search { font-style:italic; }
.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-classic ins { background:transparent !important; }
#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-classic a.jstree-search { color:aqua; }
.jstree-classic .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-classic-context,
#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-classic-context li { }
#vakata-contextmenu.jstree-classic-context a { color:black; }
#vakata-contextmenu.jstree-classic-context a:hover,
#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-classic li,
.jstree-classic ins,
#vakata-dragged.jstree-classic .jstree-invalid,
#vakata-dragged.jstree-classic .jstree-ok,
#jstree-marker.jstree-classic { _background-image:url("d.gif"); }
.jstree-classic .jstree-open ins { _background-position:-72px 0; }
.jstree-classic .jstree-closed ins { _background-position:-54px 0; }
.jstree-classic .jstree-leaf ins { _background-position:-36px 0; }
.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; }
.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; }
.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-classic-context ins { _display:none; }
#vakata-contextmenu.jstree-classic-context li { _zoom:1; }
.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
/* IE6 END */

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

View File

@ -0,0 +1,84 @@
/*
* jsTree default-rtl theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-default-rtl li,
.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-default-rtl li.jstree-last { background:transparent; }
.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; }
.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; }
.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; }
.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; }
.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-default-rtl.jstree-focused { background:#ffffee; }
.jstree-default-rtl .jstree-no-dots li,
.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; }
.jstree-default-rtl .jstree-search { font-style:italic; }
.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-default-rtl ins { background:transparent !important; }
#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-default-rtl a.jstree-search { color:aqua; }
.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-default-rtl-context,
#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-default-rtl-context li { }
#vakata-contextmenu.jstree-default-rtl-context a { color:black; }
#vakata-contextmenu.jstree-default-rtl-context a:hover,
#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-default-rtl li,
.jstree-default-rtl ins,
#vakata-dragged.jstree-default-rtl .jstree-invalid,
#vakata-dragged.jstree-default-rtl .jstree-ok,
#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); }
.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; }
.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; }
.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; }
.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; }
#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; }
.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; }
.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; }
.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; }
/* IE6 END */
/* RTL part */
.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; }
.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -0,0 +1,74 @@
/*
* jsTree default theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-default li,
.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-default li.jstree-last { background:transparent; }
.jstree-default .jstree-open > ins { background-position:-72px 0; }
.jstree-default .jstree-closed > ins { background-position:-54px 0; }
.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
.jstree-default a .jstree-icon { background-position:-56px -19px; }
.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-default.jstree-focused { background:#ffffee; }
.jstree-default .jstree-no-dots li,
.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
.jstree-default .jstree-search { font-style:italic; }
.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-default ins { background:transparent !important; }
#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-default a.jstree-search { color:aqua; }
.jstree-default .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-default-context,
#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-default-context li { }
#vakata-contextmenu.jstree-default-context a { color:black; }
#vakata-contextmenu.jstree-default-context a:hover,
#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-default li,
.jstree-default ins,
#vakata-dragged.jstree-default .jstree-invalid,
#vakata-dragged.jstree-default .jstree-ok,
#jstree-marker.jstree-default { _background-image:url("d.gif"); }
.jstree-default .jstree-open ins { _background-position:-72px 0; }
.jstree-default .jstree-closed ins { _background-position:-54px 0; }
.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-default-context ins { _display:none; }
#vakata-contextmenu.jstree-default-context li { _zoom:1; }
.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
/* IE6 END */

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,191 @@
/*
* TipTip
* Copyright 2010 Drew Wilson
* www.drewwilson.com
* code.drewwilson.com/entry/tiptip-jquery-plugin
*
* Version 1.3 - Updated: Mar. 23, 2010
*
* This Plug-In will create a custom tooltip to replace the default
* browser tooltip. It is extremely lightweight and very smart in
* that it detects the edges of the browser window and will make sure
* the tooltip stays within the current window size. As a result the
* tooltip will adjust itself to be displayed above, below, to the left
* or to the right depending on what is necessary to stay within the
* browser window. It is completely customizable as well via CSS.
*
* This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($){
$.fn.tipTip = function(options) {
var defaults = {
activation: "hover",
keepAlive: false,
maxWidth: "200px",
edgeOffset: 3,
defaultPosition: "bottom",
delay: 400,
fadeIn: 200,
fadeOut: 200,
attribute: "title",
content: false, // HTML or String to fill TipTIp with
enter: function(){},
exit: function(){}
};
var opts = $.extend(defaults, options);
// Setup tip tip elements and render them to the DOM
if($("#tiptip_holder").length <= 0){
var tiptip_holder = $('<div id="tiptip_holder" style="max-width:'+ opts.maxWidth +';"></div>');
var tiptip_content = $('<div id="tiptip_content"></div>');
var tiptip_arrow = $('<div id="tiptip_arrow"></div>');
$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
} else {
var tiptip_holder = $("#tiptip_holder");
var tiptip_content = $("#tiptip_content");
var tiptip_arrow = $("#tiptip_arrow");
}
return this.each(function(){
var org_elem = $(this);
if(opts.content){
var org_title = opts.content;
} else {
var org_title = org_elem.attr(opts.attribute);
}
if(org_title != ""){
if(!opts.content){
org_elem.removeAttr(opts.attribute); //remove original Attribute
}
var timeout = false;
if(opts.activation == "hover"){
org_elem.hover(function(){
active_tiptip();
}, function(){
if(!opts.keepAlive){
deactive_tiptip();
}
});
if(opts.keepAlive){
tiptip_holder.hover(function(){}, function(){
deactive_tiptip();
});
}
} else if(opts.activation == "focus"){
org_elem.focus(function(){
active_tiptip();
}).blur(function(){
deactive_tiptip();
});
} else if(opts.activation == "click"){
org_elem.click(function(){
active_tiptip();
return false;
}).hover(function(){},function(){
if(!opts.keepAlive){
deactive_tiptip();
}
});
if(opts.keepAlive){
tiptip_holder.hover(function(){}, function(){
deactive_tiptip();
});
}
}
function active_tiptip(){
opts.enter.call(this);
tiptip_content.html(org_title);
tiptip_holder.hide().removeAttr("class").css("margin","0");
tiptip_arrow.removeAttr("style");
var top = parseInt(org_elem.offset()['top']);
var left = parseInt(org_elem.offset()['left']);
var org_width = parseInt(org_elem.outerWidth());
var org_height = parseInt(org_elem.outerHeight());
var tip_w = tiptip_holder.outerWidth();
var tip_h = tiptip_holder.outerHeight();
var w_compare = Math.round((org_width - tip_w) / 2);
var h_compare = Math.round((org_height - tip_h) / 2);
var marg_left = Math.round(left + w_compare);
var marg_top = Math.round(top + org_height + opts.edgeOffset);
var t_class = "";
var arrow_top = "";
var arrow_left = Math.round(tip_w - 12) / 2;
if(opts.defaultPosition == "bottom"){
t_class = "_bottom";
} else if(opts.defaultPosition == "top"){
t_class = "_top";
} else if(opts.defaultPosition == "left"){
t_class = "_left";
} else if(opts.defaultPosition == "right"){
t_class = "_right";
}
var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
var left_compare = (tip_w + left) > parseInt($(window).width());
if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
t_class = "_right";
arrow_top = Math.round(tip_h - 13) / 2;
arrow_left = -12;
marg_left = Math.round(left + org_width + opts.edgeOffset);
marg_top = Math.round(top + h_compare);
} else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
t_class = "_left";
arrow_top = Math.round(tip_h - 13) / 2;
arrow_left = Math.round(tip_w);
marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
marg_top = Math.round(top + h_compare);
}
var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop());
var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
if(t_class == "_top" || t_class == "_bottom"){
t_class = "_top";
} else {
t_class = t_class+"_top";
}
arrow_top = tip_h;
marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
} else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
if(t_class == "_top" || t_class == "_bottom"){
t_class = "_bottom";
} else {
t_class = t_class+"_bottom";
}
arrow_top = -12;
marg_top = Math.round(top + org_height + opts.edgeOffset);
}
if(t_class == "_right_top" || t_class == "_left_top"){
marg_top = marg_top + 5;
} else if(t_class == "_right_bottom" || t_class == "_left_bottom"){
marg_top = marg_top - 5;
}
if(t_class == "_left_top" || t_class == "_left_bottom"){
marg_left = marg_left + 5;
}
tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"});
tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class);
if (timeout){ clearTimeout(timeout); }
timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay);
}
function deactive_tiptip(){
opts.exit.call(this);
if (timeout){ clearTimeout(timeout); }
tiptip_holder.fadeOut(opts.fadeOut);
}
}
});
}
})(jQuery);

Binary file not shown.

View File

@ -0,0 +1,21 @@
/*
* TipTip
* Copyright 2010 Drew Wilson
* www.drewwilson.com
* code.drewwilson.com/entry/tiptip-jquery-plugin
*
* Version 1.3 - Updated: Mar. 23, 2010
*
* This Plug-In will create a custom tooltip to replace the default
* browser tooltip. It is extremely lightweight and very smart in
* that it detects the edges of the browser window and will make sure
* the tooltip stays within the current window size. As a result the
* tooltip will adjust itself to be displayed above, below, to the left
* or to the right depending on what is necessary to stay within the
* browser window. It is completely customizable as well via CSS.
*
* This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);

View File

@ -0,0 +1,113 @@
/* TipTip CSS - Version 1.2 */
#tiptip_holder {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99999;
}
#tiptip_holder.tip_top {
padding-bottom: 5px;
}
#tiptip_holder.tip_bottom {
padding-top: 5px;
}
#tiptip_holder.tip_right {
padding-left: 5px;
}
#tiptip_holder.tip_left {
padding-right: 5px;
}
#tiptip_content {
font-size: 11px;
color: #000;
padding: 4px 8px;
border: 1px solid rgba(255,255,255,0.25);
background-color: rgb(215,215,215);
background-color: rgba(255,255,255,0.94);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
box-shadow: 0 0 5px #555;
-webkit-box-shadow: 0 0 5px #555;
-moz-box-shadow: 0 0 5px #555;
}
#tiptip_arrow, #tiptip_arrow_inner {
position: absolute;
border-color: transparent;
border-style: solid;
border-width: 6px;
height: 0;
width: 0;
}
#tiptip_holder.tip_top #tiptip_arrow {
border-top-color: #fff;
border-top-color: rgba(255,255,255,0.35);
}
#tiptip_holder.tip_bottom #tiptip_arrow {
border-bottom-color: #fff;
border-bottom-color: rgba(255,255,255,0.35);
}
#tiptip_holder.tip_right #tiptip_arrow {
border-right-color: #fff;
border-right-color: rgba(255,255,255,0.35);
}
#tiptip_holder.tip_left #tiptip_arrow {
border-left-color: #fff;
border-left-color: rgba(255,255,255,0.35);
}
#tiptip_holder.tip_top #tiptip_arrow_inner {
margin-top: -7px;
margin-left: -6px;
border-top-color: rgb(25,25,25);
border-top-color: rgba(25,25,25,0.92);
}
#tiptip_holder.tip_bottom #tiptip_arrow_inner {
margin-top: -5px;
margin-left: -6px;
border-bottom-color: rgb(25,25,25);
border-bottom-color: rgba(25,25,25,0.92);
}
#tiptip_holder.tip_right #tiptip_arrow_inner {
margin-top: -6px;
margin-left: -5px;
border-right-color: rgb(25,25,25);
border-right-color: rgba(25,25,25,0.92);
}
#tiptip_holder.tip_left #tiptip_arrow_inner {
margin-top: -6px;
margin-left: -7px;
border-left-color: rgb(25,25,25);
border-left-color: rgba(25,25,25,0.92);
}
/* Webkit Hacks */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#tiptip_content {
padding: 4px 8px 5px 8px;
background-color: rgba(45,45,45,0.88);
}
#tiptip_holder.tip_bottom #tiptip_arrow_inner {
border-bottom-color: rgba(45,45,45,0.88);
}
#tiptip_holder.tip_top #tiptip_arrow_inner {
border-top-color: rgba(20,20,20,0.92);
}
}

View File

@ -1,9 +0,0 @@
#tooltip {
position: absolute;
z-index: 3000;
border: 1px solid #111;
background-color: #eee;
padding: 5px;
opacity: 0.85;
}
#tooltip h3, #tooltip div { margin: 0; }

View File

@ -1,19 +0,0 @@
/*
* jQuery Tooltip plugin 1.3
*
* http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
* http://docs.jquery.com/Plugins/Tooltip
*
* Copyright (c) 2006 - 2008 Jörn Zaefferer
*
* $Id$
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);

View File

@ -23,8 +23,8 @@
/**
* \file htdocs/includes/modules/fichinter/mod_arctic.php
* \ingroup fiche intervention
* \brief Fichier contenant la classe du mod<EFBFBD>le de num<EFBFBD>rotation de r<EFBFBD>f<EFBFBD>rence de fiche intervention Arctic
* \version $Id$
* \brief File with Arctic numbering module for interventions
* \version $Id: mod_arctic.php,v 1.18 2011/07/02 15:46:02 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
@ -45,7 +45,7 @@ class mod_arctic extends ModeleNumRefFicheinter
$this->nom = "arctic";
}
/** \brief Renvoi la description du modele de num<EFBFBD>rotation
/** \brief Renvoi la description du modele de numerotation
* \return string Texte descripif
*/
function info()
@ -83,7 +83,7 @@ class mod_arctic extends ModeleNumRefFicheinter
return $texte;
}
/** \brief Renvoi un exemple de num<EFBFBD>rotation
/** \brief Renvoi un exemple de numerotation
* \return string Example
*/
function getExample()
@ -102,12 +102,12 @@ class mod_arctic extends ModeleNumRefFicheinter
return $numExample;
}
/** \brief Renvoi prochaine valeur attribu<EFBFBD>e
* \param objsoc Objet soci<EFBFBD>t<EFBFBD>
/** \brief Renvoi prochaine valeur attribuee
* \param objsoc Objet societe
* \param ficheinter Object ficheinter
* \return string Valeur
*/
function getNextValue($objsoc=0,$ficheinter='')
function getNextValue($objsoc=0,$object='')
{
global $db,$conf;
@ -122,7 +122,7 @@ class mod_arctic extends ModeleNumRefFicheinter
return 0;
}
$numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$ficheinter->date);
$numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$object->date);
return $numFinal;
}

View File

@ -19,12 +19,11 @@
*/
/**
\file htdocs/includes/modules/fichinter/mod_pacific.php
\ingroup fiche intervention
\brief Fichier contenant la classe du modele de numerotation de reference de fiche intervention Pacific
\version $Id$
* \file htdocs/includes/modules/fichinter/mod_pacific.php
* \ingroup fiche intervention
* \brief File with Pacific numbering module for interventions
* \version $Id: mod_pacific.php,v 1.12 2011/07/02 15:46:02 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
/**
@ -33,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.p
*/
class mod_pacific extends ModeleNumRefFicheinter
{
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
var $prefix='FI';
var $error='';
var $nom = 'pacific';
@ -124,7 +124,7 @@ class mod_pacific extends ModeleNumRefFicheinter
}
/** \brief Return next free value
* \param objsoc Object third party
* \param objsoc Object third party
* \param objforref Object for number to search
* \return string Next free value
*/

View File

@ -23,7 +23,7 @@
/**
* \defgroup societe Module societe
* \brief Module to manage third parties (customers, prospects)
* \version $Id: modSociete.class.php,v 1.117 2011/06/30 13:27:21 hregis Exp $
* \version $Id: modSociete.class.php,v 1.118 2011/07/01 23:07:26 eldy Exp $
*/
/**
@ -106,7 +106,8 @@ class modSociete extends DolibarrModules
$this->const[$r][3] = "";
$this->const[$r][4] = 0;
$r++;
/* Disabled (no hook by default). A module that wants to hook thirdparty or contact actions must add its own constant MAIN_MODULE_MYMODULE_HOOKS=thirdpartycard:contactcard)
$this->const[$r][0] = "MAIN_MODULE_SOCIETE_HOOKS";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "thirdpartycard:contactcard";
@ -114,7 +115,7 @@ class modSociete extends DolibarrModules
$this->const[$r][4] = 0;
$this->const[$r][4] = 'current';
$this->const[$r][4] = 1;
$r++;
$r++; */
// Boxes
$this->boxes = array();

View File

@ -1,4 +1,4 @@
# Dolibarr language file - ca_ES - boxes
# Dolibarr language file - ca_ES - boxes
CHARSET=UTF-8
BoxLastRssInfos=Fils d'informació RSS
BoxLastProducts=Els %s últims productes/serveis
@ -16,6 +16,7 @@ BoxLastBooks=Últims books
BoxLastActions=Últims esdeveniments
BoxLastContracts=Últims contractes
BoxLastContacts=Últims contactes/adreçes
BoxLastMembers=Últims membres modificats
BoxCurrentAccounts=Saldos comptes corrents
BoxSalesTurnover=Volum de negoci
BoxTotalUnpaidCustomerBills=Total factures a clients pendents de cobrament
@ -43,6 +44,7 @@ BoxTitleSalesTurnover=Volum de negoci realitzat
BoxTitleTotalUnpaidCustomerBills=Pendent de clients
BoxTitleTotalUnpaidSuppliersBills=Pendent a proveïdors
BoxTitleLastModifiedContacts=Els últims %s contactes/adreçes modificades
BoxTitleLastModifiedMembers=Els %s últims membres modificats
BoxMyLastBookmarks=Els meus %s darrers marcadors
FailedToRefreshDataInfoNotUpToDate=Error en el refresc del flux RSS. Data de l'últim refresc :%s
LastRefreshDate=Data darrera actualització
@ -52,6 +54,8 @@ NoRecordedCustomers=Cap client registrat
NoRecordedContacts=Cap contacte registrat
BoxTitleLastActionsToDo=Les %s últims esdeveniments a realitzar
BoxTitleLastContracts=Els %s últims contractes
BoxTitleLastModifiedDonations=Les %s últimes subvencions modificades
BoxTitleLastModifiedExpenses=Els %s últims honoraris modificats
NoActionsToDo=Sense esdeveniments a realitzar
NoRecordedOrders=Sense comandes de clients registrats
NoRecordedProposals=Sense pressupostos registrats
@ -63,4 +67,4 @@ NoModifiedSupplierBills=Sense factures de proveïdors modificades
NoRecordedProducts=Sense productes/serveis registrats
NoRecordedProspects=Sense clients potencials registrats
NoContractedProducts=Sense productes/serveis contractats
NoRecordedContracts=Sense contractes registrats
NoRecordedContracts=Sense contractes registrats

View File

@ -23,4 +23,5 @@ DonationStatusPaidShort= Pagada
ValidPromess= Validar promesa
BuildDonationReceipt= Crear rebut
DonationsModels= Model de document de recepció de subvenció
LastModifiedDonations=Less %s últimes subvencions modificades
LastModifiedDonations=Less %s últimes subvencions modificades
SearchADonation=Cercar una subvenció

View File

@ -34,6 +34,10 @@ InterLineId=Id línea detall
InterLineDate=Data línea
InterLineDuration=Duració línea
InterLineDesc=Descripció linea
ClassifyBilled=Classificar "Facturado"
StatusInterInvoiced=Facturado
RelatedInterventions=Intervencions adjuntes
ShowIntervention=Mostrar intervenció
##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Responsable seguiment de la intervenció
TypeContact_fichinter_internal_INTERVENING=Interventor

View File

@ -19,3 +19,5 @@ TF_OTHER=Altre
TF_LUNCH=Dieta
TF_TRIP=Viatge
ListTripsAndExpenses=Llistat notes de honoraris
ExpensesArea=Àrea Notes d'honoraris
SearchATripAndExpense=Cercar un honorari

View File

@ -23,4 +23,5 @@ DonationStatusPaidShort=Received
ValidPromess=Validate promise
BuildDonationReceipt=Build receipt
DonationsModels=Documents models for donation receipts
LastModifiedDonations=Last %s modified donations
LastModifiedDonations=Last %s modified donations
SearchADonation=Search a donation

View File

@ -23,6 +23,10 @@ ConfirmDeleteInterventionLine=Are you sure you want to delete this intervention
NameAndSignatureOfInternalContact=Name and signature of intervening :
NameAndSignatureOfExternalContact=Name and signature of customer :
DocumentModelStandard=Standard document model for interventions
ClassifyBilled=Classify "Billed"
StatusInterInvoiced=Billed
RelatedInterventions=Related interventions
ShowIntervention=Show intervention
##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Representative following-up intervention
TypeContact_fichinter_internal_INTERVENING=Intervening

View File

@ -18,4 +18,5 @@ TF_OTHER=Other
TF_LUNCH=Lunch
TF_TRIP=Trip
ListTripsAndExpenses=List of trips and expenses
ExpensesArea=Trips and exepenses area
ExpensesArea=Trips and exepenses area
SearchATripAndExpense=Search a trip and expense

View File

@ -1,4 +1,4 @@
# Dolibarr language file - es_ES - boxes
# Dolibarr language file - es_ES - boxes
CHARSET=UTF-8
BoxLastRssInfos=Hilos de información RSS
BoxLastProducts=Los %s últimos productos/servicios
@ -16,6 +16,7 @@ BoxLastBooks=Últimos books
BoxLastActions=Últimos eventos
BoxLastContracts=Últimos contratos
BoxLastContacts=Últimos contactos/direcciones
BoxLastMembers=Últimos miembros modificados
BoxCurrentAccounts=Saldos cuentas corrientes
BoxSalesTurnover=Volumen de negocio
BoxTotalUnpaidCustomerBills=Total facturas a clientes pendientes de pago
@ -43,6 +44,7 @@ BoxTitleSalesTurnover=Volumen de negocio realizado
BoxTitleTotalUnpaidCustomerBills=Pendiente de clientes
BoxTitleTotalUnpaidSuppliersBills=Pendiente a proveedores
BoxTitleLastModifiedContacts=Los %s últimos contactos/direcciones modificadas
BoxTitleLastModifiedMembers=Los %s últimos miembros modificados
BoxMyLastBookmarks=Mis %s últimos marcadores
FailedToRefreshDataInfoNotUpToDate=Error en el refresco del flujo RSS. Fecha del último refresco: %s
LastRefreshDate=Fecha última actualización
@ -52,6 +54,8 @@ NoRecordedCustomers=Ningún cliente registrado
NoRecordedContacts=Ningún contacto registrado
BoxTitleLastActionsToDo=Los %s últimos eventos a realizar
BoxTitleLastContracts=Los %s últimos contratos
BoxTitleLastModifiedDonations=Las %s últimas subvenciones modificadas
BoxTitleLastModifiedExpenses=Los %s últimos honorarios modificados
NoActionsToDo=Sin eventos a realizar
NoRecordedOrders=Sin pedidos de clientes registrados
NoRecordedProposals=Sin presupuestos registrados

View File

@ -23,4 +23,5 @@ DonationStatusPaidShort=Pagada
ValidPromess=Validar promesa
BuildDonationReceipt=Crear recibo
DonationsModels=Modelo de documento de recepción de subvención
LastModifiedDonations=Las %s últimas subvenciones modificadas
LastModifiedDonations=Las %s últimas subvenciones modificadas
SearchADonation=Buscar una subvención

View File

@ -34,6 +34,10 @@ InterLineId=Id línea detalle
InterLineDate=Fecha línea
InterLineDuration=Duración línea
InterLineDesc=Descripción linea
ClassifyBilled=Clasificar "Facturado"
StatusInterInvoiced=Facturado
RelatedInterventions=Intervenciones adjuntas
ShowIntervention=Mostrar intervención
##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Responsable seguimiento de la intervención
TypeContact_fichinter_internal_INTERVENING=Interventor

View File

@ -19,3 +19,5 @@ TF_OTHER=Otro
TF_LUNCH=Dieta
TF_TRIP=Viaje
ListTripsAndExpenses=Listado notas de honorarios
ExpensesArea=Área de Notas de honorarios
SearchATripAndExpense=Buscar un honorario

View File

@ -23,4 +23,5 @@ DonationStatusPaidShort=Payé
ValidPromess=Valider promesse
BuildDonationReceipt=Créer reçu
DonationsModels=Modèle de document de bon de réception de dons
LastModifiedDonations=Les %s derniers dons modifiés
LastModifiedDonations=Les %s derniers dons modifiés
SearchADonation=Rechercher un don

View File

@ -35,6 +35,10 @@ InterLineDate=Date ligne
InterLineDuration=Durée ligne
InterLineDesc=Description ligne
DocumentModelStandard=Modèle de fiche d'intervention standard
ClassifyBilled=Classer "Facturée"
StatusInterInvoiced=Facturée
RelatedInterventions=Interventions rattachées
ShowIntervention=Afficher intervention
##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Responsable suivi de l'intervention
TypeContact_fichinter_internal_INTERVENING=Intervenant

View File

@ -19,4 +19,5 @@ TF_OTHER=Autre
TF_LUNCH=Repas
TF_TRIP=Déplacement
ListTripsAndExpenses=Liste des notes de frais
ExpensesArea=Espace Notes de frais
ExpensesArea=Espace Notes de frais
SearchATripAndExpense=Rechercher une note de frais

View File

@ -25,7 +25,7 @@
/**
* \file htdocs/lib/CMailFile.class.php
* \brief File of class to send emails (with attachments or not)
* \version $Id$
* \version $Id: CMailFile.class.php,v 1.142 2011/07/02 16:48:31 eldy Exp $
* \author Dan Potter.
* \author Eric Seigne
* \author Laurent Destailleur.
@ -416,7 +416,7 @@ class CMailFile
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
$res=false;
}
if ($res)
{
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->smtps->setDebug(true);
@ -604,7 +604,7 @@ class CMailFile
$out.= "Content-Type: multipart/mixed; boundary=\"".$this->mixed_boundary."\"".$this->eol;
$out.= "Content-Transfer-Encoding: 8bit".$this->eol;
dol_syslog("CMailFile::write_smtpheaders smtp_header=\n".$out);
return $out;
}
@ -649,7 +649,7 @@ class CMailFile
global $conf;
$out='';
if ($this->atleastoneimage)
{
$out.= "--" . $this->mixed_boundary . $this->eol;
@ -661,7 +661,7 @@ class CMailFile
{
$out.= "--" . $this->mixed_boundary . $this->eol;
}
if ($this->msgishtml)
{
// Check if html header already in message
@ -680,7 +680,7 @@ class CMailFile
if ($this->msgishtml)
{
if ($this->atleastoneimage)
if ($this->atleastoneimage)
{
$out.= "Content-Type: text/plain; charset=".$conf->file->character_set_client.$this->eol;
$out.= $this->eol.strip_tags($strContent).$this->eol; // Add plain text message
@ -697,7 +697,7 @@ class CMailFile
$out.= "Content-Type: text/plain; charset=".$conf->file->character_set_client.$this->eol;
$out.= $this->eol.$strContent.$this->eol;
}
$out.= $this->eol;
return $out;
@ -940,7 +940,7 @@ class CMailFile
/**
* Return an address for SMTP protocol
*
* @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
* @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
* @param format 0=Auto, 1=emails with <>, 2=emails without <>
* @param encode 1=Encode name to RFC2822
* @return string If format 1: '<john@doe.com>' or 'John Doe <john@doe.com>'

View File

@ -29,7 +29,7 @@
* \file htdocs/lib/functions.lib.php
* \brief A set of functions for Dolibarr
* This file contains all frequently used functions.
* \version $Id: functions.lib.php,v 1.532 2011/06/26 00:42:23 eldy Exp $
* \version $Id: functions.lib.php,v 1.533 2011/07/02 16:48:31 eldy Exp $
*/
// For compatibility during upgrade
@ -3842,7 +3842,12 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
else if ($mesgstring && preg_match('/class="error"/i',$mesgstring)) $iserror++;
if ($style=='error') $iserror++;
if ($iserror) print get_htmloutput_mesg($mesgstring,$mesgarray,'error',$keepembedded);
if ($iserror)
{
$mesgstring=preg_replace('/<div class="error">/','',$mesgstring);
$mesgstring=preg_replace('/<\/div>/','',$mesgstring);
print get_htmloutput_mesg($mesgstring,$mesgarray,'error',$keepembedded);
}
else print get_htmloutput_mesg($mesgstring,$mesgarray,'ok',$keepembedded);
}

View File

@ -26,7 +26,7 @@
* \file htdocs/main.inc.php
* \ingroup core
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
* \version $Id: main.inc.php,v 1.745 2011/06/30 13:40:34 hregis Exp $
* \version $Id: main.inc.php,v 1.747 2011/07/02 05:49:56 hregis Exp $
*/
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
@ -905,7 +905,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
$jquerytheme = 'smoothness';
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" type="text/css" />'."\n"; // JQuery
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tooltip/jquery.tooltip.css" type="text/css" />'."\n"; // Tooltip
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" type="text/css" />'."\n"; // Tooltip
print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" type="text/css" />'."\n"; // JNotify
//print '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/css/jquery.lightbox-0.5.css" media="screen" />'."\n"; // Lightbox
}
@ -956,7 +956,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-latest.custom.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd_0_5'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tooltip/jquery.tooltip.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min'.$ext.'"></script>'."\n";
//print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/lightbox/js/jquery.lightbox-0.5.min'.$ext.'"></script>'."\n";
// jQuery Layout
if (!empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT'))
@ -1167,20 +1167,12 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Wrapper to show tooltips
print "\n".'<script type="text/javascript">
jQuery(function() {
jQuery(".classfortooltip").tooltip({
track: true,
delay: 0,
showURL: false,
//extraClass: "pretty fancy",
//fixPNG: true,
positionLeft: false,
bodyHandler: function() {
//console.log(jQuery(this).attr("tooltipText"));
return jQuery(this).attr("tooltipText"); }
jQuery(document).ready(function () {
jQuery(function() {
$(".classfortooltip").tipTip({maxWidth: "600px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50});
});
});
});
</script>';
</script>';
}
/*
@ -1378,7 +1370,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
if (! empty($object->hooks))
{
$searchform.='<!-- Begin search form hook area -->'."\n";
foreach($object->hooks as $hook)
{
if ($hook['type'] == 'searchform' && ! empty($hook['modules']))
@ -1505,7 +1497,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
if (! empty($object->hooks))
{
print '<!-- Begin left block hook area -->'."\n";
foreach($object->hooks as $hook)
{
if ($hook['type'] == 'leftblock' && ! empty($hook['modules']))

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
/**
* \file htdocs/theme/bureau2crea/style.css.php
* \brief Fichier de style CSS du theme bureau2crea
* \version $Id$
* \version $Id: style.css.php,v 1.36 2011/07/01 14:01:46 simnandez Exp $
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -240,7 +240,7 @@ div.vmenu {
}
div.fiche {
margin: 0px 20px 20px 40px;
margin: 0px 10px 10px 10px;
padding: 0px;
position: relative;
height: auto;

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/theme/eldy/style.css.php
* \brief Fichier de style CSS du theme Eldy
* \version $Id$
* \version $Id: style.css.php,v 1.80 2011/07/01 23:08:25 eldy Exp $
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -962,7 +962,7 @@ span.tabspan {
border: 1px solid #997777;
}
a.butActionDelete:hover {
.butActionDelete:hover {
background: #FFe7ec;
}
@ -1275,6 +1275,7 @@ div.error {
margin: 0.5em 0em 0.5em 0em;
border: 1px solid #8C9CAB;
-moz-border-radius:6px;
background: #efefa4;
}
/* Info admin */