Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1084 Rev 1085
Línea 60... Línea 60...
60
$status_active = \LeadersLinked\Model\CompanyPerformanceEvaluationForm::STATUS_ACTIVE;
60
$status_active = \LeadersLinked\Model\CompanyPerformanceEvaluationForm::STATUS_ACTIVE;
61
$status_inactive = \LeadersLinked\Model\CompanyPerformanceEvaluationForm::STATUS_INACTIVE;
61
$status_inactive = \LeadersLinked\Model\CompanyPerformanceEvaluationForm::STATUS_INACTIVE;
Línea 62... Línea 62...
62
 
62
 
63
$this->inlineScript()->captureStart();
63
$this->inlineScript()->captureStart();
363
                    return;
100
                    json.data = response.data.items;
364
                } else {
-
 
365
                    if ($('#id-option').val() == "") {
-
 
366
                        addOption(
-
 
367
                            $('#section-option').val(),
-
 
368
                            $('#text-option').val(),
-
 
369
                        )
-
 
370
                    } else {
-
 
371
                        editOption(
-
 
372
                            $('#section-option').val(),
101
                } else {
373
                            $('#id-option').val(),
-
 
374
                            $('#text-option').val(),
-
 
375
                        )
-
 
376
                    }
-
 
377
                    $('#modal-option').modal('hide');
-
 
378
                    return;
102
                    $.fn.showError(response.data)
379
                }
103
                }
380
            });
104
                return JSON.stringify(json);
381
            /**
-
 
382
             * Clicked edit Option
105
            }
383
             */
-
 
384
            $('body').on('click', 'button.btn-edit-option', function(e) {
106
        },
385
                e.preventDefault();
107
        'language': {
386
                var id_section = $(this).data('section');
108
            'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
387
                var id_option = $(this).data('option');
109
            'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
388
                sections.map((item) => {
110
            'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
389
                    if (item.id_section == id_section) {
111
            'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
390
                        item.options.map((opt) => {
112
            'sInfo': 'LABEL_DATATABLE_SINFO',
391
                            if (opt.id_option == id_option) {
-
 
392
                                $('#id-option').val(opt.id_option);
-
 
393
                                $('#section-option').val(opt.id_section);
-
 
394
                                $("#text-option").val(opt.title);
-
 
395
                                $('#modal-option h4[class="modal-title"]').html('LABEL_EDIT LABEL_OPTION');
113
            'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
396
                                $('#modal-option').modal('show');
-
 
397
                                return;
114
            'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
398
                            }
115
            'sInfoPostFix': '',
399
                        });
116
            'sSearch': 'LABEL_DATATABLE_SSEARCH',
400
                    }
-
 
401
                });
-
 
402
            });
-
 
403
            /**
117
            'sUrl': '',
404
             * Clicked new Form
-
 
405
             */
-
 
406
            $('button.btn-add-form').click(function(e) {
-
 
407
                $('#form-main').attr('action', '$routeAdd');
-
 
408
                $('#form-main #form-name').val('');
118
            'sInfoThousands': ',',
409
                $('#form-main #job_description_id').val('');
-
 
410
                $('#form-main #form-status').val('$status_active');
119
            'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
411
                $("#rows").html('');
120
            'oPaginate': {
412
                sections = [];
121
                'sFirst': 'LABEL_DATATABLE_SFIRST',
413
                $('#row-lists').hide();
122
                'sLast': 'LABEL_DATATABLE_SLAST',
414
                $('#row-form').show();
123
                'sNext': 'LABEL_DATATABLE_SNEXT',
415
                $('#form-main #form-name').focus();
124
                'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
416
            });
125
            },
417
            /**
126
            'oAria': {
418
             * Clicked cancel new/edit Form
-
 
419
             */
127
                'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
420
            $('button.btn-edit-cancel').click(function(e) {
-
 
421
                e.preventDefault();
-
 
422
                $('#row-form').hide();
-
 
423
                $('#row-lists').show();
128
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
424
            });
129
            },
425
            /**
130
        },
426
             * Clicked save and close new/edit Form
131
        'drawCallback': function(settings) {
427
             */
132
            NProgress.done();
