Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6849 | Rev 8290 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
$roleName       = $currentUser->getUserTypeId();
5
 
6
$routeDatatable = $this->url('microlearning/content/slides');
7
 
8
$allowAdd = $acl->isAllowed($roleName, 'microlearning/content/slides/add') ? 1 : 0;
9
$allowEdit = $acl->isAllowed($roleName, 'microlearning/content/slides/edit') ? 1 : 0;
10
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/slides/delete') ? 1 : 0;
11
 
12
 
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
15
 
16
 
17
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
18
 
19
 
20
 
21
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
22
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
23
 
24
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
25
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
26
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
27
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
28
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
29
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
30
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
32
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
33
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
34
 
6115 nelberth 35
$this->headLink()->appendStylesheet($this->basePath('plugins/nelberth-editor/style.css'));
1 www 36
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
37
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
38
 
39
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
40
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
41
 
42
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
43
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
44
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
46
 
47
 
48
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
49
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
50
 
51
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
52
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
53
 
54
 
55
 
56
 
57
$this->inlineScript()->captureStart();
58
echo <<<JS
59
 
60
 
61
jQuery( document ).ready(function( $ ) {
62
 
63
        var routeAdd = '';
64
 
65
        $.validator.setDefaults({
66
            debug: true,
67
            highlight: function(element) {
68
                $(element).addClass('is-invalid');
69
            },
70
            unhighlight: function(element) {
71
                $(element).removeClass('is-invalid');
72
            },
73
            errorElement: 'span',
74
            errorClass: 'error invalid-feedback',
75
            errorPlacement: function(error, element) {
6192 nelberth 76
 
1 www 77
            }
78
        });
79
 
80
 
81
        $.fn.showFormErrorValidator = function(fieldname, errors) {
82
            var field = $(fieldname);
83
            if(field) {
84
                $(field).addClass('is-invalid');
85
 
86
 
87
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
6622 nelberth 88
                if(element.parent('.btn-file').length) {
1 www 89
                    error.insertAfter(element.parent().parent());
90
                } else if(element.parent('.toggle').length) {
91
                    error.insertAfter(element.parent().parent());
92
                } else {
93
                    error.insertAfter(element.parent());
6622 nelberth 94
                }
1 www 95
            }
96
        };
97
 
98
    var allowEdit   = $allowEdit;
99
        var allowDelete = $allowDelete;
100
 
101
        var gridTable = $('#gridTable').dataTable( {
102
            'processing': true,
103
            'serverSide': true,
104
            'searching': true,
105
            'order': [[ 0, 'asc' ]],
106
            'ordering':  true,
107
            'ordenable' : true,
108
            'responsive': true,
109
            'select' : false,
110
        	'paging': true,
111
            'pagingType': 'simple_numbers',
112
 
113
    		'ajax': {
114
    			'url' : '$routeDatatable',
115
    			'type' : 'get',
116
                'data': function ( d ) {
117
                    d.topic_uuid = $('#form-filter #topic_uuid').val();
118
                    d.capsule_uuid = $('#form-filter #capsule_uuid').val();
119
 
120
                },
121
                'beforeSend': function (request) {
122
                  NProgress.start();
123
                },
124
                'dataFilter': function(response) {
125
                    var response = jQuery.parseJSON( response );
126
 
127
                    var json                = {};
128
                    json.recordsTotal       = 0;
129
                    json.recordsFiltered    = 0;
130
                    json.data               = [];
131
 
132
                    if(response.success) {
133
                        $('#form-capsule-add').attr('action', response.data.link_add );
134
 
135
                        if(response.data.capsules) {
136
                            $('#form-filter #capsule_uuid').empty();
137
                            $.each(response.data.capsules, function(index, value) {
138
                                  $('#form-filter #capsule_uuid').append('<option value="' + index + '">' + value + '</option>')
139
                            });
140
                        }
141
 
142
                        routeAdd = response.data.link_add;
143
                        if(response.data.link_add) {
144
 
145
                            $('button.btn-add').removeAttr('disabled');
146
                        } else {
147
                            $('button.btn-add').attr('disabled', 'disabled');
148
                        }
149
 
150
                        json.recordsTotal       = response.data.total;
151
                        json.recordsFiltered    = response.data.total;
152
                        json.data               = response.data.items;
153
                    } else {
154
                        $.fn.showError(response.data)
155
                    }
156
 
157
                    return JSON.stringify( json );
158
                }
159
    		},
160
            'language' : {
161
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
162
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
163
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
164
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
165
                'sInfo':           'LABEL_DATATABLE_SINFO',
166
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
167
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
168
                'sInfoPostFix':    '',
169
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
170
                'sUrl':            '',
171
                'sInfoThousands':  ',',
172
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
173
                'oPaginate': {
174
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
175
                    'sLast':     'LABEL_DATATABLE_SLAST',
176
                    'sNext':     'LABEL_DATATABLE_SNEXT',
177
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
178
                },
179
                'oAria': {
180
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
181
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
182
                },
183
            },
184
            'drawCallback': function( settings ) {
185
                NProgress.done();
186
                $('button.btn-delete').confirmation({
187
                    rootSelector: 'button.btn-delete',
188
                    title : 'LABEL_ARE_YOU_SURE',
189
                    singleton : true,
190
                    btnOkLabel: 'LABEL_YES',
191
                    btnCancelLabel: 'LABEL_NO',
192
                    onConfirm: function(value) {
193
                        action = $(this).data('href');
194
                        NProgress.start();
195
                        $.ajax({
196
                            'dataType'  : 'json',
197
                            'accept'    : 'application/json',
198
                            'method'    : 'post',
199
                            'url'       :  action,
200
                        }).done(function(response) {
201
                            if(response['success']) {
202
                                $.fn.showSuccess(response['data']);
203
                                gridTable.api().ajax.reload(null, false);
204
                            } else {
205
                                $.fn.showError(response['data']);
206
                            }
207
                        }).fail(function( jqXHR, textStatus, errorThrown) {
208
                            $.fn.showError(textStatus);
209
                        }).always(function() {
210
                            NProgress.done();
211
                        });
212
                    },
213
                });
214
            },
215
            'aoColumns': [
216
                { 'mDataProp': 'name' },
217
                { 'mDataProp': 'details' },
218
                { 'mDataProp': 'media' },
219
                { 'mDataProp': 'actions' },
220
    	    ],
221
            'columnDefs': [
222
                {
223
                    'targets': 0,
224
                    'className' : 'text-vertical-middle',
225
                },
226
                {
227
                    'targets': -3,
228
                    'orderable': false,
229
                    'render' : function ( data, type, row ) {
230
                        var s = '';
231
                        s += 'LABEL_TYPE: ' + data['type']  + '<br/>';
232
                        return s;
233
                    }
234
                },
235
                {
236
                    'targets': -2,
237
                    'orderable': false,
238
                    'render' : function ( data, type, row ) {
239
                        s = '';
240
                        if( data['image'] )  {
241
                            s = s + '&nbsp; <img class="btn-view-image"" data-href="' + data['image'] + '" data-toggle="tooltip" src="'+data['image']+'" title="LABEL_VIEW" style="width: 40px; object-fit: cover; height: 40px;" /> ';
242
                        }
243
 
244
                        if( data['audio'] )  {
245
                            s = s + '&nbsp;<button class="btn btn-play-audio" data-href="' + data['audio'] + '" data-toggle="tooltip" title="LABEL_PLAY_AUDIO"><i class="fa fa-play"></i></button> <br>';
246
                        }
247
 
248
                        if( data['video'] )  {
249
                            s = s + '&nbsp;<button class="btn btn-play-video" data-href="' + data['video'] + '" data-toggle="tooltip" title="LABEL_PLAY_VIDEO"><i class="fa fa-video-camera"></i></button> <br>';
250
                        }
251
 
252
 
253
                        if( data['document'] )  {
254
                            s = s + '&nbsp;<button class="btn btn-view-document" data-href="' + data['document'] + '" data-toggle="tooltip" title="LABEL_VIEW_DOCUMENT"><i class="fa fa-file"></i></button> <br>';
255
                        }
256
 
257
                        if( data['text'] )  {
258
                            s = s + '&nbsp;<button class="btn btn-view-text" data-href="' + data['text'] + '" data-toggle="tooltip" title="LABEL_VIEW_TEXT"><i class="fa fa-text-width"></i></button> <br>';
259
                        }
260
 
261
                        return s;
262
                    }
263
                },
264
 
265
 
266
                {
267
                    'targets': -1,
268
                    'orderable': false,
269
                    'render' : function ( data, type, row ) {
270
                        s = '';
271
 
272
                        if(allowEdit && data['link_edit']  ) {
273
                            s = s + '<button class="btn btn-info btn-sm btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> Editar </button>&nbsp;';
274
                        }
275
                        if(allowDelete && data['link_delete']  ) {
276
                            s = s + '<button class="btn btn-danger btn-sm btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> Eliminar</button>&nbsp;';
277
                        }
278
                        return s;
279
                    }
280
                }
281
              ],
282
        });
6591 nelberth 283
        var seleccionarCampo;
1 www 284
    var validatorTextAdd  = $('#form-slide-text-add').validate({
285
        debug: true,
286
        onclick: false,
287
        onkeyup: false,
288
        ignore: [],
289
        rules: {
290
            'name': {
291
                required: true,
292
                maxlength: 128,
293
            },
294
            'description': {
295
                updateCkeditor:function() {
296
                        CKEDITOR.instances.description_add.updateElement();
297
                },
298
                required: true
299
            },
300
           'background': {
301
                required: true,
302
            },
303
            'order' : {
304
                required: true,
305
                digits: true,
306
                min: 1,
307
                max: 250
308
            }
309
        },
310
        submitHandler: function(form)
311
        {
312
 
313
            var formdata = false;
314
            if (window.FormData){
315
                formdata = new FormData(form); //form[0]);
316
            }
317
 
7060 nelberth 318
 
319
				$('.info_noticia').prop('disabled', true);
6591 nelberth 320
            NProgress.start();
1 www 321
            $.ajax({
322
                'dataType'  : 'json',
323
                'accept'    : 'application/json',
324
                'method'    : 'post',
325
                'url'       :  routeAdd,
326
                'data'      :  formdata,
327
                'processData': false,
328
                'contentType': false,
329
            }).done(function(response) {
330
                if(response['success']) {
331
                    $.fn.showSuccess(response['data']);
6591 nelberth 332
                    $('body, html').animate({scrollTop: '0px'}, 300);
333
					$('#content1').css('display','block');
334
                    $('.contenido').html('');
335
            		seleccionarCampo.css('display','none');
1 www 336
 
337
                    gridTable.api().ajax.reload(null, false);
338
                } else {
339
                    validatorTextAdd.resetForm();
340
                    if(jQuery.type(response['data']) == 'string') {
341
                        $.fn.showError(response['data']);
342
                    } else  {
343
                        $.each(response['data'], function( fieldname, errors ) {
344
                            $.fn.showFormErrorValidator('#form-slide-text-add #' + fieldname, errors);
345
                        });
346
                    }
347
                }
348
            }).fail(function( jqXHR, textStatus, errorThrown) {
349
                $.fn.showError(textStatus);
350
            }).always(function() {
351
                NProgress.done();
7060 nelberth 352
 
353
				$('.info_noticia').prop('disabled', false);
1 www 354
            });
355
            return false;
356
        },
357
        invalidHandler: function(form, validator) {
358
 
359
        }
360
    });
361
 
362
    var validatorTextEdit = $('#form-slide-text-edit').validate({
363
        debug: true,
364
        onclick: false,
365
        onkeyup: false,
366
        ignore: [],
367
        rules: {
368
            'name': {
369
                required: true,
370
                maxlength: 128,
371
            },
372
            'description': {
373
                updateCkeditor:function() {
374
                        CKEDITOR.instances.description_edit.updateElement();
375
                },
376
                required: true
377
            },
378
           'background': {
6598 nelberth 379
                required: true,
1 www 380
            },
381
            'order' : {
382
                required: true,
383
                digits: true,
384
                min: 1,
385
                max: 250
386
            }
387
        },
388
        submitHandler: function(form)
389
        {
390
            var formdata = false;
391
            if (window.FormData){
392
                formdata = new FormData(form); //form[0]);
393
            }
394
 
7060 nelberth 395
 
396
				$('.info_noticia').prop('disabled', true);
6595 nelberth 397
            NProgress.start();
1 www 398
            $.ajax({
399
                'dataType'  : 'json',
400
                'accept'    : 'application/json',
401
                'method'    : 'post',
402
                'url'       :  $('#form-slide-text-edit').attr('action'),
403
                'data'      :  formdata,
404
                'processData': false,
405
                'contentType': false,
406
            }).done(function(response) {
407
                if(response['success']) {
408
                    $.fn.showSuccess(response['data']);
409
 
6595 nelberth 410
                    $('body, html').animate({scrollTop: '0px'}, 300);
411
					$('#content1').css('display','block');
412
                    $('.contenido').html('');
413
            		seleccionarCampo.css('display','none');
414
 
1 www 415
                    gridTable.api().ajax.reload(null, false);
416
                } else {
417
                    validatorTextEdit.resetForm();
418
                    if(jQuery.type(response['data']) == 'string') {
419
                        $.fn.showError(response['data']);
420
                    } else  {
421
                        $.each(response['data'], function( fieldname, errors ) {
422
                            $.fn.showFormErrorValidator('#form-slide-text-edit #' + fieldname, errors);
423
                        });
424
                    }
425
                }
426
            }).fail(function( jqXHR, textStatus, errorThrown) {
427
                $.fn.showError(textStatus);
428
            }).always(function() {
429
                NProgress.done();
7060 nelberth 430
 
431
				$('.info_noticia').prop('disabled', false);
1 www 432
            });
433
            return false;
434
        },
435
        invalidHandler: function(form, validator) {
436
 
437
        }
438
    });
439
 
440
    var validatorImageAdd  = $('#form-slide-image-add').validate({
441
        debug: true,
442
        onclick: false,
443
        onkeyup: false,
444
        ignore: [],
445
        rules: {
446
            'name': {
447
                required: true,
448
                maxlength: 128,
449
            },
450
           'file': {
451
                required: true,
452
            },
453
            'order' : {
454
                required: true,
455
                digits: true,
456
                min: 1,
457
                max: 250
458
            }
459
        },
460
        submitHandler: function(form)
461
        {
462
            var formdata = false;
463
            if (window.FormData){
464
                formdata = new FormData(form); //form[0]);
465
            }
466
 
7060 nelberth 467
 
468
				$('.info_noticia').prop('disabled', true);
6499 nelberth 469
            NProgress.start();
1 www 470
            $.ajax({
471
                'dataType'  : 'json',
472
                'accept'    : 'application/json',
473
                'method'    : 'post',
474
                'url'       :  routeAdd,
475
                'data'      :  formdata,
476
                'processData': false,
477
                'contentType': false,
478
            }).done(function(response) {
6192 nelberth 479
                console.log(response)
1 www 480
                if(response['success']) {
481
                    $.fn.showSuccess(response['data']);
6499 nelberth 482
                    $('body, html').animate({scrollTop: '0px'}, 300);
483
					$('#content1').css('display','block');
6576 nelberth 484
                    $('.contenido').html('');
6591 nelberth 485
 
486
            		seleccionarCampo.css('display','none');
1 www 487
 
488
                    gridTable.api().ajax.reload(null, false);
489
                } else {
490
                    validatorImageAdd.resetForm();
491
                    if(jQuery.type(response['data']) == 'string') {
492
                        $.fn.showError(response['data']);
493
                    } else  {
494
                        $.each(response['data'], function( fieldname, errors ) {
495
                            $.fn.showFormErrorValidator('#form-slide-image-add #' + fieldname, errors);
496
                        });
497
                    }
498
                }
499
            }).fail(function( jqXHR, textStatus, errorThrown) {
500
                $.fn.showError(textStatus);
501
            }).always(function() {
502
                NProgress.done();
7060 nelberth 503
 
504
				$('.info_noticia').prop('disabled', false);
1 www 505
            });
506
            return false;
507
        },
508
        invalidHandler: function(form, validator) {
509
 
510
        }
511
    });
512
 
513
    var validatorImageEdit = $('#form-slide-image-edit').validate({
514
        debug: true,
515
        onclick: false,
516
        onkeyup: false,
517
        ignore: [],
518
        rules: {
519
            'name': {
520
                required: true,
521
                maxlength: 128,
522
            },
523
            'file': {
6500 nelberth 524
                required: true,
1 www 525
            },
526
            'order' : {
527
                required: true,
528
                digits: true,
529
                min: 1,
530
                max: 250
531
            }
532
        },
533
        submitHandler: function(form)
534
        {
535
            var formdata = false;
536
            if (window.FormData){
537
                formdata = new FormData(form); //form[0]);
538
            }
7060 nelberth 539
 
540
				$('.info_noticia').prop('disabled', true);
6500 nelberth 541
            NProgress.start();
1 www 542
            $.ajax({
543
                'dataType'  : 'json',
544
                'accept'    : 'application/json',
545
                'method'    : 'post',
546
                'url'       :  $('#form-slide-image-edit').attr('action'),
547
                'data'      :  formdata,
548
                'processData': false,
549
                'contentType': false,
550
            }).done(function(response) {
551
                if(response['success']) {
552
                    $.fn.showSuccess(response['data']);
553
 
6500 nelberth 554
                    $('body, html').animate({scrollTop: '0px'}, 300);
555
					$('#content1').css('display','block');
6576 nelberth 556
                    $('.contenido').html('');
6591 nelberth 557
 
558
            		seleccionarCampo.css('display','none');
1 www 559
 
560
                    gridTable.api().ajax.reload(null, false);
561
                } else {
562
                    validatorImageEdit.resetForm();
563
                    if(jQuery.type(response['data']) == 'string') {
564
                        $.fn.showError(response['data']);
565
                    } else  {
566
                        $.each(response['data'], function( fieldname, errors ) {
567
                            $.fn.showFormErrorValidator('#form-slide-image-edit #' + fieldname, errors);
568
                        });
569
                    }
570
                }
571
            }).fail(function( jqXHR, textStatus, errorThrown) {
572
                $.fn.showError(textStatus);
573
            }).always(function() {
574
                NProgress.done();
7060 nelberth 575
 
576
				$('.info_noticia').prop('disabled', false);
1 www 577
            });
578
            return false;
579
        },
580
        invalidHandler: function(form, validator) {
581
 
582
        }
583
    });
584
 
585
    var validatorVideoAdd  = $('#form-slide-video-add').validate({
586
        debug: true,
587
        onclick: false,
588
        onkeyup: false,
589
        ignore: [],
590
        rules: {
591
            'name': {
592
                required: true,
593
                maxlength: 128,
594
            },
595
           'file': {
596
                required: true,
597
                extension: 'webm,mp4,webm',
598
                accept: 'video/webm,video/mpeg,video/mp4'
599
            },
600
            'background': {
6620 nelberth 601
                required: true,
1 www 602
            },
603
            'order' : {
604
                required: true,
605
                digits: true,
606
                min: 1,
607
                max: 250
608
            }
609
        },
610
        submitHandler: function(form)
611
        {
612
            var formdata = false;
613
            if (window.FormData){
614
                formdata = new FormData(form); //form[0]);
615
            }
616
 
7060 nelberth 617
 
618
			$('.info_noticia').prop('disabled', true);
6620 nelberth 619
            NProgress.start();
1 www 620
            $.ajax({
621
                'dataType'  : 'json',
622
                'accept'    : 'application/json',
623
                'method'    : 'post',
624
                'url'       :  routeAdd,
625
                'data'      :  formdata,
626
                'processData': false,
627
                'contentType': false,
628
            }).done(function(response) {
629
                if(response['success']) {
630
                    $.fn.showSuccess(response['data']);
6620 nelberth 631
 
632
                    $('body, html').animate({scrollTop: '0px'}, 300);
633
					$('#content1').css('display','block');
634
                    $('.contenido').html('');
635
            		seleccionarCampo.css('display','none');
1 www 636
                    gridTable.api().ajax.reload(null, false);
637
                } else {
638
                    validatorVideoAdd.resetForm();
639
                    if(jQuery.type(response['data']) == 'string') {
640
                        $.fn.showError(response['data']);
641
                    } else  {
642
                        $.each(response['data'], function( fieldname, errors ) {
643
                            $.fn.showFormErrorValidator('#form-slide-video-add #' + fieldname, errors);
644
                        });
645
                    }
646
                }
647
            }).fail(function( jqXHR, textStatus, errorThrown) {
648
                $.fn.showError(textStatus);
649
            }).always(function() {
650
                NProgress.done();
7060 nelberth 651
				$('.info_noticia').prop('disabled', false);
1 www 652
            });
653
            return false;
654
        },
655
        invalidHandler: function(form, validator) {
656
 
657
        }
658
    });
659
 
660
    var validatorVideoEdit = $('#form-slide-video-edit').validate({
661
        debug: true,
662
        onclick: false,
663
        onkeyup: false,
664
        ignore: [],
665
        rules: {
666
            'name': {
667
                required: true,
668
                maxlength: 128,
669
            },
670
            'file': {
671
                required: false,
672
                extension: 'webm,mp4,webm',
673
                accept: 'video/webm,video/mpeg,video/mp4'
674
            },
675
            'background': {
6649 nelberth 676
                required: true
1 www 677
            },
678
            'order' : {
679
                required: true,
680
                digits: true,
681
                min: 1,
682
                max: 250
683
            }
684
        },
685
        submitHandler: function(form)
686
        {
687
            var formdata = false;
688
            if (window.FormData){
689
                formdata = new FormData(form); //form[0]);
690
            }
691
 
7060 nelberth 692
 
693
			$('.info_noticia').prop('disabled', true);
6650 nelberth 694
            NProgress.start();
1 www 695
            $.ajax({
696
                'dataType'  : 'json',
697
                'accept'    : 'application/json',
698
                'method'    : 'post',
699
                'url'       :  $('#form-slide-video-edit').attr('action'),
700
                'data'      :  formdata,
701
                'processData': false,
702
                'contentType': false,
703
            }).done(function(response) {
704
                if(response['success']) {
705
                    $.fn.showSuccess(response['data']);
706
 
6649 nelberth 707
                    $('body, html').animate({scrollTop: '0px'}, 300);
708
					$('#content1').css('display','block');
709
                    $('.contenido').html('');
710
            		seleccionarCampo.css('display','none');
6643 nelberth 711
 
1 www 712
                    gridTable.api().ajax.reload(null, false);
713
                } else {
714
                    validatorVideoEdit.resetForm();
715
                    if(jQuery.type(response['data']) == 'string') {
716
                        $.fn.showError(response['data']);
717
                    } else  {
718
                        $.each(response['data'], function( fieldname, errors ) {
719
                            $.fn.showFormErrorValidator('#form-slide-video-edit #' + fieldname, errors);
720
                        });
721
                    }
722
                }
723
            }).fail(function( jqXHR, textStatus, errorThrown) {
724
                $.fn.showError(textStatus);
725
            }).always(function() {
7060 nelberth 726
				$('.info_noticia').prop('disabled', false);
1 www 727
                NProgress.done();
728
            });
729
            return false;
730
        },
731
        invalidHandler: function(form, validator) {
732
 
733
        }
734
    });
735
 
736
 
737
    var validatorDocumentAdd  = $('#form-slide-document-add').validate({
738
        debug: true,
739
        onclick: false,
740
        onkeyup: false,
741
        ignore: [],
742
        rules: {
743
            'name': {
744
                required: true,
745
                maxlength: 128,
746
            },
747
           'file': {
748
                required: true,
749
                extension: 'pdf',
750
                accept: 'application/pdf'
751
            },
752
           'background': {
753
                required: true,
754
            },
755
            'order' : {
756
                required: true,
757
                digits: true,
758
                min: 1,
759
                max: 250
760
            }
761
        },
762
        submitHandler: function(form)
763
        {
764
            var formdata = false;
765
            if (window.FormData){
766
                formdata = new FormData(form); //form[0]);
767
            }
768
 
7060 nelberth 769
 
770
			$('.info_noticia').prop('disabled', true);
6650 nelberth 771
            NProgress.start();
1 www 772
            $.ajax({
773
                'dataType'  : 'json',
774
                'accept'    : 'application/json',
775
                'method'    : 'post',
776
                'url'       :  routeAdd,
777
                'data'      :  formdata,
778
                'processData': false,
779
                'contentType': false,
780
            }).done(function(response) {
781
                if(response['success']) {
782
                    $.fn.showSuccess(response['data']);
783
 
6649 nelberth 784
                    $('body, html').animate({scrollTop: '0px'}, 300);
785
					$('#content1').css('display','block');
786
                    $('.contenido').html('');
787
            		seleccionarCampo.css('display','none');
1 www 788
 
789
                    gridTable.api().ajax.reload(null, false);
790
                } else {
791
                    validatorDocumentAdd.resetForm();
792
                    if(jQuery.type(response['data']) == 'string') {
793
                        $.fn.showError(response['data']);
794
                    } else  {
795
                        $.each(response['data'], function( fieldname, errors ) {
796
                            $.fn.showFormErrorValidator('#form-slide-document-add #' + fieldname, errors);
797
                        });
798
                    }
799
                }
800
            }).fail(function( jqXHR, textStatus, errorThrown) {
801
                $.fn.showError(textStatus);
802
            }).always(function() {
7060 nelberth 803
				$('.info_noticia').prop('disabled', false);
1 www 804
                NProgress.done();
805
            });
806
            return false;
807
        },
808
        invalidHandler: function(form, validator) {
809
 
810
        }
811
    });
812
 
813
    var validatorDocumentEdit = $('#form-slide-document-edit').validate({
814
        debug: true,
815
        onclick: false,
816
        onkeyup: false,
817
        ignore: [],
818
        rules: {
819
            'name': {
820
                required: true,
821
                maxlength: 128,
822
            },
823
           'file': {
6667 nelberth 824
                required: false,
1 www 825
                extension: 'pdf',
826
                accept: 'application/pdf'
827
            },
828
           'background': {
829
                required: true,
830
            },
831
            'order' : {
832
                required: true,
833
                digits: true,
834
                min: 1,
835
                max: 250
836
            }
837
        },
838
        submitHandler: function(form)
839
        {
840
            var formdata = false;
841
            if (window.FormData){
842
                formdata = new FormData(form); //form[0]);
843
            }
844
 
7060 nelberth 845
 
846
			$('.info_noticia').prop('disabled', true);
6650 nelberth 847
            NProgress.start();
1 www 848
            $.ajax({
849
                'dataType'  : 'json',
850
                'accept'    : 'application/json',
851
                'method'    : 'post',
852
                'url'       :  $('#form-slide-document-edit').attr('action'),
853
                'data'      :  formdata,
854
                'processData': false,
855
                'contentType': false,
856
            }).done(function(response) {
857
                if(response['success']) {
858
                    $.fn.showSuccess(response['data']);
859
 
6649 nelberth 860
                    $('body, html').animate({scrollTop: '0px'}, 300);
861
					$('#content1').css('display','block');
862
                    $('.contenido').html('');
863
            		seleccionarCampo.css('display','none');
1 www 864
 
865
                    gridTable.api().ajax.reload(null, false);
866
                } else {
867
                    validatorDocumentEdit.resetForm();
868
                    if(jQuery.type(response['data']) == 'string') {
869
                        $.fn.showError(response['data']);
870
                    } else  {
871
                        $.each(response['data'], function( fieldname, errors ) {
872
                            $.fn.showFormErrorValidator('#form-slide-document-edit #' + fieldname, errors);
873
                        });
874
                    }
875
                }
876
            }).fail(function( jqXHR, textStatus, errorThrown) {
877
                $.fn.showError(textStatus);
878
            }).always(function() {
7060 nelberth 879
				$('.info_noticia').prop('disabled', false);
1 www 880
                NProgress.done();
881
            });
882
            return false;
883
        },
884
        invalidHandler: function(form, validator) {
885
 
886
        }
887
    });
888
 
889
    var validatorAudioAdd  = $('#form-slide-audio-add').validate({
890
        debug: true,
891
        onclick: false,
892
        onkeyup: false,
893
        ignore: [],
894
        rules: {
895
            'name': {
896
                required: true,
897
                maxlength: 128,
898
            },
899
           'file': {
900
                required: true,
901
                extension: 'wav|mp3',
902
                accept: 'audio/wav, audio/mpeg'
903
            },
904
 
905
           'background': {
6649 nelberth 906
                required: true
1 www 907
            },
908
            'order' : {
909
                required: true,
910
                digits: true,
911
                min: 1,
912
                max: 250
913
            }
914
        },
915
        submitHandler: function(form)
916
        {
917
            var formdata = false;
918
            if (window.FormData){
919
                formdata = new FormData(form); //form[0]);
920
            }
921
 
7060 nelberth 922
 
923
			$('.info_noticia').prop('disabled', true);
6650 nelberth 924
            NProgress.start();
1 www 925
            $.ajax({
926
                'dataType'  : 'json',
927
                'accept'    : 'application/json',
928
                'method'    : 'post',
929
                'url'       :  routeAdd,
930
                'data'      :  formdata,
931
                'processData': false,
932
                'contentType': false,
933
            }).done(function(response) {
934
                if(response['success']) {
935
                    $.fn.showSuccess(response['data']);
936
 
6649 nelberth 937
                    $('body, html').animate({scrollTop: '0px'}, 300);
938
					$('#content1').css('display','block');
939
                    $('.contenido').html('');
940
            		seleccionarCampo.css('display','none');
1 www 941
 
942
                    gridTable.api().ajax.reload(null, false);
943
                } else {
944
                    validatorAudioAdd.resetForm();
945
                    if(jQuery.type(response['data']) == 'string') {
946
                        $.fn.showError(response['data']);
947
                    } else  {
948
                        $.each(response['data'], function( fieldname, errors ) {
949
                            $.fn.showFormErrorValidator('#form-slide-audio-add #' + fieldname, errors);
950
                        });
951
                    }
952
                }
953
            }).fail(function( jqXHR, textStatus, errorThrown) {
954
                $.fn.showError(textStatus);
955
            }).always(function() {
956
                NProgress.done();
7060 nelberth 957
 
958
				$('.info_noticia').prop('disabled', false);
1 www 959
            });
960
            return false;
961
        },
962
        invalidHandler: function(form, validator) {
963
 
964
        }
965
    });
966
 
967
    var validatorAudioEdit = $('#form-slide-audio-edit').validate({
968
        debug: true,
969
        onclick: false,
970
        onkeyup: false,
971
        ignore: [],
972
        rules: {
973
            'name': {
974
                required: true,
975
                maxlength: 128,
976
            },
977
           'file': {
6667 nelberth 978
                required: false,
1 www 979
                extension: 'wav|mp3',
980
                accept: 'audio/wav, audio/mpeg'
981
            },
982
 
983
           'background': {
984
                required: true,
985
            },
986
            'order' : {
987
                required: true,
988
                digits: true,
989
                min: 1,
990
                max: 250
991
            }
992
        },
993
        submitHandler: function(form)
994
        {
995
            var formdata = false;
996
            if (window.FormData){
997
                formdata = new FormData(form); //form[0]);
998
            }
999
 
7060 nelberth 1000
 
1001
				$('.info_noticia').prop('disabled', true);
6650 nelberth 1002
            NProgress.start();
1 www 1003
            $.ajax({
1004
                'dataType'  : 'json',
1005
                'accept'    : 'application/json',
1006
                'method'    : 'post',
1007
                'url'       :  $('#form-slide-audio-edit').attr('action'),
1008
                'data'      :  formdata,
1009
                'processData': false,
1010
                'contentType': false,
1011
            }).done(function(response) {
1012
                if(response['success']) {
1013
                    $.fn.showSuccess(response['data']);
1014
 
6649 nelberth 1015
                    $('body, html').animate({scrollTop: '0px'}, 300);
1016
					$('#content1').css('display','block');
1017
                    $('.contenido').html('');
1018
            		seleccionarCampo.css('display','none');
1 www 1019
 
1020
                    gridTable.api().ajax.reload(null, false);
1021
                } else {
1022
                    validatorAudioEdit.resetForm();
1023
                    if(jQuery.type(response['data']) == 'string') {
1024
                        $.fn.showError(response['data']);
1025
                    } else  {
1026
                        $.each(response['data'], function( fieldname, errors ) {
1027
                            $.fn.showFormErrorValidator('#form-slide-audio-edit #' + fieldname, errors);
1028
                        });
1029
                    }
1030
                }
1031
            }).fail(function( jqXHR, textStatus, errorThrown) {
1032
                $.fn.showError(textStatus);
1033
            }).always(function() {
7060 nelberth 1034
				$('.info_noticia').prop('disabled', false);
1 www 1035
                NProgress.done();
1036
            });
1037
            return false;
1038
        },
1039
        invalidHandler: function(form, validator) {
1040
 
1041
        }
1042
    });
1043
 
1044
    var validatorQuizzAdd  = $('#form-slide-quizz-add').validate({
1045
        debug: true,
1046
        onclick: false,
1047
        onkeyup: false,
1048
        ignore: [],
1049
        rules: {
1050
            'name': {
1051
                required: true,
1052
                maxlength: 128,
1053
            },
1054
           'file': {
1055
                required: true,
1056
                extension: 'wav|mp3',
1057
                accept: 'quizz/wav, quizz/mpeg'
1058
            },
6667 nelberth 1059
            'background': {
1060
                required: true,
1061
            },
1 www 1062
            'quiz_id': {
1063
                required: true,
1064
            },
1065
            'order' : {
1066
                required: true,
1067
                digits: true,
1068
                min: 1,
1069
                max: 250
1070
            }
1071
        },
1072
        submitHandler: function(form)
1073
        {
1074
 
7060 nelberth 1075
 
1076
				$('.info_noticia').prop('disabled', true);
6650 nelberth 1077
            NProgress.start();
1 www 1078
            var formdata = false;
1079
            if (window.FormData){
1080
                formdata = new FormData(form); //form[0]);
1081
            }
1082
 
1083
            $.ajax({
1084
                'dataType'  : 'json',
1085
                'accept'    : 'application/json',
1086
                'method'    : 'post',
1087
                'url'       :  routeAdd,
1088
                'data'      :  formdata,
1089
                'processData': false,
1090
                'contentType': false,
1091
            }).done(function(response) {
1092
                if(response['success']) {
1093
                    $.fn.showSuccess(response['data']);
1094
 
6649 nelberth 1095
                    $('body, html').animate({scrollTop: '0px'}, 300);
1096
					$('#content1').css('display','block');
1097
                    $('.contenido').html('');
1098
            		seleccionarCampo.css('display','none');
1 www 1099
 
1100
                    gridTable.api().ajax.reload(null, false);
1101
                } else {
1102
                    validatorQuizzAdd.resetForm();
1103
                    if(jQuery.type(response['data']) == 'string') {
1104
                        $.fn.showError(response['data']);
1105
                    } else  {
1106
                        $.each(response['data'], function( fieldname, errors ) {
1107
                            $.fn.showFormErrorValidator('#form-slide-quizz-add #' + fieldname, errors);
1108
                        });
1109
                    }
1110
                }
1111
            }).fail(function( jqXHR, textStatus, errorThrown) {
1112
                $.fn.showError(textStatus);
1113
            }).always(function() {
1114
                NProgress.done();
7060 nelberth 1115
 
1116
				$('.info_noticia').prop('disabled', true);
1 www 1117
            });
1118
            return false;
1119
        },
1120
        invalidHandler: function(form, validator) {
1121
 
1122
        }
1123
    });
1124
 
1125
    var validatorQuizzEdit = $('#form-slide-quizz-edit').validate({
1126
        debug: true,
1127
        onclick: false,
1128
        onkeyup: false,
1129
        ignore: [],
1130
        rules: {
1131
            'name': {
1132
                required: true,
1133
                maxlength: 128,
1134
            },
1135
           'background': {
6649 nelberth 1136
                required: true,
1 www 1137
            },
1138
            'quiz_id': {
1139
                required: true,
1140
            },
1141
            'order' : {
1142
                required: true,
1143
                digits: true,
1144
                min: 1,
1145
                max: 250
1146
            }
1147
        },
1148
        submitHandler: function(form)
1149
        {
1150
 
7060 nelberth 1151
            $('.info_noticia').prop('disabled', true);
6650 nelberth 1152
            NProgress.start();
1 www 1153
            var formdata = false;
1154
            if (window.FormData){
1155
                formdata = new FormData(form); //form[0]);
1156
            }
1157
            $.ajax({
1158
                'dataType'  : 'json',
1159
                'accept'    : 'application/json',
1160
                'method'    : 'post',
6673 nelberth 1161
                'url'       :  $('#form-slide-quizz-edit').attr('action'),
1 www 1162
                'data'      :  formdata,
1163
                'processData': false,
1164
                'contentType': false,
1165
            }).done(function(response) {
1166
                if(response['success']) {
1167
                    $.fn.showSuccess(response['data']);
1168
 
6649 nelberth 1169
                    $('body, html').animate({scrollTop: '0px'}, 300);
1170
					$('#content1').css('display','block');
1171
                    $('.contenido').html('');
1172
            		seleccionarCampo.css('display','none');
1 www 1173
 
1174
                    gridTable.api().ajax.reload(null, false);
1175
                } else {
1176
                    validatorQuizzEdit.resetForm();
1177
                    if(jQuery.type(response['data']) == 'string') {
1178
                        $.fn.showError(response['data']);
1179
                    } else  {
1180
                        $.each(response['data'], function( fieldname, errors ) {
1181
                            $.fn.showFormErrorValidator('#form-slide-quizz-edit #' + fieldname, errors);
1182
                        });
1183
                    }
1184
                }
1185
            }).fail(function( jqXHR, textStatus, errorThrown) {
1186
                $.fn.showError(textStatus);
1187
            }).always(function() {
1188
                NProgress.done();
7060 nelberth 1189
 
1190
				$('.info_noticia').prop('disabled', false);
1 www 1191
            });
1192
            return false;
1193
        },
1194
        invalidHandler: function(form, validator) {
1195
 
1196
        }
1197
    });
6591 nelberth 1198
 
1 www 1199
    $('body').on('click', 'button.btn-edit', function(e) {
1200
        e.preventDefault();
6651 nelberth 1201
        NProgress.start();
1 www 1202
        var url = $(this).data('href');
1203
        $.ajax({
1204
            'dataType'  : 'json',
1205
            'accept'    : 'application/json',
1206
            'method'    : 'get',
1207
            'url'       :  url,
1208
        }).done(function(response) {
1209
            if(response['success']) {
1210
 
1211
                if(response['data']['type'] == 'text') {
1212
                    $('#form-slide-text-edit').attr('action',url);
1213
                    $('#form-slide-text-edit #name').val(response['data']['name']);
1214
                    $('#form-slide-text-edit #order').val(response['data']['order']);
1215
 
1216
                    CKEDITOR.instances.description_edit.setData(response['data']['description']);
1217
                    validatorTextEdit.resetForm();
1218
 
1219
 
6595 nelberth 1220
                    $('body, html').animate({scrollTop: '0px'}, 300);
1221
					$('#content1').css('display','none');
6601 nelberth 1222
                    seleccionarCampo= $('#company-microlearning-slide-text-edit-box');
1223
                    seleccionarCampo.css('display','block')
6595 nelberth 1224
		            iniciarEditor(seleccionarCampo,response['data']['background'])
1225
 
1 www 1226
                }
1227
                if(response['data']['type'] == 'image') {
6510 nelberth 1228
                    console.log(response['data']['file'])
1 www 1229
                    $('#form-slide-image-edit').attr('action',url);
1230
                    $('#form-slide-image-edit #name').val(response['data']['name']);
1231
                    $('#form-slide-image-edit #order').val(response['data']['order']);
1232
                    validatorImageEdit.resetForm();
1233
 
6501 nelberth 1234
                    $('body, html').animate({scrollTop: '0px'}, 300);
1235
					$('#content1').css('display','none');
6586 nelberth 1236
                    seleccionarCampo=  $('#company-microlearning-slide-image-edit-box ');
6601 nelberth 1237
                    seleccionarCampo.css('display','block')
6568 nelberth 1238
		            iniciarEditor(seleccionarCampo,response['data']['file'])
1 www 1239
 
1240
                }
1241
                if(response['data']['type'] == 'video') {
1242
                    $('#form-slide-video-edit').attr('action',url);
1243
                    $('#form-slide-video-edit #name').val(response['data']['name']);
1244
                    $('#form-slide-video-edit #order').val(response['data']['order']);
1245
                    $('#form-slide-video-edit #file').fileinput('reset');
1246
                    $('#form-slide-video-edit #file').val('');
1247
                    validatorVideoEdit.resetForm();
1248
 
6613 nelberth 1249
 
1250
 
1251
                    $('body, html').animate({scrollTop: '0px'}, 300);
1252
					$('#content1').css('display','none');
1253
                    seleccionarCampo= $('#company-microlearning-slide-video-edit-box');
1254
                    seleccionarCampo.css('display','block')
1255
		            iniciarEditor(seleccionarCampo,response['data']['background'])
1 www 1256
 
1257
                }
1258
                if(response['data']['type'] == 'document') {
1259
                    $('#form-slide-document-edit').attr('action',url);
1260
                    $('#form-slide-document-edit #name').val(response['data']['name']);
1261
                    $('#form-slide-document-edit #order').val(response['data']['order']);
1262
                    $('#form-slide-document-edit #file').fileinput('reset');
1263
                    $('#form-slide-document-edit #file').val('');
1264
                    validatorDocumentEdit.resetForm();
1265
 
6613 nelberth 1266
                    $('body, html').animate({scrollTop: '0px'}, 300);
1267
					$('#content1').css('display','none');
1268
                    seleccionarCampo= $('#company-microlearning-slide-document-edit-box');
1269
                    seleccionarCampo.css('display','block')
1270
		            iniciarEditor(seleccionarCampo,response['data']['background'])
1 www 1271
 
1272
                }
1273
                if(response['data']['type'] == 'audio') {
1274
                    $('#form-slide-audio-edit').attr('action',url);
1275
                    $('#form-slide-audio-edit #name').val(response['data']['name']);
1276
                    $('#form-slide-audio-edit #order').val(response['data']['order']);
1277
                    $('#form-slide-audio-edit #file').fileinput('reset');
1278
                    $('#form-slide-audio-edit #file').val('');
1279
                    validatorAudioEdit.resetForm();
1280
 
6613 nelberth 1281
                    $('body, html').animate({scrollTop: '0px'}, 300);
1282
					$('#content1').css('display','none');
1283
                    seleccionarCampo= $('#company-microlearning-slide-audio-edit-box');
1284
                    seleccionarCampo.css('display','block')
1285
		            iniciarEditor(seleccionarCampo,response['data']['background'])
1 www 1286
 
6613 nelberth 1287
 
1 www 1288
                }
1289
                if(response['data']['type'] == 'quiz') {
1290
                    $('#form-slide-quizz-edit').attr('action',url);
1291
                    $('#form-slide-quizz-edit #name').val(response['data']['name']);
1292
                    $('#form-slide-quizz-edit #order').val(response['data']['order']);
1293
                    $('#form-slide-quizz-edit #quiz_id').val(response['data']['quiz_id']);
1294
                    validatorQuizzEdit.resetForm();
1295
 
6613 nelberth 1296
                    $('body, html').animate({scrollTop: '0px'}, 300);
1297
					$('#content1').css('display','none');
1298
                    seleccionarCampo= $('#company-microlearning-slide-quizz-edit-box');
1299
                    seleccionarCampo.css('display','block')
1300
		            iniciarEditor(seleccionarCampo,response['data']['background'])
1 www 1301
 
1302
                }
1303
 
1304
            } else {
1305
                validatorTextEdit.resetForm();
1306
                if(jQuery.type(response['data']) == 'string') {
1307
                    $.fn.showError(response['data']);
1308
                } else  {
1309
                    $.each(response['data'], function( fieldname, errors ) {
1310
                        $.fn.showFormErrorValidator('#form-slide-image-edit #' + fieldname, errors);
1311
                    });
1312
                }
1313
            }
1314
        }).fail(function( jqXHR, textStatus, errorThrown) {
1315
            $.fn.showError(textStatus);
1316
        }).always(function() {
1317
            NProgress.done();
1318
        });
1319
    });
6503 nelberth 1320
	$('body').on('click', '#ir_atras', function(e) {
1321
            e.preventDefault();
1322
            $('body, html').animate({scrollTop: '0px'}, 300);
6504 nelberth 1323
			$('#content1').css('display','block');
6592 nelberth 1324
            seleccionarCampo.css('display','none');
6575 nelberth 1325
            $('.contenido').html('');
6503 nelberth 1326
            return false;
1327
        });
1 www 1328
    $(".btn-cover-close").on("click", function(e){
1329
        e.preventDefault();
1330
 
1331
 
1332
        $('#company-microlearning-slide-text-add-box').modal('hide');
1333
        $('#company-microlearning-slide-text-edit-box').modal('hide');
1334
        $('#company-microlearning-slide-image-add-box').modal('hide');
1335
        $('#company-microlearning-slide-image-edit-box').modal('hide');
1336
        $('#company-microlearning-slide-video-add-box').modal('hide');
1337
        $('#company-microlearning-slide-video-edit-box').modal('hide');
1338
        $('#company-microlearning-slide-document-add-box').modal('hide');
1339
        $('#company-microlearning-slide-document-edit-box').modal('hide');
1340
        $('#company-microlearning-slide-audio-add-box').modal('hide');
1341
        $('#company-microlearning-slide-audio-edit-box').modal('hide');
1342
        $('#company-microlearning-slide-quizz-add-box').modal('hide');
1343
        $('#company-microlearning-slide-quizz-edit-box').modal('hide');
1344
        $('#company-microlearning-play-video-box').modal('hide');
1345
        $('#company-microlearning-play-audio-box').modal('hide');
1346
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1347
 
1348
 
1349
 
1350
         document.getElementById('microlearning-play-video').pause();
1351
         document.getElementById('microlearning-play-audio').pause();
1352
 
1353
        return false;
1354
    });
1355
 
1356
    $('body').on('click', 'button.btn-add-quizz', function(e) {
1357
        e.preventDefault();
1358
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1359
 
1360
 
1361
        $('#form-slide-quizz-add #name').val('');
1362
        $('#form-slide-quizz-add #order').val('1');
1363
        $('#form-slide-quizz-add #quiz_id').val('');
1364
        CKEDITOR.instances.description_add.setData('');
1365
        validatorQuizzAdd.resetForm();
1366
 
1367
 
6616 nelberth 1368
        $('body, html').animate({scrollTop: '0px'}, 300);
1369
		$('#content1').css('display','none');
1370
        seleccionarCampo= $('#company-microlearning-slide-quizz-add-box');
1371
        seleccionarCampo.css('display','block')
1372
		iniciarEditor(seleccionarCampo)
1 www 1373
 
1374
        return false;
1375
    });
1376
 
1377
    $('body').on('click', 'button.btn-add-text', function(e) {
1378
        e.preventDefault();
1379
 
1380
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1381
 
1382
        $('#form-slide-text-add #name').val('');
1383
        $('#form-slide-text-add #order').val('1');
1384
        CKEDITOR.instances.description_add.setData('');
1385
        validatorTextAdd.resetForm();
1386
 
6616 nelberth 1387
        $('body, html').animate({scrollTop: '0px'}, 300);
1388
		$('#content1').css('display','none');
6590 nelberth 1389
        seleccionarCampo =  $('#company-microlearning-slide-text-add-box');
6616 nelberth 1390
        seleccionarCampo.css('display','block')
6556 nelberth 1391
		iniciarEditor(seleccionarCampo)
1 www 1392
        return false;
1393
    });
1394
 
1395
 
1396
    $('body').on('click', 'button.btn-add-image', function(e) {
1397
        e.preventDefault();
1398
 
1399
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1400
        $('#form-slide-image-add #name').val('');
1401
        $('#form-slide-image-add #order').val('1');
6112 nelberth 1402
 
1 www 1403
        validatorImageAdd.resetForm();
1404
 
6616 nelberth 1405
        $('body, html').animate({scrollTop: '0px'}, 300);
1406
		$('#content1').css('display','none');
1407
        seleccionarCampo =  $('#company-microlearning-slide-image-add-box');
1408
        seleccionarCampo.css('display','block')
6565 nelberth 1409
		iniciarEditor(seleccionarCampo)
6122 nelberth 1410
 
1 www 1411
        return false;
1412
    });
1413
 
1414
    $('body').on('click', 'button.btn-add-video', function(e) {
1415
        e.preventDefault();
1416
 
1417
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1418
        $('#form-slide-video-add #name').val('');
1419
        $('#form-slide-video-add #order').val('1');
1420
        $('#form-slide-video-add #file').fileinput('reset');
1421
        $('#form-slide-video-add #file').val('');
1422
        $('#form-slide-video-add #file').fileinput('reset');
1423
        $('#form-slide-video-add #file').val('');
1424
        validatorVideoAdd.resetForm();
1425
 
6616 nelberth 1426
 
1427
        $('body, html').animate({scrollTop: '0px'}, 300);
1428
		$('#content1').css('display','none');
1429
        seleccionarCampo =  $('#company-microlearning-slide-video-add-box');
1430
        seleccionarCampo.css('display','block')
1431
		iniciarEditor(seleccionarCampo)
1 www 1432
 
1433
        return false;
1434
    });
1435
 
1436
    $('body').on('click', 'button.btn-add-document', function(e) {
1437
        e.preventDefault();
1438
 
1439
 
1440
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1441
        $('#form-slide-document-add #name').val('');
1442
        $('#form-slide-document-add #order').val('1');
1443
        $('#form-slide-document-add #file').fileinput('reset');
1444
        $('#form-slide-document-add #file').val('');
1445
        validatorDocumentAdd.resetForm();
1446
 
6616 nelberth 1447
        $('body, html').animate({scrollTop: '0px'}, 300);
1448
		$('#content1').css('display','none');
1449
        seleccionarCampo =  $('#company-microlearning-slide-document-add-box');
1450
        seleccionarCampo.css('display','block')
1451
		iniciarEditor(seleccionarCampo)
1 www 1452
 
1453
        return false;
1454
    });
1455
 
1456
    $('body').on('click', 'button.btn-add-audio', function(e) {
1457
        e.preventDefault();
1458
 
1459
        $('#company-microlearning-add-capsule-type-box').modal('hide');
1460
        $('#form-slide-audio-add #name').val('');
1461
        $('#form-slide-audio-add #order').val('1');
1462
        $('#form-slide-audio-add #file').fileinput('reset');
1463
        $('#form-slide-audio-add #file').val('');
1464
        validatorAudioAdd.resetForm();
1465
 
6616 nelberth 1466
        $('body, html').animate({scrollTop: '0px'}, 300);
1467
		$('#content1').css('display','none');
1468
        seleccionarCampo =  $('#company-microlearning-slide-audio-add-box');
1469
        seleccionarCampo.css('display','block')
1470
		iniciarEditor(seleccionarCampo)
1 www 1471
 
1472
        return false;
1473
    });
1474
 
1475
    $('#company-microlearning-slide-text-add-box, #company-microlearning-slide-text-edit-box').on("hide.bs.modal", function() {
1476
 
1477
    })
1478
 
1479
    $('#company-microlearning-slide-image-add-box, #company-microlearning-slide-image-edit-box').on("hide.bs.modal", function() {
1480
 
1481
    })
1482
 
1483
    $('#company-microlearning-slide-video-add-box, #company-microlearning-slide-video-edit-box').on("hide.bs.modal", function() {
1484
 
1485
    })
1486
 
1487
    $('#company-microlearning-slide-document-add-box, #company-microlearning-slide-document-edit-box').on("hide.bs.modal", function() {
1488
 
1489
    })
1490
 
1491
    $('#company-microlearning-slide-quizz-add-box, #company-microlearning-slide-quizz-edit-box').on("hide.bs.modal", function() {
1492
 
1493
    })
1494
 
1495
    $('#company-microlearning-play-video-box, #company-microlearning-play-audio-box').on("hide.bs.modal", function() {
1496
 
1497
 
1498
        document.getElementById('microlearning-play-video').pause();
1499
        document.getElementById('microlearning-play-audio').pause();
1500
    })
1501
 
1502
 
1503
    $('#form-slide-text-add #order').inputNumberFormat({decimal: 0});
1504
 
6591 nelberth 1505
 
1 www 1506
 
1507
    $('#form-slide-text-edit #order').inputNumberFormat({decimal: 0});
1508
 
1509
 
6591 nelberth 1510
 
1 www 1511
    $('#form-slide-image-add #order').inputNumberFormat({decimal: 0});
1512
 
6522 nelberth 1513
 
1 www 1514
 
1515
    $('#form-slide-image-edit #order').inputNumberFormat({decimal: 0});
1516
 
6522 nelberth 1517
 
1 www 1518
 
1519
    $('#form-slide-video-add #order').inputNumberFormat({decimal: 0});
1520
 
1521
    $('#form-slide-video-add #file').fileinput({
1522
        theme: 'fas',
1523
        language: 'es',
1524
        showUpload: false,
1525
        dropZoneEnabled: false,
1526
        maxFileCount: 1,
1527
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1528
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1529
    });
1530
 
1531
 
6591 nelberth 1532
 
1 www 1533
    $('#form-slide-video-edit #order').inputNumberFormat({decimal: 0});
1534
 
1535
    $('#form-slide-video-edit #file').fileinput({
1536
        theme: 'fas',
1537
        language: 'es',
1538
        showUpload: false,
1539
        dropZoneEnabled: false,
1540
        maxFileCount: 1,
1541
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1542
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1543
    });
1544
 
1545
 
6591 nelberth 1546
 
1 www 1547
 
1548
 
1549
    $('#form-slide-document-add #order').inputNumberFormat({decimal: 0});
1550
 
1551
    $('#form-slide-document-add #file').fileinput({
1552
        theme: 'fas',
1553
        language: 'es',
1554
        showUpload: false,
1555
        dropZoneEnabled: false,
1556
        maxFileCount: 1,
1557
        allowedFileExtensions: ['pdf'],
1558
        msgPlaceholder: 'Documentos de extensión pdf',
1559
    });
1560
 
1561
 
1562
 
6591 nelberth 1563
 
1 www 1564
    $('#form-slide-document-edit #order').inputNumberFormat({decimal: 0});
1565
 
1566
    $('#form-slide-document-edit #file').fileinput({
1567
        theme: 'fas',
1568
        language: 'es',
1569
        showUpload: false,
1570
        dropZoneEnabled: false,
1571
        maxFileCount: 1,
1572
        allowedFileExtensions: ['pdf'],
1573
        msgPlaceholder: 'Documentos de extensión pdf',
1574
    });
1575
 
1576
 
1577
 
6591 nelberth 1578
 
1 www 1579
    $('#form-slide-audio-add #order').inputNumberFormat({decimal: 0});
1580
 
1581
    $('#form-slide-audio-add #file').fileinput({
1582
        theme: 'fas',
1583
        language: 'es',
1584
        showUpload: false,
1585
        dropZoneEnabled: false,
1586
        maxFileCount: 1,
1587
        allowedFileExtensions: ['wav', 'mp3'],
1588
        msgPlaceholder: 'Audios de extensión wav y mp3',
1589
    });
1590
 
1591
 
1592
 
6591 nelberth 1593
 
1 www 1594
    $('#form-slide-audio-edit #order').inputNumberFormat({decimal: 0});
1595
 
1596
    $('#form-slide-audio-edit #file').fileinput({
1597
        theme: 'fas',
1598
        language: 'es',
1599
        showUpload: false,
1600
        dropZoneEnabled: false,
1601
        maxFileCount: 1,
1602
        allowedFileExtensions: ['wav', 'mp3'],
1603
        msgPlaceholder: 'Audios de extensión wav y mp3',
1604
    });
1605
 
1606
 
1607
 
6591 nelberth 1608
 
1 www 1609
    $('#form-slide-quizz-add #order').inputNumberFormat({decimal: 0});
1610
 
1611
 
1612
 
6591 nelberth 1613
 
1 www 1614
    $('#form-slide-quizz-edit #order').inputNumberFormat({decimal: 0});
1615
 
6591 nelberth 1616
 
1 www 1617
 
1618
 
1619
 
1620
 
1621
 
1622
 
1623
 
1624
    CKEDITOR.replace('description_add');
1625
    CKEDITOR.replace('description_edit');
1626
 
1627
 
1628
   $('body').on('click', '.btn-view-image', function(e) {
1629
        e.preventDefault();
1630
 
1631
        $('#company-microlearning-view-image-box').modal('show');
1632
 
1633
        $('#image-view').attr('src', $(this).data('href'));
1634
 
1635
        return false;
1636
    });
1637
 
1638
 
1639
    $('body').on('click', '.btn-play-video', function(e) {
1640
        e.preventDefault();
1641
 
1642
        $('#microlearning-play-video').attr('src', $(this).data('href'));
1643
        $('#company-microlearning-play-video-box').modal('show');
1644
 
1645
        return false;
1646
    });
1647
 
1648
    $('body').on('click', '.btn-play-audio', function(e) {
1649
        e.preventDefault();
1650
 
1651
 
1652
        $('#microlearning-play-audio').attr('src', $(this).data('href'));
1653
        $('#company-microlearning-play-audio-box').modal('show');
1654
 
1655
        return false;
1656
    });
1657
 
1658
    $('body').on('click', '.btn-view-document', function(e) {
1659
        e.preventDefault();
1660
 
1661
 
1662
        $('#document-view').attr('src', $(this).data('href'));
1663
        $('#company-microlearning-view-document-box').modal('show');
1664
 
1665
        return false;
1666
    });
1667
 
1668
    $('body').on('click', '.btn-view-text', function(e) {
1669
        e.preventDefault();
1670
 
1671
        var url = $(this).data('href');
1672
        $.ajax({
1673
            'dataType'  : 'json',
1674
            'accept'    : 'application/json',
1675
            'method'    : 'get',
1676
            'url'       :  url,
1677
        }).done(function(response) {
1678
            if(response['success']) {
1679
                $('#document-text').html( response['data']  );
1680
            }
1681
 
1682
        }).fail(function( jqXHR, textStatus, errorThrown) {
1683
            $.fn.showError(textStatus);
1684
        }).always(function() {
1685
            NProgress.done();
1686
        });
1687
 
1688
 
1689
        $('#company-microlearning-view-text-box').modal('show');
1690
 
1691
        return false;
1692
    });
1693
 
1694
 
1695
 
1696
    $('#form-filter #topic_uuid').change(function(e) {
1697
        e.preventDefault();
1698
 
1699
        $('#form-filter #capsule_uuid').empty();
1700
        gridTable.api().ajax.reload(null, false);
1701
    })
1702
 
1703
 
1704
    $('#form-filter #capsule_uuid').change(function(e) {
1705
        e.preventDefault();
1706
 
1707
        gridTable.api().ajax.reload(null, false);
1708
    })
1709
 
1710
    $('button.btn-add').click(function(e) {
1711
        e.preventDefault()
1712
 
1713
        $('#company-microlearning-add-capsule-type-box').modal('show');
1714
 
1715
    } );
1716
 
1717
 
1718
 
1719
    $('body').on('click', 'button.btn-refresh', function(e) {
1720
        e.preventDefault();
1721
        gridTable.api().ajax.reload(null, false);
1722
    });
1723
 
6113 nelberth 1724
    	/*Script del editor (Aqui comienza el cielo y la tierra) */
1725
		var imagenServidorNoticia;
1726
		var scroll_altura,viente;
1727
		var nombre_user = $(".perfil_u_nombre").text();
1728
		var primer_nombre = nombre_user.split(" ")[0];
6675 nelberth 1729
		var nuevoHtmlImagen='<div class="articulo_noticia animated fadeIn"><div class="pasos"><div class="titulo_pasos animated fadeInDown delay-04 fast">LABEL_STEP_1</div><div class="paso_opcion"><div class="responsing_cut"><div class="icon_cut"><span class="fa fa-scissors"></span></div><div class="contenido_cut"><div class="animated fadeInRight delay-04 fast"><div><div class="titulo_cut"><div>LABEL_CUT</div><div class="fa fa-times" id="cerrar_cut_modal"></div></div><div class="opcion_editor recortar10"><div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div></div></div></div><div class="responsing_text"><div class="icon_text"><span class="fa fa-text-width"></span></div><div class="contenido_text"><div class="animated fadeInRight delay-04 fast"><div class="texto"><div class="titulo_text"><div>LABEL_ADD_TEXT</div><div class="fa fa-times" id="cerrar_text_modal"></div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"><div class="fonts"><div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"> <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48"></div><div class="fonts"><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"></div><div class="fonts_style"><div class="fs at" id="arial">LABEL_FONT_ARIAL</div><div class="fs" id="calibri">LABEL_FONT_CALIBRI</div><div class="fs" id="forte">LABEL_FONT_FORTE</div><div class="fs" id="impact">LABEL_FONT_IMPACT</div><div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div><div class="fs" id="mb">LABEL_FONT_MV_BOLI</div><div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div><div class="fs" id="verdana">LABEL_FONT_VERDANA</div><div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div></div></div></div></div></div><div class="responsing_filtros"><div class="icon_filter"><span class="fa fa-eyedropper"></span></div><div class="contenido_filter"><div class="titulo_filtro"><div>LABEL_FILTERS</div><div class="fa fa-times" id="cerrar_filter_modal"></div></div><div class="opciones_imagen"><div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div></div><div class="volver"><span class="icon-undo"></span>LABEL_START_OVER</div><div class="paso_1 paso animated bounceInDown delay-04 fast">1</div><div class="paso_2 a1 animated bounceInDown delay-06 fast">2</div><div class="paso_2 b1 animated bounceInDown delay-08 fast">3</div></div></div><div class="editor_imagenes"><div class="fondo_oscuro"></div><div class="editor_imagenes2"><div class="filtros animated fadeInLeft delay-04 fast"><div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div><div class="opciones_imagen"><div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div><div class="canvas_imagen"><div class="canvas recortar"><div class="canvas_subir" id="imagen_noticia"><span class="icon-plus fa fa-plus"></span>LABEL_DRAG_IMAGE_HERE</div></div></div><div class="modificar animated fadeInRight delay-04 fast"><div><div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors"></span>LABEL_CUT</div><div class="opcion_editor recortar10"><div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div><div class="texto"><div class="titulo_texto"><span class="icon-plus fa fa-text-width"></span>LABEL_ADD_TEXT</div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"><div class="fonts"><div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"> <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48"></div><div class="fonts"><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"></div><div class="fonts_style"><div class="fs at" id="arial">LABEL_FONT_ARIAL</div><div class="fs" id="calibri">LABEL_FONT_CALIBRI</div><div class="fs" id="forte">LABEL_FONT_FORTE</div><div class="fs" id="impact">LABEL_FONT_IMPACT</div><div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div><div class="fs" id="mb">LABEL_FONT_MV_BOLI</div><div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div><div class="fs" id="verdana">LABEL_FONT_VERDANA</div><div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div></div></div></div></div><div class="botones_dimenciones"><div class="scale"><div class="dimenciones"><div id="ancho">1240px</div><div>x</div><div id="alto">720px</div></div><div class="porciento"><div id="menos_scale"><span class="icon-minus fa fa-minus"></span></div><div class="ps"><ul class="cantidades_scale"><li data-scale="2" class="as">200%</li><li data-scale="1" class="as">100%</li><li data-scale="0.75" class="as">75%</li><li data-scale="0.5" class="as">50%</li><li data-scale="0.25" class="as">25%</li></ul><div id="porciento_scale">50%</div></div><div id="mas_scale"><span class="icon-plus fa fa-plus"></span></div></div></div><div class="botones"><button class="boton_normal" id="ir_atras">LABEL_GO_BACK</button><button class="boton_normal" id="boton_recortar">LABEL_DATATABLE_SNEXT</button></div></div></div></div><dav class="fixed_noticia"></dav><dav class="cuadro_noticias animated bounceInUp delay-04" id="cuadro_noticias"><dav class="relative"><div class="titulo_topico">LABEL_TITLE</div><canvas class="imagen_noticias" id="imagen_noticias" width="320" height="480"></canvas></dav><div class="progreso d-flex align-items-center justify-content-between"><progress value="0" max="100"></progress><span class="ml-2">0.0%</span></div></dav>'
6113 nelberth 1730
 
1731
		$(document).on("click", ".info_noticia", function(e){
1732
			imagenServidorNoticia = elemento.toDataURL("image/jpeg", 1.0);
1733
			console.log(imagenServidorNoticia.split(','))
6523 nelberth 1734
			$('.background').val(imagenServidorNoticia.split(',')[1]);
1735
            $('.imageType .file').val(imagenServidorNoticia.split(',')[1]);
6113 nelberth 1736
			console.log($('.file').val())
1737
			$(".c1").addClass("paso");
1738
 
1739
 
1740
		})
6582 nelberth 1741
 
6556 nelberth 1742
		function iniciarEditor(campo, image=''){
6113 nelberth 1743
		 cortar=false;
1744
		recorte_listo=false;
1745
		texto="";
1746
		seis=true;
1747
		color="#ffffff";
1748
		texto_listo=false,siete=false;
1749
		uno=true;
1750
		size=48;
6849 nelberth 1751
        blockCelda=true;
6113 nelberth 1752
		cinco=true;
1753
		xf=320,yf =480;
1754
		negritas=false, bold="";
1755
		shadow = true, nueve=true;
1756
		italic=false, ita="";
1757
		rectangulo=false, diez=false;
1758
     	fontfamily="Arial";
1759
     	r=0,g=0,b=0,a=1;
1760
		window.clearInterval(editorNoticia);
1761
		setTimeout(function(){
1762
			scroll_altura=$(".articulo_noticia").offset().top-110;
1763
			anchoFondoOscuro = $(".articulo_noticia").width();
1764
			altoFondoOscuro = $(".editor_imagenes").height();
1765
			$(".fondo_oscuro").css("width",""+anchoFondoOscuro+"px");
1766
			$(".fondo_oscuro").css("height",""+altoFondoOscuro+"px");
1767
 
6556 nelberth 1768
		},navegacion(nuevoHtmlImagen,campo,image));
6113 nelberth 1769
 
1770
		}
1771
 
1772
		$(document).on("click", ".volver", function(){
1773
		var nombre_user = $(".perfil_u_nombre").text();
1774
		var primer_nombre = nombre_user.split(" ")[0];
1775
		 cortar=false;
6849 nelberth 1776
         blockCelda=true;
6113 nelberth 1777
		cinco=true;
1778
		recorte_listo=false;
1779
		texto="";
1780
		seis=true;
1781
		color="#ffffff";
1782
		texto_listo=false,siete=false;
1783
		uno=true;
1784
		size=48;
1785
		xf=320,yf =480;
1786
		negritas=false, bold="";
1787
		shadow = true, nueve=true;
1788
		italic=false, ita="";
1789
		rectangulo=false, diez=false;
1790
     	fontfamily="Arial";
1791
     	r=0,g=0,b=0,a=1;
1792
		 var imagenServidorNoticia;
6585 nelberth 1793
         console.log(seleccionarCampo)
6113 nelberth 1794
		window.clearInterval(editorNoticia);
1795
		setTimeout(function(){
1796
			scroll_altura=$(".articulo_noticia").offset().top-110;
1797
			anchoFondoOscuro = $(".articulo_noticia").width();
1798
			altoFondoOscuro = $(".editor_imagenes").height();
1799
			$(".fondo_oscuro").css("width",""+anchoFondoOscuro+"px");
1800
			$(".fondo_oscuro").css("height",""+altoFondoOscuro+"px");
1801
 
6584 nelberth 1802
		},navegacion(nuevoHtmlImagen,seleccionarCampo));
6113 nelberth 1803
 
1804
		})
1805
 
6574 nelberth 1806
		function navegacion(nuevoHtmlImagen,campo,image='',reload=true){
6581 nelberth 1807
                selectorElementoName=campo.find('#name')
6577 nelberth 1808
 
1809
                selectorElementoEditor=campo.find('#contenido');
6113 nelberth 1810
 
6574 nelberth 1811
				if(image!=''){
6113 nelberth 1812
					const getBase64FromUrl = async (url) => {
1813
						const data = await fetch(url);
1814
						const blob = await data.blob();
1815
						return new Promise((resolve) => {
1816
							const reader = new FileReader();
1817
							reader.readAsDataURL(blob);
1818
							reader.onloadend = function() {
1819
							const base64data = reader.result;
1820
							resolve(base64data);
1821
							}
1822
						});
1823
					}
1824
 
1825
					getBase64FromUrl(image).then(function(e){
6581 nelberth 1826
						selectorElementoName.trigger('change');
6113 nelberth 1827
						$(".volver").css("display","block")
1828
						$(".a1").addClass("paso");
1829
						$(".titulo_pasos").html("LABEL_STEP_2");
1830
						setTimeout(function(){
1831
							recorte_listo=true;
1832
							$(".fondo_oscuro").css("display","none");
1833
							$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
1834
							$(".recortar10").removeClass("recortar");
1835
							$(".canvas").removeClass("recortar");
1836
							$(".b1").addClass("paso");
1837
							$(".titulo_pasos").html("LABEL_STEP_3");
1838
							if(texto!=""){
1839
								seis=true;
1840
								siete=true;
1841
							}
1842
							cinco=true;
1843
							dos=true;
1844
							cuatro=true;
1845
							actualizar();
1846
 
1847
						},editorNoticia(e));
1848
 
1849
 
1850
					})
1851
 
1852
					setTimeout(function(){
1853
						$(".canvas_subir").html('<span class="icon-plus fa fa-spinner"></span> Cargando...')
6581 nelberth 1854
						selectorElementoName.trigger('change');
6577 nelberth 1855
					},selectorElementoEditor.html(nuevoHtmlImagen));
6113 nelberth 1856
				}else{
1857
					setTimeout(function(){
6581 nelberth 1858
					    selectorElementoName.trigger('change');
6577 nelberth 1859
					},selectorElementoEditor.html(nuevoHtmlImagen));
6113 nelberth 1860
				}
6574 nelberth 1861
 
6113 nelberth 1862
		}
1863
 
1864
		$(window).on("scroll", function(){
1865
			console.log(scroll_altura)
1866
		if($(window).scrollTop()>scroll_altura){
1867
			$("#cuadro_noticias").addClass("fixed");
1868
		}else{
1869
			$("#cuadro_noticias").removeClass("fixed");
1870
		}
1871
	})
1872
 
1873
	$(document).on("dragover", "#imagen_noticia", function(e){
1874
		e.preventDefault();
1875
		e.stopPropagation();
1876
		$(this).css({"background":"rgba(0,0,0,.2)"})
1877
	})
1878
	$(document).on("drop", "#imagen_noticia", function(e){
1879
		e.preventDefault();
1880
		e.stopPropagation();
1881
		$(this).css("background", "none");
1882
		var archivo = e.originalEvent.dataTransfer.files;
1883
		var img=archivo[0];
1884
		if(img.type =="image/jpeg"||img.type =="image/png"){
1885
			$(".modificar").removeClass("animated");
1886
			var render = new FileReader();
1887
			render.readAsDataURL(img);
1888
			render.onload = function(e){
1889
				$(".volver").css("display","block")
1890
				$(".a1").addClass("paso");
1891
				$(".titulo_pasos").html("LABEL_STEP_2");
1892
				console.log(e.target.result)
1893
				editorNoticia(e.target.result)
1894
			}
1895
		}
1896
	})
1897
	$(document).on("dragover", "body", function(e){
1898
		e.preventDefault();
1899
		e.stopPropagation();
1900
	})
1901
	$(document).on("drop", "body", function(e){
1902
		e.preventDefault();
1903
		e.stopPropagation();
1904
	})
1905
 
1906
	var canvas='<div class="editorNoticia"><canvas id="editorNoticia">LABEL_NOT_SUPPORTED</canvas></div>';
1907
	$(document).on("mouseover", ".editorNoticia", function(){
1908
		$("body").css({"overflow": "hidden"});
1909
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "17px")
1910
		$(".barra,.footer").css("padding-right","17px")
1911
 
1912
 
1913
	})
1914
	$(document).on("mouseover", "#editorNoticia", function(){
1915
		if(recorte_listo){
1916
			ocho=true;
1917
		}
1918
	})
1919
	$(document).on("mouseout", "#editorNoticia", function(){
1920
		if(recorte_listo){
1921
			ocho=false;
1922
			actualizar2()
1923
		}
1924
	})
1925
	$(document).on("mouseout", ".editorNoticia",function(){
1926
		$("body").css({"overflow": "auto"})
1927
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "0px")
1928
		$(".barra,.footer").css("padding-right","0px")
1929
 
1930
	})
