Proyectos de Subversion LeadersLinked - Backend

Rev

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

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