428
            $('button.btn-form-save-close').click(function(e) {
-
 
429
                e.preventDefault();
133
            $('button.btn-delete').confirmation({
430
                if ($('#form-name').val() == '') {
-
 
431
                    $.fn.showError('Ingrese un nombre');
-
 
432
                } else if ($('#form-status').val() == '') {
-
 
433
                    $.fn.showError('Seleccione un status');
-
 
434
                } else if ($('#job_description_id').val() == '') {
-
 
435
                    $.fn.showError('Seleccione una descripción de cargo');
134
                rootSelector: 'button.btn-delete',
436
                } else if (sections.length == 0) {
-
 
437
                    $.fn.showError('Debe ingresar al menos una sección');
135
                title: 'LABEL_ARE_YOU_SURE',
438
                } else {
136
                singleton: true,
439
                    var data = {
137
                btnOkLabel: 'LABEL_YES',
440
                        'name': $('#form-main #form-name').val(),
-
 
441
                        'job_description_id': $('#form-main #job_description_id').val(),
138
                btnCancelLabel: 'LABEL_NO',
442
                        'status': $('#form-main #form-status').val(),
139
                onConfirm: function(value) {
443
                        'content': JSON.stringify(sections)
140
                    action = $(this).data('href');
444
                    }
141
                    NProgress.start();
445
                    $.ajax({
142
                    $.ajax({
-
 
143
                        'dataType': 'json',
446
                        'dataType': 'json',
144
                        'accept': 'application/json',
447
                        'method': 'post',
-
 
448
                        'url': $('#form-main').attr('action'),
145
                        'method': 'post',
449
                        'data': data,
146
                        'url': action,
450
                    }).done(function(response) {
147
                    }).done(function(response) {
451
                        if (response['success']) {
148
                        if (response['success']) {
452
                            $.fn.showSuccess(response['data']);
-
 
453
                            $('#row-form').hide();
-
 
454
                            $('#row-lists').show();
-
 
455
                            /*---------- Reset Form -------- */
-
 
456
                            $('#form-main')[0].reset();
-
 
457
                            /*--------Reset Sections ----------*/
-
 
458
                            sections = [];
149
                            $.fn.showSuccess(response['data']);
459
                            tableForm.fnDraw();
150
                            tableForm.fnDraw();
460
                        } else {
151
                        } else {
461
                            $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
152
                            $.fn.showError(response['data']);
-
 
153
                        }
-
 
154
                    }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
155
                        $.fn.showError(textStatus);
-
 
156
                    }).always(function() {
462
                        }
157
                        NProgress.done();
463
                    });
158
                    });
464
                }
159
                },
465
            });
160
            });
-
 
161
        },
466
            /**
162
        'aoColumns': [{
467
             * Remove Html Tags
163
                'mDataProp': 'name'
-
 
164
            },
468
             */
165
            {
469
            const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
166
                'mDataProp': 'job_description'
-
 
167
            },
470
            /**
168
            {
471
             * Render Sections data
169
                'mDataProp': 'status'
-
 
170
            },
472
             */
171
            {
-
 
172
                'mDataProp': 'actions'
-
 
173
            },
-
 
174
        ],
473
            const renderData = (data) => {
175
        'columnDefs': [{
474
                console.log(data);
176
                'targets': 0,
475
                $("#rows").html($("#sectionTemplate").render(data));
177
                'className': 'text-vertical-middle',
476
            }
178
            },
477
            /**
179
            {
-
 
180
                'targets': 1,
478
             * Add Section to array
181
                'className': 'text-vertical-middle',
479
             */
182
            },
480
            const addSection = (title, text, type) => {
183
            {
481
                sections.push({
184
                'targets': -2,
482
                    'id_section': new Date().getTime(),
185
                'orderable': false,
483
                    'title': title,
186
                'className': 'text-center',
484
                    'type': type,
187
                'render': function(data, type, row) {
485
                    'text': text,
188
                    checked = data == 'a' ? ' checked="checked" ' : '';
486
                    'options': []
189
                    return '<div class="checkbox checkbox-success">' +
487
                });
190
                        '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
488
                renderData(sections);
191
                        '<label ></label></div>';
489
            }
192
                }
490
            /**
-
 
491
             * Edit item behavior
193
            },
492
             */
194
            {
493
            const editSection = (id, title, text, type) => {
195
                'targets': -1,
494
                sections.map((item) => {
196
                'orderable': false,
495
                    if (item.id_section == id) {
197
                'render': function(data, type, row) {
496
                        item.title = title;
198
                    s = '';
497
                        item.type = type;
199
                    if (allowEdit) {
498
                        item.text = text;
200
                        s = s + '<button class="btn btn-primary btn-edit-form" data-href="' + data['link_edit'] + '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
-
 
201
                    }
-
 
202
                    if (allowDelete) {
499
                    }
203
                        s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete'] + '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
500
                });
204
                    }
-
 
205
                    return s;
501
                renderData(sections);
206
                }
-
 
207
            }
-
 
208
        ],
-
 
209
    });
