Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
71932331
Commit
71932331
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Qual: Code is now simpler using jQuery. Removed rubbish javascript.
parent
058cbadb
Branches
422-onboard-fmx-metadata
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/lib/lib_head.js
+38
-77
38 additions, 77 deletions
htdocs/lib/lib_head.js
with
38 additions
and
77 deletions
htdocs/lib/lib_head.js
+
38
−
77
View file @
71932331
...
@@ -485,7 +485,8 @@ function getDateFromFormat(val,format)
...
@@ -485,7 +485,8 @@ function getDateFromFormat(val,format)
/*
/*
* =================================================================
* =================================================================
* Function:
* Function:
* stringIsInteger(string) Purpose: Return true if string is an integer
* stringIsInteger(string)
* Purpose: Return true if string is an integer
* ==================================================================
* ==================================================================
*/
*/
function
stringIsInteger
(
str
)
function
stringIsInteger
(
str
)
...
@@ -504,8 +505,8 @@ function stringIsInteger(str)
...
@@ -504,8 +505,8 @@ function stringIsInteger(str)
/*
/*
* =================================================================
* =================================================================
* Function:
* Function:
* getIntegerInString(string,pos,minlength,maxlength)
Purpose: Return part of
* getIntegerInString(string,pos,minlength,maxlength)
* string from position i that is integer
*
Purpose: Return part of
string from position i that is integer
* ==================================================================
* ==================================================================
*/
*/
function
getIntegerInString
(
str
,
i
,
minlength
,
maxlength
)
function
getIntegerInString
(
str
,
i
,
minlength
,
maxlength
)
...
@@ -523,7 +524,9 @@ function getIntegerInString(str,i,minlength,maxlength)
...
@@ -523,7 +524,9 @@ function getIntegerInString(str,i,minlength,maxlength)
/*
/*
* =================================================================
* =================================================================
* Purpose:
* Purpose:
* Clean string to have it url encoded Input: s Author: Laurent Destailleur
* Clean string to have it url encoded
* Input: s
* Author: Laurent Destailleur
* Licence: GPL
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
...
@@ -534,9 +537,11 @@ function urlencode(s) {
...
@@ -534,9 +537,11 @@ function urlencode(s) {
/*
/*
* =================================================================
* =================================================================
* Purpose:
* Purpose: Show a popup HTML page.
* Show a popup HTML page. Input: url,title Author: Laurent Destailleur Licence:
* Input: url,title
* GPL ==================================================================
* Author: Laurent Destailleur
* Licence: GPL
* ==================================================================
*/
*/
function
newpopup
(
url
,
title
)
{
function
newpopup
(
url
,
title
)
{
var
argv
=
newpopup
.
arguments
;
var
argv
=
newpopup
.
arguments
;
...
@@ -554,7 +559,8 @@ function newpopup(url,title) {
...
@@ -554,7 +559,8 @@ function newpopup(url,title) {
* =================================================================
* =================================================================
* Purpose:
* Purpose:
* Fonction pour champ saisie en mode ajax. Used for autocompletion of products.
* Fonction pour champ saisie en mode ajax. Used for autocompletion of products.
* Author: Laurent Destailleur Licence: GPL
* Author: Laurent Destailleur
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
function
publish_selvalue
(
obj
)
{
$
(
obj
.
name
).
value
=
obj
.
options
[
obj
.
selectedIndex
].
value
;
}
function
publish_selvalue
(
obj
)
{
$
(
obj
.
name
).
value
=
obj
.
options
[
obj
.
selectedIndex
].
value
;
}
...
@@ -565,7 +571,9 @@ function publish_selvalue(obj) { $(obj.name).value = obj.options[obj.selectedInd
...
@@ -565,7 +571,9 @@ function publish_selvalue(obj) { $(obj.name).value = obj.options[obj.selectedInd
* =================================================================
* =================================================================
* Purpose:
* Purpose:
* Set value of a field after return of Ajax call. Used for autocompletion.
* Set value of a field after return of Ajax call. Used for autocompletion.
* Input: HTML field name, val Author: Regis Houssin Licence: GPL
* Input: HTML field name, val
* Author: Regis Houssin
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
function
ac_return
(
field
,
val
){
function
ac_return
(
field
,
val
){
...
@@ -586,7 +594,9 @@ function ac_return(field, val){
...
@@ -586,7 +594,9 @@ function ac_return(field, val){
* =================================================================
* =================================================================
* Purpose:
* Purpose:
* Applique un delai avant execution. Used for autocompletion of companies.
* Applique un delai avant execution. Used for autocompletion of companies.
* Input: funct, delay Author: Regis Houssin Licence: GPL
* Input: funct, delay
* Author: Regis Houssin
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
function
ac_delay
(
funct
,
delay
)
{
function
ac_delay
(
funct
,
delay
)
{
...
@@ -598,8 +608,11 @@ function ac_return(field, val){
...
@@ -598,8 +608,11 @@ function ac_return(field, val){
/*
/*
* =================================================================
* =================================================================
* Purpose:
* Purpose:
* Clean values of a "Sortable.serialize". Used by drag and drop. Works for
* Clean values of a "Sortable.serialize". Used by drag and drop.
* Scriptaculous and jQuery. Input: expr Author: Regis Houssin Licence: GPL
* Works for Scriptaculous and jQuery.
* Input: expr
* Author: Regis Houssin
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
function
cleanSerialize
(
expr
)
{
function
cleanSerialize
(
expr
)
{
...
@@ -613,10 +626,13 @@ function cleanSerialize(expr) {
...
@@ -613,10 +626,13 @@ function cleanSerialize(expr) {
/*
/*
* =================================================================
* =================================================================
* Purpose:
* Purpose: Display a temporary message in input text fields (For showing help message on
* Display a temporary message in input text fields (For showing help message on
* input field).
* input field). Input: fieldId Input: message Author: Regis Houssin Licence:
* Input: fieldId
* GPL ==================================================================
* Input: message
* Author: Regis Houssin
* Licence: GPL
* ==================================================================
*/
*/
function
displayMessage
(
fieldId
,
message
)
{
function
displayMessage
(
fieldId
,
message
)
{
var
textbox
=
document
.
getElementById
(
fieldId
);
var
textbox
=
document
.
getElementById
(
fieldId
);
...
@@ -628,9 +644,12 @@ function displayMessage(fieldId,message) {
...
@@ -628,9 +644,12 @@ function displayMessage(fieldId,message) {
/*
/*
* =================================================================
* =================================================================
* Purpose:
* Purpose: Hide a temporary message in input text fields (For showing help message on
* Hide a temporary message in input text fields (For showing help message on
* input field).
* input field). Input: fiedId Input: message Author: Regis Houssin Licence: GPL
* Input: fiedId
* Input: message
* Author: Regis Houssin
* Licence: GPL
* ==================================================================
* ==================================================================
*/
*/
function
hideMessage
(
fieldId
,
message
)
{
function
hideMessage
(
fieldId
,
message
)
{
...
@@ -638,61 +657,3 @@ function hideMessage(fieldId,message) {
...
@@ -638,61 +657,3 @@ function hideMessage(fieldId,message) {
textbox
.
style
.
color
=
'
black
'
;
textbox
.
style
.
color
=
'
black
'
;
if
(
textbox
.
value
==
message
)
textbox
.
value
=
''
;
if
(
textbox
.
value
==
message
)
textbox
.
value
=
''
;
}
}
/*
* =================================================================
* Purpose: To
* show an element (To support multiselect of checkboxes in some pages) Input:
* fieldId Author: Regis Houssin Licence: GPL
* ==================================================================
*/
function
displayElement
(
fieldId
)
{
var
elementId
=
document
.
getElementById
(
fieldId
);
if
(
elementId
.
style
.
visibility
==
'
hidden
'
)
{
elementId
.
style
.
visibility
=
'
visible
'
;
}
}
/*
* =================================================================
* Purpose: To
* hide an element (To support multiselect of checkboxes in some pages) Input:
* fieldId Author: Regis Houssin Licence: GPL
* ==================================================================
*/
function
hideElement
(
fieldId
)
{
var
elementId
=
document
.
getElementById
(
fieldId
);
if
(
elementId
.
style
.
visibility
==
'
visible
'
)
{
elementId
.
style
.
visibility
=
'
hidden
'
;
}
}
/*
* =================================================================
* Purpose: To
* check a checkbox (To support multiselect of checkboxes in some pages) Input:
* fieldId Author: Regis Houssin Licence: GPL
* ==================================================================
*/
function
checkBox
(
boxId
)
{
var
elementId
=
document
.
getElementById
(
boxId
);
if
(
elementId
.
checked
==
false
)
{
elementId
.
checked
=
true
;
}
}
/*
* =================================================================
* Purpose: To
* uncheck a checkbox (To support multiselect of checkboxes in some pages)
* Input: fieldId Author: Regis Houssin Licence: GPL
* ==================================================================
*/
function
uncheckBox
(
boxId
)
{
var
elementId
=
document
.
getElementById
(
boxId
);
if
(
elementId
.
checked
==
true
)
{
elementId
.
checked
=
false
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment