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
5e04ff7b
Commit
5e04ff7b
authored
Feb 16, 2018
by
Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Création du dom en Jquery du thead
parent
8cc8c8db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
doodle.js
assets/lib/doodle/js/doodle.js
+19
-14
No files found.
assets/lib/doodle/js/doodle.js
View file @
5e04ff7b
...
@@ -21,14 +21,13 @@
...
@@ -21,14 +21,13 @@
this
.
getDays
();
this
.
getDays
();
this
.
getHours
();
this
.
getHours
();
this
.
createTable
();
this
.
createTable
();
};
};
this
.
createTable
=
()
=>
{
this
.
createTable
=
()
=>
{
this
.
item
.
html
(
`
this
.
item
.
html
(
`
<table>
<table id="myTables">
<thead>
${
this
.
createHeaderTable
()}
${
this
.
createHeaderTable
()}
</thead>
<tbody>
<tbody>
${
this
.
createBodyTable
()}
${
this
.
createBodyTable
()}
</tbody>
</tbody>
...
@@ -36,6 +35,7 @@
...
@@ -36,6 +35,7 @@
`
);
`
);
};
};
/**
/**
* Create table header for hours
* Create table header for hours
* @returns {string}
* @returns {string}
...
@@ -55,6 +55,12 @@
...
@@ -55,6 +55,12 @@
return
html
;
return
html
;
};
};
function
createInputBox
(
hasTask
,
name
,
id
,
setDisabled
)
{
return
"<input type='checkbox' id='"
+
id
+
"' name='"
+
name
+
"'"
+
(
hasTask
?
" checked"
:
""
)
+
(
setDisabled
?
" disabled"
:
""
)
+
" />"
+
"<label class='checkWrapper' for='"
+
id
+
"'></label>"
;
}
/**
/**
* Create body content
* Create body content
* @param index
* @param index
...
@@ -79,22 +85,21 @@
...
@@ -79,22 +85,21 @@
* @returns {string}
* @returns {string}
*/
*/
this
.
createHeaderTable
=
()
=>
{
this
.
createHeaderTable
=
()
=>
{
let
html
=
`
let
$thead
=
$
(
'<thead>'
);
<tr>
let
$tr
=
$
(
'<tr>'
);
<th></th>
let
html
,
theadFinal
;
`
;
for
(
let
index
in
this
.
hours
)
{
for
(
let
index
in
this
.
hours
)
{
html
+=
`
//La première case est vide
<th>
${
this
.
hours
[
index
]}
</th>
if
(
index
<
1
)
`
;
html
=
$tr
.
append
(
'<th></th>'
);
html
=
$tr
.
append
(
'<th>'
+
this
.
hours
[
index
]
+
'</th>'
);
}
}
html
+=
`
theadFinal
=
$thead
.
append
(
html
);
</tr>
`
;
return
html
;
return
theadFinal
.
html
()
;
};
};
/**
/**
...
...
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