67 lines
2.7 KiB
Plaintext
67 lines
2.7 KiB
Plaintext
doctype html
|
|
html
|
|
head
|
|
title Munka nyílvántartó
|
|
link(rel='stylesheet' href='/bower_components/bootstrap/dist/css/bootstrap.css')
|
|
link(rel='stylesheet', href='/bower_components/bootstrap/dist/css/bootstrap.min.css')
|
|
link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css')
|
|
link(rel='stylesheet' href='/bower_components/jquery-typeahead/dist/jquery.typeahead.min.css')
|
|
link(rel='stylesheet' href='/bower_components/bootstrap-year-calendar/css/bootstrap-year-calendar.css')
|
|
link(rel='stylesheet', href='https://use.fontawesome.com/releases/v5.6.1/css/all.css')
|
|
-//link(rel='stylesheet' type='text/css' href='./css/bootstrap-datepicker.min.css')
|
|
|
|
body
|
|
.container
|
|
h2 #{title}
|
|
.panel.panel-primary
|
|
.panel-heading Panel Heading
|
|
.panel-body
|
|
#calendar.div(data-provide='calendar')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
script(src='/bower_components/jquery/dist/jquery.js')
|
|
script(type='text/javascript', src='/bower_components/jquery/dist/jquery.min.js')
|
|
script(type='text/javascript', src='/bower_components/moment/min/moment.min.js')
|
|
script(src='/bower_components/bootstrap/dist/js/bootstrap.js')
|
|
script(type='text/javascript', src='/bower_components/bootstrap-year-calendar/js/bootstrap-year-calendar.min.js')
|
|
script(type='text/javascript', src='/bower_components/bootstrap-year-calendar/js/languages/bootstrap-year-calendar.hu.js')
|
|
script(src='https://unpkg.com/js-year-calendar@latest/dist/js-year-calendar.min.js')
|
|
script(type='text/javascript', src='/js/holidays.js')
|
|
script.
|
|
$.get('/employee/get_employee_list' , function(data) {
|
|
|
|
var currentYear = new Date().getFullYear();
|
|
var dates=[];
|
|
data[3].holidayData.forEach(function(d)
|
|
{
|
|
dates.push(
|
|
{
|
|
id: data._id,
|
|
name: 'Google I/O',
|
|
//location: 'San Francisco, CA',
|
|
startDate: moment(d.start_date,'DD.MM.YYYY').toDate(),
|
|
endDate: moment(d.end_date,'DD.MM.YYYY').toDate()
|
|
}
|
|
)
|
|
|
|
})
|
|
console.log(dates);
|
|
$('#calendar').calendar({
|
|
style:'background',
|
|
dataSource: dates/* [
|
|
{
|
|
startDate: new Date(currentYear, 1, 4),
|
|
endDate: new Date(currentYear, 1, 15)
|
|
},
|
|
{
|
|
startDate: new Date(currentYear, 3, 5),
|
|
endDate: new Date(currentYear, 5, 15)
|
|
}
|
|
]*/
|
|
});
|
|
|
|
}); |