Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16891 Rev 16929
Línea 8... Línea 8...
8
$route      = $this->url('engagement/setup');
8
$route      = $this->url('engagement/setup');
Línea 9... Línea 9...
9
 
9
 
10
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
10
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 11... Línea -...
11
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
-
 
12
 
-
 
13
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
-
 
11
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
-
 
12
 
-
 
13
 
Línea 14... Línea 14...
14
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
14
 
Línea 15... Línea 15...
15
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
15
 
16
 
16
 
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.js'));
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.js'));
Línea 18... Línea -...
18
 
-
 
19
 
-
 
20
$this->inlineScript()->captureStart();
-
 
21
echo <<<JS
-
 
22
    jQuery( document ).ready(function( $ ) {
-
 
23
 
-
 
24
        $.validator.setDefaults({
-
 
25
            debug: true,
-
 
26
            highlight: function(element) {
-
 
27
                $(element).addClass('is-invalid');
-
 
28
            },
-
 
29
            unhighlight: function(element) {
-
 
30
                $(element).removeClass('is-invalid');
-
 
31
            },
-
 
32
            errorElement: 'span',
-
 
33
            errorClass: 'error invalid-feedback',
-
 
34
            errorPlacement: function(error, element) {
-
 
35
                if(element.parent('.form-group').length) {
-
 
36
                    error.insertAfter(element);
-
 
37
                } else if(element.parent('.toggle').length) {
-
 
38
                    error.insertAfter(element.parent().parent());
-
 
39
                } else {
18
 
40
                    error.insertAfter(element.parent());
-
 
41
                }
-
 
42
            }
-
 
43
        });
-
 
44
    
-
 
45
    
-
 
46
        $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
47
            var field = $(fieldname);
-
 
48
            if(field) {
-
 
49
                $(field).addClass('is-invalid');
-
 
50
    
-
 
51
 
-
 
52
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
-
 
53
                if(field.parent('.form-group').length) {
-
 
54
                    error.insertAfter(field);
-
 
55
                } else  if(field.parent('.toggle').length) {
-
 
Línea 56... Línea 19...
56
                    error.insertAfter(field.parent().parent());
19
 
57
                } else {
20
$this->inlineScript()->captureStart();
58
                    error.insertAfter(field.parent());
21
echo <<<JS
59
                }
22
    jQuery( document ).ready(function( $ ) {