Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16891 Rev 16929
Línea 20... Línea 20...
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fa/theme.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fa/theme.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fa/theme.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fa/theme.js'));
Línea 23... Línea -...
23
 
-
 
24
 
-
 
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
-
 
23
 
Línea 26... Línea 24...
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
24
 
Línea 27... Línea 25...
27
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
25
 
Línea 108... Línea 106...
108
        var page = $(this).data('page');
106
        var page = $(this).data('page');
109
        $.fn.reload(page);
107
        $.fn.reload(page);
Línea 110... Línea 108...
110
        
108
        
Línea 111... Línea -...
111
    });
-
 
112
 
-
 
113
    $.validator.setDefaults({
-
 
114
        debug: true,
-
 
115
        highlight: function(element) {
-
 
116
            $(element).addClass('form-group-has-error');
-
 
117
        },
-
 
118
        unhighlight: function(element) {
-
 
119
            $(element).removeClass('form-group-has-error');
-
 
120
        },
-
 
121
        errorElement: 'div',
-
 
122
        errorClass: 'form-group-invalid-feedback',
-
 
123
        errorPlacement: function(error, element) {
-
 
124
            if(element.context.id == 'file') {
-
 
125
                error.insertAfter(element.parent().parent().parent());
-
 
126
            } else { 
-
 
127
               if(element.parent('.form-group').length) {
-
 
128
                    error.insertAfter(element.parent());
-
 
129
                } else {
-
 
130
                    error.insertAfter(element);
-
 
Línea 131... Línea -...
131
                }
-
 
132
            }
-
 
133
 
-
 
Línea 134... Línea -...
134
 
-
 
135
        }
-
 
136
    });
-
 
137
    
-
 
138
    $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
139
        var field = $(fieldname);
-
 
140
        if(field) {
-
 
141
            $(field).addClass('form-group-has-error');
-
 
142
            
-
 
143
            var error = $('<div id="' + fieldname +'-error" class="form-group-invalid-feedback">' + errors + '</div>');
-
 
144
 
-
 
145
            var element = $(fieldname)
-
 
146
            if(element.parent('.form-group').length) {
-
 
147
                error.insertAfter(element.parent());
-
 
148
            } else if(element.parent('.file-loading').length) {
-
 
149
                error.insertAfter(element.parent().parent());
-
 
150
            } else {
-
 
Línea 151... Línea 109...
151
                error.insertAfter(element);
109
    });
152
            }
110
 
153
        }
111
 
154
    };
112
    
Línea 278... Línea 236...
278
                    validatorFeedImage.resetForm();
236
                    validatorFeedImage.resetForm();
279
                    if(jQuery.type(response['data']) == 'string') {
237
                    if(jQuery.type(response['data']) == 'string') {
280
                        $.fn.showError(response['data']);
238
                        $.fn.showError(response['data']);
281
                    } else  {
239
                    } else  {
282
                        $.each(response['data'], function( fieldname, errors ) {
240
                        $.each(response['data'], function( fieldname, errors ) {
-
 
241
       
283
                            $.fn.showFormErrorValidator('#form-feed-image #' + fieldname, errors);
242
                                $.fn.showFormErrorValidator('#form-feed-image #' + fieldname, errors);
-
 
243
                       
284
                        });
244
                        });
285
                    }
245
                    }
286
                }
246
                }
