Qual: Code is now simpler using jQuery. Removed rubbish javascript.
This commit is contained in:
parent
058cbadba4
commit
719323313d
@ -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)
|
|||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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)
|
|||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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) {
|
|||||||
* =================================================================
|
* =================================================================
|
||||||
* 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
|
|||||||
* =================================================================
|
* =================================================================
|
||||||
* 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){
|
|||||||
* =================================================================
|
* =================================================================
|
||||||
* 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){
|
|||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* =================================================================
|
* =================================================================
|
||||||
* 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) {
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user