-
 
210
    /**
-
 
211
     * Clicked on edit form
-
 
212
     */
-
 
213
    $('body').on('click', 'button.btn-edit-form', function(e) {
-
 
214
        e.preventDefault();
-
 
215
        form_id = $(this).data('id')
502
            }
216
        var action = $(this).data('href');
-
 
217
        $.ajax({
-
 
218
            'dataType': 'json',
503
            /**
219
            'accept': 'application/json',
504
             * Remove behavior
220
            'method': 'get',
-
 
221
            'url': action,
-
 
222
        }).done(function(response) {
-
 
223
            if (response['success']) {
505
             */
224
                $("#rows").html('');
-
 
225
                sections = [];
-
 
226
                $('#form-main').attr('action', action);
-
 
227
                $('#form-main #form-name').val(response['data']['name']),
-
 
228
                    $('#form-main #job_description_id').val(response['data']['job_description_id']);
506
            const removeSection = (id) => {
229
                $('#form-main #form-status').val(response['data']['status']);
507
                sections = sections.filter((item) => item.id_section != id);
230
                sections = response['data']['content'] || [];
-
 
231
                renderData(sections);
-
 
232
                $('#row-lists').hide();
-
 
233
                $('#row-form').show();
-
 
234
            } else {
-
 
235
                $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
-
 
236
            }
-
 
237
        }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
238
            $.fn.showError(textStatus);
-
 
239
        });
-
 
240
    });
-
 
241
    /**
-
 
242
     * Clicked add new section
-
 
243
     */
-
 
244
    $('#btn-add-section').click(function(e) {
-
 
245
        $('#form-section #id-section').val('');
-
 
246
        $('#form-section #title-section').val('');
-
 
247
        $('#form-section #text-section').val('');
-
 
248
        $('#form-section #type-section').val($('#form-section #type-section option:first').val());
-
 
249
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
-
 
250
        $('#modal-section').modal('show');
-
 
251
        return;
-
 
252
    });
-
 
253
    /**
-
 
254
     * Clicked edit section
-
 
255
     */
-
 
256
    /**
-
 
257
     * Clicked save section
-
 
258
     */
-
 
259
    $('#btn-save-section').click(function(e) {
-
 
260
        if ($('#title-section').val() == '') {
-
 
261
            $.fn.showError('ERROR_ENTER_TITLE');
-
 
262
            return;
-
 
263
        } else {
-
 
264
            $('#id-section').val() == "" ?
-
 
265
                addSection($('#title-section').val(), $('#text-section').val(), $('#type-section').val()) :
-
 
266
                editSection($('#id-section').val() $('#title-section').val(), $('#text-section').val(), $('#type-section').val())
-
 
267
            $('#modal-section').modal('hide');
-
 
268
            return;
-
 
269
        }
-
 
270
    });
-
 
271
    /**
-
 
272
     * Clicked remove section
-
 
273
     */
-
 
274
    $('body').on('click', 'button.btn-delete-section', function(e) {
-
 
275
        var id_section = $(this).data('section');
-
 
276
        bootbox.confirm({
-
 
277
            title: "LABEL_DELETE LABEL_SECTION",
-
 
278
            message: "LABEL_QUESTION_DELETE",
-
 
279
            buttons: {
-
 
280
                cancel: {
-
 
281
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
282
                },
-
 
283
                confirm: {
-
 
284
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
285
                }
-
 
286
            },
-
 
287
            callback: function(result) {
-
 
288
                if (result) {
-
 
289
                    removeSection(id_section);
-
 
290
                }
-
 
291
            }
-
 
292
        });
-
 
293
    });
-
 
294
    $('body').on('click', 'button.btn-edit-section', function(e) {
-
 
295
        var id = $(this).data('section');
-
 
296
        sections.map((item) => {
-
 
297
            if (item.id_section == id) {
-
 
298
                $('#form-section #id-section').val(item.id_section);
-
 
299
                $('#form-section #title-section').val(item.title);
-
 
300
                $('#form-section #text-text').val(item.text);
-
 
301
                $('#form-section #type-section').val(item.type);
-
 
302
                $('#modal-section').modal('show');
-
 
303
                return;
-
 
304
            }
-
 
305
        });
-
 
306
    });