1931
	$(document).on('mousewheel', ".editorNoticia",function(e){
1932
		var ruedita = e.originalEvent.wheelDelta
1933
		if(ruedita>0){
1934
			scale = scale+(scale/10);
1935
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
1936
		}else{
1937
			scale = scale-(scale/10);
1938
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
1939
		}
1940
		$("#editorNoticia").css({"transform": "scale("+scale+")"});
1941
	})
1942
	$(document).on("click", ".as", function(e){
1943
		e.preventDefault();
1944
		 scale = $(this).data("scale");
1945
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
1946
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
1947
 
1948
	})
1949
	$(document).on("click", ".ps", function(e){
1950
		e.preventDefault();
1951
		$(".cantidades_scale").slideToggle(200).css("display", "block");
1952
	})
1953
	$(document).on("click", "#cerrar_filter_modal, .icon_filter", function(e){
1954
		e.preventDefault();
1955
		if(recorte_listo){
1956
		$(".contenido_filter").slideToggle(200).css("display", "block");
1957
		}
1958
	})
1959
	$(document).on("click", "#cerrar_text_modal, .icon_text", function(e){
1960
		e.preventDefault();
1961
		if(recorte_listo){
1962
			$(".contenido_text").slideToggle(200).css("display", "block");
1963
		}
1964
	})