287
            }).fail(function( jqXHR, textStatus, errorThrown) {
247
            }).fail(function( jqXHR, textStatus, errorThrown) {
288
                $.fn.showError(textStatus);
248
                $.fn.showError(textStatus);
Línea 747... Línea 707...
747
        <div class="modal-content">
707
        <div class="modal-content">
748
            <div class="modal-header">
708
            <div class="modal-header">
749
                <h3 class="modal-title">LABEL_SHARE_IMAGE</h3>
709
                <h3 class="modal-title">LABEL_SHARE_IMAGE</h3>
750
            </div>
710
            </div>
751
            <div class="modal-body">
711
            <div class="modal-body">
752
                <div class="form-group">
712
                <div class="row">
-
 
713
                   <div class="col-12 mt-3">
753
                    <?php
714
                    <?php
754
                    $element = $form->get('description');
715
                    $element = $form->get('description');
755
                    $element->setAttributes(['id' => 'description_image', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
716
                    $element->setAttributes(['id' => 'description_image', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
756
                    echo $this->formTextArea($element);
717
                    echo $this->formTextArea($element);
757
                    ?>
718
                    ?>
-
 
719
                    </div>
758
                </div>
720
                </div>
759
                <div class="form-group">
721
                <div class="row">
760
                    <div class="file-loading">
722
                   <div class="col-12 mt-3">
761
                        <?php
723
                        <?php
762
                        $element = $form->get('file');
724
                        $element = $form->get('file');
763
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
725
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
764
                        echo $this->formFile($element);
726
                        echo $this->formFile($element);
765
                        ?>
727
                        ?>
766
                    </div>
728
                    </div>
767
                </div>
729
                </div>
768
            </div>
730
            </div>
769
            <div class="modal-footer">
731
            <div class="modal-footer text-right">
770
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_UPLOAD</button>
732
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_UPLOAD</button>
771
                <button type="button" class="btn btn-light cancel btn-modal-feed-image-close">LABEL_CANCEL</button>
733
                <button type="button" class="btn btn-light cancel btn-modal-feed-image-close">LABEL_CANCEL</button>
772
            </div>
734
            </div>
Línea 773... Línea 735...
773
 
735
 
Línea 797... Línea 759...
797
        <div class="modal-content">
759
        <div class="modal-content">
798
            <div class="modal-header">
760
            <div class="modal-header">
799
                <h3 class="modal-title">LABEL_SHARE_VIDEO</h3>
761
                <h3 class="modal-title">LABEL_SHARE_VIDEO</h3>
800
            </div>
762
            </div>
801
            <div class="modal-body">
763
            <div class="modal-body">
802
                <div class="form-group">
764
              	<div class="row">
-
 
765
              		<div class="col-12 mt-3">
803
                    <?php
766
                    <?php
804
                    $element = $form->get('description');
767
                    $element = $form->get('description');
805
                    $element->setAttributes(['id' => 'description_video', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
768
                    $element->setAttributes(['id' => 'description_video', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
806
                    echo $this->formTextArea($element);
769
                    echo $this->formTextArea($element);
807
                    ?>
770
                    ?>
-
 
771
                    </div>
808
                </div>
772
                </div>
809
                <div class="form-group">
773
              	<div class="row">
810
                    <div class="file-loading">
774
              		<div class="col-12 mt-3">
811
                        <?php
775
                        <?php
812
                        $element = $form->get('file');
776
                        $element = $form->get('file');
813
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
777
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
814
                        echo $this->formFile($element);
778
                        echo $this->formFile($element);
815
                        ?>
779
                        ?>
Línea 847... Línea 811...
847
        <div class="modal-content">
811
        <div class="modal-content">
848
            <div class="modal-header">
812
            <div class="modal-header">
849
                <h3 class="modal-title">LABEL_SHARE_DOCUMENT</h3>
813
                <h3 class="modal-title">LABEL_SHARE_DOCUMENT</h3>
850
            </div>
814
            </div>
851
            <div class="modal-body">
815
            <div class="modal-body">
852
                <div class="form-group">
816
                <div class="row">
-
 
817
                    <div class="col-12 mt-3">
853
                    <?php
818
                    <?php
854
                    $element = $form->get('description');
819
                    $element = $form->get('description');
855
                    $element->setAttributes(['id' => 'description_document', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
820
                    $element->setAttributes(['id' => 'description_document', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
856
                    echo $this->formTextArea($element);
821
                    echo $this->formTextArea($element);
857
                    ?>
822
                    ?>
-
 
823
                    </div>
858
                </div>
824
                </div>
859
                <div class="form-group">
825
                <div class="row">
860
                    <div class="file-loading">
826
                    <div class="col-12 mt-3">
861
                        <?php
827
                        <?php
862
                        $element = $form->get('file');
828
                        $element = $form->get('file');
863
                        $element->setAttributes(['accept' => 'application/pdf']);
829
                        $element->setAttributes(['accept' => 'application/pdf']);
864
                        echo $this->formFile($element);
830
                        echo $this->formFile($element);
865
                        ?>
831
                        ?>
Línea 895... Línea 861...
895
        <div class="modal-content">
861
        <div class="modal-content">
896
            <div class="modal-header">
862
            <div class="modal-header">
897
                <h3 class="modal-title">LABEL_SHARE</h3>
863
                <h3 class="modal-title">LABEL_SHARE</h3>
898
            </div>
864
            </div>
899
            <div class="modal-body">
865
            <div class="modal-body">
900
                <div class="form-group">
866
                <div class="row">
-
 
867
                	<div class="col-12 mt-3">
901
                    <?php
868
                    <?php
902
                    $element = $form->get('description');
869
                    $element = $form->get('description');
903
                    $element->setAttributes(['id' => 'description_feed', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
870
                    $element->setAttributes(['id' => 'description_feed', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
904
                    echo $this->formTextArea($element);
871
                    echo $this->formTextArea($element);
905
                    ?>
872
                    ?>
-
 
873
                    </div>
906
                </div>
874
                </div>
907
            </div>
875
            </div>
908
            <div class="modal-footer text-right">
876
            <div class="modal-footer text-right">
909
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_SAVE</button>
877
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_SAVE</button>
910
                <button type="button" class="btn btn-light cancel btn-modal-feed-close">LABEL_CANCEL</button>
878
                <button type="button" class="btn btn-light cancel btn-modal-feed-close">LABEL_CANCEL</button>
Línea 921... Línea 889...
921
<script id="commentTemplate" type="text/x-jsrender">
889
<script id="commentTemplate" type="text/x-jsrender">
922
    <li>
890
    <li>
923
        <div class="comment-list">
891
        <div class="comment-list">
924
                <div class="comment comment-{{:unique}}" >
892
                <div class="comment comment-{{:unique}}" >
925
                    <a href="{{>user_url}}"><h3>{{>user_name}}</h3>
893
                    <a href="{{>user_url}}"><h3>{{>user_name}}</h3>
926
                    <span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>time_elapsed}} 
894
                    <span><img src="<?php echo $this->basePath('assets/images/clock.png') ?>" alt="">{{>time_elapsed}} 
927
                {{if link_delete}}
895
                {{if link_delete}}
928
                    <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a> 
896
                    <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a> 
929
                {{/if}}
897
                {{/if}}
930
                    </span>
898
                    </span>
Línea 946... Línea 914...
946
                <a href="{{>owner_url}}">
914
                <a href="{{>owner_url}}">
947
                    <h2>{{>owner_name}}</h2>
915
                    <h2>{{>owner_name}}</h2>
948
                </a>
916
                </a>
Línea 949... Línea 917...
949
 
917
 
950
                <span>
918
                <span>
951
                    <img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">
919
                    <img src="<?php echo $this->basePath('assets/images/clock.png') ?>" alt="">
952
                    {{>owner_time_elapse}} 
920
                    {{>owner_time_elapse}} 
953
                    {{if feed_delete_url}}  
921
                    {{if feed_delete_url}}  
954
                        <a href="#" class="btn-feed-trash" data-link="{{:feed_delete_url}}" data-feed-unique="{{>feed_unique}}"><i class="fa fa-trash"></i></a>
922
                        <a href="#" class="btn-feed-trash" data-link="{{:feed_delete_url}}" data-feed-unique="{{>feed_unique}}"><i class="fa fa-trash"></i></a>
955
                    {{/if}}
923
                    {{/if}}
Línea 977... Línea 945...
977
                    <img src="{{>shared_image}}" alt="" style="width:50px; height: auto">
945
                    <img src="{{>shared_image}}" alt="" style="width:50px; height: auto">
Línea 978... Línea 946...
978
 
946
 
979
                    <div class="feed-info">
947
                    <div class="feed-info">
980
                        <h3>{{>shared_name}}</h3>
948
                        <h3>{{>shared_name}}</h3>
981
                        <span>
949
                        <span>
982
                            <img style="width: 12px; height: auto" src="<?php echo $this->basePath('images/clock.png') ?>" alt="">
950
                            <img style="width: 12px; height: auto" src="<?php echo $this->basePath('assets/images/clock.png') ?>" alt="">
983
                            {{>shared_time_elapse}}
951
                            {{>shared_time_elapse}}
984
                        </span>       
952
                        </span>       
985
                    </div>
953
                    </div>
Línea 1015... Línea 983...
1015
                            <a href="{{>user_url}}">
983
                            <a href="{{>user_url}}">
1016
                                <h2>{{>user_name}}</h2>
984
                                <h2>{{>user_name}}</h2>
1017
                            </a>
985
                            </a>
Línea 1018... Línea 986...
1018
 
986
 
1019
                            <span>
987
                            <span>
1020
                                <img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">
988
                                <img src="<?php echo $this->basePath('assets/images/clock.png') ?>" alt="">
1021
                                {{>time_elapsed}} 
989
                                {{>time_elapsed}} 
1022
                                {{if link_delete}}
990
                                {{if link_delete}}
1023
                                    <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}">
991
                                    <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}">
1024
                                        <i class="fa fa-trash"></i>
992
                                        <i class="fa fa-trash"></i>