Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15612 Rev 15613
Línea 56... Línea 56...
56
$this->inlineScript()->captureStart();
56
$this->inlineScript()->captureStart();
57
echo <<<JS
57
echo <<<JS
58
jQuery( document ).ready(function( $ ) {
58
jQuery( document ).ready(function( $ ) {
Línea -... Línea 59...
-
 
59
 
-
 
60
 
-
 
61
    $.fn.loadData = function() {
-
 
62
        NProgress.start(); 
-
 
63
        $.ajax({
-
 
64
            'dataType'  : 'json',
-
 
65
            'accept'    : 'application/json',
-
 
66
            'method'    : 'get',
-
 
67
            'url'       :  $('#form-filter').attr('action'), 
-
 
68
            'data'      :  $('#form-filter').serialize(),
-
 
69
        }).done(function(response) {
-
 
70
            if(response['success']) {
-
 
71
 
-
 
72
 
-
 
73
 
-
 
74
               $('#gridTable tbody').empty();
-
 
75
                if(response['data']['items']) { 
-
 
76
                    
Línea -... Línea 77...
-
 
77
                    $('#gridTable tbody').append(
-
 
78
                        $( "#itemRowTemplate" ).render( response['data']['items'] )
-
 
79
    
-
 
80
                    );
-
 
81
        
-
 
82
                } else {
-
 
83
                    $('#gridTable tbody').append(
-
 
84
                        $( "#itemEmptyRowTemplate" ).render([])
-
 
85
                    );
-
 
86
 
-
 
87
                }
-
 
88
 
-
 
89
                if(response['data']['link_download']) {
-
 
90
                    $('button.btn-download').data('href', response['data']['link_download']);
-
 
91
                    $('button.btn-download').show();
-
 
92
 
-
 
93
                } else {
-
 
94
                     $('button.btn-download').hide();
-
 
95
                }
-
 
96
 
-
 
97
            } else {
-
 
98
                if(jQuery.type(response['data']) == 'string') {
-
 
99
                    $.fn.showError(response['data']);
-
 
100
                } else  {
-
 
101
                    $.each(response['data'], function( fieldname, errors ) {
-
 
102
                        $.fn.showFormErrorValidator('#form-filter #' + fieldname, errors);
-
 
103
                    });
-
 
104
                }
-
 
105
            }
-
 
106
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
107
            $.fn.showError(textStatus);
-
 
108
        }).always(function() {
-
 
109
            NProgress.done();
Línea 260... Línea 311...
260
                                <tr>
311
                                <tr>
261
                                    <th style="width: 25%">LABEL_FIRST_NAME</th>
312
                                    <th style="width: 25%">LABEL_FIRST_NAME</th>
262
                                    <th style="width: 25%">LABEL_LAST_NAME</th>
313
                                    <th style="width: 25%">LABEL_LAST_NAME</th>
263
                                    <th style="width: 30%">LABEL_EMAIL</th>
314
                                    <th style="width: 30%">LABEL_EMAIL</th>
264
                                    <th style="width: 20%">LABEL_REPORTS_LAST_ACTIVITY</th>
315
                                    <th style="width: 20%">LABEL_REPORTS_LAST_ACTIVITY</th>
265
 
-
 
266
 
-
 
267
                                </tr>
316
                                </tr>
268
                            </thead>
317
                            </thead>
269
                            <tbody>
318
                            <tbody>
270
                            </tbody>
319
                            </tbody>
271
                        </table>
320
                        </table>