dolibarr  7.0.0-beta
Functions | Variables
lib_head.js.php File Reference

File that include javascript functions (included if option use_javascript activated) JQuery (providing object $) and JQuery-UI (providing $datepicker) libraries must be loaded before this file. More...

Go to the source code of this file.

Functions

 getObjectFromID (id)
 For calendar input.
 
 copyToClipboard (text, text2)
 Function to output a dialog bog for copy/paste. More...
 
 newpopup (url, title)
 Show a popup HTML page. More...
 
 document_preview (file, type, title)
 Function show document preview. More...
 
 getParameterByName (name, valueifnotfound)
 
 price2numjs (amount)
 Function similar to PHP price2num() More...
 

Variables

 select2arrayoflanguage
 Set array used for select2 translations.
 

Detailed Description

File that include javascript functions (included if option use_javascript activated) JQuery (providing object $) and JQuery-UI (providing $datepicker) libraries must be loaded before this file.

Definition in file lib_head.js.php.

Function Documentation

copyToClipboard ( text  ,
text2   
)

Function to output a dialog bog for copy/paste.

Parameters
stringtext Text to put into copy/paste area
stringtext2 Text to put under the copy/paste area

Definition at line 827 of file lib_head.js.php.

document_preview ( file  ,
type  ,
title   
)

Function show document preview.

Use the "dialog" function.

Parameters
stringfile Url
stringtype Mime file type ("image/jpeg", "application/pdf", "text/html")
stringtitle Title of popup
Returns
void
See also
newpopup

Definition at line 869 of file lib_head.js.php.

References type.

getParameterByName ( name  ,
valueifnotfound   
)

Decimal adjustment of a number.

Parameters
{String}type The type of adjustment.
{Number}value The number.
{Integer}exp The exponent (the 10 logarithm of the adjustment base).
Returns
{Number} The adjusted value.

Definition at line 953 of file lib_head.js.php.

References name.

newpopup ( url  ,
title   
)

Show a popup HTML page.

Use the "window.open" function.

Parameters
stringurl Url
stringtitle Title of popup
Returns
boolean False
See also
document_preview

Definition at line 847 of file lib_head.js.php.

price2numjs ( amount  )

Function similar to PHP price2num()

Parameters
{number|string}amount The amount to convert/clean
Returns
{string} The amount in universal numeric format (Example: '99.99999')
Todo:
Implement rounding parameter

Definition at line 1022 of file lib_head.js.php.

References dol_escape_js(), and print.