1965
 
1966
	$(document).on("click", "#cerrar_cut_modal, .icon_cut", function(e){
1967
		e.preventDefault();
1968
		if(cortar){
1969
			$(".contenido_cut").slideToggle(200).css("display", "block");
1970
		}
1971
 
1972
	})
1973
	$(document).on("click", "#menos_scale", function(e){
1974
		e.preventDefault();
1975
		scale = scale-(scale/10);
1976
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
1977
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
1978
	})
1979
 
1980
	$(document).on("click", "#mas_scale", function(e){
1981
		e.preventDefault();
1982
		scale = scale+(scale/10);
1983
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
1984
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
1985
	})
1986
	$(document).on("click", "#noche", function(){
1987
		$(".oa").removeClass("oa")
1988
		filter( .5,1.3,1.31,1.33,1.38);
1989
		$(this).addClass("oa")
1990
	})
1991
	$(document).on("click", "#sa", function(){
1992
		$(".oa").removeClass("oa")
1993
		filter( .7,1.1,1.64,1.66,1.50);
1994
		$(this).addClass("oa")
1995
	})
1996
	$(document).on("click", "#crema", function(){
1997
		$(".oa").removeClass("oa")
1998
		filter( .75,1,1.66,1.60,1.51);
1999
		$(this).addClass("oa")
2000
	})