-
 
307
    /**
-
 
308
     * Clicked remove option
-
 
309
     */
-
 
310
    $('body').on('click', 'button.btn-delete-option', function(e) {
-
 
311
        var id_section = $(this).data('section');
-
 
312
        var id_option = $(this).data('option');
-
 
313
        bootbox.confirm({
-
 
314
            title: "LABEL_DELETE LABEL_OPTION",
-
 
315
            message: "LABEL_QUESTION_DELETE",
-
 
316
            buttons: {
-
 
317
                cancel: {
-
 
318
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
319
                },
-
 
320
                confirm: {
-
 
321
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
322
                }
-
 
323
            },
-
 
324
            callback: function(result) {
-
 
325
                if (result) {
-
 
326
                    removeOption(id_section, id_option);
-
 
327
                    return;
508
                renderData(sections);
328
                }
-
 
329
            }
-
 
330
        });
-
 
331
    });
-
 
332
    /**
-
 
333
     * Clicked add new Option
-
 
334
     */
-
 
335
    $('body').on('click', 'button.btn-add-option', function(e) {
-
 
336
        var id = $(this).data('section');
-
 
337
        $('#section-option').val(id);
-
 
338
        $('#text-option').val('');
-
 
339
        $('#modal-option h4[class="modal-title"]').html('LABEL_EDIT LABEL_OPTION');
-
 
340
        $('#modal-option').modal('show');
-
 
341
        return;
-
 
342
    });
-
 
343
    /**
-
 
344
     * Clicked add new Option
-
 
345
     */
-
 
