Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 17060 Rev 17061
Línea 97... Línea 97...
97
 
97
 
98
$this->inlineScript()->captureStart();
98
$this->inlineScript()->captureStart();
99
echo <<<JS
99
echo <<<JS
Línea 100... Línea -...
100
    jQuery( document ).ready(function( $ ) {
-
 
101
 
100
    jQuery( document ).ready(function( $ ) {
102
        // Configuración de validación de formularios
101
 
103
        $.validator.setDefaults({
102
        $.validator.setDefaults({
104
            debug: true,
103
            debug: true,
105
            highlight: function(element) {
104
            highlight: function(element) {
Línea 126... Línea 125...
126
 
125
 
127
        var allowEdit   = $allowEdit;
126
        var allowEdit   = $allowEdit;
128
        var allowDelete = $allowDelete;
127
        var allowDelete = $allowDelete;
Línea 129... Línea -...
129
        var allowUsers  = $allowUsers;
-
 
-
 
128
        var allowUsers  = $allowUsers;
130
 
129
 
131
        // Configuración de la tabla principal
130
        
132
        var gridTable = $('#gridTable').dataTable( {
131
        var gridTable = $('#gridTable').dataTable( {
133
            'processing': true,
132
            'processing': true,
134
            'serverSide': true,
133
            'serverSide': true,
Línea 138... Línea 137...
138
            'ordenable' : true,
137
            'ordenable' : true,
139
            'responsive': true,
138
            'responsive': true,
140
            'select' : false,
139
            'select' : false,
141
        	'paging': true,
140
        	'paging': true,
142
            'pagingType': 'simple_numbers',
141
            'pagingType': 'simple_numbers',
-
 
142
 
143
    		'ajax': {
143
    		'ajax': {
144
    			'url' : '$routeDatatable',
144
    			'url' : '$routeDatatable',
145
    			'type' : 'get',,
145
    			'type' : 'get',
146
                'beforeSend': function (request) {
146
                'beforeSend': function (request) {
147
                  NProgress.start();
147
                  NProgress.start();
148
                },
148
                },
149
                'dataFilter': function(response) {
149
                'dataFilter': function(response) {
150
                    var response = jQuery.parseJSON( response );
150
                    var response = jQuery.parseJSON( response );
Línea 272... Línea 272...
272
                }
272
                }
273
              ],
273
              ],
274
        });
274
        });
Línea 275... Línea 275...
275
 
275
 
276
    
276
    
277
    var seleccionarCampo;
277
        var seleccionarCampo;
278
    var validatorAdd = $('#form-add').validate({
278
    var validatorAdd = $('#form-add').validate({
279
        debug: true,
279
        debug: true,
280
        onclick: false,
280
        onclick: false,
Línea 667... Línea 667...
667
            'accept'    : 'application/json',
667
            'accept'    : 'application/json',
668
            'method'    : 'get',
668
            'method'    : 'get',
669
            'url'       : href,
669
            'url'       : href,
670
        }).done(function(response) {
670
        }).done(function(response) {
671
            if(response['success']) {
671
            if(response['success']) {
672
      			$('#table-users-capsule').val(response['data']['capsule']);
672
                $('#table-users-capsule').val(response['data']['capsule']);
Línea 673... Línea 673...
673
 
673
 
Línea 674... Línea 674...
674
                $('#gridTableUsers tbody').empty();
674
                $('#gridTableUsers tbody').empty();
675
                
-
 
676
                $.each(response['data']['items'], function(index, item) {
-
 
677
 
-
 
678
                    console.log(item);
675
                
679
 
676
                $.each(response['data']['items'], function(index, item) {
680
                    var s = '<tr>';
677
                    var s = '<tr>';
681
                    s = s + '<td>' + item['first_name'] + '</td>';
678
                    s = s + '<td>' + item['first_name'] + '</td>';
Línea 695... Línea 692...
695
 
692
 
696
                    s = s + '</td>';
693
                    s = s + '</td>';
Línea 697... Línea 694...
697
                    s = s + '</tr>';
694
                    s = s + '</tr>';
698
 
-
 
699
                    $('#gridTableUsers tbody').append(s);
-
 
700
            
695
 
Línea 701... Línea 696...
701
 
696
                    $('#gridTableUsers tbody').append(s);
702
                });    
-
 
703
 
697
                });    
704
                $('#notificationUsersModal').modal('show');
698
 
705
 
-
 
706
            } else {
699
                $('#notificationUsersModal').modal('show');
707
                $.fn.showError(response['data']);
700
            } else {
708
 
701
                $.fn.showError(response['data']);
709
            }
702
            }
710
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
711
            $.fn.showError(textStatus);
703
        }).fail(function( jqXHR, textStatus, errorThrown) {
712
        }).always(function() {
704
            $.fn.showError(textStatus);
713
               
705
        }).always(function() {
714
            NProgress.done();
-
 
715
        });
706
            NProgress.done();
716
        return false;
707
        });
717
 
708
        return false;
718
    }); 
709
    }); 
719
    $('body').on('click', 'button.btn-refresh', function(e) {
710
    $('body').on('click', 'button.btn-refresh', function(e) {
Línea 818... Línea 809...
818
	 		<h6 class="card-title">LABEL_CAPSULES</h6>
809
	 		<h6 class="card-title">LABEL_CAPSULES</h6>
819
	 	</div>
810
	 	</div>
820
	 	<div class="card-body">
811
	 	<div class="card-body">
821
			<div class="row">
812
			<div class="row">
822
	 	         <div class="col-12 mt-3">	
813
	 	         <div class="col-12 mt-3">	
823
					<table id="gridTable" class="table   table-bordered">
814
					<table id="gridTable" class="table table-bordered">
824
							<thead>
815
							<thead>
825
								<tr>
816
								<tr>
826
									<th>LABEL_NAME</th>
817
									<th>LABEL_NAME</th>
827
									<th>LABEL_DETAILS</th>
818
									<th>LABEL_DETAILS</th>
828
									<th>LABEL_IMAGES</th>
819
									<th>LABEL_IMAGES</th>
Línea 1179... Línea 1170...
1179
					</div>	
1170
					</div>	
1180
				</form>
1171
				</form>
1181
				<div class="row">
1172
				<div class="row">
1182
					<div class="col-12 mt-3">
1173
					<div class="col-12 mt-3">
1183
        				<div style="height: 300px;overflow: scroll;">
1174
        				<div style="height: 300px;overflow: scroll;">
1184
        					<table id="gridTableUsers" style="width: 100%" class="table   table-bordered">
1175
        					<table id="gridTableUsers" style="width: 100%" class="table table-bordered">
1185
        						<thead>
1176
        						<thead>
1186
        							<tr>
1177
        							<tr>
1187
        								<th>LABEL_FIRST_NAME</th>
1178
        								<th>LABEL_FIRST_NAME</th>
1188
        								<th>LABEL_LAST_NAME</th>
1179
        								<th>LABEL_LAST_NAME</th>
1189
        								<th>LABEL_EMAIL</th>
1180
        								<th>LABEL_EMAIL</th>
Línea 1194... Línea 1185...
1194
        						</tbody>
1185
        						</tbody>
1195
        					</table>
1186
        					</table>
1196
        				</div>
1187
        				</div>
1197
    				</div>
1188
    				</div>
1198
    			</div>	
1189
    			</div>	
1199
 
-
 
1200
			</div>
1190
			</div>
Línea 1201... Línea 1191...
1201
 
1191
 
1202
			<!-- Modal footer -->
1192
			<!-- Modal footer -->
1203
			<div class="modal-footer text-right">
1193
			<div class="modal-footer text-right">