2001
	$(document).on("click", "#setenta", function(){
2002
		$(".oa").removeClass("oa")
2003
		filter( .8,.75,1.60,1.66,1.58);
2004
		$(this).addClass("oa")
2005
	})
2006
	$(document).on("click", "#orange", function(){
2007
		$(".oa").removeClass("oa")
2008
		filter( .8,1,1.6,1.45,1.49);
2009
		$(this).addClass("oa")
2010
	})
2011
	$(document).on("click", "#relieve", function(){
2012
		$(".oa").removeClass("oa")
2013
		filter( .7,1.2,1.60,1.66,1.58);
2014
		$(this).addClass("oa")
2015
	})
2016
	$(document).on("click", "#bosque", function(){
2017
		$(".oa").removeClass("oa")
2018
		filter( .85,.75,1.47,1.66,1.54);
2019
		$(this).addClass("oa")
2020
	})
2021
	$(document).on("click", "#desierto", function(){
2022
		$(".oa").removeClass("oa")
2023
		filter( .8,.9,1.66,1.43,1.28);
2024
		$(this).addClass("oa")
2025
	})
2026
	$(document).on("click", "#villa", function(){
2027
		$(".oa").removeClass("oa")
2028
		filter( .8,.8,1.71,1.64,1.58);
2029
		$(this).addClass("oa")
2030
	})
2031
	$(document).on("click", "#magia", function(){
2032
		$(".oa").removeClass("oa")
2033
		filter( .7,1.2,1.49,1.49,1.6);
2034
		$(this).addClass("oa")
2035
	})
2036
	$(document).on("click", "#luz", function(){
2037
		$(".oa").removeClass("oa")
2038
		filter( .9,.9,1.45,1.54,1.54);
2039
		$(this).addClass("oa")
2040
	})
2041
	$(document).on("click", "#retoque", function(){
2042
		$(".oa").removeClass("oa")
2043
		filter( .9,1.3,1,1,1);
2044
		$(this).addClass("oa")
2045
	})
2046
	$(document).on("click", "#saturacion", function(){
2047
		$(".oa").removeClass("oa")
2048
		filter( 1,1.5,1,1,1);
2049
		$(this).addClass("oa")
2050
	})
