Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7176 | Rev 7178 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7176 Rev 7177
Línea 1... Línea 1...
1
<?php
1
<?php
Línea 2... Línea 2...
2
 
2
 
Línea -... Línea 3...
-
 
3
$routeEvents = $this->url('calendar/events');
-
 
4
 
Línea 3... Línea 5...
3
$routeEvents = $this->url('calendar/events');
5
$this->headLink()->appendStylesheet($this->basePath('vendors/nprogress/nprogress.css'));
4
 
-
 
5
 
-
 
6
$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar/fullcalendar.css'));
-
 
Línea 7... Línea 6...
7
//$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar-scheduler/dist/scheduler.css'));
6
$this->inlineScript()->appendFile($this->basePath('vendors/nprogress/nprogress.js'));
8
//$this->headLink()->appendStylesheet($this->basePath('vendors/iCheck/skins/flat/green.css'));
7
 
9
 
8
$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar/fullcalendar.css'));
10
 
-
 
11
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/lib/moment.min.js'));
-
 
12
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/fullcalendar.js'));
9
 
Línea 13... Línea 10...
13
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/locale/es-us.js'));
10
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/lib/moment.min.js'));
Línea 25... Línea 22...
25
    var data_resources  = new Array();
22
    var data_resources  = new Array();
26
    var data_events = new Array();
23
    var data_events = new Array();
Línea 27... Línea 24...
27
 
24
 
28
    $('#calendar').fullCalendar({
25
    $('#calendar').fullCalendar({
29
        header: {
-
 
30
            left: 'prev,next today',
26
        header: {
31
            center: 'title',
27
            left: 'title',
32
            right: 'month,agendaWeek,agendaDay,listWeek'
28
            right: 'month,agendaWeek,agendaDay,listWeek,prev,next'
33
          },
29
          },
34
          defaultDate: '$defaultDate',
30
          defaultDate: '$defaultDate',
35
          editable: true,
31
          editable: true,
36
          navLinks: true, // can click day/week names to navigate views
32
          navLinks: true, // can click day/week names to navigate views
37
          eventLimit: true, // allow "more" link when too many events
33
          eventLimit: true, // allow "more" link when too many events
38
          events: {
34
          events: {
39
            url: '$routeEvents',
35
            url: '$routeEvents',
40
            error: function() {
36
            error: function() {
41
              $('#script-warning').show();
37
              $('#script-warning').show();
42
            }
38
            }
-
 
39
          },
-
 
40
          eventClick: function(event) {
-
 
41
            if (event.url) {
-
 
42
            //  window.open(event.url, "_blank");
-
 
43
 
-
 
44
console.log('url = ' + event.url);
-
 
45
              return false;
-
 
46
            }
43
          }
47
          },
44
          ,eventRender: function(eventObj, \$el) {
48
          eventRender: function(eventObj, \$el) {
45
            $('.popover').remove();
49
            $('.popover').remove();
46
            \$el.popover({
50
            \$el.popover({
47
                title: eventObj.title,
51
                title: eventObj.title,
48
                content: eventObj.agenda,
52
                content: eventObj.agenda,
49
                trigger: 'hover',
53
                trigger: 'click', // 'hover',
50
                placement: 'top',
54
                placement: 'top',
-
 
55
                container: 'body',
51
                container: 'body',
56
 
52
                popperOptions : {
57
                popperOptions : {
53
                    removeOnDestroy: true
58
                    removeOnDestroy: true
54
                },  
59
                },  
55
                options : {
60
                options : {
Línea 59... Línea 64...
59
            });
64
            });
60
        },
65
        },
Línea 61... Línea 66...
61
 
66
 
Línea -... Línea 67...
-
 
67
    });
-
 
68
 
-
 
69
 
-
 
70
   
-
 
71
    $('body').on('click', 'a.goto-backend', function(e) {
-
 
72
        e.preventDefault();
-
 
73
        var action = $(this).attr('href');
-
 
74
 
-
 
75
        NProgress.start();
-
 
76
        $.ajax({
-
 
77
            'dataType'  : 'json',
-
 
78
            'method'    : 'get',
-
 
79
            'url'       :  action,
-
 
80
            'data'      :  $('#form').serialize(),
-
 
81
        }).done(function(response) {
-
 
82
            if(response['success']) {
-
 
83
              window.open(response['data'], '_backend')
-
 
84
            } else {
-
 
85
                $.fn.showError(response['data']);
-
 
86
            }
-
 
87
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
88
            $.fn.showError(textStatus);
-
 
89
        }).always(function() {
-
 
90
            NProgress.done();
-
 
91
        });
-
 
92
 
-
 
93
    });
-
 
94
 
Línea 62... Línea 95...
62
    });
95
 
63
 
96
 
64
    
97
    
65
 
-
 
-
 
98
 
-
 
99
});
-
 
100
JS;
66
});
101
$this->inlineScript()->captureEnd();
67
JS;
102
$this->headLink()->appendStylesheet('/css/calendar.css');
68
$this->inlineScript()->captureEnd();
-
 
69
 
-
 
70
?>
-
 
71
<section class="info-page">
-
 
72
	<div class="container">
-
 
73
		<div class="row">
-
 
74
			<div id="calendar" class="col-xs-12 col-sm-12 col-md-12 col-lg-122"></div>
103
$this->headLink()->appendStylesheet('/look-and-field/calendar.css');
-
 
104
$this->inlineScript()->appendFile('/react-bundles/calendar/calendarBundle.js');
-
 
105
?>
-
 
106
<section class="info-page">
-
 
107
  <div class="container">
-
 
108
    <div class="row">
-
 
109
      <div id="calendar" class="col-12 col-md-8"></div>
-
 
110
      <div id="calendar-events" class="col-12 col-md-4"></div>
-
 
111
    </div>
-
 
112
  </div>
-
 
113
</section>
-
 
114
<script>
-
 
115
  const isMobile = Boolean(window.innerWidth < 768)
-
 
116
  const row = document.querySelector('.container .row')
75
		</div>
117