346
    $('#btn-save-option').click(function(e) {
-
 
347
        if ($('#text-option').val() == '') {
509
            }
348
            $.fn.showError('ERROR_ENTER_TEXT');
-
 
349
            return;
510
            /**
350
        } else {
-
 
351
            $('#id-option').val() == "" ?
-
 
352
                addOption($('#section-option').val(), $('#text-option').val()) :
-
 
353
                editOption($('#section-option').val(), $('#id-option').val(), $('#text-option').val())
-
 
354
        }
511
             * Add Option to array
355
        $('#modal-option').modal('hide');
-
 
356
        return;
-
 
357
    });
-
 
358
    /**
-
 
359
     * Clicked edit Option
-
 
360
     */
-
 
361
    $('body').on('click', 'button.btn-edit-option', function(e) {
512
             */
362
        var id_section = $(this).data('section');
513
            const addOption = (id_section, title) => {
363
        var id_option = $(this).data('option');
514
                sections.map((item) => {
364
        sections.map((item) => {
515
                    if (item.id_section == id_section) {
365
            if (item.id_section == id_section) {
516
                        item.options.push({
366
                item.options.map((opt) => {
517
                            'id_section': id_section,
367
                    if (opt.id_option == id_option) {
-
 
368
                        $('#id-option').val(opt.id_option);
518
                            'id_option': new Date().getTime(),
369
                        $('#section-option').val(opt.id_section);
-
 
370
                        $("#text-option").val(opt.title);
-
 
371
                        $('#modal-option h4[class="modal-title"]').html('LABEL_EDIT LABEL_OPTION');
519
                            'title': title,
372
                        $('#modal-option').modal('show');
520
                        });
373
                        return;
521
                    }
374
                    }
522
                });
-
 
523
                renderData(sections);
375
                });
-
 
376
            }
-
 
377
        });
-
 
378
    });
-
 
379
    /**
-
 
380
     * Clicked new Form
-
 
381
     */
-
 
382
    $('button.btn-add-form').click(function(e) {
-
 
383
        $("#rows").html('');
-
 
384
        sections = [];
-
 
385
        $('#form-main').attr('action', '$routeAdd');
-
 
386
        $('#form-main #form-name').val('');
-
 
387
        $('#form-main #job_description_id').val('');
-
 
388
        $('#form-main #form-status').val('$status_active');
-
 
389
        $('#row-lists').hide();
-
 
390
        $('#row-form').show();
-
 
391
        $('#form-main #form-name').focus();
-
 
392
        return;
-
 
393
    });
-
 
394
    /**
-
 
395
     * Clicked cancel new/edit Form
-
 
396
     */
-
 
397
    $('button.btn-edit-cancel').click(function(e) {
-
 
398
        $('#row-form').hide();
-
 
399
        $('#row-lists').show();
-
 
400
        return;
-
 
401
    });
-
 
402
    /**
-
 
403
     * Clicked save and close new/edit Form
-
 
404
     */
-
 
405
    $('button.btn-form-save-close').click(function(e) {
-
 
406
        if ($('#form-name').val() == '') {
-
 
407
            $.fn.showError('ERROR_ENTER_NAME');
-
 
408
        } else if ($('#form-status').val() == '') {
-
 
409
            $.fn.showError('ERROR_SELECT_STATUS');
-
 
410
        } else if ($('#job_description_id').val() == '') {
-
 
411
            $.fn.showError('ERROR_SELECT_JOB_DESCRIPTION');
-
 
412
        } else if (sections.length == 0) {
524
            }
413
            $.fn.showError('ERROR_NOT_SECTIONS');
-
 
414
        } else {
525
            /**
415
            $.ajax({
-
 
416
                'dataType': 'json',
-
 
417
                'method': 'post',
-
 
418
                'url': $('#form-main').attr('action'),
-
 
419
                'data': {
-
 
420
                    'name': $('#form-main #form-name').val(),
-
 
421
                    'job_description_id': $('#form-main #job_description_id').val(),
-
 
422
                    'status': $('#form-main #form-status').val(),
526
             * Edit item Option
423
                    'content': JSON.stringify(sections)
527
             */
424
                },
528
            const editOption = (id_section, id, title) => {
425
            }).done(function(response) {
529
                sections.map((item) => {
426
                if (response['success']) {
-
 
427
                    $.fn.showSuccess(response['data']);
-
 
428
                    $('#row-form').hide();
-
 
429
                    $('#row-lists').show();
530
                    if (item.id_section == id_section) {
430
                    /*---------- Reset Form -------- */
531
                        item.options.map((opt) => {
431
                    $('#form-main')[0].reset();
532
                            if (opt.id_option == id) {
432
                    /*--------Reset Sections ----------*/
-
 
433
                    sections = [];
533
                                opt.title = title
434
                    tableForm.fnDraw();
-
 
435
                    return;
-
 
436
                } else {
534
                            }
437
                    $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
535
                        });
438
                    return;
-
 
439
                }
-
 
440
            });
-
 
441
        }
-
 
442
    });
-
 
443
    /**
-
 
444
     * Remove Html Tags
-
 
445
     */
-
 
446
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
-
 
447
    /**
-
 
448
     * Render Sections data
-
 
449
     */
-
 
450
    const renderData = (data) => {
-
 
451
        $("#rows").html($("#sectionTemplate").render(data));
-
 
452
    }
-
 
453
    /**
-
 
454
     * Add Section to array
-
 
455
     */
-
 
456
    const addSection = (title, text, type) => {
-
 
457
        sections.push({
-
 
458
            'id_section': new Date().getTime(),
-
 
459
            'title': title,
-
 
460
            'type': type,
-
 
461
            'text': text,
-
 
462
            'options': []
-
 
463
        });
-
 
464
        return renderData(sections);
-
 
465
    }
-
 
466
    /**
-
 
467
     * Edit item behavior
-
 
468
     */
-
 
469
    const editSection = (id, title, text, type) => {
-
 
470
        sections.map((item) => {
-
 
471
            if (item.id_section == id) {
-
 
472
                item.title = title;
-
 
473
                item.type = type;
-
 
474
                item.text = text;
-
 
475
            }
-
 
476
        });
-
 
477
        return renderData(sections);
-
 
478
    }
-
 
479
    /**
-
 
480
     * Remove behavior
-
 
481
     */
-
 
482
    const removeSection = (id) => {
-
 
483
        sections = sections.filter((item) => item.id_section != id);
-
 
484
        return renderData(sections);
-
 
485
    }
-
 
486
    /**
-
 
487
     * Add Option to array
-
 
488
     */
-
 
489
    const addOption = (id_section, title) => {
-
 
490
        sections.map((item) => {
-
 
491
            if (item.id_section == id_section) {
-
 
492
                item.options.push({
-
 
493
                    'id_section': id_section,
-
 
494
                    'id_option': new Date().getTime(),
536
                    }
495
                    'title': title,
537
                });
-
 
538
                renderData(sections);
496
                });
539
            }
497
            }
-
 
498
        });
