Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7177 Rev 7178
Línea 1... Línea 1...
1
<?php
1
<?php
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea -...
3
$routeEvents = $this->url('calendar/events');
-
 
4
 
-
 
Línea 5... Línea 3...
5
$this->headLink()->appendStylesheet($this->basePath('vendors/nprogress/nprogress.css'));
3
$routeEvents = $this->url('calendar/events');
-
 
4
 
-
 
5
 
-
 
6
$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar/fullcalendar.css'));
Línea 6... Línea 7...
6
$this->inlineScript()->appendFile($this->basePath('vendors/nprogress/nprogress.js'));
7
//$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar-scheduler/dist/scheduler.css'));
7
 
8
//$this->headLink()->appendStylesheet($this->basePath('vendors/iCheck/skins/flat/green.css'));
8
$this->headLink()->appendStylesheet($this->basePath('vendors/fullcalendar/fullcalendar.css'));
9
 
-
 
10
 
-
 
11
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/lib/moment.min.js'));
9
 
12
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/fullcalendar.js'));
Línea 10... Línea 13...
10
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/lib/moment.min.js'));
13
$this->inlineScript()->appendFile($this->basePath('vendors/fullcalendar/locale/es-us.js'));
Línea 22... Línea 25...
22
    var data_resources  = new Array();
25
    var data_resources  = new Array();
23
    var data_events = new Array();
26
    var data_events = new Array();
Línea 24... Línea 27...
24
 
27
 
25
    $('#calendar').fullCalendar({
28
    $('#calendar').fullCalendar({
-
 
29
        header: {
26
        header: {
30
            left: 'prev,next today',
27
            left: 'title',
31
            center: 'title',
28
            right: 'month,agendaWeek,agendaDay,listWeek,prev,next'
32
            right: 'month,agendaWeek,agendaDay,listWeek'
29
          },
33
          },
30
          defaultDate: '$defaultDate',
34
          defaultDate: '$defaultDate',
31
          editable: true,
35
          editable: true,
32
          navLinks: true, // can click day/week names to navigate views
36
          navLinks: true, // can click day/week names to navigate views
33
          eventLimit: true, // allow "more" link when too many events
37
          eventLimit: true, // allow "more" link when too many events
34
          events: {
38
          events: {
35
            url: '$routeEvents',
39
            url: '$routeEvents',
36
            error: function() {
40
            error: function() {
37
              $('#script-warning').show();
41
              $('#script-warning').show();
38
            }
42
            }
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
            }
-
 
47
          },
43
          }
48
          eventRender: function(eventObj, \$el) {
44
          ,eventRender: function(eventObj, \$el) {
49
            $('.popover').remove();
45
            $('.popover').remove();
50
            \$el.popover({
46
            \$el.popover({
51
                title: eventObj.title,
47
                title: eventObj.title,
52
                content: eventObj.agenda,
48
                content: eventObj.agenda,
53
                trigger: 'click', // 'hover',
49
                trigger: 'hover',
54
                placement: 'top',
50
                placement: 'top',
55
                container: 'body',
-
 
56
 
51
                container: 'body',
57
                popperOptions : {
52
                popperOptions : {
58
                    removeOnDestroy: true
53
                    removeOnDestroy: true
59
                },  
54
                },  
60
                options : {
55
                options : {
Línea 64... Línea 59...
64
            });
59
            });
65
        },
60
        },
Línea 66... Línea 61...
66
 
61
 
Línea 67... Línea -...
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 95... Línea 62...
95
 
62
    });
96
 
63
 
97
    
64
    
98
 
-
 
99
});
-
 
100
JS;
-
 
-
 
65
 
101
$this->inlineScript()->captureEnd();
66
});
102
$this->headLink()->appendStylesheet('/css/calendar.css');
67
JS;
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')
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>
117
 
75
                </div>