mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -7,3 +7,7 @@
|
|||||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
||||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||||
|
#
|
||||||
|
# Example to test a ldap search:
|
||||||
|
# ldapsearch -h hostname -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||||
|
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ if ($mode != 'focus')
|
|||||||
{
|
{
|
||||||
$texthelp.=$key.' -> '.$val.'<br>';
|
$texthelp.=$key.' -> '.$val.'<br>';
|
||||||
}
|
}
|
||||||
$textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, ''); // No tooltip on click, this also triggers the sort click
|
$textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, 'subsitutiontooltip');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
if (! empty($tabhelp[$id][$value]))
|
if (! empty($tabhelp[$id][$value]))
|
||||||
{
|
{
|
||||||
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value); // Tooltip on hover
|
||||||
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
||||||
}
|
}
|
||||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||||
|
|||||||
@@ -76,13 +76,16 @@ function printBookmarksList($aDb, $aLangs)
|
|||||||
$ret.= '<form id="actionbookmark" name="actionbookmark" method="POST" action="">';
|
$ret.= '<form id="actionbookmark" name="actionbookmark" method="POST" action="">';
|
||||||
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
|
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
|
||||||
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
||||||
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'">'.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'" ';
|
||||||
|
$ret.= ' html="'.dol_escape_htmltag('<span class="fa fa-star-o"></span> '.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...').'">';
|
||||||
|
$ret.= dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
||||||
// Url to go on create new bookmark page
|
// Url to go on create new bookmark page
|
||||||
if (! empty($user->rights->bookmark->creer))
|
if (! empty($user->rights->bookmark->creer))
|
||||||
{
|
{
|
||||||
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
||||||
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
||||||
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_htmltag($urltoadd).'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'...</option>';
|
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_htmltag($urltoadd).'"';
|
||||||
|
$ret.= ' html="'.dol_escape_htmltag('<span class="fa fa-star-o"></span> '.$langs->trans('AddThisPageToBookmarks').'...').'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks').'...').'</option>';
|
||||||
}
|
}
|
||||||
// Menu with all bookmarks
|
// Menu with all bookmarks
|
||||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||||
@@ -96,9 +99,9 @@ function printBookmarksList($aDb, $aLangs)
|
|||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_htmltag($obj->url).'">';
|
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_htmltag($obj->url).'"';
|
||||||
//$ret.='<span class="fa fa-print">aa</span>';
|
//$ret.=' html="'.dol_escape_htmltag('<span class="fa fa-print"></span> '.$obj->title).'"';
|
||||||
$ret.=img_picto('','object_bookmark').' ';
|
$ret.='>';
|
||||||
$ret.=dol_escape_htmltag($obj->title);
|
$ret.=dol_escape_htmltag($obj->title);
|
||||||
$ret.='</option>';
|
$ret.='</option>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ if ($resql)
|
|||||||
|
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
//print "<td> </td>";
|
//print "<td> </td>";
|
||||||
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"rowid","", $param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"b.rowid","", $param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Title",$_SERVER["PHP_SELF"],"title","", $param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre("Title",$_SERVER["PHP_SELF"],"b.title","", $param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Link",'','');
|
print_liste_field_titre("Link",$_SERVER["PHP_SELF"],"b.url","", $param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Target",'','','','','align="center"');
|
print_liste_field_titre("Target",'','','','','align="center"');
|
||||||
print_liste_field_titre("Owner",$_SERVER["PHP_SELF"],"u.lastname","", $param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre("Owner",$_SERVER["PHP_SELF"],"u.lastname","", $param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"b.dateb","", $param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"b.dateb","", $param,'align="center"',$sortfield,$sortorder);
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ class Form
|
|||||||
elseif ($type == 'warning') $img = img_warning($alt);
|
elseif ($type == 'warning') $img = img_warning($alt);
|
||||||
else $img = img_picto($alt, $type);
|
else $img = img_picto($alt, $type);
|
||||||
|
|
||||||
return $this->textwithtooltip($text, $htmltext, ($tooltiptrigger?3:2), $direction, $img, $extracss, $notabs, '', $noencodehtmltext, $tooltiptrigger);
|
return $this->textwithtooltip($text, $htmltext, (($tooltiptrigger && ! $img)?3:2), $direction, $img, $extracss, $notabs, '', $noencodehtmltext, $tooltiptrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
141
htdocs/core/js/lib_foot.js.php
Normal file
141
htdocs/core/js/lib_foot.js.php
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/core/js/lib_foot.js.php
|
||||||
|
* \brief File that include javascript functions (included if option use_javascript activated)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
|
||||||
|
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations
|
||||||
|
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
|
||||||
|
if (! defined('NOLOGIN')) define('NOLOGIN',1);
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
|
||||||
|
session_cache_limiter(FALSE);
|
||||||
|
|
||||||
|
require_once '../../main.inc.php';
|
||||||
|
|
||||||
|
// Define javascript type
|
||||||
|
top_httphead('text/javascript; charset=UTF-8');
|
||||||
|
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||||
|
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||||
|
else header('Cache-Control: no-cache');
|
||||||
|
|
||||||
|
//var_dump($conf);
|
||||||
|
|
||||||
|
// Wrapper to show tooltips (html or onclick popup)
|
||||||
|
if (empty($conf->dol_no_mouse_hover))
|
||||||
|
{
|
||||||
|
print "\n/* JS CODE TO ENABLE Tooltips on all object with class classfortooltip */\n";
|
||||||
|
print '
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
jQuery(".classfortooltip").tooltip({
|
||||||
|
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
|
||||||
|
hide: { effect:\'toggle\', delay: 50 },
|
||||||
|
tooltipClass: "mytooltip",
|
||||||
|
content: function () {
|
||||||
|
return $(this).prop(\'title\'); /* To force to get title as is */
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery(".classfortooltiponclicktext").dialog({ closeOnEscape: true, classes: { "ui-dialog": "highlight" }, maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).', autoOpen: false }).css("z-index: 5000");
|
||||||
|
jQuery(".classfortooltiponclick").click(function () {
|
||||||
|
console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\'));
|
||||||
|
if ($(this).attr(\'dolid\'))
|
||||||
|
{
|
||||||
|
obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */
|
||||||
|
obj.dialog("open");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to manage dropdown
|
||||||
|
if (! defined('JS_JQUERY_DISABLE_DROPDOWN'))
|
||||||
|
{
|
||||||
|
print "\n/* JS CODE TO ENABLE dropdown */\n";
|
||||||
|
print '
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
$(".dropdown dt a").on(\'click\', function () {
|
||||||
|
console.log("We click on dropdown");
|
||||||
|
//console.log($(this).parent().parent().find(\'dd ul\'));
|
||||||
|
$(this).parent().parent().find(\'dd ul\').slideToggle(\'fast\');
|
||||||
|
// Note: Did not find a way to get exact height (value is update at exit) so i calculate a generic from nb of lines
|
||||||
|
heigthofcontent = 21 * $(this).parent().parent().find(\'dd div ul li\').length;
|
||||||
|
if (heigthofcontent > 300) heigthofcontent = 300; // limited by max-height on css .dropdown dd ul
|
||||||
|
posbottom = $(this).parent().parent().find(\'dd\').offset().top + heigthofcontent + 8;
|
||||||
|
var scrollBottom = $(window).scrollTop() + $(window).height();
|
||||||
|
diffoutsidebottom = (posbottom - scrollBottom);
|
||||||
|
console.log("heigthofcontent="+heigthofcontent+", diffoutsidebottom (posbottom="+posbottom+" - scrollBottom="+scrollBottom+") = "+diffoutsidebottom);
|
||||||
|
if (diffoutsidebottom > 0)
|
||||||
|
{
|
||||||
|
pix = "-"+(diffoutsidebottom+8)+"px";
|
||||||
|
console.log("We reposition top by "+pix);
|
||||||
|
$(this).parent().parent().find(\'dd\').css("top", pix);
|
||||||
|
}
|
||||||
|
// $(".dropdown dd ul").slideToggle(\'fast\');
|
||||||
|
});
|
||||||
|
$(".dropdowncloseonclick").on(\'click\', function () {
|
||||||
|
console.log("Link has class dropdowncloseonclick, so we close/hide the popup ul");
|
||||||
|
$(this).parent().parent().hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).bind(\'click\', function (e) {
|
||||||
|
// TODO Use a bind on elements in dropdown only to avoid to bind/code all clicks
|
||||||
|
var $clicked = $(e.target);
|
||||||
|
if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to manage document_preview
|
||||||
|
if ($conf->browser->layout != 'phone')
|
||||||
|
{
|
||||||
|
print "\n/* JS CODE TO ENABLE document_preview */\n";
|
||||||
|
print '
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
jQuery(".documentpreview").click(function () {
|
||||||
|
console.log("We click on preview for element with href="+$(this).attr(\'href\')+" mime="+$(this).attr(\'mime\'));
|
||||||
|
document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \''.dol_escape_js($langs->transnoentities("Preview")).'\');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "\n/* JS CODE TO ENABLE reposition management (does not work if a redirect is done after action of submission) */\n";
|
||||||
|
print '
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
/* If page_y set, we set scollbar with it */
|
||||||
|
page_y=getParameterByName(\'page_y\', 0); if (page_y > 0) $(\'html, body\').scrollTop(page_y);
|
||||||
|
/* Set handler to add page_y param on some a href links */
|
||||||
|
jQuery(".reposition").click(function() {
|
||||||
|
var page_y = $(document).scrollTop();
|
||||||
|
this.href=this.href+\'&page_y=\'+page_y;
|
||||||
|
console.log("We click on tag with .reposition class. this.ref is now "+this.href)
|
||||||
|
});
|
||||||
|
});'."\n";
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ function document_preview(file, type, title)
|
|||||||
if ($.inArray(type, ValidImageTypes) < 0) {
|
if ($.inArray(type, ValidImageTypes) < 0) {
|
||||||
var width='85%';
|
var width='85%';
|
||||||
var object_width='100%';
|
var object_width='100%';
|
||||||
var height = $( window ).height()*0.90;
|
var height = ($( window ).height() - 60) * 0.90;
|
||||||
var object_height='98%';
|
var object_height='98%';
|
||||||
|
|
||||||
show_preview('notimage');
|
show_preview('notimage');
|
||||||
|
|||||||
@@ -6347,9 +6347,10 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
|
|||||||
/**
|
/**
|
||||||
* Print common footer :
|
* Print common footer :
|
||||||
* conf->global->MAIN_HTML_FOOTER
|
* conf->global->MAIN_HTML_FOOTER
|
||||||
* conf->global->MAIN_GOOGLE_AN_ID
|
* js for switch of menu hider
|
||||||
* conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"]
|
* js for conf->global->MAIN_GOOGLE_AN_ID
|
||||||
* conf->logbuffer
|
* js for conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"]
|
||||||
|
* js for conf->logbuffer
|
||||||
*
|
*
|
||||||
* @param string $zone 'private' (for private pages) or 'public' (for public pages)
|
* @param string $zone 'private' (for private pages) or 'public' (for public pages)
|
||||||
* @return void
|
* @return void
|
||||||
@@ -6362,29 +6363,21 @@ function printCommonFooter($zone='private')
|
|||||||
if ($zone == 'private') print "\n".'<!-- Common footer for private page -->'."\n";
|
if ($zone == 'private') print "\n".'<!-- Common footer for private page -->'."\n";
|
||||||
else print "\n".'<!-- Common footer for public page -->'."\n";
|
else print "\n".'<!-- Common footer for public page -->'."\n";
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('printCommonFooter',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n";
|
if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n";
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print '<!-- Reposition management (does not work if a redirect is done after action of submission) -->'."\n";
|
print '<script type="text/javascript" language="javascript">'."\n";
|
||||||
print '<script type="text/javascript" language="javascript">jQuery(document).ready(function() {'."\n";
|
|
||||||
|
|
||||||
print '<!-- If page_y set, we set scollbar with it -->'."\n";
|
if ($zone == 'private' && empty($conf->dol_use_jmobile))
|
||||||
print "page_y=getParameterByName('page_y', 0);";
|
|
||||||
print "if (page_y > 0) $('html, body').scrollTop(page_y);\n";
|
|
||||||
|
|
||||||
print '<!-- Set handler to add page_y param on some a href links -->'."\n";
|
|
||||||
print 'jQuery(".reposition").click(function() {
|
|
||||||
var page_y = $(document).scrollTop();
|
|
||||||
/*alert(page_y);*/
|
|
||||||
this.href=this.href+\'&page_y=\'+page_y;
|
|
||||||
});'."\n";
|
|
||||||
print '});'."\n";
|
|
||||||
|
|
||||||
if (empty($conf->dol_use_jmobile))
|
|
||||||
{
|
{
|
||||||
print '<!-- Set handler to switch left menu page (menuhider) -->'."\n";
|
print "\n";
|
||||||
|
print '/* JS CODE TO ENABLE to enable handler to switch left menu page (menuhider) */'."\n";
|
||||||
print 'jQuery(".menuhider").click(function() {';
|
print 'jQuery(".menuhider").click(function() {';
|
||||||
print ' console.log("We click on .menuhider");'."\n";
|
print ' console.log("We click on .menuhider");'."\n";
|
||||||
//print " $('.side-nav').animate({width:'toggle'},200);\n"; // OK with eldy theme but not with md
|
//print " $('.side-nav').animate({width:'toggle'},200);\n"; // OK with eldy theme but not with md
|
||||||
@@ -6393,14 +6386,13 @@ function printCommonFooter($zone='private')
|
|||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</script>'."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Google Analytics (need Google module)
|
// Google Analytics (need Google module)
|
||||||
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||||
|
{
|
||||||
|
if (($conf->dol_use_jmobile != 4))
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<script type="text/javascript">'."\n";
|
print "/* JS CODE TO ENABLE for google analtics tag */\n";
|
||||||
print ' var _gaq = _gaq || [];'."\n";
|
print ' var _gaq = _gaq || [];'."\n";
|
||||||
print ' _gaq.push([\'_setAccount\', \''.$conf->global->MAIN_GOOGLE_AN_ID.'\']);'."\n";
|
print ' _gaq.push([\'_setAccount\', \''.$conf->global->MAIN_GOOGLE_AN_ID.'\']);'."\n";
|
||||||
print ' _gaq.push([\'_trackPageview\']);'."\n";
|
print ' _gaq.push([\'_trackPageview\']);'."\n";
|
||||||
@@ -6410,13 +6402,14 @@ function printCommonFooter($zone='private')
|
|||||||
print ' ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';'."\n";
|
print ' ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';'."\n";
|
||||||
print ' var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);'."\n";
|
print ' var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);'."\n";
|
||||||
print ' })();'."\n";
|
print ' })();'."\n";
|
||||||
print '</script>'."\n";
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of tuning
|
// End of tuning
|
||||||
if (! empty($_SERVER['MAIN_SHOW_TUNING_INFO']) || ! empty($conf->global->MAIN_SHOW_TUNING_INFO))
|
if (! empty($_SERVER['MAIN_SHOW_TUNING_INFO']) || ! empty($conf->global->MAIN_SHOW_TUNING_INFO))
|
||||||
{
|
{
|
||||||
print "\n".'<script type="text/javascript">'."\n";
|
print "\n";
|
||||||
|
print "/* JS CODE TO ENABLE to add memory info */\n";
|
||||||
print 'window.console && console.log("';
|
print 'window.console && console.log("';
|
||||||
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
|
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
|
||||||
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
|
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
|
||||||
@@ -6440,14 +6433,16 @@ function printCommonFooter($zone='private')
|
|||||||
print ' - Zend encoded file: '.(zend_loader_file_encoded()?'yes':'no');
|
print ' - Zend encoded file: '.(zend_loader_file_encoded()?'yes':'no');
|
||||||
}
|
}
|
||||||
print '");'."\n";
|
print '");'."\n";
|
||||||
print '</script>'."\n";
|
}
|
||||||
|
|
||||||
|
print "\n".'</script>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Add Xdebug coverage of code
|
// Add Xdebug coverage of code
|
||||||
if (defined('XDEBUGCOVERAGE'))
|
if (defined('XDEBUGCOVERAGE'))
|
||||||
{
|
{
|
||||||
print_r(xdebug_get_code_coverage());
|
print_r(xdebug_get_code_coverage());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If there is some logs in buffer to show
|
// If there is some logs in buffer to show
|
||||||
if (count($conf->logbuffer))
|
if (count($conf->logbuffer))
|
||||||
@@ -6462,9 +6457,7 @@ function printCommonFooter($zone='private')
|
|||||||
//print '</div>'."\n";
|
//print '</div>'."\n";
|
||||||
print "End of log output -->\n";
|
print "End of log output -->\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$parameters=array();
|
|
||||||
$reshook=$hookmanager->executeHooks('printCommonFooter',$parameters); // Note that $action and $object may have been modified by some hooks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,10 +41,11 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_S
|
|||||||
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_HANDLERS','["mod_syslog_file"]','chaine','Which logger to use',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_HANDLERS','["mod_syslog_file"]','chaine','Which logger to use',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_FILE','DOL_DATA_ROOT/dolibarr.log','chaine','Directory where to write log file',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_FILE','DOL_DATA_ROOT/dolibarr.log','chaine','Directory where to write log file',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_LEVEL','7','chaine','Level of debug info to show',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_LEVEL','7','chaine','Level of debug info to show',0,0);
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0);
|
||||||
|
|
||||||
-- Hidden but specific to one entity
|
-- Hidden but specific to one entity
|
||||||
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_OVERWRITE_TRANSLATION','1','chaine','Enable translation overwrite',0,1);
|
||||||
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_DEFAULT_VALUES','1','chaine','Enable default value overwrite',0,1);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0,1);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0,1);
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MAIL_SMTP_SERVER','','chaine','Host or ip address for SMTP server',0,1);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MAIL_SMTP_SERVER','','chaine','Host or ip address for SMTP server',0,1);
|
||||||
@@ -56,12 +57,11 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
|
|||||||
--
|
--
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Longueur maximum des listes',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Longueur maximum des listes courtes (fiche client)',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Longueur maximum des listes courtes (fiche client)',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SHOW_WORKBOARD','1','yesno','Affichage tableau de bord de travail Dolibarr',0,0);
|
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_STANDARD','eldy_menu.php','chaine','Menu manager for external users',0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENUFRONT_STANDARD','eldy_menu.php','chaine','Menu manager for external users',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_SMARTPHONE','eldy_menu.php','chaine','Menu manager for internal users using smartphones',0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENU_SMARTPHONE','eldy_menu.php','chaine','Menu manager for internal users using smartphones',0,0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_SMARTPHONE','eldy_menu.php','chaine','Menu manager for external users using smartphones',0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENUFRONT_SMARTPHONE','eldy_menu.php','chaine','Menu manager for external users using smartphones',0,0);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -90,8 +90,9 @@ insert into llx_const (name, value, type, note, visible) values ('MAILING_EMAIL_
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- ODT Path
|
-- ODT Path
|
||||||
---
|
--
|
||||||
insert into llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/products', 'chaine', 0);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('PRODUCT_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/products', 'chaine', 0, 1);
|
||||||
insert into llx_const (name, entity, value, type, visible) VALUES ('CONTRACT_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/contracts', 'chaine', 0);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('CONTRACT_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/contracts', 'chaine', 0, 1);
|
||||||
insert into llx_const (name, entity, value, type, visible) VALUES ('USERGROUP_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/usergroups', 'chaine', 0);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('USERGROUP_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/usergroups', 'chaine', 0, 1);
|
||||||
insert into llx_const (name, entity, value, type, visible) VALUES ('USER_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/users', 'chaine', 0);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('USER_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/users', 'chaine', 0, 1);
|
||||||
|
|
||||||
|
|||||||
@@ -433,6 +433,8 @@ CREATE TABLE llx_comment (
|
|||||||
import_key varchar(125) DEFAULT NULL
|
import_key varchar(125) DEFAULT NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
DELETE FROM llx_const where name = 'MAIN_SHOW_WORKBOARD';
|
||||||
|
|
||||||
-- Accountancy - Remove old constants
|
-- Accountancy - Remove old constants
|
||||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_SELL_JOURNAL')__;
|
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_SELL_JOURNAL')__;
|
||||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_PURCHASE_JOURNAL')__;
|
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_PURCHASE_JOURNAL')__;
|
||||||
@@ -490,7 +492,6 @@ UPDATE llx_accounting_system SET fk_country =140 WHERE pcg_version = 'PCN-LUXEMB
|
|||||||
UPDATE llx_accounting_system SET fk_country = 12 WHERE pcg_version = 'PCG';
|
UPDATE llx_accounting_system SET fk_country = 12 WHERE pcg_version = 'PCG';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE llx_actioncomm_reminder(
|
CREATE TABLE llx_actioncomm_reminder(
|
||||||
-- BEGIN MODULEBUILDER FIELDS
|
-- BEGIN MODULEBUILDER FIELDS
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
@@ -554,3 +555,4 @@ ALTER TABLE llx_prelevement_lignes MODIFY COLUMN amount double(24,8);
|
|||||||
ALTER TABLE llx_societe MODIFY COLUMN capital double(24,8);
|
ALTER TABLE llx_societe MODIFY COLUMN capital double(24,8);
|
||||||
ALTER TABLE llx_tva MODIFY COLUMN amount double(24,8);
|
ALTER TABLE llx_tva MODIFY COLUMN amount double(24,8);
|
||||||
ALTER TABLE llx_subscription MODIFY COLUMN subscription double(24,8);
|
ALTER TABLE llx_subscription MODIFY COLUMN subscription double(24,8);
|
||||||
|
|
||||||
|
|||||||
@@ -1087,6 +1087,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
//print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
|
//print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
|
||||||
if (empty($disablehead))
|
if (empty($disablehead))
|
||||||
{
|
{
|
||||||
|
$ext='version='.urlencode(DOL_VERSION);
|
||||||
|
|
||||||
print "<head>\n";
|
print "<head>\n";
|
||||||
if (GETPOST('dol_basehref','alpha')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref','alpha')).'">'."\n";
|
if (GETPOST('dol_basehref','alpha')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref','alpha')).'">'."\n";
|
||||||
// Displays meta
|
// Displays meta
|
||||||
@@ -1110,10 +1112,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
else print "<title>".dol_htmlentities($appli)."</title>";
|
else print "<title>".dol_htmlentities($appli)."</title>";
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
//$ext='';
|
|
||||||
//if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION);
|
|
||||||
$ext='version='.urlencode(DOL_VERSION);
|
|
||||||
|
|
||||||
if (GETPOST('version','int')) $ext='version='.GETPOST('version','int'); // usefull to force no cache on css/js
|
if (GETPOST('version','int')) $ext='version='.GETPOST('version','int'); // usefull to force no cache on css/js
|
||||||
if (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER)) $ext.='&testmenuhider='.(GETPOST('testmenuhider','int')?GETPOST('testmenuhider','int'):$conf->global->MAIN_TESTMENUHIDER);
|
if (GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER)) $ext.='&testmenuhider='.(GETPOST('testmenuhider','int')?GETPOST('testmenuhider','int'):$conf->global->MAIN_TESTMENUHIDER);
|
||||||
|
|
||||||
@@ -1134,23 +1132,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
||||||
if (! defined('DISABLE_JQUERY_JNOTIFY')) print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JNotify
|
if (! defined('DISABLE_JQUERY_JNOTIFY')) print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JNotify
|
||||||
/* Removed a old hidden problematic feature never used in Dolibarr. If an external module need datatable, the module must provide all lib it needs and manage version problems with other dolibarr components
|
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables
|
|
||||||
{
|
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/media/css/jquery.dataTables.min.css'.($ext?'?'.$ext:'').'">'."\n";
|
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/Buttons/css/buttons.dataTables.min.css'.($ext?'?'.$ext:'').'">'."\n";
|
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/ColReorder/css/colReorder.dataTables.min.css'.($ext?'?'.$ext:'').'"></script>'."\n";
|
|
||||||
}*/
|
|
||||||
if (! defined('DISABLE_SELECT2') && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2"...
|
if (! defined('DISABLE_SELECT2') && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2"...
|
||||||
{
|
{
|
||||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/css/'.$tmpplugin.'.css'.($ext?'?'.$ext:'').'">'."\n";
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/css/'.$tmpplugin.'.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||||
}
|
}
|
||||||
// jQuery Timepicker
|
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
|
||||||
{
|
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'">'."\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! defined('DISABLE_FONT_AWSOME'))
|
if (! defined('DISABLE_FONT_AWSOME'))
|
||||||
@@ -1871,6 +1857,8 @@ if (! function_exists("llxFooter"))
|
|||||||
global $conf, $langs, $user, $object;
|
global $conf, $langs, $user, $object;
|
||||||
global $delayedhtmlcontent;
|
global $delayedhtmlcontent;
|
||||||
|
|
||||||
|
$ext='version='.urlencode(DOL_VERSION);
|
||||||
|
|
||||||
// Global html output events ($mesgs, $errors, $warnings)
|
// Global html output events ($mesgs, $errors, $warnings)
|
||||||
dol_htmloutput_events($disabledoutputofmessages);
|
dol_htmloutput_events($disabledoutputofmessages);
|
||||||
|
|
||||||
@@ -1916,99 +1904,21 @@ if (! function_exists("llxFooter"))
|
|||||||
|
|
||||||
print '</div> <!-- End div class="fiche" -->'."\n"; // End div fiche
|
print '</div> <!-- End div class="fiche" -->'."\n"; // End div fiche
|
||||||
|
|
||||||
if (empty($conf->dol_hide_leftmenu)) print '</div> <!-- End div id-right -->'; // End div id-right
|
if (empty($conf->dol_hide_leftmenu)) print '</div> <!-- End div id-right -->'."\n"; // End div id-right
|
||||||
|
|
||||||
|
if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '</div> <!-- End div id-container -->'."\n"; // End div container
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
if ($comment) print '<!-- '.$comment.' -->'."\n";
|
if ($comment) print '<!-- '.$comment.' -->'."\n";
|
||||||
|
|
||||||
printCommonFooter($zone);
|
printCommonFooter($zone);
|
||||||
|
|
||||||
if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '</div> <!-- End div id-container -->'."\n"; // End div container
|
|
||||||
|
|
||||||
if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent;
|
if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent;
|
||||||
|
|
||||||
// TODO Move this in lib_head.js.php
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
|
||||||
// Wrapper to show tooltips (html or onclick popup)
|
|
||||||
if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover))
|
|
||||||
{
|
{
|
||||||
print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n";
|
print "\n".'<!-- Includes JS Footer of Dolibarr -->'."\n";
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript" src="/dolibarr/htdocs/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
|
||||||
jQuery(document).ready(function () {
|
|
||||||
jQuery(".classfortooltip").tooltip({
|
|
||||||
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
|
|
||||||
hide: { effect:\'toggle\', delay: 50 },
|
|
||||||
tooltipClass: "mytooltip",
|
|
||||||
content: function () {
|
|
||||||
return $(this).prop(\'title\'); /* To force to get title as is */
|
|
||||||
}
|
|
||||||
});
|
|
||||||
jQuery(".classfortooltiponclicktext").dialog({ closeOnEscape: true, classes: { "ui-dialog": "highlight" }, maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).', autoOpen: false }).css("z-index: 5000");
|
|
||||||
jQuery(".classfortooltiponclick").click(function () {
|
|
||||||
console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\'));
|
|
||||||
if ($(this).attr(\'dolid\'))
|
|
||||||
{
|
|
||||||
obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */
|
|
||||||
obj.dialog("open");
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrapper to manage document_preview
|
|
||||||
if (! empty($conf->use_javascript_ajax) && ($conf->browser->layout != 'phone'))
|
|
||||||
{
|
|
||||||
print "\n<!-- JS CODE TO ENABLE document_preview -->\n";
|
|
||||||
print '<script type="text/javascript">
|
|
||||||
jQuery(document).ready(function () {
|
|
||||||
jQuery(".documentpreview").click(function () {
|
|
||||||
console.log("We click on preview for element with href="+$(this).attr(\'href\')+" mime="+$(this).attr(\'mime\'));
|
|
||||||
document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \''.dol_escape_js($langs->transnoentities("Preview")).'\');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrapper to manage dropdown
|
|
||||||
if (! empty($conf->use_javascript_ajax) && ! defined('JS_JQUERY_DISABLE_DROPDOWN'))
|
|
||||||
{
|
|
||||||
print "\n<!-- JS CODE TO ENABLE dropdown -->\n";
|
|
||||||
print '<script type="text/javascript">
|
|
||||||
jQuery(document).ready(function () {
|
|
||||||
$(".dropdown dt a").on(\'click\', function () {
|
|
||||||
//console.log($(this).parent().parent().find(\'dd ul\'));
|
|
||||||
$(this).parent().parent().find(\'dd ul\').slideToggle(\'fast\');
|
|
||||||
// Note: Did not find a way to get exact height (value is update at exit) so i calculate a generic from nb of lines
|
|
||||||
heigthofcontent = 21 * $(this).parent().parent().find(\'dd div ul li\').length;
|
|
||||||
if (heigthofcontent > 300) heigthofcontent = 300; // limited by max-height on css .dropdown dd ul
|
|
||||||
posbottom = $(this).parent().parent().find(\'dd\').offset().top + heigthofcontent + 8;
|
|
||||||
//console.log(posbottom);
|
|
||||||
var scrollBottom = $(window).scrollTop() + $(window).height();
|
|
||||||
//console.log(scrollBottom);
|
|
||||||
diffoutsidebottom = (posbottom - scrollBottom);
|
|
||||||
console.log("heigthofcontent="+heigthofcontent+", diffoutsidebottom (posbottom="+posbottom+" - scrollBottom="+scrollBottom+") = "+diffoutsidebottom);
|
|
||||||
if (diffoutsidebottom > 0)
|
|
||||||
{
|
|
||||||
pix = "-"+(diffoutsidebottom+8)+"px";
|
|
||||||
console.log("We reposition top by "+pix);
|
|
||||||
$(this).parent().parent().find(\'dd\').css("top", pix);
|
|
||||||
}
|
|
||||||
// $(".dropdown dd ul").slideToggle(\'fast\');
|
|
||||||
});
|
|
||||||
$(".dropdowncloseonclick").on(\'click\', function () {
|
|
||||||
console.log("Link has class dropdowncloseonclick, so we close/hide the popup ul");
|
|
||||||
$(this).parent().parent().hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).bind(\'click\', function (e) {
|
|
||||||
var $clicked = $(e.target);
|
|
||||||
if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper to add log when clicking on download or preview
|
// Wrapper to add log when clicking on download or preview
|
||||||
@@ -2044,7 +1954,6 @@ if (! function_exists("llxFooter"))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// A div for the address popup
|
// A div for the address popup
|
||||||
print "\n<!-- A div to allow dialog popup -->\n";
|
print "\n<!-- A div to allow dialog popup -->\n";
|
||||||
print '<div id="dialogforpopup" style="display: none;"></div>'."\n";
|
print '<div id="dialogforpopup" style="display: none;"></div>'."\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user