2051
	$(document).on("click", "#rosa", function(){
2052
		$(".oa").removeClass("oa")
2053
		filter( .8,1.2,1.24,.99,1);
2054
		$(this).addClass("oa")
2055
	})
2056
	$(document).on("click", "#historia", function(){
2057
		$(".oa").removeClass("oa")
2058
		filter( .9,1.1,1.33,1.19,.91);
2059
		$(this).addClass("oa")
2060
	})
2061
	$(document).on("click", "#encantador", function(){
2062
		$(".oa").removeClass("oa")
2063
		filter( .9,1.2,26,-12,0,2);
2064
		$(this).addClass("oa")
2065
	})
2066
	$(document).on("click", "#emocion", function(){
2067
		$(".oa").removeClass("oa")
2068
		filter( 1.1,1.4,40,12,-6,2);
2069
		$(this).addClass("oa")
2070
	})
2071
	$(document).on("click", "#beige", function(){
2072
		$(".oa").removeClass("oa")
2073
		filter( .9,1.32,56,47,17,2);
2074
		$(this).addClass("oa")
2075
	})
2076
	$(document).on("click", "#fine", function(){
2077
		$(".oa").removeClass("oa")
2078
		filter( .87,1.19,55,37,23,2);
2079
		$(this).addClass("oa")
2080
	})
2081
	$(document).on("click", "#lord", function(){
2082
		$(".oa").removeClass("oa")
2083
		filter( 1.2,.9,67,13,-23,2);
2084
		$(this).addClass("oa")
2085
	})
2086
	$(document).on("click", "#70", function(){
2087
		$(".oa").removeClass("oa")
2088
		filter( 1.2,1.2,35,7,18,2);
2089
		$(this).addClass("oa")
2090
	})
2091
	$(document).on("click", "#arbol", function(){
2092
		$(".oa").removeClass("oa")
2093
		filter(.92,1.23,-11,11,11,2);
2094
		$(this).addClass("oa")
2095
	})
2096
	$(document).on("click", "#verano", function(){
2097
		$(".oa").removeClass("oa")
2098
		filter( 1,1.4,-3,-1,-12,2);
2099
		$(this).addClass("oa")
2100
	})
2101
	$(document).on("click", "#cf", function(){
2102
		$(".oa").removeClass("oa")
2103
		filter( .85,1.26,-15,2,-1,2);
2104
		$(this).addClass("oa")
2105
	})
2106
	$(document).on("click", "#angeles", function(){
2107
		$(".oa").removeClass("oa")
2108
		filter( 1,1.4,5,12,1,2);
2109
		$(this).addClass("oa")
2110
	})
2111
	$(document).on("click", "#caliente", function(){
2112
		$(".oa").removeClass("oa")
2113
		filter( .9,1.2,43,-17,-55,2);
2114
		$(this).addClass("oa")
2115
	})
2116
	$(document).on("click", "#otono", function(){
2117
		$(".oa").removeClass("oa")
2118
		filter( 1,1.29,29,26,17,2);
2119
		$(this).addClass("oa")
2120
	})
2121
	$(document).on("click", "#marzo", function(){
2122
		$(".oa").removeClass("oa")
2123
		filter( .85,1.3,43,25,-11,2);
2124
		$(this).addClass("oa")
2125
	})
2126
	$(document).on("click", "#pera", function(){
2127
		$(".oa").removeClass("oa")
2128
		filter( .8,1.25,31,41,12,2);
2129
		$(this).addClass("oa")
2130
	})
2131
	$(document).on("click", "#comun", function(){
2132
		$(".oa").removeClass("oa")
2133
		filter( 1,1.36,4,5,1,2);
2134
		$(this).addClass("oa")
2135
	})
2136
	$(document).on("click", "#oro", function(){
2137
		$(".oa").removeClass("oa")
2138
		filter( .9,1.3,37,-25,1,2);
2139
		$(this).addClass("oa")
2140
	})
2141
	$(document).on("click", "#gotico", function(){
2142
		$(".oa").removeClass("oa")
2143
		filter( 1.1,1.3,-47,-42,-30,2);
2144
		$(this).addClass("oa")
2145
	})
2146
	$(document).on("click", "#forestal", function(){
2147
		$(".oa").removeClass("oa")
2148
		filter( 1,1.4,-5,42,11,2);
2149
		$(this).addClass("oa")
2150
	})
2151
	$(document).on("click", "#luna", function(){
2152
		$(".oa").removeClass("oa")
2153
		filter( .9,1.2,-5,-7,4,2);
2154
		$(this).addClass("oa")
2155
	})
2156
	$(document).on("click", "#fiesta", function(){
2157
		$(".oa").removeClass("oa")
2158
		filter( 1.1,1.3,-1,-1,26,2);
2159
		$(this).addClass("oa")
2160
	})
2161
	$(document).on("click", "#gris", function(){
2162
		$(".oa").removeClass("oa")
2163
		filtergris(1,1)
2164
		$(this).addClass("oa")
2165
	})
2166
	$(document).on("click", "#lhs", function(){
2167
		$(".oa").removeClass("oa")
2168
		filtergris(.8,1.5);
2169
		$(this).addClass("oa")
2170
	})
2171
	$(document).on("click", "#normal", function(){
2172
		$(".oa").removeClass("oa")
2173
		$(this).addClass("oa")
2174
		filter();
2175
	})
2176
	var texto_listo=false,siete=false;
2177
	var texto;
2178
	$(document).on("keyup", "#texto_input", function(e){
2179
		e.preventDefault();
2180
		texto = $(this).val();
2181
		if(texto_actualizar){
2182
			siete=true;
2183
		}
2184
		if(texto!=""){
2185
			texto_actualizar=true;
2186
			actualizar2();
2187
		}else{
2188
			actualizar2();
2189
		}
2190
 
2191
	})
2192
	var color="#ffffff";
2193
	$(document).on("change", "#color", function(){
2194
    	color=$(this).val();
2195
    	seis=true;
2196
    	actualizar2();
2197
    })
2198
    var size=48;
2199
    $(document).on("keyup change", "#font-size", function(){
2200
    	size=$(this).val();
2201
    	size = parseInt(size);
2202
    	seis=true;
2203
    	siete=true;
2204
    	actualizar2();
2205
    })
2206
    var negritas=false, bold="";
2207
    $(document).on("click", "#negritas", function(e){
2208
    	e.preventDefault();
2209
    	if(!negritas){
2210
    		bold="bold";
2211
    		$(this).addClass("fa");
2212
    		seis=true;
2213
    		siete=true;
2214
    		actualizar2();
2215
    		negritas=true;
2216
    	}else{
2217
    		bold="";
2218
    		$(this).removeClass("fa");
2219
    		seis=true;
2220
    		siete=true;
2221
    		actualizar2();
2222
    		negritas=false;
2223
    	}
2224
    })
2225
    var italic=false, ita="";
2226
     $(document).on("click", "#italic", function(e){
2227
    	e.preventDefault();
2228
    	if(!italic){
2229
    		ita="italic";
2230
    		$(this).addClass("fa");
2231
    		seis=true;
2232
    		siete=true;
2233
    		actualizar2();
2234
    		italic=true;
2235
    	}else{
2236
    		ita="";
2237
    		$(this).removeClass("fa");
2238
    		seis=true;
2239
    		siete=true;
2240
    		actualizar2();
2241
    		italic=false;
2242
    	}
2243
    })
2244
     var fontfamily="Arial";
2245
     $(document).on("click", ".fs", function(e){
2246
    	e.preventDefault();
2247
    	$(".at").removeClass("at");
2248
    	$(this).addClass("at");
2249
    	fontfamily= $(this).text();
2250
    	seis=true;
2251
    	siete=true;
2252
    	actualizar2();
2253
 
2254
    })
2255
     var shadow = true, nueve=true;
2256
     $(document).on("click","#shadow", function(e){
2257
     	e.preventDefault();
2258
     	if(shadow){
2259
     		$(this).removeClass("fa");
2260
     		seis=true;
2261
     		nueve=false;
2262
     		actualizar2();
2263
     		shadow=false;
2264
     	}else{
2265
     		$(this).addClass("fa");
2266
     		seis=true;
2267
     		nueve=true;
2268
     		actualizar2();
2269
     		shadow=true;
2270
     	}
2271
 
2272
     })
2273
     var rectangulo=false, diez=false, colorrect="#000000";
2274
     $(document).on("click", "#rectangulo", function(e){
2275
     	e.preventDefault();
2276
     	if(!rectangulo){
2277
     		$(this).addClass("fa");
2278
     		diez=true;
2279
     		actualizar2();
2280
     		rectangulo=true;
2281
     	}else{
2282
     		$(this).removeClass("fa");
2283
     		diez=false;
2284
     		actualizar2();
2285
     		rectangulo=false;
2286
     	}
2287
 
2288
     })
2289
     var r=0,g=0,b=0;
2290
    $(document).on("change", "#colorrect", function(){
2291
    	colorrect=$(this).val();
2292
    	r=parseInt(colorrect.slice(1,3),16);
2293
    	g=parseInt(colorrect.slice(3,5),16);
2294
    	b=parseInt(colorrect.slice(5,7),16);
2295
    	seis=true;
2296
    	actualizar2();
2297
    })
2298
    var a=1;
2299
 
2300
    $(document).on("keyup change", "#opacidad", function(){
2301
    	a=$(this).val();
2302
    	a=a/100;
2303
    	seis=true;
2304
    	actualizar2();
2305
    })
2306
	var imaNoti = new Image();
2307
	function filter(brillo=1, contraste=1, rojo=1, verde=1, azul=1, valor=1){
2308
		cuatro=false;
2309
		restaurar(brillo, contraste);
2310
		datos=imagenOriginal.data;
2311
		if(valor==2){
2312
			for (var i =  0; i <datos.length; i+=4) {
2313
				datos[i]=datos[i]+rojo;
2314
				datos[i+1]=datos[i+1]+verde;
2315
				datos[i+2]=datos[i+2]+azul;
2316
			}
2317
		}else{
2318
			for (var i =  0; i <datos.length; i+=4) {
2319
				datos[i]=datos[i]*rojo;
2320
				datos[i+1]=datos[i+1]*verde;
2321
				datos[i+2]=datos[i+2]*azul
2322
			}
2323
		}
2324
		editor.putImageData(imagenOriginal,0,0)
2325
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
2326
	    imaNoti.src = imagenNoticia;
2327
		actualizar2();
2328
	}
2329
	function filtergris(brillo=1, contraste=1){
2330
		cuatro=false;
2331
		restaurar(brillo, contraste);
2332
		datos=imagenOriginal.data;
2333
		var auxiliar;
2334
		for (var i =  0; i <datos.length; i+=4) {
2335
			auxiliar = 0.34 * datos[i] + 0.5 *datos[i+1] + 0.16 * datos[i+2];
2336
			datos[i]=auxiliar;
2337
			datos[i+1]=auxiliar;
2338
			datos[i+2]=auxiliar;
2339
		}
2340
 
2341
		editor.putImageData(imagenOriginal,0,0)
2342
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
2343
	    imaNoti.src = imagenNoticia;
2344
		actualizar2();
2345
	}
2346
	function restaurar(brillo = 1, contraste=1){
2347
		editor.filter = "none"
2348
		editor.filter = 'contrast('+contraste+') brightness('+brillo+') saturate(1) sepia(0)';
2349
		editor.fillStyle="rgba(255,255,255,1)"
2350
		editor.fillRect(0,0,ancho,alto);
2351
		editor.fillStyle=""+color+"";
2352
		var pxf=0,pyf=0;
2353
			if(xf>=(yf/recorte)){
2354
				pxf=xf/ancho;
2355
				pyf=yf/pxf;
2356
				py=(alto/2)-(pyf/2);
2357
				editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
2358
			}else{
2359
				pyf=yf/alto;
2360
				pxf=xf/pyf;
2361
				px=(ancho/2)-(pxf/2);
2362
				editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
2363
			}
2364
		imagenOriginal = editor.getImageData(0,0,ancho,alto)
2365
	}
2366
	var ocho=false;
2367
	function actualizar2(){
2368
		if(recorte_listo){
2369
		if(cuatro){
2370
			imagenOriginal = editor.getImageData(0,0,ancho,alto)
2371
			var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
2372
	    	imaNoti.src = imagenNoticia;
2373
	    	cuatro=false;
2374
		}
2375
		editor.filter = "none"
2376
		$(imaNoti).ready(function(e){
2377
			noticia.drawImage(imaNoti,0,0,320,480);
2378
			editor.drawImage(imaNoti,0,0,ancho,alto)
2379
			if(texto_actualizar){
2380
				if(texto!=""){
2381
					if(seis){
2382
						ancho_imaNoti = imaNoti.width;
2383
 
2384
						scale_noticia = -(((ancho_imaNoti-320)/ancho_imaNoti)-1);
2385
						editor.fillStyle=""+color+"";
2386
						editor.strokeStyle="rgb(255,255,255)";
2387
						if(nueve){
2388
							editor.shadowColor="rgba(0,0,0,.5)";
2389
							editor.shadowOffsetX=6;
2390
							editor.shadowOffsetY=6;
2391
							editor.shadowBlur=6;
2392
							noticia.shadowColor="rgba(0,0,0,.5)";
2393
							noticia.shadowOffsetX=6*scale_noticia;
2394
							noticia.shadowOffsetY=6*scale_noticia;
2395
							noticia.shadowBlur=6*scale_noticia;
2396
						}else{
2397
							editor.shadowColor="rgba(0,0,0,0)";
2398
							noticia.shadowColor="rgba(0,0,0,0)";
2399
						}
2400
						editor.font=""+ita+" "+bold+" "+size+"px "+fontfamily+"";
2401
						editor.textAlign="start";
2402
						editor.textBaseline="top";
2403
 
2404
						var sizeNoticia = size*scale_noticia;
2405
						noticia.fillStyle=""+color+"";
2406
						noticia.font=""+ita+" "+bold+" "+sizeNoticia+"px "+fontfamily+"";
2407
						noticia.textAlign="start";
2408
						noticia.textBaseline="top";
2409
						seis=false;
2410
					}
2411
					if(siete){
2412
						dimencionesTexto = editor.measureText(texto);
2413
						txf=dimencionesTexto.width+20;
2414
						tyf= (20+size);
2415
						siete=false;
2416
					}
2417
					if(cinco){
2418
						dimencionesTexto = editor.measureText(texto);
2419
						if(xf>=(yf/recorte)){
2420
							tx=(xf/2)-(dimencionesTexto.width/2);
2421
							ty=(xf*recorte/2)-(size/2);
2422
						}else{
2423
							tx=(yf/recorte/2)-(dimencionesTexto.width/2);
2424
							ty=(yf/2)-(size/2);
2425
						}
2426
 
2427
						txf=dimencionesTexto.width+20;
2428
						tyf= size+20;
2429
						cinco=false;
2430
					}
2431
					if(diez){
2432
						editor.fillStyle="rgba("+r+","+g+","+b+","+a+")";
2433
						noticia.fillStyle="rgba("+r+","+g+","+b+","+a+")";
2434
						editor.fillRect(tx-10,ty-10,txf,tyf);
2435
						noticia.fillRect(((tx-10)*scale_noticia),((ty-10)*scale_noticia),txf*scale_noticia,tyf*scale_noticia);
2436
						editor.fillStyle=""+color+"";
2437
						noticia.fillStyle=""+color+"";
2438
 
2439
					}
2440
					editor.fillText(texto,tx,ty);
2441
					noticia.fillText(texto,(tx*scale_noticia),ty*scale_noticia);
2442
					if(ocho){
2443
						editor.strokeRect(tx-10,ty-10,txf,tyf)
2444
						editor.arc(tx+txf,ty+tyf,10,0,Math.PI*2,false);
2445
						editor.fill();
2446
						editor.beginPath();
2447
					}
2448
					texto_listo=true;
2449
				}
2450
			}
2451
		})
2452
 
2453
	}
2454
	}
2455
	function actualizar(){
2456
			$(imagen).ready(function(e){
2457
				if(uno){
2458
					ancho=imagen.width, alto = imagen.height;
2459
					elemento.width = ancho;
2460
					elemento.height = alto;
2461
					$(".scale").css("display","flex");
2462
					mitadX=ancho/2;
2463
					mitadY=alto/2;
2464
					x=mitadX-xf/2;
2465
					y=mitadY-yf/2;
2466
					if(ancho<=alto){
2467
					 scale = -(((alto-450)/alto)-1);
2468
 
2469
					}else{
2470
					 scale = -(((ancho-500)/ancho)-1);
2471
					}
2472
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
2473
					$("#ancho").html(ancho+"px");
2474
					$("#alto").html(alto+"px");
2475
					uno=false;
2476
				}
2477
				if(dos){
2478
 
2479
					if(xf>=(yf/recorte)){
2480
						alto=xf*recorte;
2481
						ancho=xf;
2482
					}else{
2483
						ancho=yf/recorte;
2484
						alto=yf;
2485
 
2486
					}
2487
					elemento.width = ancho;
2488
					elemento.height = alto;
2489
					if(xf<=yf){
2490
					 scale = -(((yf-450)/yf)-1);
2491
 
2492
					}else{
2493
					 scale = -(((xf-500)/xf)-1);
2494
					}
2495
 
2496
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
2497
					$("#ancho").html(Math.round(xf)+"px");
2498
					$("#alto").html(Math.round(yf)+"px");
2499
					dos=false;
2500
				}
2501
 
2502
					var pxf=0,pyf=0;
2503
					noticia.fillStyle="rgba(255,255,255,1)"
2504
					noticia.fillRect(0,0,320,480);
2505
				if(xf>=(yf/recorte)){
2506
					pxf=xf/320;
2507
					pyf=yf/pxf;
2508
					py=(480/2)-(pyf/2);
2509
					noticia.drawImage(imagen,x,y,xf,yf,0,py,320,pyf);
2510
				}else{
2511
					pyf=yf/480;
2512
					pxf=xf/pyf;
2513
					px=(320/2)-(pxf/2);
2514
					noticia.drawImage(imagen,x,y,xf,yf,px,0,pxf,480);
2515
				}
2516
 
2517
				$("#editorNoticia").css({"transform": "scale("+scale+")"});
2518
				if(!recorte_listo){
2519
					editor.drawImage(imagen,0,0,ancho,alto);
2520
					editor.fillStyle="rgba(0,0,0,.2)"
2521
					editor.fillRect(0,0,ancho,alto);
2522
					editor.fillStyle="rgba(255,255,255,.1)"
2523
					editor.fillRect(x,y,xf,yf);
2524
					editor.fillStyle="rgba(255,255,255,.5)"
2525
					editor.fillRect(x,y,16,16);
2526
					editor.fillRect((x+xf)-16,y,16,16);
2527
					editor.fillRect(x,y+yf-16,16,16);
2528
					editor.fillRect(x+xf-16,yf+y-16,16,16);
2529
					esta=true;
2530
				}else{
2531
					var pxf=0,pyf=0;
2532
 
2533
					editor.fillStyle="rgba(255,255,255,1)"
2534
					editor.fillRect(0,0,ancho,alto);
2535
					if(xf>=(yf/recorte)){
2536
						pxf=xf/ancho;
2537
						pyf=yf/pxf;
2538
						py=(alto/2)-(pyf/2);
2539
						editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
2540
					}else{
2541
						pyf=yf/alto;
2542
						pxf=xf/pyf;
2543
						px=(ancho/2)-(pxf/2);
2544
						editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
2545
				}
2546
 
2547
				}
2548
			})
2549
		}
