Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15451 Rev 15831
Línea 186... Línea 186...
186
                });
186
                });
187
            },
187
            },
188
            'aoColumns': [
188
            'aoColumns': [
189
                { 'mDataProp': 'name' },
189
                { 'mDataProp': 'name' },
190
                { 'mDataProp': 'privacy' },
190
                { 'mDataProp': 'privacy' },
191
                { 'mDataProp': 'editors' },
-
 
192
                { 'mDataProp': 'status' },
191
                { 'mDataProp': 'status' },
193
                { 'mDataProp': 'actions' },
192
                { 'mDataProp': 'actions' },
194
    	    ],
193
    	    ],
195
            'columnDefs': [
194
            'columnDefs': [
196
                {
195
                {
Línea 201... Línea 200...
201
                    'targets': 1,
200
                    'targets': 1,
202
                    'orderable': false,
201
                    'orderable': false,
203
                    'className' : 'text-vertical-middle',
202
                    'className' : 'text-vertical-middle',
Línea 204... Línea 203...
204
 
203
 
205
                },
-
 
206
                {  
-
 
207
                    'targets': 2,
-
 
208
                    'orderable': false,
-
 
209
                    'className' : 'text-center',
-
 
210
                      'render' : function ( data, type, row ) {
-
 
211
                      
-
 
212
                       var s = '';
-
 
213
                       $.each(row['editors'], function(i, editor) {
-
 
214
                        s = s  + editor + '<br>';
-
 
215
 
-
 
216
                       });
-
 
217
 
-
 
218
                       return s; 
-
 
219
                    }
-
 
Línea 220... Línea 204...
220
                },
204
                },
221
 
205
 
222
                {
206
                {
223
                    'targets': -2,
207
                    'targets': -2,
Línea 321... Línea 305...
321
            $('span[id="form-title"]').html('LABEL_ADD');
305
            $('span[id="form-title"]').html('LABEL_ADD');
322
            $('#form').attr('action', '$routeAdd');
306
            $('#form').attr('action', '$routeAdd');
323
            $('#form #name').val('');
307
            $('#form #name').val('');
324
            $('#form #description').val('');
308
            $('#form #description').val('');
325
            $('#form #privacy').val('$privacy_company').trigger('change');
309
            $('#form #privacy').val('$privacy_company').trigger('change');
326
            $('#form #editors').val('').trigger('change');
-
 
327
            $('#form #status').bootstrapToggle('on');
310
            $('#form #status').bootstrapToggle('on');
328
            CKEDITOR.instances.description.setData('');
311
            CKEDITOR.instances.description.setData('');
Línea 329... Línea 312...
329
 
312
 
Línea 347... Línea 330...
347
                if(response['success']) {
330
                if(response['success']) {
Línea 348... Línea 331...
348
 
331
 
349
                    $('span[id="form-title"]').html('LABEL_EDIT');
332
                    $('span[id="form-title"]').html('LABEL_EDIT');
350
                    $('#form').attr('action', action);
333
                    $('#form').attr('action', action);
351
                    $('#form #name').val(response['data']['name']);
-
 
352
                    $('#form #editors').val(response['data']['editors']).trigger('change');
334
                    $('#form #name').val(response['data']['name']);
353
                    $('#form #privacy').val(response['data']['privacy']).trigger('change');
335
                    $('#form #privacy').val(response['data']['privacy']).trigger('change');
Línea 354... Línea 336...
354
                    $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
336
                    $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
Línea 392... Línea 374...
392
            theme: 'bootstrap4',
374
            theme: 'bootstrap4',
393
            width: '100%',
375
            width: '100%',
394
        });
376
        });
Línea 395... Línea -...
395
 
-
 
396
 
-
 
397
        $('#form #editors').select2({
-
 
398
            theme: 'bootstrap4',
-
 
399
            width: '100%',
-
 
400
        });
-
 
401
 
377
 
402
 
378
 
Línea 403... Línea 379...
403
        CKEDITOR.replace( 'description'); 
379
        CKEDITOR.replace( 'description'); 
404
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
380
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
Línea 432... Línea 408...
432
                        <table id="gridTable" class="table table-hover">
408
                        <table id="gridTable" class="table table-hover">
433
                            <thead>
409
                            <thead>
434
                                <tr>
410
                                <tr>
435
                                    <th>LABEL_NAME</th>
411
                                    <th>LABEL_NAME</th>
436
                                    <th>LABEL_PRIVACY</th>
412
                                    <th>LABEL_PRIVACY</th>
437
                                    <th>LABEL_EDITORS</th>
-
 
438
                                    <th>LABEL_ACTIVE</th>
413
                                    <th>LABEL_ACTIVE</th>
439
                                    <th>LABEL_ACTIONS</th>
414
                                    <th>LABEL_ACTIONS</th>
440
                                </tr>
415
                                </tr>
441
                            </thead>
416
                            </thead>
442
                            <tbody>
417
                            <tbody>
Línea 508... Línea 483...
508
                            echo $this->formTextArea($element);
483
                            echo $this->formTextArea($element);
509
                            ?>
484
                            ?>
510
                     	</div>
485
                     	</div>
Línea 511... Línea -...
511
	
-
 
512
                            
-
 
513
                    <div class="form-group">
-
 
514
                        <?php
-
 
515
                        $element = $form->get('editors');
-
 
Línea 516... Línea -...
516
                        $element->setAttributes(['class' => 'form-control']);
-
 
517
                        $element->setOptions(['label' => 'LABEL_EDITORS']);
-
 
518
 
-
 
519
                        echo $this->formLabel($element);
-
 
520
                        echo $this->formSelect($element);
-
 
521
                        ?>
486
	
522
 
487
                            
523
                    </div>
488
 
524
                    <div class="form-group ">
489
                    <div class="form-group ">
525
                        <?php
490
                        <?php