forked from Wavyzz/dolibarr
Comment deprecated js code
This commit is contained in:
@@ -82,6 +82,7 @@ else header('Cache-Control: no-cache');
|
||||
* SimpleDateFormat a utiliser pour retour
|
||||
* ==================================================================
|
||||
*/
|
||||
/*
|
||||
function showDP(base,dateFieldID,format,codelang)
|
||||
{
|
||||
// check to see if another box is already showing
|
||||
@@ -165,7 +166,7 @@ function resetDP(base,dateFieldID,format,codelang)
|
||||
|
||||
function loadMonth(base,month,year,ymd,codelang)
|
||||
{
|
||||
/* showDP.box.innerHTML="Loading..."; */
|
||||
// showDP.box.innerHTML="Loading...";
|
||||
// alert(codelang);
|
||||
var theURL=base+"datepicker.php?cm=shw&lang="+codelang;
|
||||
theURL+="&m="+encodeURIComponent(month);
|
||||
@@ -192,37 +193,6 @@ function closeDPBox()
|
||||
showDP.datefieldID=null;
|
||||
}
|
||||
|
||||
function dpChangeDay(dateFieldID,format)
|
||||
{
|
||||
showDP.datefieldID=dateFieldID;
|
||||
console.log("Call dpChangeDay, we save date into detailed fields.");
|
||||
|
||||
var thefield=getObjectFromID(showDP.datefieldID);
|
||||
var thefieldday=getObjectFromID(showDP.datefieldID+"day");
|
||||
var thefieldmonth=getObjectFromID(showDP.datefieldID+"month");
|
||||
var thefieldyear=getObjectFromID(showDP.datefieldID+"year");
|
||||
|
||||
var date=getDateFromFormat(thefield.value,format);
|
||||
if (date)
|
||||
{
|
||||
thefieldday.value=date.getDate();
|
||||
if(thefieldday.onchange) thefieldday.onchange.call(thefieldday);
|
||||
thefieldmonth.value=date.getMonth()+1;
|
||||
if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth);
|
||||
thefieldyear.value=date.getFullYear();
|
||||
if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear);
|
||||
}
|
||||
else
|
||||
{
|
||||
thefieldday.value='';
|
||||
if(thefieldday.onchange) thefieldday.onchange.call(thefieldday);
|
||||
thefieldmonth.value='';
|
||||
if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth);
|
||||
thefieldyear.value='';
|
||||
if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear);
|
||||
}
|
||||
}
|
||||
|
||||
function dpClickDay(year,month,day,format)
|
||||
{
|
||||
var thefield=getObjectFromID(showDP.datefieldID);
|
||||
@@ -250,16 +220,6 @@ function dpHighlightDay(year,month,day,months){
|
||||
displayinfo.innerHTML=months[month-1]+" "+day+", "+year;
|
||||
}
|
||||
|
||||
// Returns an object given an id
|
||||
function getObjectFromID(id){
|
||||
var theObject;
|
||||
if(document.getElementById)
|
||||
theObject=document.getElementById(id);
|
||||
else
|
||||
theObject=document.all[id];
|
||||
return theObject;
|
||||
}
|
||||
|
||||
// This Function returns the top position of an object
|
||||
function getTop(theitem){
|
||||
var offsetTrail = theitem;
|
||||
@@ -286,6 +246,85 @@ function getLeft(theitem){
|
||||
return offsetLeft;
|
||||
}
|
||||
|
||||
// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and
|
||||
// not put popup completely on the front)
|
||||
// Used only bu popup calendar
|
||||
function hideSelectBoxes() {
|
||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
|
||||
{
|
||||
for(var i = 0; i < document.all.length; i++)
|
||||
{
|
||||
if(document.all[i].tagName)
|
||||
if(document.all[i].tagName == "SELECT")
|
||||
document.all[i].style.visibility="hidden";
|
||||
}
|
||||
}
|
||||
}
|
||||
// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and
|
||||
// not put popup completely on the front)
|
||||
// Used only bu popup calendar
|
||||
function displaySelectBoxes() {
|
||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
|
||||
{
|
||||
for(var i = 0; i < document.all.length; i++)
|
||||
{
|
||||
if(document.all[i].tagName)
|
||||
if(document.all[i].tagName == "SELECT")
|
||||
document.all[i].style.visibility="visible";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Returns an object given an id
|
||||
function getObjectFromID(id){
|
||||
var theObject;
|
||||
if(document.getElementById)
|
||||
theObject=document.getElementById(id);
|
||||
else
|
||||
theObject=document.all[id];
|
||||
return theObject;
|
||||
}
|
||||
|
||||
// Called after selection of a date to save details into detailed fields
|
||||
function dpChangeDay(dateFieldID,format)
|
||||
{
|
||||
//showDP.datefieldID=dateFieldID;
|
||||
console.log("Call dpChangeDay, we save date into detailed fields.");
|
||||
|
||||
var thefield=getObjectFromID(dateFieldID);
|
||||
var thefieldday=getObjectFromID(dateFieldID+"day");
|
||||
var thefieldmonth=getObjectFromID(dateFieldID+"month");
|
||||
var thefieldyear=getObjectFromID(dateFieldID+"year");
|
||||
|
||||
var date=getDateFromFormat(thefield.value,format);
|
||||
if (date)
|
||||
{
|
||||
thefieldday.value=date.getDate();
|
||||
if(thefieldday.onchange) thefieldday.onchange.call(thefieldday);
|
||||
thefieldmonth.value=date.getMonth()+1;
|
||||
if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth);
|
||||
thefieldyear.value=date.getFullYear();
|
||||
if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear);
|
||||
}
|
||||
else
|
||||
{
|
||||
thefieldday.value='';
|
||||
if(thefieldday.onchange) thefieldday.onchange.call(thefieldday);
|
||||
thefieldmonth.value='';
|
||||
if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth);
|
||||
thefieldyear.value='';
|
||||
if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Create XMLHttpRequest object and load url
|
||||
// Used by calendar or other ajax processes
|
||||
@@ -345,40 +384,6 @@ function loadXMLDoc(url,readyStateFunction,async)
|
||||
return req;
|
||||
}
|
||||
|
||||
/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and
|
||||
* not put popup completely on the front)
|
||||
* Used only bu popup calendar
|
||||
*/
|
||||
function hideSelectBoxes() {
|
||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
|
||||
{
|
||||
for(var i = 0; i < document.all.length; i++)
|
||||
{
|
||||
if(document.all[i].tagName)
|
||||
if(document.all[i].tagName == "SELECT")
|
||||
document.all[i].style.visibility="hidden";
|
||||
}
|
||||
}
|
||||
}
|
||||
/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and
|
||||
* not put popup completely on the front)
|
||||
* Used only bu popup calendar
|
||||
*/
|
||||
function displaySelectBoxes() {
|
||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
|
||||
{
|
||||
for(var i = 0; i < document.all.length; i++)
|
||||
{
|
||||
if(document.all[i].tagName)
|
||||
if(document.all[i].tagName == "SELECT")
|
||||
document.all[i].style.visibility="visible";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* =================================================================
|
||||
|
||||
Reference in New Issue
Block a user