2550
	var imagenOriginal;
2551
	var x,y,xf=320,yf =480, elemento,editor,centro, total,scale,dimencionesTexto,ancho_imaNoti,
2552
	recorte_listo=false,alto,ancho,tx,ty,txf,tyf,cuatro=true,texto_actualizar=false,cinco=true,seis=true,cuatro;
2553
	var  mitadY,mitadX, uno=true,dos=false, recorte=480/320, imagen_noticias, scale_noticia, tres=true,rotar=false, cortar=false;;
2554
	var translateX;
2555
 
2556
	$(document).on("click", ".recortar10", function(e){
2557
 
2558
		e.preventDefault();
2559
		recorte_listo=false;
2560
		uno=true;
2561
		$(".fondo_oscuro").css("display","block");
2562
		$("#boton_recortar").addClass("recortar").text("Recortar").removeClass("info_noticia");
2563
		$("#boton_recortar3").addClass("recortar").text("Recortar").removeClass("info_noticia3");
2564
		$(".contenido_text").css("display", "none");
2565
		$(".contenido_filter").css("display", "none");
2566
		$(".recortar10").addClass("recortar");
2567
		$(".canvas").addClass("recortar")
2568
		$(".oa").removeClass("oa");
2569
		$("#normal").addClass("oa");
2570
		$(".b1").removeClass("paso");
2571
		$(".titulo_pasos").html("LABEL_STEP_2");
2572
		window.clearInterval(actualizar2);
2573
		actualizar();
2574
 
2575
	})
2576
 
2577
 
2578
	blockCelda=true;
2579
	$(document).on("click", "#blockCelda", function(e){
2580
		e.preventDefault();
2581
		if(blockCelda){
2582
			$(this).html('<span class="fa fa-unlock"></span>')
2583
 
2584
			blockCelda=false;
2585
		}else{
2586
			$(this).html('<span class="fa fa-lock"></span>')
2587
			blockCelda=true;
2588
		}
2589
		t4=true;
2590
 
2591
	})
2592
	var imagen
2593
	function editorNoticia(img){
2594
		 cortar=true;
2595
		imagen= new Image();
2596
		$(".canvas").html(canvas);
2597
		elemento = document.getElementById("editorNoticia");
2598
		editor = elemento.getContext("2d");
2599
		elemento2 = document.getElementById("imagen_noticias");
2600
		noticia = elemento2.getContext("2d");
2601
 
2602
		$(document).on("click", ".boton_marino.recortar",function(e){
2603
			e.preventDefault();
2604
			recorte_listo=true;
2605
			$(".fondo_oscuro").css("display","none");
2606
			$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
2607
			$(".recortar10").removeClass("recortar");
2608
			$(".canvas").removeClass("recortar");
2609
			$(".b1").addClass("paso");
2610
			$(".titulo_pasos").html("LABEL_STEP_3");
2611
			if(texto!=""){
2612
				seis=true;
2613
				siete=true;
2614
			}
2615
			cinco=true;
2616
			dos=true;
2617
			cuatro=true;
2618
			actualizar();
2619
		})
2620
 
2621
		var cli = false, t1= false, t2=false,t3=false,t4=false,tcli=false;
2622
		var mouse =[];
2623
 
2624
 
2625
		function raton(elemento, e){
2626
			return {
2627
				x:((e.pageX - elemento.offsetLeft - ((ancho/2)-((ancho*scale)/2)))/scale),
2628
				y:((e.pageY - elemento.offsetTop - ((alto/2)-((alto*scale)/2)))/scale)
2629
			}
2630
		}
2631
 
2632
		imagen.src=img;
2633
		$(".recortar10").addClass("recortar");
2634
		$("#boton_recortar").removeClass("boton_normal").addClass("recortar boton_marino").text("LABEL_CUT")
2635
		actualizar();
2636
 
2637
		$(elemento).mousemove(function(e){
2638
			mouse = raton(this, e);
2639
			//console.log("raton x: "+mouse.x+ " raton Y: " +mouse.y+ " tx: "+tx+" ty: "+ty+" txf:"+(txf+tx)+" tyf:"+(tyf+ty) )
2640
			if(!recorte_listo){
2641
				if(x+16<mouse.x &&(xf+x-16)>mouse.x && y+16<mouse.y && (y+yf-16)>mouse.y){
2642
			 		$(elemento).css("cursor","move");
2643
			 	}else if((xf+x-16)<mouse.x &&(xf+x)>mouse.x && (y+yf-16)<mouse.y && (y+yf)>mouse.y){
2644
			 		$(elemento).css("cursor","nw-resize");
2645
			 	}else if((xf+x-16)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+16)>mouse.y){
2646
			 		$(elemento).css("cursor","ne-resize");
2647
			 	}else if(x<mouse.x &&(16+x)>mouse.x && y<mouse.y && (y+16)>mouse.y){
2648
			 		$(elemento).css("cursor","se-resize");
2649
			 	}else if(x<mouse.x &&(16+x)>mouse.x && (y+yf-16)<mouse.y &&(y+yf)>mouse.y){
2650
			 		$(elemento).css("cursor","sw-resize");
2651
			 	}else{
2652
			 		$(elemento).css("cursor","default");
2653
			 	}
2654
			}else if(texto_listo){
2655
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
2656
			 		$(elemento).css("cursor","move");
2657
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
2658
			 		$(elemento).css("cursor","pointer");
2659
			 	}else{
2660
			 		$(elemento).css("cursor","default");
2661
			 	}
2662
			}
2663
			else{
2664
				$(elemento).css("cursor","default");
2665
			}
2666
		})
2667
		$(elemento).mousedown(function(e){
2668
			mouse = raton(this, e);
2669
			if(!recorte_listo){
2670
				if(x+16<mouse.x &&(xf+x-16)>mouse.x && y+16<mouse.y && (y+yf-16)>mouse.y){
2671
			 		cli = true;
2672
			 	}
2673
			 	if((xf+x-16)<mouse.x &&(xf+x)>mouse.x && (y+yf-16)<mouse.y && (y+yf)>mouse.y){
2674
			 		t4 = true;
2675
			 	}
2676
				if((xf+x-16)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+16)>mouse.y){
2677
			 		t3 = true;
2678
			 	}
2679
			 	if(x<mouse.x &&(16+x)>mouse.x && y<mouse.y && (y+16)>mouse.y){
2680
			 		t1 = true;
2681
			 	}
2682
			 	if(x<mouse.x &&(16+x)>mouse.x && (y+yf-16)<mouse.y &&(y+yf)>mouse.y){
2683
			 		t2 = true;
2684
			 	}
2685
			}else if(texto_listo){
2686
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
2687
			 		tcli=true;
2688
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
2689
			 		rotar=true;
2690
			 	}
2691
			}
2692
 
2693
		 })
2694
 
2695
		 $(elemento).mousemove(function(e){
2696
		 	mouse = raton(this, e);
2697
		 	if(!recorte_listo){
2698
			 	if(cli){
2699
			 		if((mouse.y-(yf/2))>=0&&(mouse.y+(yf/2))<=alto){
2700
				 		y = (mouse.y-(yf/2));
2701
			 		}else{
2702
			 			if((mouse.y-(yf/2))<0){
2703
			 				y=0;
2704
			 			}
2705
			 			if((mouse.y+(yf/2))>alto){
2706
			 				y=alto-yf;
2707
			 			}
2708
			 		}
2709
			 		if((mouse.x-(xf/2))>=0&&(mouse.x+(xf/2))<=ancho){
2710
			 			x = (mouse.x-(xf/2));
2711
			 		}else{
2712
			 			if((mouse.x-(xf/2))<0){
2713
			 				x=0;
2714
			 			}
2715
			 			if((mouse.x+(xf/2))>ancho){
2716
			 				x=(ancho)-xf;
2717
			 			}
2718
			 		}
2719
			 	}
2720
				if(blockCelda){
2721
			 	if(t4){
2722
			 		if(mouse.y<(alto-10)&&(x+xf)<=(ancho)){
2723
				 		if(Math.round(xf)>=50){
2724
							if(((mouse.y-y)/recorte)>50){
2725
				 				yf=mouse.y-y;
2726
				 				xf=(yf/recorte);
2727
				 			}
2728
						}
2729
			 		}else{
2730
			 			if(mouse.y>=(alto-10)){
2731
			 				yf=alto-y;
2732
				 			xf=(yf/recorte);
2733
				 			t4=false;
2734
			 			}
2735
			 			if(x+xf>(ancho)){
2736
			 				xf=(ancho)-x;
2737
				 			yf=(xf*recorte);
2738
				 			t4=false;
2739
			 			}
2740
			 		}
2741
			 	}
2742
			 	if(t3){
2743
			 		if(mouse.y>0&&(x+xf)<=(ancho)){
2744
				 		if(Math.round(xf)>=50){
2745
							if(((yf+(y-mouse.y))/recorte)>50){
2746
					 			yf=yf+(y-mouse.y);
2747
					 			xf=(yf/recorte);
2748
					 			y=mouse.y;
2749
				 			}
2750
				 		}
2751
 
2752
			 		}else{
2753
			 			if(mouse.y<=0) {
2754
			 				yf=yf+(y-mouse.y);
2755
				 			xf=(yf/recorte);
2756
			 				y=0;
2757
			 				t3=false;
2758
			 			}
2759
			 			if(x+xf>(ancho)){
2760
			 				xf=(ancho)-x;
2761
				 			yf=xf*recorte;
2762
				 			t3=false;
2763
			 			}
2764
			 		}
2765
			 	}
2766
			 	if(t2){
2767
			 		if(mouse.y<(alto-10)&&x>=0){
2768
				 		if(Math.round(xf)>=50){
2769
							if(((mouse.y-y)/recorte)>50){
2770
					 			x=(x+(yf-(mouse.y-y))/recorte);
2771
					 			yf=mouse.y-y;
2772
					 			xf=(yf/recorte);
2773
				 			}
2774
					 	}
2775
 
2776
			 		}else{
2777
			 			if(mouse.y>=(alto-10)) {
2778
			 				yf=alto-y;
2779
				 			xf=(yf/recorte);
2780
				 			t2=false;
2781
			 			}
2782
			 			if(0>x){
2783
			 				x=0;
2784
			 				xf=mouse.y-y;
2785
				 			yf=(xf*recorte);
2786
				 			t2=false;
2787
			 			}
2788
			 		}
2789
			 	}
2790
			 	if(t1){
2791
			 		if(mouse.y>0&&x>=0){
2792
				 		if(Math.round(xf)>=50){
2793
							if(((yf+(y-mouse.y))/recorte)>50){
2794
								yf=yf+(y-mouse.y);
2795
					 			xf=(yf/recorte);
2796
					 			x=(x-(y-mouse.y)/recorte);
2797
					 			y=mouse.y;
2798
							}
2799
				 		}
2800
			 		}else{
2801
			 			if(mouse.y<=0) {
2802
			 				yf=yf+(y-mouse.y);
2803
				 			xf=(yf/recorte);
2804
			 				y=0;
2805
			 				t1=false;
2806
			 			}
2807
			 			if(0>x){
2808
			 				x=0;
2809
			 				xf=yf+(y-mouse.y);
2810
				 			yf=(xf*recorte);
2811
				 			t1=false;
2812
			 			}
2813
			 		}
2814
			 	}
2815
				}else{
2816
				 if(t4){
2817
			 		if(mouse.y<(alto-10-(2/scale))&&mouse.x<=(ancho-(2/scale))){
2818
 
2819
							if((mouse.y-y)>50){
2820
				 				yf=mouse.y-y;
2821
				 			}
2822
							if((mouse.x-x)>50){
2823
								xf=mouse.x-x;
2824
							}
2825
 
2826
			 		}else{
2827
			 			if(mouse.y>=(alto-10-(2/scale))){
2828
			 				yf=alto-y;
2829
			 			}
2830
			 			if(mouse.x>(ancho-(2/scale))){
2831
			 				xf=(ancho)-x;
2832
			 			}
2833
						 t4=false;
2834
			 		}
2835
			 	}
2836
			 	if(t3){
2837
			 		if(mouse.y>(2/scale)&&mouse.x<=(ancho-(2/scale))){
2838
 
2839
							if((yf-(mouse.y-y))>50){
2840
				 				yf=yf-(mouse.y-y);
2841
								y=mouse.y;
2842
				 			}
2843
							if((mouse.x-x)>50){
2844
								xf=mouse.x-x;
2845
							}
2846
 
2847
 
2848
			 		}else{
2849
						if(mouse.x>(ancho-(2/scale))){
2850
							xf=ancho-x;
2851
						}
2852
						if(mouse.y<=(2/scale)){
2853
							yf=yf-(mouse.y-y);
2854
							y=0;
2855
						}
2856
			 			t3=false;
2857
			 		}
2858
			 	}
2859
				/* Izquierda abajo */
2860
			 	if(t2){
2861
			 		if(mouse.y<(alto-10-(2/scale))&&mouse.x>=(2/scale)){
2862
							 if((mouse.y-y)>50){
2863
								yf=mouse.y-y;
2864
				 			}
2865
							if((xf-(mouse.x-x))>50){
2866
								xf=xf-(mouse.x-x);
2867
								x=mouse.x
2868
							}
2869
 
2870
			 		}else{
2871
			 			if(mouse.y>=(alto-10-(2/scale))) {
2872
							yf=alto-y;
2873
			 			}
2874
 
2875
			 			if(mouse.x<(2/scale)){
2876
							xf=xf-(mouse.x-x);
2877
			 				x=0;
2878
			 			}
2879
						 t2=false;
2880
			 		}
2881
			 	}
2882
				/* izquierda arriba */
2883
			 	if(t1){
2884
			 		if(mouse.y>(2/scale)&&mouse.x>=(2/scale)){
2885
 
2886
							if((yf-(mouse.y-y))>50){
2887
				 				yf=yf-(mouse.y-y);
2888
								y=mouse.y;
2889
				 			}
2890
							if((xf-(mouse.x-x))>50){
2891
								xf=xf-(mouse.x-x);
2892
								x=mouse.x
2893
							}
2894
 
2895
			 		}else{
2896
						if(mouse.y<=(2/scale)){
2897
							yf=yf-(mouse.y-y);
2898
							y=0;
2899
						}
2900
						 if(mouse.x<(2/scale)){
2901
							xf=xf-(mouse.x-x);
2902
			 				x=0;
2903
 
2904
			 			}
2905
						 t1=false;
2906
			 		}
2907
			 	}
2908
			}
2909
 
2910
		 	actualizar();
2911
		 	}else if(texto_listo){
2912
		 		if(tcli){
2913
		 			tx=mouse.x-(txf/2)
2914
		 			ty=mouse.y-(tyf/2)
2915
		 		}else if(rotar){
2916
 
2917
		 		}
2918
 
2919
		 		actualizar2();
2920
		 	}
2921
		 })
2922
		 $(elemento).mouseup(function(e){
2923
		 	if(!recorte_listo){
2924
			 	cli=false;
2925
			 	t1=false;
2926
			 	t2=false;
2927
			 	t3=false;
2928
			 	t4=false;
2929
		 	}else if (texto_listo) {
2930
		 		tcli=false;
2931
		 	}
2932
		 })
2933
 
2934
 
2935
	}
2936
	/* Titulo */
2937
 
2938
var titulo_noticia, censor_titulo = true, numero_titulo=0;
2939
	$(document).on("keyup change", "#name", function(e){
2940
	console.log(numero_titulo)
2941
	titulo_noticia = $(this).val();
2942
	titulo_elemento= $(".titulo_topico");
2943
	if(titulo_noticia!=""){
2944
		if(censor_titulo){
2945
			titulo_elemento.html(titulo_noticia);
2946
			if(titulo_elemento.height()>38){
2947
				var titulo_noticia2 = "";
2948
				for(var i =0; i <titulo_noticia.length;i++){
2949
					titulo_noticia2 = titulo_noticia2 + titulo_noticia.split("")[i];
2950
					titulo_elemento.html(titulo_noticia2);
2951
					if(titulo_elemento.height()>38){
2952
						titulo_noticia2 = titulo_noticia2.slice(0,-5) + "...";
2953
						titulo_elemento.html(titulo_noticia2);
2954
						numero_titulo = titulo_noticia2.length;
2955
						censor_titulo=false;
2956
						break;
2957
					}
2958
 
2959
				}
2960
			}else{
2961
				numero_titulo=0;
2962
			}
2963
		}else{
2964
			if(numero_titulo+1>=titulo_noticia.length){
2965
				titulo_elemento.html(titulo_noticia);
2966
				censor_titulo=true;
2967
			}
2968
		}
2969
	}else{
6675 nelberth 2970
		titulo_elemento.html("LABEL_TITLE");
6113 nelberth 2971
		censor_titulo = true;
2972
	}
2973
})
2974
 
1 www 2975
});
2976
JS;
2977
$this->inlineScript()->captureEnd();
2978
?>
2979
 
2980
 
2981
<!-- Content Header (Page header) -->
2982
<section class="content-header">
2983
	<div class="container-fluid">
2984
    	<div class="row mb-2">
2985
        	<div class="col-sm-12">
2986
            	<h1>LABEL_SLIDES</h1>
2987
			</div>
2988
		</div>
2989
	</div><!-- /.container-fluid -->
2990
</section>
2991
 
6122 nelberth 2992
<section class="content" id='content1'>
1 www 2993
	<div class="container-fluid">
2994
    	<div class="row">
2995
        	<div class="col-12">
2996
				<div class="card">
2997
					<div class="card-header">
2998
						<?php
2999
                        $form = $this->form;
3000
            	        $form->setAttributes([
3001
                            'name'    => 'form-filter',
3002
                            'id'      => 'form-filter',
3003
                        ]);
3004
 
3005
                        $form->prepare();
3006
                        echo $this->form()->openTag($form);
3007
                        ?>
3008
                        <div class="row">
3009
                            <div class="col-md-6 col-sm-12">
3010
                                <div class="form-group">
3011
                                    <?php
3012
                                        $element = $form->get('topic_uuid');
3013
 
3014
                                        $element->setOptions(['label' => 'LABEL_TOPIC']);
3015
 
3016
                                        $element->setAttributes(['class' => 'form-control']);
3017
                                        echo $this->formLabel($element);
3018
                                        echo $this->formSelect($element);
3019
                                    ?>
3020
                                </div>
3021
                            </div>
3022
                            <div class="col-md-6 col-sm-12">
3023
                                <div class="form-group">
3024
                                    <?php
3025
                                        $element = $form->get('capsule_uuid');
3026
                                        $element->setOptions(['label' => 'LABEL_CAPSULE']);
3027
                                        $element->setAttributes(['class' => 'form-control']);
3028
                                        echo $this->formLabel($element);
3029
                                        echo $this->formSelect($element);
3030
                                    ?>
3031
                                </div>
3032
                            </div>
3033
                        </div>
3034
						<?php echo $this->form()->closeTag($form); ?>
3035
					</div>
3036
					<div class="card-body">
20 steven 3037
        	    		<table id="gridTable" class="table   table-hover">
1 www 3038
                      		<thead>
3039
        						<tr>
3040
                                	<th>LABEL_NAME</th>
3041
                                  	<th>LABEL_DETAILS</th>
3042
                                  	<th>LABEL_MEDIA</th>
3043
                                  	<th>LABEL_ACTIONS</th>
3044
                                </tr>
3045
                       		</thead>
3046
                         	<tbody>
3047
                         	</tbody>
3048
                    	</table>
3049
                   	</div>
3050
                   	<div class="card-footer clearfix">
