Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doodle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jquery Plugin
doodle
Commits
8efccd64
Commit
8efccd64
authored
Feb 22, 2018
by
Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout deux nombres de cases vide
parent
d331d446
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
doodle.js
assets/lib/doodle/js/doodle.js
+14
-10
No files found.
assets/lib/doodle/js/doodle.js
View file @
8efccd64
...
@@ -61,9 +61,11 @@
...
@@ -61,9 +61,11 @@
let
$tr
=
$
(
'<tr>'
);
let
$tr
=
$
(
'<tr>'
);
if
(
!
(
i
==
dayLength
))
{
if
(
!
(
i
==
dayLength
))
{
let
formatDate
=
moment
(
this
.
days
[
i
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'dddd DD MMMM YYYY'
);
let
formatDateDay
=
moment
(
this
.
days
[
i
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'dddd'
);
let
formatDateMonth
=
moment
(
this
.
days
[
i
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'DD MMMM'
);
html
=
$tr
.
append
(
'<td>'
+
formatDate
+
'</td>'
)
html
=
$tr
.
append
(
'<td>'
+
formatDateDay
+
'</td>'
)
.
append
(
'<td>'
+
formatDateMonth
+
'</td>'
)
.
append
(
this
.
createBodyContent
(
this
.
days
[
i
]));
.
append
(
this
.
createBodyContent
(
this
.
days
[
i
]));
}
}
...
@@ -78,9 +80,11 @@
...
@@ -78,9 +80,11 @@
for
(
let
index
in
this
.
days
)
{
for
(
let
index
in
this
.
days
)
{
let
$tr
=
$
(
'<tr>'
);
let
$tr
=
$
(
'<tr>'
);
let
formatDate
=
moment
(
this
.
days
[
index
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'dddd DD MMMM YYYY'
);
let
formatDateDay
=
moment
(
this
.
days
[
index
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'dddd'
);
let
formatDateMonth
=
moment
(
this
.
days
[
index
],
'DD/MM/YYYY'
).
locale
(
'fr'
).
format
(
'DD MMMM'
);
html
=
$tr
.
append
(
'<td>'
+
formatDate
+
'</td>'
)
html
=
$tr
.
append
(
'<td>'
+
formatDateDay
+
'</td>'
)
.
append
(
'<td>'
+
formatDateMonth
+
'</td>'
)
.
append
(
this
.
createBodyContent
(
this
.
days
[
index
]));
.
append
(
this
.
createBodyContent
(
this
.
days
[
index
]));
...
@@ -137,11 +141,12 @@
...
@@ -137,11 +141,12 @@
let
html
,
theadFinal
;
let
html
,
theadFinal
;
let
finalSortedTab
=
[];
let
finalSortedTab
=
[];
// Nombre de cases vide
let
nbrCaseVide
=
2
;
// Permet de mettre un 'h' pour les heures/minutes
// Permet de mettre un 'h' pour les heures/minutes
this
.
hours
.
forEach
(
(
el
,
index
)
=>
{
this
.
hours
.
forEach
(
(
el
,
index
)
=>
{
if
(
el
.
split
(
':'
).
length
===
2
)
{
if
(
el
.
split
(
':'
).
length
===
2
)
{
console
.
log
(
el
.
split
(
':'
));
let
test
=
el
.
split
(
':'
);
let
test
=
el
.
split
(
':'
);
let
final
=
test
[
0
]
+
'h'
+
test
[
1
];
let
final
=
test
[
0
]
+
'h'
+
test
[
1
];
...
@@ -153,15 +158,14 @@
...
@@ -153,15 +158,14 @@
let
hoursSorted
=
finalSortedTab
.
sort
();
let
hoursSorted
=
finalSortedTab
.
sort
();
//Ajouter les cases vide
for
(
let
index
in
hoursSorted
)
{
for
(
let
i
=
0
;
i
<
nbrCaseVide
;
i
++
)
{
//La première case est vide
if
(
index
<
1
)
{
html
=
$tr
.
append
(
'<th></th>'
);
html
=
$tr
.
append
(
'<th></th>'
);
}
}
for
(
let
index
in
hoursSorted
)
{
console
.
log
(
'nt cc'
,
hoursSorted
[
index
]);
html
=
$tr
.
append
(
'<th>'
+
hoursSorted
[
index
]
+
'</th>'
);
html
=
$tr
.
append
(
'<th>'
+
hoursSorted
[
index
]
+
'</th>'
);
if
(
index
==
this
.
hours
.
length
-
1
&&
EDITMODE
)
{
if
(
index
==
this
.
hours
.
length
-
1
&&
EDITMODE
)
{
html
=
$tr
.
append
(
'<th>+</th>'
);
html
=
$tr
.
append
(
'<th>+</th>'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment