mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 15:42:29 +01:00
modify animation speed of tooltips
This commit is contained in:
@@ -21,13 +21,27 @@
|
|||||||
* \brief File that include javascript functions (included if option use_javascript activated)
|
* \brief File that include javascript functions (included if option use_javascript activated)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
if (!defined('NOREQUIRESOC')) {
|
||||||
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1);
|
define('NOREQUIRESOC', '1');
|
||||||
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1);
|
}
|
||||||
if (!defined('NOLOGIN')) define('NOLOGIN', 1);
|
if (!defined('NOCSRFCHECK')) {
|
||||||
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1);
|
define('NOCSRFCHECK', 1);
|
||||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
|
}
|
||||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '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('public');
|
session_cache_limiter('public');
|
||||||
|
|
||||||
@@ -36,8 +50,11 @@ require_once '../../main.inc.php';
|
|||||||
// Define javascript type
|
// Define javascript type
|
||||||
top_httphead('text/javascript; charset=UTF-8');
|
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.
|
// 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=10800, public, must-revalidate');
|
if (empty($dolibarr_nocache)) {
|
||||||
else header('Cache-Control: no-cache');
|
header('Cache-Control: max-age=10800, public, must-revalidate');
|
||||||
|
} else {
|
||||||
|
header('Cache-Control: no-cache');
|
||||||
|
}
|
||||||
|
|
||||||
//var_dump($conf);
|
//var_dump($conf);
|
||||||
|
|
||||||
@@ -46,15 +63,14 @@ else header('Cache-Control: no-cache');
|
|||||||
print "\n/* JS CODE TO ENABLE Tooltips on all object with class classfortooltip */\n";
|
print "\n/* JS CODE TO ENABLE Tooltips on all object with class classfortooltip */\n";
|
||||||
print "jQuery(document).ready(function () {\n";
|
print "jQuery(document).ready(function () {\n";
|
||||||
|
|
||||||
if (empty($conf->dol_no_mouse_hover))
|
if (empty($conf->dol_no_mouse_hover)) {
|
||||||
{
|
|
||||||
print 'jQuery(".classfortooltip").tooltip({
|
print 'jQuery(".classfortooltip").tooltip({
|
||||||
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
|
show: { collision: "flipfit", effect:"toggle", delay:75, duration:150 },
|
||||||
hide: { delay: 250 },
|
hide: { delay: 250, duration: 20 },
|
||||||
tooltipClass: "mytooltip",
|
tooltipClass: "mytooltip",
|
||||||
content: function () {
|
content: function () {
|
||||||
console.log("Return title for popup");
|
console.log("Return title for popup");
|
||||||
return $(this).prop(\'title\'); /* To force to get title as is */
|
return $(this).prop("title"); /* To force to get title as is */
|
||||||
}
|
}
|
||||||
});'."\n";
|
});'."\n";
|
||||||
}
|
}
|
||||||
@@ -79,8 +95,7 @@ print "});\n";
|
|||||||
|
|
||||||
|
|
||||||
// Wrapper to manage dropdown
|
// Wrapper to manage dropdown
|
||||||
if (!defined('JS_JQUERY_DISABLE_DROPDOWN'))
|
if (!defined('JS_JQUERY_DISABLE_DROPDOWN')) {
|
||||||
{
|
|
||||||
print "\n/* JS CODE TO ENABLE dropdown (hamburger, linkto, ...) */\n";
|
print "\n/* JS CODE TO ENABLE dropdown (hamburger, linkto, ...) */\n";
|
||||||
print '
|
print '
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
@@ -149,8 +164,7 @@ if (!defined('JS_JQUERY_DISABLE_DROPDOWN'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper to manage document_preview
|
// Wrapper to manage document_preview
|
||||||
if ($conf->browser->layout != 'phone')
|
if ($conf->browser->layout != 'phone') {
|
||||||
{
|
|
||||||
print "\n/* JS CODE TO ENABLE document_preview */\n"; // Function document_preview is into header
|
print "\n/* JS CODE TO ENABLE document_preview */\n"; // Function document_preview is into header
|
||||||
print '
|
print '
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user