index.html 5.93 KB
Newer Older
Your Name's avatar
Your Name committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
 <html charset='utf-8'>
<head>
 <meta charset="UTF-8">

 <!--<link type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.css" rel="stylesheet">
 <link type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css " rel="stylesheet">

 -->
<!--
 <script src="node_modules/jquery/dist/jquery.js"></script>
 <script src="node_modules/moment/moment.js"></script>

 <script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.js"></script>
-->


<link href="https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.css" rel="stylesheet"></link>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.js"></script> 

<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/locale/el.js"></script> 


<script src="https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/jquery.qtip.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/jquery.qtip.min.css" rel="stylesheet"></link>



<script>

$(document).ready(function() {

    // page is now ready, initialize the calendar...

    $('#calendar').fullCalendar({
        // put your options and callbacks here
    			header: {
    				left: 'prev,next today',
    				center: 'title',
    				right: 'month,agendaWeek,agendaDay'
    			},
    			defaultDate: '2017-06-12',
    			lang: 'el',
    			
    			editable: true,
    			defaultView: 'agendaWeek', // or 'agenda' or 'basic'    'agendaWeek',
				minTime: "09:00:00",

    			events: [


    				{
    					title: 'All Day Event',
    					start: '2017-06-01'
    				},
				{
    title:"My repeating event",
    					start: 	'2017-05-12T10:00',
    					end: 	'2017-07-15T10:45',
					color: 'pink',textColor: 'black',
    dow: [ 1, 6 ] // Repeat monday and thursday
},
    				{
    					title: 	'Τμήμα T5 - Τεχνολογία - Γκατζέτης',
    					start: 	'2017-06-15T16:00:00',
    					end: 	'2017-06-15T16:45:00',
    					color: 'cyan',textColor: 'black',
    					description: 'Αιθουσα 4'
    				},    			
    				{
    					title: 	'Τμήμα T5 - Ηλεκτρονική - Ρεύματοπουλος',
    					start: 	'2017-06-15T17:00:00',
    					end: 	'2017-06-15T17:45:00',
    					color: 'cyan',textColor: 'black',
    					description: 'Αιθουσα 4'
    				},
    				{
    					title: 	'Τμήμα T5 - Μαθηματικά - Μπουλίδης',
    					start: 	'2017-06-15T18:00:00',
    					end: 	'2017-06-15T18:45:00',
    					color: 'cyan',textColor: 'black',
    					description: 'Αιθουσα 4'
    				},
    				{
    					title: 	'Τμήμα T5 - Έκθεση - Δεθίδου',
    					start: 	'2017-06-15T19:00:00',
    					end: 	'2017-06-15T19:45:00',
    					color: 'cyan',textColor: 'black',
    					description: 'Αιθουσα 4'
 					},



    				{
    					title: 'Τμήμα Α2-Παπαδόπουλος',
    					start: '2017-06-12T19:00:00',
    					end: '2017-06-12T19:45:00',
    					description: 'Αίθουσα 1'
    				},
    				{
    					id: 999,
    					title: 'Τμήμα Β2-Σταυρίδης',
    					start: '2017-06-13T17:00:00',
    					description: 'This is a cool event'
    				},
    				{
    					id: 999,
    					title: 'Τμήμα Β2-Σταυρίδης Αναπλήρωση',
    					start: '2017-06-16T13:00:00',
    					description: 'This is a cool event'
    				},
    				{
    					title: 	'Τμήμα Θ2 - Μαθηματικά - Μπουλίδης',
    					start: 	'2017-06-15T16:00:00',
    					end: 	'2017-06-15T16:45:00',
    					color: 'orange',textColor: 'black',
    					description: 'Αιθουσα 2'
    				},
    				{
    					title: 	'Τμήμα Θ2 - ΦΥΣΙΚΗ - Αλβερτίδης',
    					start: 	'2017-06-15T17:00:00',
    					end: 	'2017-06-15T17:45:00',
    					color: 'orange',textColor: 'black',
    					description: 'Αιθουσα 2'
    				},
    				{
    					title: 	'Τμήμα Θ2 - Χημέια - Πλάνκας',
    					start: 	'2017-06-15T18:00:00',
    					end: 	'2017-06-15T18:45:00',
    					color: 'orange',textColor: 'black',
    					description: 'Αιθουσα 2'
    				},

    				{
    					title: 	'Τμήμα Θ2 - Έκθεση - Χελεξάκη',
    					start: 	'2017-06-15T19:00:00',
    					end: 	'2017-06-15T19:45:00',
    					color: 'orange',textColor: 'black',
    					description: 'Αιθουσα 2'
 
    				}
    			],



    eventSources: [

        // your event source
        {
            url: 'myjsonfeed.php', // use the `url` property
            type: 'GET',
            color: 'yellow',    // an option!
Your Name's avatar
Your Name committed
154 155 156 157 158 159 160 161
            textColor: 'black',  // an option!
	        data: function() { // a function that returns an object
	            return {
	                professor_id: Math.random(),
	                lesson_id: Math.random()
	            };
	        }            

Your Name's avatar
Your Name committed
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
        }

        // any other sources...

    ],    			

    eventRender: function(event, element) {
        element.qtip({

            content: event.title + ' ' +event.description
        });
    },

       eventClick: function(calEvent, jsEvent, view) {

        alert('Επιλέξατε το : ' + calEvent.title);
        //alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
        //alert('View: ' + view.name);

        // change the border color just for fun
        $(this).css('border-color', 'red');

    },



            dayClick: function(date, jsEvent) {
       			//alert( 'Κενή Ώρα - Παρακαλώ εισάγετε διδασκαλία' + date.format());
       			         //open an ADD NEW EVENT FORM for this date
         				   window.open("add_new_event.php?start="+date.format());
            			
        				
    		}



    })

});

</script>

 </head>
 <body>
<div id='calendar'></div>


 </body>