3051
                   		<div style="float:right;">
3052
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH  </button>
3053
							<?php if($allowAdd) : ?>
3054
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
3055
							<?php endif; ?>
3056
						</div>
3057
                 	</div>
3058
          		</div>
3059
           	</div>
3060
        </div>
3061
 	</div>
3062
</section>
3063
 
3064
 
3065
 
3066
<!-- The Modal -->
6531 nelberth 3067
<div  id="company-microlearning-slide-text-add-box" style='display:none'>
6528 nelberth 3068
 
1 www 3069
    		<?php
3070
    	    $form = $this->formTextAdd;
3071
    	    $form->setAttributes([
3072
    	       'method'    => 'post',
3073
    	       'name'      => 'form-slide-text-add',
3074
    	       'id'        => 'form-slide-text-add'
3075
    	    ]);
3076
    	    $form->prepare();
3077
    	    echo $this->form()->openTag($form);
3078
 
3079
    	    $element = $form->get('type');
3080
    	    echo $this->formHidden($element);
3081
 
3082
    	    ?>
3083
 
6528 nelberth 3084
            <div class="d-flex justify-content-center tituloEditor">
6590 nelberth 3085
              <h4>LABEL_ADD_TEXT_SLIDE</h4>
6528 nelberth 3086
 
3087
             </div>
3088
 
3089
 
3090
            <div class="grid-padre">
3091
				<div class="form-group grid-1-2">
1 www 3092
    				<?php
3093
                        $element = $form->get('name');
3094
                        $element->setAttributes(['class' => 'form-control']);
3095
                        $element->setOptions(['label' => 'LABEL_NAME']);
3096
                        echo $this->formLabel($element);
3097
                        echo $this->formText($element);
3098
                    ?>
3099
				</div>
6528 nelberth 3100
                <div class="form-group grid-1-2">
1 www 3101
                	<?php
3102
                    $element = $form->get('description');
3103
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
6600 nelberth 3104
                    $element->setAttributes(['id' => 'description_add', 'rows' => '2',  'class' => 'form-control']);
1 www 3105
                    echo $this->formLabel($element);
3106
                    echo $this->formTextArea($element);
3107
                    ?>
3108
   				</div>
6528 nelberth 3109
				<div class="form-group grid-1-2">
1 www 3110
    				<?php
3111
                        $element = $form->get('order');
3112
                        $element->setAttributes(['class' => 'form-control']);
3113
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3114
                        echo $this->formLabel($element);
3115
                        echo $this->formText($element);
3116
                    ?>
3117
				</div>
6529 nelberth 3118
                <?php
3119
                    $element = $form->get('background');
3120
					$element->setAttributes([ 'class' => 'background']);
3121
                    echo $this->formHidden($element);
3122
                ?>
6543 nelberth 3123
				<div class="contenido form-group " id="contenido"></div>
6529 nelberth 3124
 
1 www 3125
      		</div>
3126
 
3127
          	<?php echo $this->form()->closeTag($form); ?>
6528 nelberth 3128
 
1 www 3129
</div>
3130
 
3131
 
3132
 
3133
 
3134
<!-- The Modal -->
6596 nelberth 3135
<div id="company-microlearning-slide-text-edit-box" style='display:none'>
6595 nelberth 3136
            <?php
1 www 3137
    	    $form = $this->formTextEdit;
3138
    	    $form->setAttributes([
3139
    	       'method'    => 'post',
3140
    	       'name'      => 'form-slide-text-edit',
3141
    	       'id'        => 'form-slide-text-edit'
3142
    	    ]);
3143
    	    $form->prepare();
3144
    	    echo $this->form()->openTag($form);
3145
 
3146
    	    $element = $form->get('type');
3147
    	    echo $this->formHidden($element);
3148
 
6595 nelberth 3149
    	    ?>
3150
            <div class="d-flex justify-content-center tituloEditor">
3151
              <h4>LABEL_EDIT_TEXT_SLIDE</h4>
1 www 3152
 
6595 nelberth 3153
             </div>
3154
 
3155
 
3156
            <div class="grid-padre">
3157
				<div class="form-group grid-1-2">
1 www 3158
    				<?php
3159
                        $element = $form->get('name');
3160
                        $element->setAttributes(['class' => 'form-control']);
3161
                        $element->setOptions(['label' => 'LABEL_NAME']);
3162
                        echo $this->formLabel($element);
3163
                        echo $this->formText($element);
3164
                    ?>
3165
				</div>
6595 nelberth 3166
                <div class="form-group grid-1-2">
1 www 3167
                	<?php
3168
                    $element = $form->get('description');
3169
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
6600 nelberth 3170
                    $element->setAttributes(['id' => 'description_edit', 'rows' => '2',  'class' => 'form-control']);
1 www 3171
                    echo $this->formLabel($element);
3172
                    echo $this->formTextArea($element);
3173
                    ?>
3174
   				</div>
6595 nelberth 3175
				<div class="form-group grid-1-2">
1 www 3176
    				<?php
3177
                        $element = $form->get('order');
3178
                        $element->setAttributes(['class' => 'form-control']);
3179
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3180
                        echo $this->formLabel($element);
3181
                        echo $this->formText($element);
3182
                    ?>
3183
				</div>
6595 nelberth 3184
                <?php
3185
                    $element = $form->get('background');
3186
					$element->setAttributes([ 'class' => 'background']);
3187
                    echo $this->formHidden($element);
3188
                ?>
3189
				<div class="contenido form-group " id="contenido"></div>
3190
 
1 www 3191
      		</div>
3192
 
3193
          	<?php echo $this->form()->closeTag($form); ?>
6595 nelberth 3194
 
1 www 3195
</div>
3196
 
3197
 
3198
 
3199
<!-- The Modal -->
6523 nelberth 3200
<div class='imageType'  id="company-microlearning-slide-image-add-box" style='display:none' >
1 www 3201
    		<?php
3202
    	    $form = $this->formImageAdd;
3203
    	    $form->setAttributes([
3204
    	       'method'    => 'post',
3205
    	        'name'      => 'form-slide-image-add',
3206
    	        'id'        => 'form-slide-image-add'
3207
    	    ]);
3208
    	    $form->prepare();
3209
    	    echo $this->form()->openTag($form);
3210
 
3211
    	    $element = $form->get('type');
3212
    	    echo $this->formHidden($element);
3213
 
3214
    	    ?>
3215
            <!-- Modal Header -->
6126 nelberth 3216
            <div class="d-flex justify-content-center tituloEditor">
6131 nelberth 3217
              <h4>LABEL_ADD_IMAGE_SLIDE</h4>
1 www 3218
 
6126 nelberth 3219
             </div>
3220
 
1 www 3221
            <!-- Modal body -->
6126 nelberth 3222
            <div class="grid-padre">
6140 nelberth 3223
                 <div class="form-group grid-1-2">
1 www 3224
    				<?php
3225
                        $element = $form->get('name');
3226
                        $element->setAttributes(['class' => 'form-control']);
3227
                        $element->setOptions(['label' => 'LABEL_NAME']);
3228
                        echo $this->formLabel($element);
3229
                        echo $this->formText($element);
3230
                    ?>
3231
				</div>
6142 nelberth 3232
 
6137 nelberth 3233
 
6134 nelberth 3234
                <?php
3235
                    $element = $form->get('file');
3236
					$element->setAttributes([ 'class' => 'file']);
3237
                    echo $this->formHidden($element);
3238
                ?>
6129 nelberth 3239
				<div class="form-group grid-1-2">
1 www 3240
    				<?php
3241
                        $element = $form->get('order');
3242
                        $element->setAttributes(['class' => 'form-control']);
3243
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3244
                        echo $this->formLabel($element);
3245
                        echo $this->formText($element);
3246
                    ?>
3247
				</div>
6544 nelberth 3248
                <div class="contenido form-group " id="contenido"></div>
1 www 3249
      		</div>
3250
 
6125 nelberth 3251
 
1 www 3252
          	<?php echo $this->form()->closeTag($form); ?>
3253
</div>
3254
 
6523 nelberth 3255
<div class='imageType' id="company-microlearning-slide-image-edit-box" style='display:none' >
6505 nelberth 3256
            <?php
3257
    	    $form = $this->formImageEdit;
3258
    	    $form->setAttributes([
3259
    	       'method'    => 'post',
3260
    	       'name'      => 'form-slide-image-edit',
3261
    	       'id'        => 'form-slide-image-edit'
3262
    	    ]);
3263
    	    $form->prepare();
3264
    	    echo $this->form()->openTag($form);
3265
 
3266
    	    $element = $form->get('type');
3267
    	    echo $this->formHidden($element);
3268
 
3269
    	    ?>
3270
            <!-- Modal Header -->
3271
            <div class="d-flex justify-content-center tituloEditor">
3272
              <h4>LABEL_EDIT_IMAGE_SLIDE</h4>
3273
 
3274
             </div>
3275
 
3276
            <!-- Modal body -->
3277
            <div class="grid-padre">
3278
                 <div class="form-group grid-1-2">
3279
    				<?php
3280
                        $element = $form->get('name');
3281
                        $element->setAttributes(['class' => 'form-control']);
3282
                        $element->setOptions(['label' => 'LABEL_NAME']);
3283
                        echo $this->formLabel($element);
3284
                        echo $this->formText($element);
3285
                    ?>
3286
				</div>
3287
 
3288
 
3289
                <?php
3290
                    $element = $form->get('file');
3291
					$element->setAttributes([ 'class' => 'file']);
3292
                    echo $this->formHidden($element);
3293
                ?>
3294
				<div class="form-group grid-1-2">
3295
    				<?php
3296
                        $element = $form->get('order');
3297
                        $element->setAttributes(['class' => 'form-control']);
3298
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3299
                        echo $this->formLabel($element);
3300
                        echo $this->formText($element);
3301
                    ?>
3302
				</div>
6625 nelberth 3303
 
6569 nelberth 3304
                <div class="contenido form-group " id="contenido"></div>
6505 nelberth 3305
      		</div>
1 www 3306
 
6505 nelberth 3307
 
3308
          	<?php echo $this->form()->closeTag($form); ?>
3309
</div>
1 www 3310
 
3311
 
3312
<!-- The Modal -->
6523 nelberth 3313
 
1 www 3314
 
3315
 
3316
 
3317
<!-- The Modal -->
6618 nelberth 3318
<div  id="company-microlearning-slide-video-add-box"  style='display:none'>
3319
 
1 www 3320
    		<?php
3321
    	    $form = $this->formVideoAdd;
3322
    	    $form->setAttributes([
3323
    	       'method'    => 'post',
3324
    	        'name'      => 'form-slide-video-add',
3325
    	        'id'        => 'form-slide-video-add'
3326
    	    ]);
3327
    	    $form->prepare();
3328
    	    echo $this->form()->openTag($form);
3329
 
3330
    	    $element = $form->get('type');
3331
    	    echo $this->formHidden($element);
3332
 
3333
    	    ?>
6618 nelberth 3334
 
3335
              <div class="d-flex justify-content-center tituloEditor">
3336
              <h4>LABEL_ADD_VIDEO_SLIDE</h4>
1 www 3337
 
6618 nelberth 3338
             </div>
3339
            <div class="grid-padre">
3340
				<div class="form-group  grid-1-2">
1 www 3341
    				<?php
3342
                        $element = $form->get('name');
3343
                        $element->setAttributes(['class' => 'form-control']);
3344
                        $element->setOptions(['label' => 'LABEL_NAME']);
3345
                        echo $this->formLabel($element);
3346
                        echo $this->formText($element);
3347
                    ?>
3348
				</div>
6618 nelberth 3349
				<div class="form-group  grid-1-2">
1 www 3350
    				<?php
3351
                        $element = $form->get('order');
3352
                        $element->setAttributes(['class' => 'form-control']);
3353
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3354
                        echo $this->formLabel($element);
3355
                        echo $this->formText($element);
3356
                    ?>
3357
				</div>
6618 nelberth 3358
				<div class="form-group  grid-1-2">
1 www 3359
 
3360
                 		<?php
3361
                        $element = $form->get('file');
3362
                        $element->setAttributes(['class' => 'form-control']);
3363
                        $element->setOptions(['label' => 'LABEL_VIDEO']);
3364
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
3365
                        echo $this->formLabel($element);
3366
                        ?>
3367
                        <div class="file-loading">
3368
                        <?php echo $this->formFile($element);?>
3369
                        </div>
3370
 
3371
          		</div>
6625 nelberth 3372
                  <?php
3373
                    $element = $form->get('background');
3374
					$element->setAttributes([ 'class' => 'background']);
6844 nelberth 3375
                    echo $this->formHidden($element);
6625 nelberth 3376
                ?>
6618 nelberth 3377
          		<div class="contenido form-group " id="contenido"></div>
1 www 3378
      		</div>
3379
 
3380
            <!-- Modal footer -->
6618 nelberth 3381
 
1 www 3382
          	<?php echo $this->form()->closeTag($form); ?>
6618 nelberth 3383
 
1 www 3384
</div>
3385
 
3386
 
3387
 
3388
 
3389
<!-- The Modal -->
6646 nelberth 3390
<div  id="company-microlearning-slide-video-edit-box"  style='display:none'>
6644 nelberth 3391
 
1 www 3392
        	<?php
3393
    	    $form = $this->formVideoEdit;
3394
    	    $form->setAttributes([
3395
    	       'method'    => 'post',
3396
    	       'name'      => 'form-slide-video-edit',
3397
    	       'id'        => 'form-slide-video-edit'
3398
    	    ]);
3399
    	    $form->prepare();
3400
    	    echo $this->form()->openTag($form);
3401
 
3402
    	    $element = $form->get('type');
3403
    	    echo $this->formHidden($element);
3404
 
3405
    	    ?>
3406
 
6654 nelberth 3407
 
3408
              <div class="d-flex justify-content-center tituloEditor">
3409
              <h4>LABEL_EDIT_VIDEO_SLIDE</h4>
1 www 3410
 
6654 nelberth 3411
             </div>
3412
 
6643 nelberth 3413
            <!-- Modal body -->
6644 nelberth 3414
            <div class="grid-padre">
6645 nelberth 3415
				<div class="form-group grid-1-2">
1 www 3416
    				<?php
3417
                        $element = $form->get('name');
3418
                        $element->setAttributes(['class' => 'form-control']);
3419
                        $element->setOptions(['label' => 'LABEL_NAME']);
3420
                        echo $this->formLabel($element);
3421
                        echo $this->formText($element);
3422
                    ?>
3423
				</div>
6645 nelberth 3424
				<div class="form-group grid-1-2">
1 www 3425
    				<?php
3426
                        $element = $form->get('order');
3427
                        $element->setAttributes(['class' => 'form-control']);
3428
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3429
                        echo $this->formLabel($element);
3430
                        echo $this->formText($element);
3431
                    ?>
3432
				</div>
6645 nelberth 3433
				<div class="form-group grid-1-2">
6643 nelberth 3434
 
1 www 3435
                 		<?php
3436
                        $element = $form->get('file');
3437
                        $element->setAttributes(['class' => 'form-control']);
3438
                        $element->setOptions(['label' => 'LABEL_VIDEO']);
3439
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
3440
                        echo $this->formLabel($element);
3441
                        ?>
3442
                        <div class="file-loading">
3443
                        <?php echo $this->formFile($element);?>
3444
                        </div>
6643 nelberth 3445
 
1 www 3446
          		</div>
6645 nelberth 3447
          		<?php
3448
                    $element = $form->get('background');
3449
					$element->setAttributes([ 'class' => 'background']);
3450
                    echo $this->formHidden($element);
3451
                ?>
3452
          		<div class="contenido form-group " id="contenido"></div>
1 www 3453
      		</div>
6643 nelberth 3454
 
6644 nelberth 3455
 
6643 nelberth 3456
          	<?php echo $this->form()->closeTag($form); ?>
6644 nelberth 3457
 
1 www 3458
</div>
3459
 
3460
 
3461
 
3462
 
3463
<!-- The Modal -->
6655 nelberth 3464
<div id="company-microlearning-slide-document-add-box" style='display:none'>
6654 nelberth 3465
 
1 www 3466
    		<?php
3467
    	    $form = $this->formDocumentAdd;
3468
    	    $form->setAttributes([
3469
    	       'method'    => 'post',
3470
    	        'name'      => 'form-slide-document-add',
3471
    	        'id'        => 'form-slide-document-add'
3472
    	    ]);
3473
    	    $form->prepare();
3474
    	    echo $this->form()->openTag($form);
3475
 
3476
    	    $element = $form->get('type');
3477
    	    echo $this->formHidden($element);
3478
 
3479
    	    ?>
6654 nelberth 3480
 
3481
              <div class="d-flex justify-content-center tituloEditor">
3482
              <h4>LABEL_ADD_DOCUMENT_SLIDE</h4>
1 www 3483
 
6654 nelberth 3484
             </div>
1 www 3485
            <!-- Modal body -->
6654 nelberth 3486
            <div class="grid-padre">
3487
				<div class="form-group  grid-1-2">
1 www 3488
    				<?php
3489
                        $element = $form->get('name');
3490
                        $element->setAttributes(['class' => 'form-control']);
3491
                        $element->setOptions(['label' => 'LABEL_NAME']);
3492
                        echo $this->formLabel($element);
3493
                        echo $this->formText($element);
3494
                    ?>
3495
				</div>
6654 nelberth 3496
				<div class="form-group  grid-1-2">
1 www 3497
    				<?php
3498
                        $element = $form->get('order');
3499
                        $element->setAttributes(['class' => 'form-control']);
3500
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3501
                        echo $this->formLabel($element);
3502
                        echo $this->formText($element);
3503
                    ?>
3504
				</div>
6654 nelberth 3505
				<div class="form-group  grid-1-2">
1 www 3506
 
3507
                 		<?php
3508
                        $element = $form->get('file');
3509
                        $element->setAttributes(['class' => 'form-control']);
3510
                        $element->setOptions(['label' => 'LABEL_DOCUMENT']);
3511
                        $element->setAttributes(['accept' => 'application/pdf']);
3512
                        echo $this->formLabel($element);
3513
                        ?>
3514
                        <div class="file-loading">
3515
                        <?php echo $this->formFile($element);?>
3516
                        </div>
3517
 
3518
          		</div>
6654 nelberth 3519
                  <?php
3520
                    $element = $form->get('background');
3521
					$element->setAttributes([ 'class' => 'background']);
3522
                    echo $this->formHidden($element);
3523
                ?>
3524
          		<div class="contenido form-group " id="contenido"></div>
1 www 3525
      		</div>
3526
 
3527
            <!-- Modal footer -->
6654 nelberth 3528
 
1 www 3529
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3530
 
1 www 3531
</div>
3532
 
3533
 
3534
 
3535
 
3536
<!-- The Modal -->
6655 nelberth 3537
<div id="company-microlearning-slide-document-edit-box" style='display:none'>
6654 nelberth 3538
 
1 www 3539
    		<?php
3540
    	    $form = $this->formDocumentEdit;
3541
    	    $form->setAttributes([
3542
    	       'method'    => 'post',
3543
    	       'name'      => 'form-slide-document-edit',
3544
    	       'id'        => 'form-slide-document-edit'
3545
    	    ]);
3546
    	    $form->prepare();
3547
    	    echo $this->form()->openTag($form);
3548
 
3549
    	    $element = $form->get('type');
3550
    	    echo $this->formHidden($element);
3551
 
3552
    	    ?>
3553
            <!-- Modal Header -->
6654 nelberth 3554
 
