Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 4808 Rev 4809
Línea 49... Línea 49...
49
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
49
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
50
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
50
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
Línea 51... Línea 51...
51
 
51
 
52
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
52
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
53
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
-
 
Línea 54... Línea 53...
54
$this->inlineScript()->appendFile('/react-bundles/settings/company-sizes/companySizesBundle.js');
53
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
Línea 55... Línea 54...
55
 
54
 
56
$status_active = \LeadersLinked\Model\CompanySize::STATUS_ACTIVE;
55
$status_active = \LeadersLinked\Model\CompanySize::STATUS_ACTIVE;
57
 
56
 
58
 
57
 
59
$this->inlineScript()->captureStart();
58
$this->inlineScript()->captureStart();
60
echo <<<JS
59
echo <<<JS
61
    jQuery( document ).ready(function( $ ) {
60
    jQuery( document ).ready(function( $ ) {
62
 
61
        
63
        $.validator.addMethod('greaterThan', function (value, element, param) {
62
        $.validator.addMethod('greaterThan', function (value, element, param) {
64
            var otherElement = $(param);
63
            var otherElement = $(param);
65
            return parseInt(value, 10) > parseInt(otherElement.val(), 10);
64
            return parseInt(value, 10) > parseInt(otherElement.val(), 10);
66
        }, 'ERROR_INVALID_MINIMUM');
65
        }, 'ERROR_INVALID_MINIMUM');
67
 
66
        
68
        $.validator.setDefaults({
67
        $.validator.setDefaults({
Línea 101... Línea 100...
101
                } else {
100
                } else {
102
                    error.insertAfter(field.parent());
101
                    error.insertAfter(field.parent());
103
                }
102
                }
104
            }
103
            }
105
        };
104
        };
106
 
105
        
107
        var allowEdit   = $allowEdit;
106
        var allowEdit   = $allowEdit;
108
        var allowDelete = $allowDelete;
107
        var allowDelete = $allowDelete;
Línea 109... Línea 108...
109
        
108
        
110
        var gridTable = $('#gridTable').dataTable( {
109
        var gridTable = $('#gridTable').dataTable( {
Línea 221... Línea 220...
221
                },
220
                },
222
                {
221
                {
223
                    'targets': -2,
222
                    'targets': -2,
224
                    'orderable': false,
223
                    'orderable': false,
225
                    'className' : 'text-center',
224
                    'className' : 'text-center',
226
                      'render' : function ( data, type, row ) {
225
                    'render' : function ( data, type, row ) {
Línea 227... Línea 226...
227
                      
226
                      
228
                        checked = data == 'a' ? ' checked="checked" ' : '';
227
                        checked = data == 'a' ? ' checked="checked" ' : '';
229
                        return '<div class="checkbox checkbox-success">' +
228
                        return '<div class="checkbox checkbox-success">' +
230
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
229
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
Línea 244... Línea 243...
244
                            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;';
243
                            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;';
245
                        }
244
                        }
246
                        return s;
245
                        return s;
247
                    }
246
                    }
248
                }
247
                }
249
              ],
248
            ],
250
        });
249
        });
251
 
250
        
252
 
251
        
253
        var validator = $('#form').validate({
252
        var validator = $('#form').validate({
254
            debug: true,
253
            debug: true,
255
            onclick: false,
254
            onclick: false,
256
            onkeyup: false,
255
            onkeyup: false,
257
            ignore: [],
256
            ignore: [],
Línea 295... Línea 294...
295
                                $.fn.showFormErrorValidator('#form #' + fieldname, errors);
294
                                $.fn.showFormErrorValidator('#form #' + fieldname, errors);
296
                            });
295
                            });
297
                        }
296
                        }
298
                    }
297
                    }
299
                }).fail(function( jqXHR, textStatus, errorThrown) {
298
                }).fail(function( jqXHR, textStatus, errorThrown) {
300
                   $.fn.showError(textStatus);
299
                    $.fn.showError(textStatus);
301
                }).always(function() {
300
                }).always(function() {
302
                    NProgress.done();
301
                    NProgress.done();
303
                });
302
                });
304
                return false;
303
                return false;
305
            },
304
            },
Línea 363... Línea 362...
363
 
362
 
364
        $('body').on('click', 'button.btn-cancel', function(e) {
363
        $('body').on('click', 'button.btn-cancel', function(e) {
365
            e.preventDefault();
364
            e.preventDefault();
366
            $('#modal').modal('hide');
365
            $('#modal').modal('hide');
367
        });
366
        });
368
 
367
        
Línea 369... Línea 368...
369
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
368
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
370
 
369
 
371
        $('#form #minimum_no_of_employee').inputNumberFormat({decimal : 0});
370
        $('#form #minimum_no_of_employee').inputNumberFormat({decimal : 0});
Línea 380... Línea 379...
380
        routeTable: JSON.parse('$jsonRouteTable'),
379
        routeTable: JSON.parse('$jsonRouteTable'),
381
        routeDashboard: JSON.parse('$jsonRouteDashboard'),
380
        routeDashboard: JSON.parse('$jsonRouteDashboard'),
382
   };
381
   };
383
JS;
382
JS;
384
$this->inlineScript()->appendScript($js);
383
$this->inlineScript()->appendScript($js);
-
 
384
$this->inlineScript()->appendFile('/react-bundles/settings/company-sizes/companySizesBundle.js');
385
?>
385
?>
Línea 386... Línea 386...
386
 
386
 
387
<!-- Content Header (Page header) -->
387
<!-- Content Header (Page header) -->
388
<section class="content-header">
388
<section class="content-header">