Pridan program, opraveno jQuery s webpackem

This commit is contained in:
Michal Kváček
2018-11-16 14:10:42 +01:00
parent 7d388100a5
commit 15c0f0b54a
13 changed files with 311 additions and 30 deletions
+4 -4
View File
@@ -48,7 +48,7 @@ function initCalendar() {
$modal.find ('input[name=startdate]').val (startdate);
},
eventDrop: function (event) {
/*eventDrop: function (event) {
if (event.type === "event") {
$.nette.ajax ({
url: {plink editCalendarEvent!},
@@ -71,7 +71,7 @@ function initCalendar() {
}
});
}
},
},*/
eventClick: function (event, jsEvent, view) {
// wasn't remove button clicked?
if ($ (jsEvent.target).hasClass ('fa-times')) {
@@ -97,14 +97,14 @@ function initCalendar() {
$modal.modal ('show');
},
eventRender: function (event, element) {
/*eventRender: function (event, element) {
var url = {plink delete! 0,1};
url = url.replace ("0?", event.id + "?").replace ("type=1", "type=" + event.type);
var link = '<span class="delete-button"><a href="javascript:void(0);" data-action="' + url + '" class="calendar-remove"><span class="fa fa-times"></span></a></span>';
element.find (".fc-title").parent ().append (link);
},
},*/
events: window.events
});
+38
View File
@@ -0,0 +1,38 @@
$ (document).on ('click', '.js-add-program', function () {
var $template = $ ($ (this).data ('template'));
var $templateContainer = $ ($ (this).data ('template-container'));
var $copy = $template.clone ().removeClass ('template');
$copy.find ('.js-remove-program').removeAttr('hidden');
$copy.appendTo ($templateContainer);
});
$ (document).on ('click', '.js-remove-program', function () {
if ($ (this).hasClass ('template'))
return;
$ (this).closest ('tr').remove ();
});
var $iconTarget = null;
$(document).on('click', '.js-set-icon-program', function () {
$('#setIconProgramModal').modal('show');
$iconTarget = $(this);
});
$(document).on('click', '.js-choose-icon', function () {
var icon = $(this).data('icon');
$iconTarget.find('input').val(icon);
$iconTarget.find('.fa').removeAttr('class').addClass('fa fa-2x fa-'+icon);
$iconTarget = null;
$('#setIconProgramModal').modal('hide');
});
+1 -1
View File
@@ -23,4 +23,4 @@ $fa-font-path: "~font-awesome/fonts";
@import "backToDashboard";
@import "boxes";
@import "editor/parts";
@import "editor/app";
+3 -1
View File
@@ -4,9 +4,11 @@
&__container {
column-count: 2;
column-width: 50%;
padding: 20px;
}
&__item {
margin: 20px;
margin-bottom: 20px;
}
}
+4
View File
@@ -0,0 +1,4 @@
@import "parts";
@import "timeline";
+56
View File
@@ -0,0 +1,56 @@
.timeline-container {
overflow: auto;
white-space: nowrap;
}
.timeline {
list-style: none;
width: auto;
color: gray;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
}
.timeline .timeline__item {
display: inline-block;
max-width: 200px;
text-align: center;
padding: 0 20px;
margin: 0 10px;
flex-grow: 1;
}
.timeline .timeline__icon {
width: 40px;
height: 40px;
font-size: 40px;
position: relative;
}
.timeline::before {
border: solid 1px;
position: absolute;
top: 100px;
content: " ";
width: 100%;
}
.timeline .timeline__icon::after {
font: normal normal normal 14px/1 FontAwesome;
content: "\F111";
position: absolute;
z-index: -1;
width: 100%;
bottom: -30px;
left: 0;
font-size: 20px;
}
.timeline .timeline__content {
margin-top: 30px;
}
.timeline .timeline__content h3 {
}