Commit a17d2e0f by Arnaud

update css

parent 62481589
...@@ -241,11 +241,11 @@ ...@@ -241,11 +241,11 @@
border-radius: 0 2px 2px 0 !important; border-radius: 0 2px 2px 0 !important;
} }
.doodle-table .label_input input { .doodle-table .label_input input, .doodle-list .label_input input {
display: none; display: none;
} }
.doodle-table .label_input span { .doodle-table .label_input span, .doodle-list .label_input span {
position: relative; position: relative;
display: flex; display: flex;
width: 16px; width: 16px;
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
overflow: hidden; overflow: hidden;
} }
.doodle-table .label_input span i { .doodle-table .label_input span i, .doodle-list .label_input span i {
position: relative; position: relative;
width: 16px; width: 16px;
height: 16px; height: 16px;
...@@ -265,38 +265,66 @@ ...@@ -265,38 +265,66 @@
transform-origin: center left; transform-origin: center left;
} }
.doodle-table .label_input span i:before, .doodle-table .label_input span i:after { .doodle-list .label_input span {
margin-left: 5px;
float: left;
}
.doodle-list .label_input {
position: relative;
height: 100%;
width: 120px;
display: flex;
align-items: center;
}
.doodle-list .label_input h5 {
margin-left: 10px;
}
.doodle-list .doodle-label {
position: absolute;
}
.doodle-list li {
height: 50px;
width: 120px;
cursor: pointer;
margin-top: 2px;
}
.doodle-table .label_input span i:before, .doodle-table .label_input span i:after, .doodle-list .label_input span i:before, .doodle-list .label_input span i:after {
content: ""; content: "";
position: absolute; position: absolute;
background-color: white; background-color: white;
border-radius: 20px; border-radius: 20px;
} }
.doodle-table .label_input span i:before { .doodle-table .label_input span i:before, .doodle-list .label_input span i:before {
height: 0; height: 0;
top: 60%; top: 60%;
left: 0; left: 0;
width: 2px; width: 2px;
} }
.doodle-table .label_input span i:after { .doodle-table .label_input span i:after, .doodle-list .label_input span i:after {
width: 0; width: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 2px; height: 2px;
} }
.doodle-table .label_input input:checked ~ span { .doodle-table .label_input input:checked ~ span, .doodle-list .label_input input:checked ~ span{
border: none; border: none;
background-color: rgba(109, 92, 174, 1); background-color: rgba(109, 92, 174, 1);
} }
.doodle-table .label_input input:checked ~ span i:before { .doodle-table .label_input input:checked ~ span i:before, .doodle-list .label_input input:checked ~ span i:before {
height: 25%; height: 25%;
transition: height 300ms cubic-bezier(0.895, 0.03, 0.685, 0.22); transition: height 300ms cubic-bezier(0.895, 0.03, 0.685, 0.22);
} }
.doodle-table .label_input input:checked ~ span i:after { .doodle-table .label_input input:checked ~ span i:after, .doodle-list .label_input input:checked ~ span i:after {
width: 75%; width: 75%;
transition: width 300ms 300ms cubic-bezier(0.165, 0.84, 0.44, 1); transition: width 300ms 300ms cubic-bezier(0.165, 0.84, 0.44, 1);
} }
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
} else { } else {
hour = hour.replace(':', 'h'); hour = hour.replace(':', 'h');
} }
$li.html(this.createInputBox(this.hours[index2], formatDateDay) + '<label class="doodle-label">' + hour + '</label>'); $li.html(this.createInputBox(this.hours[index2], formatDateDay, hour));
div.append($li); div.append($li);
} }
} }
...@@ -148,10 +148,16 @@ ...@@ -148,10 +148,16 @@
* @param day * @param day
* @returns {string} * @returns {string}
*/ */
this.createInputBox = (hour, day) => { this.createInputBox = (hour, day, name = null) => {
let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY'); let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY');
return "<label class='label_input'><input type='checkbox' data-check=" + dayFormat + '_' + hour + " /><span><i></i></span></label>" let html = "<label class='label_input'><input type='checkbox' data-check=" + dayFormat + '_' + hour + " /><span><i></i></span>";
if(name) {
html += "<h5>" + name + "</h5>";
}
html += "</label>"
return html;
}; };
/** /**
...@@ -268,8 +274,11 @@ ...@@ -268,8 +274,11 @@
this.createJSON = () => { this.createJSON = () => {
let $input = $(this.config.inputSelector); let $input = $(this.config.inputSelector);
console.log($input);
if ($input.length > 0) { if ($input.length > 0) {
$input.val(JSON.stringify(this.outputJson)); $input.val(JSON.stringify(this.outputJson));
console.log($input.val());
} }
}; };
...@@ -278,6 +287,7 @@ ...@@ -278,6 +287,7 @@
* @param e event * @param e event
*/ */
this.eventInput = (e) => { this.eventInput = (e) => {
console.log("OUAIS");
let data = $(e.target).data('check').split('_'); let data = $(e.target).data('check').split('_');
let isChecked = $(e.target).is(':checked'); let isChecked = $(e.target).is(':checked');
...@@ -950,7 +960,6 @@ ...@@ -950,7 +960,6 @@
this.initLoad(); this.initLoad();
}; };
/** /**
* *
* @param options * @param options
...@@ -986,5 +995,4 @@ ...@@ -986,5 +995,4 @@
} }
}; };
})(jQuery); })(jQuery);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment