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
01efd315
Commit
01efd315
authored
19 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Possibilité de choisir le gestionnaire de popup date
parent
5905c1d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/html.form.class.php
+3
-1
3 additions, 1 deletion
htdocs/html.form.class.php
htdocs/lib/lib_head.js
+16
-4
16 additions, 4 deletions
htdocs/lib/lib_head.js
with
19 additions
and
5 deletions
htdocs/html.form.class.php
+
3
−
1
View file @
01efd315
...
@@ -1631,7 +1631,9 @@ class Form
...
@@ -1631,7 +1631,9 @@ class Form
$formated_date
=
dolibarr_print_date
(
$set_time
,
$conf
->
format_date_short
);
$formated_date
=
dolibarr_print_date
(
$set_time
,
$conf
->
format_date_short
);
// Zone de saisie manuelle de la date
// Zone de saisie manuelle de la date
print
'<input id="'
.
$prefix
.
'" name="'
.
$prefix
.
'" type="text" size="11" maxlength="11" value="'
.
$formated_date
.
'"> '
;
print
'<input id="'
.
$prefix
.
'" name="'
.
$prefix
.
'" type="text" size="11" maxlength="11" value="'
.
$formated_date
.
'"'
;
print
' onChange="dpChangeDay(\''
.
$prefix
.
'\',\''
.
$conf
->
format_date_short_java
.
'\')"'
;
print
'> '
;
// Icone calendrier
// Icone calendrier
print
'<button id="'
.
$prefix
.
'Button" type="button" class="dpInvisibleButtons"'
;
print
'<button id="'
.
$prefix
.
'Button" type="button" class="dpInvisibleButtons"'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/lib/lib_head.js
+
16
−
4
View file @
01efd315
...
@@ -106,15 +106,27 @@ function loadMonth(base,month,year,ymd)
...
@@ -106,15 +106,27 @@ function loadMonth(base,month,year,ymd)
showDP
.
box
.
innerHTML
=
req
.
responseText
;
showDP
.
box
.
innerHTML
=
req
.
responseText
;
}
}
function
closeDPBox
()
function
closeDPBox
()
{
{
document
.
body
.
removeChild
(
showDP
.
box
);
document
.
body
.
removeChild
(
showDP
.
box
);
displaySelectBoxes
();
displaySelectBoxes
();
showDP
.
box
=
null
;
showDP
.
box
=
null
;
showDP
.
datefieldID
=
null
;
showDP
.
datefieldID
=
null
;
}
}
function
dpClickDay
(
year
,
month
,
day
,
format
){
function
dpChangeDay
(
dateFieldID
,
format
)
{
showDP
.
datefieldID
=
dateFieldID
;
var
thefield
=
getObjectFromID
(
dateFieldID
);
var
date
=
getDateFromFormat
(
thefield
.
value
,
format
);
if
(
date
)
dpClickDay
(
date
.
getFullYear
(),
date
.
getMonth
()
+
1
,
date
.
getDate
(),
format
)
else
dpClickDay
(
0
,
0
,
0
,
format
);
}
function
dpClickDay
(
year
,
month
,
day
,
format
)
{
var
thefield
=
getObjectFromID
(
showDP
.
datefieldID
);
var
thefield
=
getObjectFromID
(
showDP
.
datefieldID
);
var
thefieldday
=
getObjectFromID
(
showDP
.
datefieldID
+
"
day
"
);
var
thefieldday
=
getObjectFromID
(
showDP
.
datefieldID
+
"
day
"
);
var
thefieldmonth
=
getObjectFromID
(
showDP
.
datefieldID
+
"
month
"
);
var
thefieldmonth
=
getObjectFromID
(
showDP
.
datefieldID
+
"
month
"
);
...
@@ -126,7 +138,7 @@ function dpClickDay(year,month,day,format){
...
@@ -126,7 +138,7 @@ function dpClickDay(year,month,day,format){
dt
.
setDate
(
day
);
dt
.
setDate
(
day
);
thefield
.
value
=
formatDate
(
dt
,
format
);
thefield
.
value
=
formatDate
(
dt
,
format
);
if
(
thefield
.
onchange
)
thefield
.
onchange
.
call
(
thefield
);
//
if(thefield.onchange) thefield.onchange.call(thefield);
thefieldday
.
value
=
day
;
thefieldday
.
value
=
day
;
if
(
thefieldday
.
onchange
)
thefieldday
.
onchange
.
call
(
thefieldday
);
if
(
thefieldday
.
onchange
)
thefieldday
.
onchange
.
call
(
thefieldday
);
...
...
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