3555
              <div class="d-flex justify-content-center tituloEditor">
3556
              <h4>LABEL_EDIT_DOCUMENT_SLIDE</h4>
1 www 3557
 
6654 nelberth 3558
             </div>
1 www 3559
            <!-- Modal body -->
6654 nelberth 3560
            <div class="grid-padre">
3561
				<div class="form-group  grid-1-2">
1 www 3562
    				<?php
3563
                        $element = $form->get('name');
3564
                        $element->setAttributes(['class' => 'form-control']);
3565
                        $element->setOptions(['label' => 'LABEL_NAME']);
3566
                        echo $this->formLabel($element);
3567
                        echo $this->formText($element);
3568
                    ?>
3569
				</div>
6654 nelberth 3570
				<div class="form-group  grid-1-2">
1 www 3571
    				<?php
3572
                        $element = $form->get('order');
3573
                        $element->setAttributes(['class' => 'form-control']);
3574
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3575
                        echo $this->formLabel($element);
3576
                        echo $this->formText($element);
3577
                    ?>
3578
				</div>
6654 nelberth 3579
				<div class="form-group  grid-1-2">
1 www 3580
 
3581
                 		<?php
3582
                        $element = $form->get('file');
3583
                        $element->setAttributes(['class' => 'form-control']);
3584
                        $element->setOptions(['label' => 'LABEL_DOCUMENT']);
3585
                        $element->setAttributes(['accept' => 'application/pdf']);
3586
                        echo $this->formLabel($element);
3587
                        ?>
3588
                        <div class="file-loading">
3589
                        <?php echo $this->formFile($element);?>
3590
                        </div>
3591
 
3592
          		</div>
6654 nelberth 3593
 
3594
          		<?php
3595
                    $element = $form->get('background');
3596
					$element->setAttributes([ 'class' => 'background']);
3597
                    echo $this->formHidden($element);
3598
                ?>
3599
          		<div class="contenido form-group " id="contenido"></div>
1 www 3600
      		</div>
3601
 
3602
            <!-- Modal footer -->
6654 nelberth 3603
 
1 www 3604
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3605
 
1 www 3606
</div>
3607
 
3608
 
3609
 
3610
<!-- The Modal -->
6655 nelberth 3611
<div  id="company-microlearning-slide-audio-add-box" style='display:none'>
6654 nelberth 3612
 
1 www 3613
    		<?php
3614
    	    $form = $this->formAudioAdd;
3615
    	    $form->setAttributes([
3616
    	       'method'    => 'post',
3617
    	        'name'      => 'form-slide-audio-add',
3618
    	        'id'        => 'form-slide-audio-add'
3619
    	    ]);
3620
    	    $form->prepare();
3621
    	    echo $this->form()->openTag($form);
3622
 
3623
    	    $element = $form->get('type');
3624
    	    echo $this->formHidden($element);
3625
 
3626
    	    ?>
3627
            <!-- Modal Header -->
6654 nelberth 3628
 
3629
              <div class="d-flex justify-content-center tituloEditor">
3630
              <h4>LABEL_ADD_AUDIO_SLIDE</h4>
1 www 3631
 
6654 nelberth 3632
             </div>
3633
 
1 www 3634
            <!-- Modal body -->
6654 nelberth 3635
            <div class="grid-padre">
3636
				<div class="form-group  grid-1-2">
1 www 3637
    				<?php
3638
                        $element = $form->get('name');
3639
                        $element->setAttributes(['class' => 'form-control']);
3640
                        $element->setOptions(['label' => 'LABEL_NAME']);
3641
                        echo $this->formLabel($element);
3642
                        echo $this->formText($element);
3643
                    ?>
3644
				</div>
6654 nelberth 3645
				<div class="form-group  grid-1-2">
1 www 3646
    				<?php
3647
                        $element = $form->get('order');
3648
                        $element->setAttributes(['class' => 'form-control']);
3649
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3650
                        echo $this->formLabel($element);
3651
                        echo $this->formText($element);
3652
                    ?>
3653
				</div>
6658 nelberth 3654
				<div class="form-group  grid-1-2">
1 www 3655
 
3656
                 		<?php
3657
                        $element = $form->get('file');
3658
                        $element->setAttributes(['class' => 'form-control']);
3659
                        $element->setOptions(['label' => 'LABEL_AUDIO']);
3660
                        $element->setAttributes(['accept' => 'audio/x-wav, audio/mpeg']);
3661
                        echo $this->formLabel($element);
3662
                        ?>
3663
                        <div class="file-loading">
3664
                        <?php echo $this->formFile($element);?>
3665
                        </div>
3666
 
3667
          		</div>
6657 nelberth 3668
          		<?php
3669
                    $element = $form->get('background');
3670
					$element->setAttributes([ 'class' => 'background']);
3671
                    echo $this->formHidden($element);
3672
                ?>
3673
          		<div class="contenido form-group " id="contenido"></div>
1 www 3674
      		</div>
3675
 
3676
            <!-- Modal footer -->
6654 nelberth 3677
 
1 www 3678
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3679
 
1 www 3680
</div>
3681
 
3682
 
3683
 
3684
<!-- The Modal -->
6655 nelberth 3685
<div  id="company-microlearning-slide-audio-edit-box" style='display:none'>
6654 nelberth 3686
 
1 www 3687
        	<?php
3688
    	    $form = $this->formAudioEdit;
3689
    	    $form->setAttributes([
3690
    	       'method'    => 'post',
3691
    	       'name'      => 'form-slide-audio-edit',
3692
    	       'id'        => 'form-slide-audio-edit'
3693
    	    ]);
3694
    	    $form->prepare();
3695
    	    echo $this->form()->openTag($form);
3696
 
3697
    	    $element = $form->get('type');
3698
    	    echo $this->formHidden($element);
3699
 
3700
    	    ?>
3701
 
3702
            <!-- Modal Header -->
6654 nelberth 3703
 
3704
              <div class="d-flex justify-content-center tituloEditor">
3705
              <h4>LABEL_EDIT_AUDIO_SLIDE</h4>
1 www 3706
 
6654 nelberth 3707
             </div>
1 www 3708
            <!-- Modal body -->
6654 nelberth 3709
            <div class="grid-padre">
1 www 3710
				<div class="form-group">
3711
    				<?php
3712
                        $element = $form->get('name');
3713
                        $element->setAttributes(['class' => 'form-control']);
3714
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3715
                        echo $this->formLabel($element);
3716
                        echo $this->formText($element);
3717
                    ?>
3718
				</div>
6654 nelberth 3719
				<div class="form-group  grid-1-2">
1 www 3720
    				<?php
3721
                        $element = $form->get('order');
3722
                        $element->setAttributes(['class' => 'form-control']);
3723
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3724
                        echo $this->formLabel($element);
3725
                        echo $this->formText($element);
3726
                    ?>
3727
				</div>
6658 nelberth 3728
				<div class="form-group  grid-1-2">
1 www 3729
 
3730
                 		<?php
3731
                        $element = $form->get('file');
3732
                        $element->setAttributes(['class' => 'form-control']);
3733
                        $element->setOptions(['label' => 'LABEL_AUDIO']);
3734
                        $element->setAttributes(['accept' => 'audio/x-wav, audio/mpeg']);
3735
                        echo $this->formLabel($element);
3736
                        ?>
3737
                        <div class="file-loading">
3738
                        <?php echo $this->formFile($element);?>
3739
                        </div>
3740
 
3741
          		</div>
6654 nelberth 3742
 
3743
          		<?php
3744
                    $element = $form->get('background');
3745
					$element->setAttributes([ 'class' => 'background']);
3746
                    echo $this->formHidden($element);
3747
                ?>
3748
          		<div class="contenido form-group " id="contenido"></div>
1 www 3749
      		</div>
3750
 
3751
            <!-- Modal footer -->
6654 nelberth 3752
 
1 www 3753
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3754
 
1 www 3755
</div>
3756
 
3757
 
3758
 
3759
<!-- The Modal -->
6655 nelberth 3760
<div  id="company-microlearning-slide-quizz-add-box" style='display:none'>
6654 nelberth 3761
 
1 www 3762
    		<?php
3763
    	    $form = $this->formQuizzAdd;
3764
    	    $form->setAttributes([
3765
    	       'method'    => 'post',
3766
    	        'name'      => 'form-slide-quizz-add',
3767
    	        'id'        => 'form-slide-quizz-add'
3768
    	    ]);
3769
    	    $form->prepare();
3770
    	    echo $this->form()->openTag($form);
3771
 
3772
    	    $element = $form->get('type');
3773
    	    echo $this->formHidden($element);
3774
 
3775
    	    ?>
3776
            <!-- Modal Header -->
6654 nelberth 3777
 
3778
              <div class="d-flex justify-content-center tituloEditor">
3779
              <h4>LABEL_ADD_QUIZ_SLIDE</h4>
1 www 3780
 
6654 nelberth 3781
             </div>
1 www 3782
            <!-- Modal body -->
6654 nelberth 3783
            <div class="grid-padre">
3784
				<div class="form-group  grid-1-2">
1 www 3785
    				<?php
3786
                        $element = $form->get('name');
3787
                        $element->setAttributes(['class' => 'form-control']);
3788
                        $element->setOptions(['label' => 'LABEL_NAME']);
3789
                        echo $this->formLabel($element);
3790
                        echo $this->formText($element);
3791
                    ?>
3792
				</div>
6654 nelberth 3793
				<div class="form-group  grid-1-2">
1 www 3794
    				<?php
3795
                        $element = $form->get('order');
3796
                        $element->setAttributes(['class' => 'form-control']);
3797
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3798
                        echo $this->formLabel($element);
3799
                        echo $this->formText($element);
3800
                    ?>
3801
				</div>
6657 nelberth 3802
 
6658 nelberth 3803
				<div class="form-group  grid-1-2">
1 www 3804
    				<?php
3805
                        $element = $form->get('quiz_id');
3806
                        $element->setAttributes(['class' => 'form-control']);
3807
                        $element->setOptions(['label' => 'LABEL_QUIZ']);
3808
                        echo $this->formLabel($element);
3809
                        echo $this->formSelect($element);
3810
                    ?>
3811
				</div>
6657 nelberth 3812
                <?php
3813
                    $element = $form->get('background');
3814
					$element->setAttributes([ 'class' => 'background']);
3815
                    echo $this->formHidden($element);
3816
                ?>
3817
          		<div class="contenido form-group " id="contenido"></div>
1 www 3818
      		</div>
3819
 
3820
            <!-- Modal footer -->
6654 nelberth 3821
 
1 www 3822
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3823
 
1 www 3824
</div>
3825
 
3826
 
3827
 
3828
<!-- The Modal -->
6655 nelberth 3829
<div  id="company-microlearning-slide-quizz-edit-box" style='display:none'>
6654 nelberth 3830
 
1 www 3831
        	<?php
3832
    	    $form = $this->formQuizzEdit;
3833
    	    $form->setAttributes([
3834
    	       'method'    => 'post',
3835
    	       'name'      => 'form-slide-quizz-edit',
3836
    	       'id'        => 'form-slide-quizz-edit'
3837
    	    ]);
3838
    	    $form->prepare();
3839
    	    echo $this->form()->openTag($form);
3840
 
3841
    	    $element = $form->get('type');
3842
    	    echo $this->formHidden($element);
3843
 
3844
    	    ?>
3845
 
3846
            <!-- Modal Header -->
6654 nelberth 3847
 
3848
              <div class="d-flex justify-content-center tituloEditor">
3849
              <h4>LABEL_EDIT_QUIZ_SLIDE</h4>
1 www 3850
 
6654 nelberth 3851
             </div>
1 www 3852
            <!-- Modal body -->
6654 nelberth 3853
            <div class="grid-padre">
3854
				<div class="form-group  grid-1-2">
1 www 3855
    				<?php
3856
                        $element = $form->get('name');
3857
                        $element->setAttributes(['class' => 'form-control']);
3858
                        $element->setOptions(['label' => 'LABEL_NAME']);
3859
                        echo $this->formLabel($element);
3860
                        echo $this->formText($element);
3861
                    ?>
3862
				</div>
6654 nelberth 3863
				<div class="form-group  grid-1-2">
1 www 3864
    				<?php
3865
                        $element = $form->get('order');
3866
                        $element->setAttributes(['class' => 'form-control']);
3867
                        $element->setOptions(['label' => 'LABEL_ORDER']);
3868
                        echo $this->formLabel($element);
3869
                        echo $this->formText($element);
3870
                    ?>
3871
				</div>
6657 nelberth 3872
 
6658 nelberth 3873
				<div class="form-group  grid-1-2">
1 www 3874
    				<?php
3875
                        $element = $form->get('quiz_id');
3876
                        $element->setAttributes(['class' => 'form-control']);
3877
                        $element->setOptions(['label' => 'LABEL_QUIZ']);
3878
                        echo $this->formLabel($element);
3879
                        echo $this->formSelect($element);
3880
                    ?>
3881
				</div>
6657 nelberth 3882
				<?php
3883
                    $element = $form->get('background');
3884
					$element->setAttributes([ 'class' => 'background']);
3885
                    echo $this->formHidden($element);
3886
                ?>
3887
          		<div class="contenido form-group " id="contenido"></div>
1 www 3888
 
3889
      		</div>
3890
 
3891
            <!-- Modal footer -->
6657 nelberth 3892
      		<
1 www 3893
 
3894
          	<?php echo $this->form()->closeTag($form); ?>
6656 nelberth 3895
 
1 www 3896
</div>
3897
 
3898
 
3899
 
3900
<!-- The Modal -->
6652 nelberth 3901
<div class="modal" id="company-microlearning-play-video-box" >
1 www 3902
	<div class="modal-dialog ">
3903
    	<div class="modal-content">
3904
 
3905
            <!-- Modal Header -->
3906
      		<div class="modal-header">
3907
        		<h4 class="modal-title">LABEL_PLAY_VIDEO</h4>
3908
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
3909
      		</div>
3910
 
3911
            <!-- Modal body -->
3912
            <div class="modal-body">
3913
				<video src=""  style="width: 300px; height: auto" controls preload="false" autoplay="false"  poster="" id="microlearning-play-video"></video>
3914
      		</div>
3915
 
3916
            <!-- Modal footer -->
3917
      		<div class="modal-footer">
3918
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
3919
          	</div>
3920
         </div>
3921
	</div>
3922
</div>
3923
 
3924
 
3925
 
3926
 
3927
 
3928
<!-- The Modal -->
6652 nelberth 3929
<div class="modal" id="company-microlearning-play-audio-box" >
1 www 3930
	<div class="modal-dialog ">
3931
    	<div class="modal-content">
3932
 
3933
            <!-- Modal Header -->
3934
      		<div class="modal-header">
3935
        		<h4 class="modal-title">LABEL_PLAY_AUDIO</h4>
3936
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
3937
      		</div>
3938
 
3939
            <!-- Modal body -->
3940
            <div class="modal-body">
3941
				<audio src="" controls autoplay="false"  id="microlearning-play-audio" >
3942
                  Your browser does not support the <code>audio</code> element.
3943
                </audio>
3944
      		</div>
3945
 
3946
            <!-- Modal footer -->
3947
      		<div class="modal-footer">
3948
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
3949
          	</div>
3950
         </div>
3951
	</div>
3952
</div>
3953
 
3954
 
3955
<!-- The Modal -->
3956
<div class="modal" id="company-microlearning-view-image-box">
3957
	<div class="modal-dialog ">
3958
    	<div class="modal-content">
3959
 
3960
            <!-- Modal Header -->
3961
      		<div class="modal-header">
6108 nelberth 3962
        		<h4 class="modal-title">LABEL_IMAGE</h4>
1 www 3963
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
3964
      		</div>
3965
 
3966
            <!-- Modal body -->
3967
            <div class="modal-body text-center">
3968
				<img src="" class="img img-responsive" style="width: 300px; height: auto" id="image-view" />
3969
      		</div>
3970
 
3971
            <!-- Modal footer -->
3972
      		<div class="modal-footer">
3973
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
3974
          	</div>
3975
         </div>
3976
	</div>
3977
</div>
3978
 
3979
 
3980
<!-- The Modal -->
3981
<div class="modal" id="company-microlearning-view-document-box">
3982
	<div class="modal-dialog ">
3983
    	<div class="modal-content">
3984
 
3985
            <!-- Modal Header -->
3986
      		<div class="modal-header">
3987
        		<h4 class="modal-title">LABEL_DOCUMENT</h4>
3988
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
3989
      		</div>
3990
 
3991
            <!-- Modal body -->
3992
            <div class="modal-body text-center">
3993
            	<iframe id="document-view" style="width: 450px; height: 300px; scroll: auto">
3994
 
3995
            	</iframe>
3996
       	</div>
3997
 
3998
            <!-- Modal footer -->
3999
      		<div class="modal-footer">
4000
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
4001
          	</div>
4002
         </div>
4003
	</div>
4004
</div>
4005
 
4006
 
4007
<!-- The Modal -->
4008
<div class="modal" id="company-microlearning-view-text-box">
4009
	<div class="modal-dialog modal-xl">
4010
    	<div class="modal-content">
4011
 
4012
            <!-- Modal Header -->
4013
      		<div class="modal-header">
4014
        		<h4 class="modal-title">LABEL_TEXT</h4>
4015
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
4016
      		</div>
4017
 
4018
            <!-- Modal body -->
4019
            <div class="modal-body" >
4020
            	<div id="document-text" style="width: 100%; height: 300px; scroll: auto; overflow: auto;">
4021
 
4022
 
4023
            	</div>
4024
 
4025
       	</div>
4026
 
4027
            <!-- Modal footer -->
4028
      		<div class="modal-footer">
4029
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
4030
          	</div>
4031
         </div>
4032
	</div>
4033
</div>
4034
 
4035
 
4036
<!-- The Modal -->
4037
<div class="modal" id="company-microlearning-add-capsule-type-box">
4038
	<div class="modal-dialog ">
4039
    	<div class="modal-content">
4040
 
4041
            <!-- Modal Header -->
4042
      		<div class="modal-header">
6092 nelberth 4043
        		<h4 class="modal-title">LABEL_ADD_CAPSULE_SELECT_TYPE</h4>
1 www 4044
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
4045
      		</div>
4046
 
4047
            <!-- Modal body -->
4048
            <div class="modal-body">
4049
				<table style="width: 100%">
4050
					<tr>
4051
      					<td class="text-left" ><button type="button" class="btn btn-primary btn-add-text"> Texto </button></td>
4052
      					<td class="text-left" ><button type="button" class="btn btn-primary btn-add-image"> Imagén </button></td>
4053
      				</tr>
4054
      				<tr>
4055
						<td class="text-left" ><button type="button" class="btn btn-primary btn-add-video"> Video </button></td>
4056
						<td class="text-left" ><button type="button" class="btn btn-primary btn-add-audio"> Audio </button></td>
4057
					</tr>
4058
					<tr>
4059
						<td class="text-left" ><button type="button" class="btn btn-primary btn-add-document"> Documento </button></td>
4060
        				<td class="text-left" ><button type="button" class="btn btn-primary btn-add-quizz"> Cuestionario </button></td>
4061
        			</tr>
4062
                </table>
4063
      		</div>
4064
 
4065
            <!-- Modal footer -->
4066
      		<div class="modal-footer">
4067
        		<button type="button" class="btn btn-danger" data-dismiss="modal">LABEL_CLOSE</button>
4068
          	</div>
4069
         </div>
4070
	</div>
4071
</div>
4072
 
4073
 
4074
 
4075
 
4076