-
 
499
        return renderData(sections);
-
 
500
    }
540
            /**
501
    /**
541
             * Remove Option
502
     * Edit item Option
542
             */
503
     */
543
            const removeOption = (id_section, id) => {
504
    const editOption = (id_section, id, title) => {
544
                sections.map((item) => {
505
        sections.map((item) => {
-
 
506
            if (item.id_section == id_section) {
545
                    if (item.id_section == id_section) {
507
                item.options.map((opt) => {
-
 
508
                    if (opt.id_option == id) {
546
                        item.options = item.options.filter((opt) => opt.id_option != id) || []
509
                        opt.title = title
547
                    }
510
                    }
548
                });
-
 
549
                renderData(sections);
511
                });
-
 
512
            }
-
 
513
        });
-
 
514
        return renderData(sections);
-
 
515
    }
-
 
516
    /**
-
 
517
     * Remove Option
-
 
518
     */
-
 
519
    const removeOption = (id_section, id) => {
-
 
520
        sections.map((item) => {
-
 
521
            if (item.id_section == id_section) {
550
            }
522
                item.options = item.options.filter((opt) => opt.id_option != id) || []
-
 
523
            }
-
 
524
        });
-
 
525
        return renderData(sections);
-
 
526
    }
551
            /**
527
    /**
552
             * Clicked refresh button
528
     * Clicked refresh button
553
             */
529
     */
554
            $('button.btn-refresh').click(function(e) {
530
    $('button.btn-refresh').click(function(e) {
555
                tableForm.fnDraw();
531
        tableForm.fnDraw();
-
 
532
        return;
556
            });
533
    });
557
});
534
});
558
JS;
535
JS;
559
$this->inlineScript()->captureEnd();
536
$this->inlineScript()->captureEnd();
560
?>
537
?>
Línea 742... Línea 719...
742
                     <td>
719
                     <td>
743
                        {{if type == 'simple'}} Simple {{/if}}
720
                        {{if type == 'simple'}} Simple {{/if}}
744
                        {{if type == 'multiple'}} Multiple {{/if}}
721
                        {{if type == 'multiple'}} Multiple {{/if}}
745
                     </td>
722
                     </td>
746
                     <td>
723
                     <td>
747
                        <button  class="btn btn-default btn-edit-section" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_SECTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_SECTION </button>
724
                        <button  type="button" class="btn btn-default btn-edit-section" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_SECTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_SECTION </button>
748
                        <button  class="btn btn-default btn-delete-section" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_SECTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_SECTION </button> 
725
                        <button  type="button" class="btn btn-default btn-delete-section" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_SECTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_SECTION </button> 
749
                        {{if type == 'multiple'}}
726
                        {{if type == 'multiple'}}
750
                        <button type="button" class="btn btn-default btn-add-option" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_ADD  LABEL_OPTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD  LABEL_OPTION </button> 
727
                        <button type="button" class="btn btn-default btn-add-option" data-section="{{:id_section}}" data-toggle="tooltip"  data-original-title="LABEL_ADD  LABEL_OPTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD  LABEL_OPTION </button> 
751
                        {{/if}}
728
                        {{/if}}
752
                     </td>
729
                     </td>
753
                  </tr>
730
                  </tr>
Línea 757... Línea 734...
757
                     <td class="text-left">
734
                     <td class="text-left">
758
                        {{:title}}
735
                        {{:title}}
759
                     </td>
736
                     </td>
760
                     <td></td>
737
                     <td></td>
761
                     <td>
738
                     <td>
762
                        <button class="btn btn-default btn-edit-option" data-section="{{:id_section}}" data-option="{{:id_option}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_OPTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_OPTION</button> 
739
                        <button type="button"  class="btn btn-default btn-edit-option" data-section="{{:id_section}}" data-option="{{:id_option}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_OPTION"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_OPTION</button> 
763
                        <button class="btn btn-default btn-delete-option" data-section="{{:id_section}}" data-option="{{:id_option}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_OPTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_OPTION</button> 
740
                        <button type="button" class="btn btn-default btn-delete-option" data-section="{{:id_section}}" data-option="{{:id_option}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_OPTION"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_OPTION</button> 
764
                     </td>
741
                     </td>
765
                  </tr>
742
                  </tr>
766
                  {{/for}}
743
                  {{/for}}
767
               </tbody>
744
               </tbody>
768
            </table>
745
            </table>