Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 2 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2 Rev 187
Línea 7... Línea 7...
7
$roleName = $currentUser->getUserTypeId();
7
$roleName = $currentUser->getUserTypeId();
Línea 8... Línea 8...
8
 
8
 
9
 
9
 
-
 
10
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
Línea 10... Línea 11...
10
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
11
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
11
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
12
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.js'));
Línea 55... Línea 56...
55
            'data'      :  $('#form-filter').serialize(),
56
            'data'      :  $('#form-filter').serialize(),
56
        }).done(function(response) {
57
        }).done(function(response) {
57
            if(response['success']) {
58
            if(response['success']) {
Línea 58... Línea 59...
58
 
59
 
59
                $('#tableDevices tbody').empty();
-
 
60
                $.each(response['data'], function(id, item) {
-
 
61
    
-
 
62
 
60
                $('#tableDevices tbody').empty();
63
                    var s = '<tr>';
-
 
64
                    
61
                $('#tableDevices tbody').append(
65
                    s = s + '<td>' + $.trim( item['first_name'] ) + '</td>';
-
 
66
                    s = s + '<td>' + $.trim( item['last_name'] ) + '</td>';
-
 
67
                    s = s + '<td>' + $.trim(item['email'] ) + '</td>';
-
 
Línea 68... Línea -...
68
 
-
 
69
 
-
 
70
                    s = s + '</tr>';
-
 
71
 
-
 
72
                    if(item['devices']) {
-
 
73
                        s = s + '<tr>';  
-
 
74
                        s = s + '<td colspan="3">'; 
-
 
75
    
-
 
76
                        $.each(item['devices'], function(id_device, device) {
-
 
77
    
-
 
78
                            s = s + '<b>Marca : </b>' + device['brand'];
-
 
79
                            s = s + '&nbsp;<b>Fabricante : </b>' + device['manufacturer'] ;
-
 
80
                            s = s + '&nbsp;<b>Model : </b>' + device['model'];
-
 
81
                            s = s + '&nbsp;<b>Plataforma : </b>' + device['platform'];
-
 
82
                            s = s + '&nbsp;<b>Versión : </b>' + device['version'];
-
 
83
                            s = s + '&nbsp;<b>Token : </b>' + device['token'];
-
 
84
                            s = s + '&nbsp;<b>Actualización : </b>' + device['updated_on'] + '<br/>';
-
 
85
    
-
 
86
                        });    
-
 
87
    
-
 
88
                        s = s + '</td></tr>'; 
-
 
89
                    }
-
 
90
                    $('#tableDevices tbody').append(s);
-
 
91
            
62
                     $( "#deviceRowTemplate" ).render( response['data'] )
Línea 92... Línea 63...
92
 
63
 
93
                }); 
64
                );
94
    
65
    
Línea 307... Línea 278...
307
        </div>          
278
        </div>          
308
 	</div>
279
 	</div>
309
</section> 	
280
</section> 	
Línea -... Línea 281...
-
 
281
 
-
 
282
 
-
 
283
<script id="deviceRowTemplate" type="text/x-jsrender">
-
 
284
    <tr>
-
 
285
        <td> {{>first_name}} </td>
-
 
286
        <td> {{>last_name}} </td>
-
 
287
        <td> {{>email}} </td>
-
 
288
    </tr>
-
 
289
 
-
 
290
    {{if devices}}
-
 
291
        <tr>
-
 
292
            <td colspan="3"> 
-
 
293
                <table class="table table-bordered">
-
 
294
                    <thead>
-
 
295
                        <tr>
-
 
296
                            <td>Marca</td>
-
 
297
                            <td>Fabricante</td>
-
 
298
                            <td>Modelo</td>
-
 
299
                            <td>Plataforma</td>
-
 
300
                            <td>Versión</td>
-
 
301
                            <td>Ult.uso</td>
-
 
302
                        </tr>
-
 
303
                    </thead>
-
 
304
                    <tbody>
-
 
305
                        {{for devices}}
-
 
306
                            <tr>
-
 
307
                                <td>{{>brand}}</td>
-
 
308
                                <td>{{>manufacturer}}</td>
-
 
309
                                <td>{{>model}}</td>
-
 
310
                                <td>{{>platform}}</td>
-
 
311
                                <td>{{>version}}</td>
-
 
312
                                <td>{{>updated_on}}</td>
-
 
313
                            </tr>
-
 
314
                        {{/for}}
-
 
315
                    </tbody>
-
 
316
                </table>
-
 
317
            </td>
-
 
318
        </tr>
-
 
319
    {{/if}}
-
 
320
 
-
 
321