Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16906 Rev 16929
Línea 18... Línea 18...
18
 
18
 
19
 
19
 
Línea 20... Línea -...
20
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
-
 
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
-
 
22
 
-
 
-
 
20
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
-
 
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
-
 
22
 
Línea 23... Línea 23...
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
23
 
Línea 24... Línea 24...
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
24
 
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
25
 
Línea 44... Línea 44...
44
 
44
 
45
$this->inlineScript()->captureStart();
45
$this->inlineScript()->captureStart();
46
echo <<<JS
46
echo <<<JS
Línea 47... Línea -...
47
    jQuery( document ).ready(function( $ ) {
-
 
48
 
-
 
49
 
-
 
50
        $.validator.setDefaults({
-
 
51
            debug: true,
-
 
52
            highlight: function(element) {
-
 
53
                $(element).addClass('is-invalid');
-
 
54
            },
-
 
55
            unhighlight: function(element) {
-
 
56
                $(element).removeClass('is-invalid');
-
 
57
            },
-
 
58
            errorElement: 'span',
-
 
59
            errorClass: 'error invalid-feedback',
-
 
60
            errorPlacement: function(error, element) {
-
 
61
                if(element.parent('.form-group').length) {
-
 
62
                    error.insertAfter(element);
-
 
63
                } else if(element.parent('.toggle').length) {
-
 
64
                    error.insertAfter(element.parent().parent());
-
 
65
                } else {
-
 
66
                    error.insertAfter(element.parent());
-
 
67
                }
-
 
68
            }
-
 
69
        });
-
 
70
    
-
 
71
    
-
 
72
        $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
73
            var field = $(fieldname);
-
 
74
            if(field) {
-
 
75
                $(field).addClass('is-invalid');
-
 
76
    
-
 
77
 
-
 
78
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
-
 
79
                if(field.parent('.form-group').length) {
-
 
80
                    error.insertAfter(field);
-
 
81
                } else  if(field.parent('.toggle').length) {
-
 
82
                    error.insertAfter(field.parent().parent());
-
 
83
                } else {
-
 
84
                    error.insertAfter(field.parent());
-
 
85
                }
-
 
86
            }
-
 
87
        };
-
 
88
 
-
 
89
 
-
 
90
 
-
 
91
 
47
    jQuery( document ).ready(function( $ ) {
92
 
48
 
Línea 93... Línea 49...
93
        var allowEdit   = $allowEdit;
49
        var allowEdit   = $allowEdit;
94
        var allowDelete = $allowDelete;
50
        var allowDelete = $allowDelete;