Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 872 Rev 873
Línea 266... Línea 266...
266
            }).done(function(response) {
266
            }).done(function(response) {
267
                NProgress.start();
267
                NProgress.start();
268
                if (response['success']) {
268
                if (response['success']) {
269
                    $.fn.showSuccess(response['data']);
269
                    $.fn.showSuccess(response['data']);
270
                    $('#row-form').hide();
270
                    $('#row-form').hide();
271
                $('#row-lists').show();
271
        $('#row-list').show();
272
                    gridTable.api().ajax.reload(null, false);
272
                    gridTable.api().ajax.reload(null, false);
273
                } else {
273
                } else {
274
                    validator.resetForm();
274
                    validator.resetForm();
275
                    if (jQuery.type(response['data']) == 'string') {
275
                    if (jQuery.type(response['data']) == 'string') {
276
                        $.fn.showError(response['data']);
276
                        $.fn.showError(response['data']);
Línea 297... Línea 297...
297
        $('#form #competency_type_id').val('').trigger('change');
297
        $('#form #competency_type_id').val('').trigger('change');
298
        $('#form #status').bootstrapToggle('on');
298
        $('#form #status').bootstrapToggle('on');
299
        CKEDITOR.instances.description.setData('');
299
        CKEDITOR.instances.description.setData('');
300
        validator.resetForm();
300
        validator.resetForm();
301
        $('#row-form').show();
301
        $('#row-form').show();
302
        $('#row-lists').hide();
302
        $('#row-list').hide();
303
        return false;
303
        return false;
304
    });
304
    });
305
    $('body').on('click', 'button.btn-edit', function(e) {
305
    $('body').on('click', 'button.btn-edit', function(e) {
306
        e.preventDefault();
306
        e.preventDefault();
307
        NProgress.start();
307
        NProgress.start();
Línea 318... Línea 318...
318
                $('#form #competency_type_id').val(response['data']['competency_type_id']).trigger('change');
318
                $('#form #competency_type_id').val(response['data']['competency_type_id']).trigger('change');
319
                $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
319
                $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
320
                CKEDITOR.instances.description.setData(response['data']['description']);
320
                CKEDITOR.instances.description.setData(response['data']['description']);
321
                validator.resetForm();
321
                validator.resetForm();
322
                $('#row-form').show();
322
                $('#row-form').show();
323
                $('#row-lists').hide();
323
                $('#row-list').hide();
324
            } else {
324
            } else {
325
                $.fn.showError(response['data']);
325
                $.fn.showError(response['data']);
326
            }
326
            }
327
        }).fail(function(jqXHR, textStatus, errorThrown) {
327
        }).fail(function(jqXHR, textStatus, errorThrown) {
328
            $.fn.showError(textStatus);
328
            $.fn.showError(textStatus);
Línea 469... Línea 469...
469
            if (id) {} else {}
469
            if (id) {} else {}
470
            $('#modal-conduct').modal('hide');
470
            $('#modal-conduct').modal('hide');
471
            return false;
471
            return false;
472
        }
472
        }
473
    });
473
    });
-
 
474
 
-
 
475
    /**
-
 
476
     * Clicked cancel new/edit Form
-
 
477
     */
-
 
478
    $('button.btn-edit-cancel').click(function(e) {
-
 
479
        e.preventDefault();
-
 
480
        $('#row-form').hide();
-
 
481
        $('#row-list').show();
-
 
482
    });
474
});
483
});
475
JS;
484
JS;
476
$this->inlineScript()->captureEnd();
485
$this->inlineScript()->captureEnd();
477
?>
486
?>
Línea 489... Línea 498...
489
			</div>
498
			</div>
490
		</div>
499
		</div>
491
	</div><!-- /.container-fluid -->
500
	</div><!-- /.container-fluid -->
492
</section>
501
</section>
Línea 493... Línea 502...
493
 
502
 
494
<section class="content" id="row-lists">
503
<section class="content" id="row-list">
495
	<div class="container-fluid">
504
	<div class="container-fluid">
496
    	<div class="row">
505
    	<div class="row">
497
        	<div class="col-12">
506
        	<div class="col-12">
498
				<div class="card">                    
507
				<div class="card">                    
Línea 610... Línea 619...
610
                     <div class="panel-group" id="rows"></div>
619
                     <div class="panel-group" id="rows"></div>
611
                  </div>
620
                  </div>
612
                  <div class="col-xs-12 col-md-12">
621
                  <div class="col-xs-12 col-md-12">
613
                  <div class="form-group">
622
                  <div class="form-group">
614
               <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
623
               <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
615
               <button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
624
               <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
616
            </div>
625
            </div>
617
                </div>
626
                </div>
618
            </div>
627
            </div>
619
            <!-- Modal footer -->
628
            <!-- Modal footer -->