Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16891 Rev 16905
Línea 13... Línea 13...
13
$allowDelete    = $acl->isAllowed($roleName, 'microlearning/content/capsules/delete') ? 1 : 0;
13
$allowDelete    = $acl->isAllowed($roleName, 'microlearning/content/capsules/delete') ? 1 : 0;
14
$allowUsers     = $acl->isAllowed($roleName, 'microlearning/content/capsules/users') ? 1 : 0;
14
$allowUsers     = $acl->isAllowed($roleName, 'microlearning/content/capsules/users') ? 1 : 0;
Línea 15... Línea -...
15
 
-
 
-
 
15
 
16
 
16
 
17
 
17
 
Línea 18... Línea 18...
18
$this->headLink()->setStylesheet($this->basePath('assets/vendors/nelberth-editor/style.css'));
18
 
Línea 174... Línea 174...
174
                    json.recordsTotal       = 0;
174
                    json.recordsTotal       = 0;
175
                    json.recordsFiltered    = 0;
175
                    json.recordsFiltered    = 0;
176
                    json.data               = [];
176
                    json.data               = [];
Línea 177... Línea 177...
177
                    
177
                    
178
                    if(response.success) {
178
                    if(response.success) {
Línea 179... Línea 179...
179
                        $('#form-capsule-add').attr('action', response.data.link_add ); 
179
                        $('#form-add').attr('action', response.data.link_add ); 
180
 
180
 
181
                        json.recordsTotal       = response.data.total;
181
                        json.recordsTotal       = response.data.total;
182
                        json.recordsFiltered    = response.data.total;
182
                        json.recordsFiltered    = response.data.total;
Línea 294... Línea 294...
294
              ],
294
              ],
295
        });
295
        });
Línea 296... Línea 296...
296
 
296
 
297
    
297
    
298
        var seleccionarCampo;
298
        var seleccionarCampo;
299
    var validatorAdd = $('#form-capsule-add').validate({
299
    var validatorAdd = $('#form-add').validate({
300
        debug: true,
300
        debug: true,
301
        onclick: false,
301
        onclick: false,
302
        onkeyup: false,
302
        onkeyup: false,
Línea 312... Línea 312...
312
                },
312
                },
313
                required: true
313
                required: true
314
            },
314
            },
315
           'file': {
315
           'file': {
316
                required: true,
316
                required: true,
-
 
317
                extension: 'jpg|jpeg|png',
-
 
318
                accept: 'image/jpg,image/jpeg,image/png'
317
            },
319
            },
318
            'order' : {
320
            'order' : {
319
                required: true,
321
                required: true,
320
                digits: true,
322
                digits: true,
321
                min: 1,
323
                min: 1,
322
                max: 250
324
                max: 250
323
            },
325
            },
324
           'marketplace': {
326
           'marketplace': {
325
                required: true,
327
                required: false,
-
 
328
                extension: 'jpg|jpeg|png',
-
 
329
                accept: 'image/jpg,image/jpeg,image/png'
326
            },
330
            },
327
            'status' : {
331
            'status' : {
328
                required: true,
332
                required: true,
329
            },
333
            },
330
            'privacy' : {
334
            'privacy' : {
Línea 333... Línea 337...
333
            'type' : {
337
            'type' : {
334
                required: true,
338
                required: true,
335
            },
339
            },
336
            'cost' : {
340
            'cost' : {
337
                required: function() {
341
                required: function() {
338
                    return $('#form-capsule-add #type').val() == 's';
342
                    return $('#form-add #type').val() == 's';
339
                },
343
                },
340
                'number' : true,
344
                'number' : true,
341
                'min' : 0
345
                'min' : 0
342
            }
346
            }
343
        },
347
        },
Línea 352... Línea 356...
352
			NProgress.start();
356
			NProgress.start();
353
            $.ajax({
357
            $.ajax({
354
                'dataType'  : 'json',
358
                'dataType'  : 'json',
355
                'accept'    : 'application/json',
359
                'accept'    : 'application/json',
356
                'method'    : 'post',
360
                'method'    : 'post',
357
                'url'       :  $('#form-capsule-add').attr('action'),
361
                'url'       :  $('#form-add').attr('action'),
358
                'data'      :  formdata,
362
                'data'      :  formdata,
359
                'processData': false,
363
                'processData': false,
360
                'contentType': false,
364
                'contentType': false,
361
            }).done(function(response) {
365
            }).done(function(response) {
362
                if(response['success']) {
366
                if(response['success']) {
363
                    $.fn.showSuccess(response['data']);
367
                    $.fn.showSuccess(response['data']);
364
                       console.log(response)
-
 
365
                    $('body, html').animate({scrollTop: '0px'}, 300);
-
 
-
 
368
      
366
					$('#content1').css('display','block');
369
					gridTable.api().ajax.reload(null, false);
-
 
370
 
367
                    $('.contenido').html(''); 
371
                    $('#row-add').hide();
368
            		seleccionarCampo.css('display','none');
372
                    $('#row-edit').hide();
369
					$('#titleTypeImage').html('LABEL_IMAGE_MARKETPLACE')
-
 
370
					$('.marketplaceImg').attr('src', '')
-
 
371
					fileToggle=true;
-
 
372
                    gridTable.api().ajax.reload(null, false);
373
                    $('#row-listing').show();
-
 
374
 
-
 
375
                    
373
                } else {
376
                } else {
374
                    validatorAdd.resetForm();
377
                    validatorAdd.resetForm();
375
                    if(jQuery.type(response['data']) == 'string') {
378
                    if(jQuery.type(response['data']) == 'string') {
376
                        $.fn.showError(response['data']);
379
                        $.fn.showError(response['data']);
377
                    } else  {
380
                    } else  {
378
                        $.each(response['data'], function( fieldname, errors ) {
381
                        $.each(response['data'], function( fieldname, errors ) {
379
                            $.fn.showFormErrorValidator('#form-capsule-add #' + fieldname, errors);
382
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
380
                        });
383
                        });
381
                    }
384
                    }
382
                }
385
                }
383
            }).fail(function( jqXHR, textStatus, errorThrown) {
386
            }).fail(function( jqXHR, textStatus, errorThrown) {
384
				console.log(jqXHR)
387
				console.log(jqXHR)
Línea 392... Línea 395...
392
        invalidHandler: function(form, validator) {
395
        invalidHandler: function(form, validator) {
Línea 393... Línea 396...
393
            
396
            
394
        }
397
        }
Línea 395... Línea 398...
395
    });
398
    });
396
 
399
 
397
    var validatorEdit  = $('#form-capsule-edit').validate({
400
    var validatorEdit  = $('#form-edit').validate({
398
        debug: true,
401
        debug: true,
399
        onclick: false,
402
        onclick: false,
400
        onkeyup: false,
403
        onkeyup: false,
Línea 409... Línea 412...
409
                        CKEDITOR.instances.description_edit.updateElement();
412
                        CKEDITOR.instances.description_edit.updateElement();
410
                },
413
                },
411
                required: true
414
                required: true
412
            },
415
            },
413
           'file': {
416
           'file': {
414
                required: true,
417
                required: false,
-
 
418
                extension: 'jpg|jpeg|png',
-
 
419
                accept: 'image/jpg,image/jpeg,image/png'
415
            },
420
            },
416
            'order' : {
421
            'order' : {
417
                required: true,
422
                required: true,
418
                digits: true,
423
                digits: true,
419
                min: 1,
424
                min: 1,
420
                max: 250
425
                max: 250
421
            },
426
            },
422
           'marketplace': {
427
           'marketplace': {
423
                required: true,
428
                required: false,
-
 
429
                extension: 'jpg|jpeg|png',
-
 
430
                accept: 'image/jpg,image/jpeg,image/png'
424
            },
431
            },
425
            'status' : {
432
            'status' : {
426
                required: true,
433
                required: true,
427
            },
434
            },
428
            'privacy' : {
435
            'privacy' : {
Línea 431... Línea 438...
431
            'type' : {
438
            'type' : {
432
                required: true,
439
                required: true,
433
            },
440
            },
434
            'cost' : {
441
            'cost' : {
435
                required: function() {
442
                required: function() {
436
                    return $('#form-capsule-edit #type').val() == 's';
443
                    return $('#form-edit #type').val() == 's';
437
                },
444
                },
438
                'number' : true,
445
                'number' : true,
439
                'min' : 0
446
                'min' : 0
440
            }
447
            }
441
        },
448
        },
Línea 450... Línea 457...
450
			NProgress.start();
457
			NProgress.start();
451
            $.ajax({
458
            $.ajax({
452
                'dataType'  : 'json',
459
                'dataType'  : 'json',
453
                'accept'    : 'application/json',
460
                'accept'    : 'application/json',
454
                'method'    : 'post',
461
                'method'    : 'post',
455
                'url'       :  $('#form-capsule-edit').attr('action'),
462
                'url'       :  $('#form-edit').attr('action'),
456
                'data'      :  formdata,
463
                'data'      :  formdata,
457
                'processData': false,
464
                'processData': false,
458
                'contentType': false,
465
                'contentType': false,
459
            }).done(function(response) {
466
            }).done(function(response) {
460
                if(response['success']) {
467
                if(response['success']) {
461
                    $.fn.showSuccess(response['data']);
468
                    $.fn.showSuccess(response['data']);
462
					console.log(response)
-
 
463
					$('body, html').animate({scrollTop: '0px'}, 300);
-
 
464
					$('#content1').css('display','block');
-
 
465
                    $('.contenido').html(''); 
-
 
466
            		seleccionarCampo.css('display','none');
-
 
467
					$('#titleTypeImage').html('LABEL_IMAGE_MARKETPLACE')
-
 
468
					$('.marketplaceImg').attr('src', '')
-
 
469
					fileToggle=true;
-
 
470
					imagenEdit='';
-
 
-
 
469
					
471
                    gridTable.api().ajax.reload(null, false);
470
                    gridTable.api().ajax.reload(null, false);
-
 
471
 
-
 
472
                    $('#row-add').hide();
-
 
473
                    $('#row-edit').hide();
-
 
474
                    $('#row-listing').show();
-
 
475
 
-
 
476
                    
472
                } else {
477
                } else {
473
                    validatorAdd.resetForm();
478
                    validatorEdit.resetForm();
474
                    if(jQuery.type(response['data']) == 'string') {
479
                    if(jQuery.type(response['data']) == 'string') {
475
                        $.fn.showError(response['data']);
480
                        $.fn.showError(response['data']);
476
                    } else  {
481
                    } else  {
477
                        $.each(response['data'], function( fieldname, errors ) {
482
                        $.each(response['data'], function( fieldname, errors ) {
478
                            $.fn.showFormErrorValidator('#form-capsule-edit #' + fieldname, errors);
483
                            $.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
479
                        });
484
                        });
480
                    }
485
                    }
481
                }
486
                }
482
            }).fail(function( jqXHR, textStatus, errorThrown) {
487
            }).fail(function( jqXHR, textStatus, errorThrown) {
483
				console.log(jqXHR)
-
 
-
 
488
 
484
                $.fn.showError(textStatus);
489
                $.fn.showError(textStatus);
485
            }).always(function() {
490
            }).always(function() {
Línea 486... Línea -...
486
 
-
 
-
 
491
 
487
				$('#boton_recortar').prop('disabled', false);
492
 
488
                NProgress.done();
493
                NProgress.done();
489
            });
494
            });
490
            return false;
495
            return false;
491
        },
496
        },
Línea 498... Línea 503...
498
 
503
 
499
        $('body').on('click', '.btn-view-image-marketplace', function(e) {
504
        $('body').on('click', '.btn-view-image-marketplace', function(e) {
Línea 500... Línea 505...
500
            e.preventDefault();
505
            e.preventDefault();
501
    
506
    
502
            $('#image-marketplace').attr('src', $(this).data('href'));
507
            $('#image-marketplace').attr('src', $(this).data('href'));
503
            $('#modalAppMarkeplate').modal('show');
508
            $('#modalPreviewMarketPlace').modal('show');
Línea 504... Línea 509...
504
            return false;
509
            return false;
505
        });
510
        });
Línea 506... Línea 511...
506
    
511
    
507
        $('body').on('click', '.btn-view-image-app', function(e) {
512
        $('body').on('click', '.btn-view-image-app', function(e) {
508
            e.preventDefault();
513
            e.preventDefault();
509
    
514
    
Línea 510... Línea 515...
510
            $('#image-app').attr('src', $(this).data('href'));
515
            $('#image-app').attr('src', $(this).data('href'));
Línea 511... Línea 516...
511
            $('#modalImageApp').modal('show');
516
            $('#modalPreviewImage').modal('show');
512
            return false;
517
            return false;
Línea 513... Línea 518...
513
        });		
518
        });		
514
 
519
 
Línea 515... Línea 520...
515
        $('#form-capsule-add #order').inputNumberFormat({decimal: 0});
520
        $('#form-add #order').inputNumberFormat({decimal: 0});
516
    
521
    
517
    
522
    
518
    
523
    
-
 
524
 
-
 
525
        $('body').on('click', 'button.btn-add', function(e) {
-
 
526
            e.preventDefault();
-
 
527
 
Línea 519... Línea 528...
519
 
528
            $('#form-add #name').val('');
520
        $('body').on('click', 'button.btn-add', function(e) {
529
            $('#form-add #order').val('1');
Línea 521... Línea 530...
521
            e.preventDefault();
530
    
522
 
-
 
523
            $('#form-capsule-add #name').val('');
531
            $('#form-add #privacy').val('');
524
            $('#form-capsule-add #order').val('1');
-
 
525
    
-
 
526
            $('#form-capsule-add #privacy').val('');
532
            $('#form-add #status').val('');
527
            $('#form-capsule-add #status').val('');
533
            $('#form-add #cost').val('');
Línea 528... Línea 534...
528
            $('#form-capsule-add #cost').val('');
534
            $('#form-add #form-row-cost').hide();
Línea 556... Línea 562...
556
                'method'    : 'get',
562
                'method'    : 'get',
557
                'url'       :  url,
563
                'url'       :  url,
558
            }).done(function(response) {
564
            }).done(function(response) {
559
                if(response['success']) {
565
                if(response['success']) {
560
					console.log(response)
566
					console.log(response)
561
                    $('#form-capsule-edit').attr('action',url);
567
                    $('#form-edit').attr('action',url);
562
                    $('#form-capsule-edit #name').val(response['data']['name']);
568
                    $('#form-edit #name').val(response['data']['name']);
563
                    $('#form-capsule-edit #order').val(response['data']['order']);
569
                    $('#form-edit #order').val(response['data']['order']);
564
                    $('#form-capsule-edit #privacy').val(response['data']['privacy']);
570
                    $('#form-edit #privacy').val(response['data']['privacy']);
565
                    $('#form-capsule-edit #type').val(response['data']['type']);
571
                    $('#form-edit #type').val(response['data']['type']);
566
                    $('#form-capsule-edit #status').val(response['data']['status']);
572
                    $('#form-edit #status').val(response['data']['status']);
Línea 567... Línea 573...
567
    
573
    
568
                    if('s' == response['data']['type']) {
574
                    if('s' == response['data']['type']) {
569
                        $('#form-capsule-edit #form-row-cost').show();
575
                        $('#form-edit #form-row-cost').show();
570
                        $('#form-capsule-edit #cost').val(response['data']['cost']);
576
                        $('#form-edit #cost').val(response['data']['cost']);
571
                    } else {
577
                    } else {
572
                        $('#form-capsule-edit #form-row-cost').hide();
578
                        $('#form-edit #form-row-cost').hide();
573
                        $('#form-capsule-edit #cost').val('');
579
                        $('#form-edit #cost').val('');
-
 
580
                    }
-
 
581
 
-
 
582
                    $('#form-add #file').fileinput('reset');
-
 
583
                    $('#form-add #file').val('');
-
 
584
                    $('#form-add #marketplace').fileinput('reset');
Línea 574... Línea 585...
574
                    }
585
                    $('#form-add #marketplace').val('');
575
    
586
    
576
                    CKEDITOR.instances.description_edit.setData(response['data']['description']);
-
 
577
                    validatorEdit.resetForm();
-
 
-
 
587
                    CKEDITOR.instances.description_edit.setData(response['data']['description']);
578
					 fileToggle=true;
588
                    validatorEdit.resetForm();
579
					$('body, html').animate({scrollTop: '0px'}, 300);
589
					
580
					$('#content1').css('display','none');
590
                    $('#row-listing').hide();   
581
                    seleccionarCampo= $('#modalCapsuleEdit');
-
 
582
                    seleccionarCampo.css('display','block')
-
 
Línea 583... Línea 591...
583
					imagenEdit=response['data']['image'];
591
                    $('#row-add').hide();
584
		            iniciarEditor(seleccionarCampo,response['data']['marketplace'])
592
                    $('#row-edit').show();
585
					
593
					
586
                } else {
594
                } else {
587
                    validatorEdit.resetForm();
595
                    validatorEdit.resetForm();
588
                    if(jQuery.type(response['data']) == 'string') {
596
                    if(jQuery.type(response['data']) == 'string') {
589
                        $.fn.showError(response['data']);
597
                        $.fn.showError(response['data']);
590
                    } else  {
598
                    } else  {
591
                        $.each(response['data'], function( fieldname, errors ) {
599
                        $.each(response['data'], function( fieldname, errors ) {
592
                            $.fn.showFormErrorValidator('#form-capsule-edit #' + fieldname, errors);
600
                            $.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
593
                        });
601
                        });
594
                    }
602
                    }
Línea 630... Línea 638...
630
                ],
638
                ],
631
                removePlugins: 'elementspath,Anchor',
639
                removePlugins: 'elementspath,Anchor',
632
                heigth: 100
640
                heigth: 100
633
		});
641
		});
Línea 634... Línea 642...
634
 
642
 
635
        $('#form-capsule-add #type').change(function(e) {
643
        $('#form-add #type').change(function(e) {
Línea 636... Línea 644...
636
            e.preventDefault();
644
            e.preventDefault();
637
    
645
    
638
            if('s' == $(this).val()) {
646
            if('s' == $(this).val()) {
639
                $('#form-capsule-add #form-row-cost').show();
647
                $('#form-add #form-row-cost').show();
640
            } else {
648
            } else {
641
                $('#form-capsule-add #cost').val(0);
649
                $('#form-add #cost').val(0);
Línea 642... Línea 650...
642
                $('#form-capsule-add #form-row-cost').hide();
650
                $('#form-add #form-row-cost').hide();
Línea 643... Línea 651...
643
            }
651
            }
644
    
652
    
Línea 645... Línea 653...
645
        });
653
        });
646
    
654
    
647
        $('#form-capsule-edit #type').change(function(e) {
655
        $('#form-edit #type').change(function(e) {
648
            e.preventDefault();
656
            e.preventDefault();
649
    
657
    
650
            if('s' == $(this).val()) {
658
            if('s' == $(this).val()) {
Línea 651... Línea 659...
651
                $('#form-capsule-edit #form-row-cost').show();
659
                $('#form-edit #form-row-cost').show();
Línea 652... Línea 660...
652
            } else {
660
            } else {
653
                $('#form-capsule-edit #cost').val(0);
661
                $('#form-edit #cost').val(0);
Línea 654... Línea 662...
654
                $('#form-capsule-edit #form-row-cost').hide();
662
                $('#form-edit #form-row-cost').hide();
655
            }
663
            }
Línea 656... Línea 664...
656
    
664
    
Línea 769... Línea 777...
769
                        NProgress.done();
777
                        NProgress.done();
770
                    });
778
                    });
771
                }
779
                }
772
           });
780
           });
773
        });
781
        });
774
       	/*Script del editor (Aqui comienza el cielo y la tierra) */
-
 
775
		
-
 
776
		var fileToggle=true;
-
 
777
		$('body').on('click', '#ir_atras', function(e) {
-
 
778
            e.preventDefault();
-
 
779
			if(fileToggle){	
-
 
780
				imagenEdit='';
-
 
781
            	$('body, html').animate({scrollTop: '0px'}, 300);
-
 
782
				$('#content1').css('display','block');
-
 
783
           		seleccionarCampo.css('display','none');
-
 
784
            	$('.contenido').html('');
-
 
785
				$('.marketplaceImg').attr('src', '')
-
 
786
			}else{
-
 
787
				$('#titleTypeImage').html('LABEL_IMAGE_MARKETPLACE')
-
 
788
				$('.marketplaceImg').attr('src', '')
-
 
789
				fileToggle=true;
-
 
790
				iniciarEditor(seleccionarCampo,imagenServidorNoticia,false)
-
 
791
			
-
 
792
			}          
-
 
793
            return false;
-
 
794
        });
-
 
795
		var imagenEdit='';
-
 
796
		var imagenServidorNoticia;
-
 
797
		var scroll_altura,viente;
-
 
798
		var nombre_user = $(".perfil_u_nombre").text();
-
 
799
		var primer_nombre = nombre_user.split(" ")[0];
-
 
800
		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 class="recortar_texto">LABEL_CUT</div><div id="blockCelda"><span class="fa fa-unlock"></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_TEXT</div><div class="fa fa-times" id="cerrar_text_modal"></div></div><div class="fonts mb-20"><select name="fuentes" id="selectFuente" class="select-custom mr-2"><option value="arial" selected>LABEL_FONT_ARIAL</option><option value="calibri">LABEL_FONT_CALIBRI</option><option value="forte">LABEL_FONT_FORTE</option><option value="impact">LABEL_FONT_IMPACT</option><option value="jokerman">LABEL_FONT_JOKERMAN</option><option value="mv boli">LABEL_FONT_MV_BOLI</option><option value="times new roman">LABEL_FONT_TIMES_NEW_ROMAN</option><option value="verdana">LABEL_FONT_VERDANA</option><option value="vivaldi">LABEL_FONT_VIVALDI</option></select><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 mb-20"> <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><div class="color_letra font"><label>A</label><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"/></div><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">S</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"> <div class="rectangulo">F</div></div></div><div class="color_fondo_cuadro mb-20 flex-column" style="display:none"> <div class="w-100 d-flex justify-content-between border-bottom"><label for="colorrect" class="font-weight-normal d-flex align-items-center" style="margin:0 !important">LABEL_COLOR_BACKGROUND: </label><input type="color" name="" id="colorrect" value="#000000" style="width:30px" data-tooltip="Color del fondo" class="mr-2"/></div><div class="d-flex flex-column"><label for="opacidad" class="font-weight-normal mt-2">LABEL_BACKGROUND_TRANSPARENCY</label><input type="range" id="opacidad" max="100" min="1" step="1" value="100" ></div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"/> </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 mb-20"> <div>LABEL_FILTERS</div><div class="fa fa-times" id="cerrar_filter_modal"></div></div><div class="fonts mb-20"> <select name="filtros" id="selectFiltro" class="select-custom"><option class="opcion_editor" value="normal">LABEL_FILTER_NORMAL</option><option class="opcion_editor" value=".5,1.3,1.31,1.33,1.38">LABEL_FILTER_NIGHT</option><option class="opcion_editor" value=".7,1.1,1.64,1.66,1.50">LABEL_FILTER_SAINT_ANA</option><option class="opcion_editor" value=".75,1,1.66,1.60,1.51">LABEL_FILTER_CREAM</option><option class="opcion_editor" value=".7,1.2,1.49,1.49,1.6">LABEL_FILTER_MAGIC</option><option class="opcion_editor" value=".7,1.2,1.60,1.66,1.58">LABEL_FILTER_RELIEF</option><option class="opcion_editor" value=".9,.9,1.45,1.54,1.54">LABEL_FILTER_LIGHT</option><option class="opcion_editor" value="1,1.5,1,1,1">LABEL_FILTER_SATURATION</option><option class="opcion_editor" value=".9,1.3,1,1,1">LABEL_FILTER_RETOUCH</option><option class="opcion_editor" value=".8,1,1.6,1.45,1.49">LABEL_FILTER_ORANGE</option><option class="opcion_editor" value=".8,.75,1.60,1.66,1.58">LABEL_FILTER_WIND</option><option class="opcion_editor" value=".8,.9,1.66,1.43,1.28">LABEL_FILTER_DESERT</option><option class="opcion_editor" value=".85,.75,1.47,1.66,1.54">LABEL_FILTER_FOREST</option><option class="opcion_editor" value=".8,.8,1.71,1.64,1.58">LABEL_FILTER_TOWN</option><option class="opcion_editor" value=".8,1.2,1.24,.99,1">LABEL_FILTER_PINK</option><option class="opcion_editor" value=".9,1.1,1.33,1.19,.91">LABEL_FILTER_HISTORY</option><option class="opcion_editor" value="1,1,gris">LABEL_FILTER_GRAY</option><option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_OLD_PICTURE</option><option class="opcion_editor" value=".9,1.2,26,-12,0,2">LABEL_FILTER_CHARMING</option><option class="opcion_editor" value="1.1,1.4,40,12,-6,2">LABEL_FILTER_EMOTION</option><option class="opcion_editor" value=".9,1.32,56,47,17,2">LABEL_FILTER_BEIGE</option><option class="opcion_editor" value=".87,1.19,55,37,23,2">LABEL_FILTER_FINE</option><option class="opcion_editor" value="1.2,.9,67,13,-23,2">LABEL_FILTER_LORD</option><option class="opcion_editor" value="1.2,1.2,35,7,18,2">LABEL_FILTER_70S</option><option class="opcion_editor" value=".92,1.23,-11,11,11,2">LABEL_FILTER_TREE</option><option class="opcion_editor" value=" 1,1.4,-3,-1,-12,2">LABEL_FILTER_SUMMER</option><option class="opcion_editor" value=".85,1.26,-15,2,-1,2">LABEL_FILTER_COLD_WEATHER</option><option class="opcion_editor" value="1,1.4,5,12,1,2">LABEL_FILTER_ANGELS</option><option class="opcion_editor" value=".9,1.2,43,-17,-55,2">LABEL_FILTER_HOT</option><option class="opcion_editor" value="1,1.29,29,26,17,2">LABEL_FILTER_FALL</option><option class="opcion_editor" value=".85,1.3,43,25,-11,2">LABEL_FILTER_MARCH</option><option class="opcion_editor" value=".8,1.25,31,41,12,2">LABEL_FILTER_PEAR</option><option class="opcion_editor" value="1,1.36,4,5,1,2">LABEL_FILTER_COMMON</option><option class="opcion_editor" value=".9,1.3,37,-25,1,2">LABEL_FILTER_GOLD</option><option class="opcion_editor" value="1.1,1.3,-47,-42,-30,2">LABEL_FILTER_GOTHIC</option><option class="opcion_editor" value="1,1.4,-5,42,11,2">LABEL_FILTER_FORESTRY</option><option class="opcion_editor" value=".9,1.2,-5,-7,4,2">LABEL_FILTER_MOON</option><option class="opcion_editor" value="1.1,1.3,-1,-1,26,2">LABEL_FILTER_PARTY</option> </select> </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> <div class="canvas_imagen"> <div class="canvas recortar"> <div class="canvas_subir d-flex flex-column" id="imagen_noticia"><div>LABEL_DRAG_IMAGE_HERE_OR </div><label class="font-weight-normal mt-2" style="font-size:0.6em"for="imagen_noticia_file"> LABEL_UPLOAD_FILE_IMAGE <div class="ml-2 btn btn-primary btn-sm">LABEL_SELECT_IMAGE</div></label> <input style="display:none" type="file" id="imagen_noticia_file" accept="image/x-png,image/jpeg"></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 class="modificar animated fadeInRight delay-04 fast escalar"> <div> <div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors mb-20"></span>LABEL_CUT</div><div class="opcion_editor recortar10"> <div class="recortar_texto">LABEL_CUT</div><div id="blockCelda"><span class="fa fa-unlock"></span></div></div></div><div class="texto"> <div class="mb-20"> <div class="titulo_texto "><span class="icon-plus fa fa-text-width"></span>LABEL_TEXT</div></div><div class="fonts mb-20"> <select name="fuentes" id="selectFuente" class="select-custom mr-2"> <option value="arial" selected>LABEL_FONT_ARIAL</option> <option value="calibri">LABEL_FONT_CALIBRI</option> <option value="forte">LABEL_FONT_FORTE</option> <option value="impact">LABEL_FONT_IMPACT</option> <option value="jokerman">LABEL_FONT_JOKERMAN</option> <option value="mv boli">LABEL_FONT_MV_BOLI</option> <option value="times new roman">LABEL_FONT_TIMES_NEW_ROMAN</option> <option value="verdana">LABEL_FONT_VERDANA</option> <option value="vivaldi">LABEL_FONT_VIVALDI</option> </select> <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 mb-20"> <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><div class="color_letra font"><label>A</label><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"/></div><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">S</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"> <div class="rectangulo">F</div></div></div><div class="color_fondo_cuadro mb-20 flex-column" style="display:none"> <div class="w-100 d-flex justify-content-between border-bottom"><label for="colorrect" class="font-weight-normal d-flex align-items-center" style="margin:0 !important">LABEL_COLOR_BACKGROUND: </label><input type="color" name="" id="colorrect" value="#000000" style="width:30px" data-tooltip="Color del fondo" class="mr-2"/></div><div class="d-flex flex-column"><label for="opacidad" class="font-weight-normal mt-2">LABEL_BACKGROUND_TRANSPARENCY</label><input type="range" id="opacidad" max="100" min="1" step="1" value="100" ></div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"/> <div class="mb-20"> <div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div></div><div class="fonts mb-20"> <select name="filtros" id="selectFiltro" class="select-custom selectFiltro"><option class="opcion_editor" value="normal" >LABEL_FILTER_NORMAL</option><option class="opcion_editor" value=".5,1.3,1.31,1.33,1.38">LABEL_FILTER_NIGHT</option><option class="opcion_editor" value=".7,1.1,1.64,1.66,1.50">LABEL_FILTER_SAINT_ANA</option><option class="opcion_editor" value=".75,1,1.66,1.60,1.51">LABEL_FILTER_CREAM</option><option class="opcion_editor" value=".7,1.2,1.49,1.49,1.6">LABEL_FILTER_MAGIC</option><option class="opcion_editor" value=".7,1.2,1.60,1.66,1.58">LABEL_FILTER_RELIEF</option><option class="opcion_editor" value=".9,.9,1.45,1.54,1.54">LABEL_FILTER_LIGHT</option><option class="opcion_editor" value="1,1.5,1,1,1">LABEL_FILTER_SATURATION</option><option class="opcion_editor" value=".9,1.3,1,1,1">LABEL_FILTER_RETOUCH</option><option class="opcion_editor" value=".8,1,1.6,1.45,1.49">LABEL_FILTER_ORANGE</option><option class="opcion_editor" value=".8,.75,1.60,1.66,1.58">LABEL_FILTER_WIND</option><option class="opcion_editor" value=".8,.9,1.66,1.43,1.28">LABEL_FILTER_DESERT</option><option class="opcion_editor" value=".85,.75,1.47,1.66,1.54">LABEL_FILTER_FOREST</option><option class="opcion_editor" value=".8,.8,1.71,1.64,1.58">LABEL_FILTER_TOWN</option><option class="opcion_editor" value=".8,1.2,1.24,.99,1">LABEL_FILTER_PINK</option><option class="opcion_editor" value=".9,1.1,1.33,1.19,.91">LABEL_FILTER_HISTORY</option><option class="opcion_editor" value="1,1,gris">LABEL_FILTER_GRAY</option><option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_OLD_PICTURE</option><option class="opcion_editor" value=".9,1.2,26,-12,0,2">LABEL_FILTER_CHARMING</option><option class="opcion_editor" value="1.1,1.4,40,12,-6,2">LABEL_FILTER_EMOTION</option><option class="opcion_editor" value=".9,1.32,56,47,17,2">LABEL_FILTER_BEIGE</option><option class="opcion_editor" value=".87,1.19,55,37,23,2">LABEL_FILTER_FINE</option><option class="opcion_editor" value="1.2,.9,67,13,-23,2">LABEL_FILTER_LORD</option><option class="opcion_editor" value="1.2,1.2,35,7,18,2">LABEL_FILTER_70S</option><option class="opcion_editor" value=".92,1.23,-11,11,11,2">LABEL_FILTER_TREE</option><option class="opcion_editor" value=" 1,1.4,-3,-1,-12,2">LABEL_FILTER_SUMMER</option><option class="opcion_editor" value=".85,1.26,-15,2,-1,2">LABEL_FILTER_COLD_WEATHER</option><option class="opcion_editor" value="1,1.4,5,12,1,2">LABEL_FILTER_ANGELS</option><option class="opcion_editor" value=".9,1.2,43,-17,-55,2">LABEL_FILTER_HOT</option><option class="opcion_editor" value="1,1.29,29,26,17,2">LABEL_FILTER_FALL</option><option class="opcion_editor" value=".85,1.3,43,25,-11,2">LABEL_FILTER_MARCH</option><option class="opcion_editor" value=".8,1.25,31,41,12,2">LABEL_FILTER_PEAR</option><option class="opcion_editor" value="1,1.36,4,5,1,2">LABEL_FILTER_COMMON</option><option class="opcion_editor" value=".9,1.3,37,-25,1,2">LABEL_FILTER_GOLD</option><option class="opcion_editor" value="1.1,1.3,-47,-42,-30,2">LABEL_FILTER_GOTHIC</option><option class="opcion_editor" value="1,1.4,-5,42,11,2">LABEL_FILTER_FORESTRY</option><option class="opcion_editor" value=".9,1.2,-5,-7,4,2">LABEL_FILTER_MOON</option><option class="opcion_editor" value="1.1,1.3,-1,-1,26,2">LABEL_FILTER_PARTY</option> </select> </div></div></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_TOPIC</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>'
-
 
801
		
-
 
802
		var pw=420,ph=320;
-
 
803
		$(document).on("click", ".info_noticia", function(e){
-
 
804
			imagenServidorNoticia = elemento.toDataURL("image/jpeg", 1.0);
-
 
805
			if(fileToggle){
-
 
806
				e.preventDefault();
-
 
807
				setTimeout(function(){
-
 
808
					
-
 
809
					$('.marketplaceImg').attr('src', imagenServidorNoticia)
-
 
810
					$('#titleTypeImage').html('LABEL_IMAGE')
-
 
811
					fileToggle=false;
-
 
812
					if(imagenEdit==""){
-
 
813
						iniciarEditor(seleccionarCampo)
-
 
814
					}else{
-
 
815
						iniciarEditor(seleccionarCampo,imagenEdit)
-
 
816
					}
-
 
817
					
-
 
818
				},$('.marketplace').val(imagenServidorNoticia.split(',')[1]));
-
 
819
			}else{
-
 
820
				$('.file').val(imagenServidorNoticia.split(',')[1]);
-
 
821
			
-
 
822
			}
-
 
823
           
-
 
824
			console.log($('.file').val())
-
 
825
			console.log($('.marketplace').val())
-
 
826
			$(".c1").addClass("paso");
-
 
827
 
-
 
828
		
-
 
829
		})
-
 
830
		var edit;
-
 
831
		function iniciarEditor(campo, image='',load=true){
-
 
832
		 cortar=false;
-
 
833
		recorte_listo=false;
-
 
834
		texto="";
-
 
835
		seis=true;
-
 
836
		color="#ffffff";
-
 
837
		texto_listo=false,siete=false;
-
 
838
		uno=true;
-
 
839
		size=48;
-
 
840
		cinco=true;
-
 
841
		blockCelda=false;
-
 
842
		if(fileToggle){
-
 
843
			pw=420; ph=320;
-
 
844
			recorte=ph/pw;
-
 
845
		}else{
-
 
846
			pw=320; ph=480;
-
 
847
			recorte=ph/pw;
-
 
848
		}
-
 
849
		
-
 
850
		xf=pw,yf =ph;
-
 
851
		negritas=false, bold="";
-
 
852
		shadow = true, nueve=true;
-
 
853
		italic=false, ita="";
-
 
854
		rectangulo=false, diez=false;
-
 
855
     	fontfamily="Arial";
-
 
856
     	r=0,g=0,b=0,a=1;
-
 
857
		window.clearInterval(editorNoticia);	
-
 
858
		setTimeout(function(){
-
 
859
			if(fileToggle){
-
 
860
				$('#imagen_noticias').css({
-
 
861
					'height': '320px',
-
 
862
    				'width': '420px',
-
 
863
				})
-
 
864
				$('.cuadro_noticias').addClass('tienda')
-
 
865
				
-
 
866
			}else{
-
 
867
				$('#imagen_noticias').css({
-
 
868
					'height': '480px',
-
 
869
    				'width': '320px',
-
 
870
				})
-
 
871
				$('.cuadro_noticias').removeClass('tienda')
-
 
872
			}
-
 
873
			console.log(ph+'  '+pw)
-
 
874
			scroll_altura=$(".articulo_noticia").offset().top-110;
-
 
875
			anchoFondoOscuro = $(".articulo_noticia").width();
-
 
876
			altoFondoOscuro = $(".editor_imagenes").height();
-
 
877
		
-
 
878
		},navegacion(nuevoHtmlImagen,campo,image,load));
-
 
879
 
-
 
880
		}
-
 
881
 
-
 
882
		$(document).on("click", ".volver", function(){
-
 
883
		var nombre_user = $(".perfil_u_nombre").text();
-
 
884
		var primer_nombre = nombre_user.split(" ")[0];
-
 
885
		 cortar=false;
-
 
886
		cinco=true;
-
 
887
		recorte_listo=false;
-
 
888
		texto="";
-
 
889
		seis=true;
-
 
890
		color="#ffffff";
-
 
891
		texto_listo=false,siete=false;
-
 
892
		uno=true;
-
 
893
		size=48;
-
 
894
		if(fileToggle){
-
 
895
			pw=420, ph=320;
-
 
896
			recorte=ph/pw
-
 
897
		}else{
-
 
898
			pw=320, ph=480;
-
 
899
			recorte=ph/pw
-
 
900
		}
-
 
901
		xf=pw,yf =ph;
-
 
902
		blockCelda=false;
-
 
903
		negritas=false, bold="";
-
 
904
		shadow = true, nueve=true;
-
 
905
		italic=false, ita="";
-
 
906
		rectangulo=false, diez=false;
-
 
907
     	fontfamily="Arial";
-
 
908
     	r=0,g=0,b=0,a=1;
-
 
909
		 var imagenServidorNoticia;
-
 
910
         console.log(seleccionarCampo)
-
 
911
		window.clearInterval(editorNoticia);
-
 
912
		setTimeout(function(){
-
 
913
			if(fileToggle){
-
 
914
				$('#imagen_noticias').css({
-
 
915
					'height': '320px',
-
 
916
    				'width': '420px',
-
 
917
				})
-
 
918
				$('.cuadro_noticias').addClass('tienda')
-
 
919
				
-
 
920
			}else{
-
 
921
				$('#imagen_noticias').css({
-
 
922
					'height': '480px',
-
 
923
    				'width': '320px',
-
 
924
				})
-
 
925
				$('.cuadro_noticias').removeClass('tienda')
-
 
926
			}
-
 
927
			scroll_altura=$(".articulo_noticia").offset().top-110;
-
 
928
			anchoFondoOscuro = $(".articulo_noticia").width();
-
 
929
			altoFondoOscuro = $(".editor_imagenes").height();
-
 
930
		
-
 
931
		},navegacion(nuevoHtmlImagen,seleccionarCampo));
-
 
932
		
-
 
933
		})
-
 
934
 
-
 
935
		function navegacion(nuevoHtmlImagen,campo,image='',load=true){
-
 
936
                selectorElementoName=campo.find('#name')
-
 
937
				
-
 
938
                selectorElementoEditor=campo.find('#contenido');
-
 
939
				edit=true;
-
 
940
				if(image!=''){
-
 
941
					edit=false;
-
 
942
					if(load){
-
 
943
						
-
 
944
 
-
 
945
						const getBase64FromUrl = async (url) => {
-
 
946
							const data = await fetch(url);
-
 
947
							const blob = await data.blob();
-
 
948
							return new Promise((resolve) => {
-
 
949
								const reader = new FileReader();
-
 
950
								reader.readAsDataURL(blob); 
-
 
951
								reader.onloadend = function() {
-
 
952
								const base64data = reader.result;   
-
 
953
								resolve(base64data);
-
 
954
								}
-
 
955
							});
-
 
956
						}
-
 
957
						
-
 
958
						getBase64FromUrl(image).then(function(e){	
-
 
959
							selectorElementoName.trigger('change');
-
 
960
							$(".volver").css("display","block")
-
 
961
							$(".a1").addClass("paso");
-
 
962
							$(".titulo_pasos").html("LABEL_STEP_2");
-
 
963
							setTimeout(function(){
-
 
964
								recorte_listo=true;
-
 
965
								$(".fondo_oscuro").css("display","none");
-
 
966
								if(fileToggle){
-
 
967
									$("#boton_recortar").removeClass("recortar").text("LABEL_ATTACH_IMAGE").addClass("info_noticia");
-
 
968
									}else{
-
 
969
									$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
-
 
970
								}
-
 
971
								$(".recortar10").removeClass("recortar");
-
 
972
								$(".canvas").removeClass("recortar");
-
 
973
								$(".b1").addClass("paso");
-
 
974
								$(".titulo_pasos").html("LABEL_STEP_3");
-
 
975
								if(texto!=""){
-
 
976
									seis=true;
-
 
977
									siete=true;
-
 
978
								}
-
 
979
								cinco=true;
-
 
980
								dos=true;
-
 
981
								cuatro=true;
-
 
982
								actualizar();
-
 
983
						
-
 
984
							},editorNoticia(e));
-
 
985
							
-
 
986
							
-
 
987
						})
-
 
988
						setTimeout(function(){				
-
 
989
							$(".canvas_subir").html('<span class="icon-plus fa fa-spinner"></span> LABEL_LOADING...')
-
 
990
							selectorElementoName.trigger('change');
-
 
991
						},selectorElementoEditor.html(nuevoHtmlImagen));
-
 
992
					}else{
-
 
993
						selectorElementoName.trigger('change');
-
 
994
						setTimeout(function(){	
-
 
995
							$(".volver").css("display","block")
-
 
996
							$(".a1").addClass("paso");
-
 
997
							$(".titulo_pasos").html("LABEL_STEP_2");
-
 
998
							setTimeout(function(){
-
 
999
								recorte_listo=true;
-
 
1000
								$(".fondo_oscuro").css("display","none");
-
 
1001
								if(fileToggle){
-
 
1002
 
-
 
1003
									$("#boton_recortar").removeClass("recortar").text("LABEL_ATTACH_IMAGE").addClass("info_noticia");
-
 
1004
								}else{
-
 
1005
									$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
-
 
1006
									
-
 
1007
								}
-
 
1008
								$(".recortar10").removeClass("recortar");
-
 
1009
								$(".canvas").removeClass("recortar");
-
 
1010
								$(".b1").addClass("paso");
-
 
1011
								$(".titulo_pasos").html("LABEL_STEP_3");
-
 
1012
								if(texto!=""){
-
 
1013
									seis=true;
-
 
1014
									siete=true;
-
 
1015
								}
-
 
1016
								cinco=true;
-
 
1017
								dos=true;
-
 
1018
								cuatro=true;
-
 
1019
								actualizar();
-
 
1020
						
-
 
1021
							},editorNoticia(image));
-
 
1022
 
-
 
1023
									
-
 
1024
							selectorElementoName.trigger('change');
-
 
1025
						},selectorElementoEditor.html(nuevoHtmlImagen));
-
 
1026
					}
-
 
1027
					
-
 
1028
				}else{
-
 
1029
					setTimeout(function(){				
-
 
1030
					    selectorElementoName.trigger('change');
-
 
1031
					},selectorElementoEditor.html(nuevoHtmlImagen));
-
 
1032
				}
-
 
1033
			
-
 
1034
		}
-
 
Línea 1035... Línea -...
1035
 
-
 
1036
		$(window).on("scroll", function(){
-
 
1037
			console.log(scroll_altura)
-
 
1038
		if($(window).scrollTop()>scroll_altura){
-
 
1039
			$("#cuadro_noticias").addClass("fixed");
-
 
1040
		}else{
-
 
1041
			$("#cuadro_noticias").removeClass("fixed");
-
 
1042
		}
-
 
1043
	})
-
 
1044
 
-
 
1045
	$(document).on("dragover", "#imagen_noticia", function(e){
-
 
1046
		e.preventDefault();
-
 
1047
		e.stopPropagation();
-
 
1048
		$(this).css({"background":"rgba(0,0,0,.2)"})
-
 
1049
	})
-
 
1050
 
-
 
1051
	$(window).resize(function() { 
-
 
1052
		anchoFondoOscuro = $(".articulo_noticia").width();
-
 
1053
		altoFondoOscuro = $(".editor_imagenes").height();
-
 
1054
		setTimeout(function(){
-
 
1055
			anchoFondoOscuro = $(".articulo_noticia").width();
-
 
1056
			altoFondoOscuro = $(".editor_imagenes").height();
-
 
1057
		},300)
-
 
1058
		
-
 
1059
	});
-
 
1060
	
-
 
1061
	$(document).on("drop", "#imagen_noticia", function(e){
-
 
1062
		e.preventDefault();
-
 
1063
		e.stopPropagation();
-
 
1064
		$(this).css("background", "none");
-
 
1065
		var archivo = e.originalEvent.dataTransfer.files;
-
 
1066
		var img=archivo[0];
-
 
1067
		if(img.type =="image/jpeg"||img.type =="image/png"){
-
 
1068
			$(".modificar").removeClass("animated");
-
 
1069
			var render = new FileReader();
-
 
1070
			render.readAsDataURL(img);
-
 
1071
			render.onload = function(e){
-
 
1072
				imagen2=new Image();
-
 
1073
				imagen2.src=e.target.result;
-
 
1074
				
-
 
1075
				$(imagen2).ready(function(e){
-
 
1076
					if(imagen2.width<320||imagen2.height<480){
-
 
1077
						$.fn.showError('LABEL_MINIMUM_IMAGE_SIZE');
-
 
1078
					}else{
-
 
1079
						$(".volver").css("display","block")
-
 
1080
						$(".a1").addClass("paso");
-
 
1081
						$(".titulo_pasos").html("LABEL_STEP_2");
-
 
1082
						editorNoticia(imagen2.src)
-
 
1083
					}			
-
 
1084
				})
-
 
1085
			}
-
 
1086
		}else{
-
 
1087
			$.fn.showError('LABEL_SUPPORTED_FORMATS');
-
 
1088
		}
-
 
1089
	})	
-
 
1090
	$(document).on("change", "#imagen_noticia_file", function(e){
-
 
1091
		file = $(this)[0].files[0];
-
 
1092
		e.preventDefault();
-
 
1093
		$(this).css("background", "none");
-
 
1094
		var archivo = file;
-
 
1095
		var img=file;
-
 
1096
		if(img.type =="image/jpeg"||img.type =="image/png"){
-
 
1097
			$(".modificar").removeClass("animated");
-
 
1098
			var render = new FileReader();
-
 
1099
			render.readAsDataURL(img);
-
 
1100
			render.onload = function(e){
-
 
1101
				imagen2=new Image();
-
 
1102
				imagen2.src=e.target.result;
-
 
1103
				
-
 
1104
				$(imagen2).ready(function(e){
-
 
1105
					if(imagen2.width<320||imagen2.height<480){
-
 
1106
						$.fn.showError('LABEL_MINIMUM_IMAGE_SIZE');
-
 
1107
					}else{
-
 
1108
						$(".volver").css("display","block")
-
 
1109
						$(".a1").addClass("paso");
-
 
1110
						$(".titulo_pasos").html("LABEL_STEP_2");
-
 
1111
						editorNoticia(imagen2.src)
-
 
1112
					}			
-
 
1113
				})
-
 
1114
			}
-
 
1115
		}else{
-
 
1116
			$.fn.showError('LABEL_SUPPORTED_FORMATS');
-
 
1117
		}
-
 
1118
	})	
-
 
1119
	$(document).on("dragover", "body", function(e){
-
 
1120
		e.preventDefault();
-
 
1121
		e.stopPropagation();
-
 
1122
	})
-
 
1123
	$(document).on("drop", "body", function(e){
-
 
1124
		e.preventDefault();
-
 
1125
		e.stopPropagation();
-
 
1126
	})	
-
 
1127
 
-
 
1128
	var canvas='<div class="editorNoticia"><canvas id="editorNoticia">LABEL_NOT_SUPPORTED</canvas></div>';
-
 
1129
	$(document).on("mouseover", ".editorNoticia", function(){
-
 
1130
		const getScrollBarWidth = () => window.innerWidth - document.documentElement.getBoundingClientRect().width
-
 
1131
		let anchoScroll= getScrollBarWidth()+"px";
-
 
1132
		$("body").css({"overflow": "hidden"});
-
 
1133
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre,.subpanel").css("margin-right",anchoScroll )
-
 
1134
		$(".barra,.footer").css("padding-right",anchoScroll)
-
 
1135
		
-
 
1136
		
-
 
1137
 
-
 
1138
	})
-
 
1139
	$(document).on("mouseover", "#editorNoticia", function(){
-
 
1140
		if(recorte_listo){
-
 
1141
			ocho=true;	
-
 
1142
		}
-
 
1143
	})
-
 
1144
	$(document).on("mouseout", "#editorNoticia", function(){
-
 
1145
		if(recorte_listo){
-
 
1146
			ocho=false;
-
 
1147
			actualizar2()
-
 
1148
		}
-
 
1149
	})
-
 
1150
	$(document).on("mouseout", ".editorNoticia",function(){
-
 
1151
		$("body").css({"overflow": "auto"})
-
 
1152
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "0px")
-
 
1153
		$(".barra,.footer").css("padding-right","0px")
-
 
1154
		
-
 
1155
	})
-
 
1156
	$(document).on('mousewheel', ".editorNoticia",function(e){
-
 
1157
		var ruedita = e.originalEvent.wheelDelta 
-
 
1158
		if(ruedita>0){
-
 
1159
			scale = scale+(scale/10); 
-
 
1160
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1161
		}else{
-
 
1162
			scale = scale-(scale/10); 
-
 
1163
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1164
		}
-
 
1165
		$("#editorNoticia").css({"transform": "scale("+scale+")"});
-
 
1166
	})
-
 
1167
	$(document).on("click", ".as", function(e){
-
 
1168
		e.preventDefault();
-
 
1169
		 scale = $(this).data("scale");
-
 
1170
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1171
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
-
 
1172
		
-
 
1173
	})
-
 
1174
	$(document).on("click", ".ps", function(e){
-
 
1175
		e.preventDefault();
-
 
1176
		$(".cantidades_scale").slideToggle(200).css("display", "block");
-
 
1177
	})
-
 
1178
	$(document).on("click", "#cerrar_filter_modal, .icon_filter", function(e){
-
 
1179
		e.preventDefault();
-
 
1180
		if(recorte_listo){
-
 
1181
		$(".contenido_filter").slideToggle(200).css("display", "block");
-
 
1182
		}
-
 
1183
	})
-
 
1184
	$(document).on("click", "#cerrar_text_modal, .icon_text", function(e){
-
 
1185
		e.preventDefault();
-
 
1186
		if(recorte_listo){
-
 
1187
			$(".contenido_text").slideToggle(200).css("display", "block");
-
 
1188
		}
-
 
1189
	})
-
 
1190
	
-
 
1191
	$(document).on("click", "#cerrar_cut_modal, .icon_cut", function(e){
-
 
1192
		e.preventDefault();
-
 
1193
		if(cortar){
-
 
1194
			$(".contenido_cut").slideToggle(200).css("display", "block");
-
 
1195
		}
-
 
1196
		
-
 
1197
	})
-
 
1198
	$(document).on("click", "#menos_scale", function(e){
-
 
1199
		e.preventDefault();
-
 
1200
		scale = scale-(scale/10);
-
 
1201
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1202
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
-
 
1203
	})
-
 
1204
 
-
 
1205
	$(document).on("click", "#mas_scale", function(e){
-
 
1206
		e.preventDefault();
-
 
1207
		scale = scale+(scale/10);
-
 
1208
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1209
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
-
 
1210
	})
-
 
1211
	$(document).on('change', '#selectFiltro', function(e){
-
 
1212
		
-
 
1213
		data=$(this).val()
-
 
1214
		if(data=="normal"){
-
 
1215
			filter();
-
 
1216
		}else{
-
 
1217
			data=data.split(',');
-
 
1218
			if(data[2]=='gris'){	
-
 
1219
				filtergris(data[0],data[1]);
-
 
1220
			}else{	
-
 
1221
				filter(Number(data[0]),Number(data[1]),Number(data[2]),Number(data[3]),Number(data[4]),Number(data[5]));
-
 
1222
			}
-
 
1223
		}
-
 
1224
	})
-
 
1225
	var texto_listo=false,siete=false;
-
 
1226
	var texto;
-
 
1227
	$(document).on("keyup", "#texto_input", function(e){
-
 
1228
		e.preventDefault();
-
 
1229
		texto = $(this).val();
-
 
1230
		if(texto_actualizar){
-
 
1231
			siete=true;	
-
 
1232
		}
-
 
1233
		if(texto!=""){
-
 
1234
			texto_actualizar=true;
-
 
1235
			actualizar2();
-
 
1236
		}else{
-
 
1237
			actualizar2();
-
 
1238
		}
-
 
1239
 
-
 
1240
	})
-
 
1241
	var color="#ffffff";
-
 
1242
	$(document).on("change input", "#color", function(){
-
 
1243
    	color=$(this).val();
-
 
1244
    	seis=true;
-
 
1245
    	actualizar2();
-
 
1246
    })
-
 
1247
	$(document).on("keypress", "#font-size, #texto_input", function(e){
-
 
1248
    	if(e.which == 13){
-
 
1249
      		return false;
-
 
1250
    	}
-
 
1251
  	});
-
 
1252
    var size=48;
-
 
1253
    $(document).on("keyup change", "#font-size", function(){
-
 
1254
    	size=$(this).val();
-
 
1255
    	size = parseInt(size);
-
 
1256
    	seis=true;
-
 
1257
    	siete=true;
-
 
1258
    	actualizar2();
-
 
1259
    })
-
 
1260
    var negritas=false, bold="";
-
 
1261
    $(document).on("click", "#negritas", function(e){
-
 
1262
    	e.preventDefault();
-
 
1263
    	if(!negritas){
-
 
1264
    		bold="bold";
-
 
1265
    		$(this).addClass("fa");
-
 
1266
    		seis=true;
-
 
1267
    		siete=true;
-
 
1268
    		actualizar2();
-
 
1269
    		negritas=true;
-
 
1270
    	}else{
-
 
1271
    		bold="";
-
 
1272
    		$(this).removeClass("fa");
-
 
1273
    		seis=true;
-
 
1274
    		siete=true;
-
 
1275
    		actualizar2();
-
 
1276
    		negritas=false;
-
 
1277
    	}
-
 
1278
    })
-
 
1279
    var italic=false, ita="";
-
 
1280
     $(document).on("click", "#italic", function(e){
-
 
1281
    	e.preventDefault();
-
 
1282
    	if(!italic){
-
 
1283
    		ita="italic";
-
 
1284
    		$(this).addClass("fa");
-
 
1285
    		seis=true;
-
 
1286
    		siete=true;
-
 
1287
    		actualizar2();
-
 
1288
    		italic=true;
-
 
1289
    	}else{
-
 
1290
    		ita="";
-
 
1291
    		$(this).removeClass("fa");
-
 
1292
    		seis=true;
-
 
1293
    		siete=true;
-
 
1294
    		actualizar2();
-
 
1295
    		italic=false;
-
 
1296
    	}
-
 
1297
    })
-
 
1298
	var fontfamily="Arial";
-
 
1299
     $(document).on("change", "#selectFuente", function(e){
-
 
1300
    	e.preventDefault();
-
 
1301
    	fontfamily= $(this).val();
-
 
1302
    	seis=true;
-
 
1303
    	siete=true;
-
 
1304
    	actualizar2();
-
 
1305
    	
-
 
1306
    })
-
 
1307
     var shadow = true, nueve=true;
-
 
1308
     $(document).on("click","#shadow", function(e){
-
 
1309
     	e.preventDefault();
-
 
1310
     	if(shadow){
-
 
1311
     		$(this).removeClass("fa");
-
 
1312
     		seis=true;
-
 
1313
     		nueve=false;
-
 
1314
     		actualizar2();
-
 
1315
     		shadow=false;
-
 
1316
     	}else{
-
 
1317
     		$(this).addClass("fa");
-
 
1318
     		seis=true;
-
 
1319
     		nueve=true;
-
 
1320
     		actualizar2();
-
 
1321
     		shadow=true;
-
 
1322
     	}
-
 
1323
 
-
 
1324
     })
-
 
1325
     var rectangulo=false, diez=false, colorrect="#000000";
-
 
1326
	 $(document).on("click", "#rectangulo", function(e){
-
 
1327
     	e.preventDefault();
-
 
1328
     	if(!rectangulo){
-
 
1329
     		$(this).addClass("fa");
-
 
1330
			$('.color_fondo_cuadro').css('display','flex')
-
 
1331
     		diez=true;
-
 
1332
     		actualizar2();
-
 
1333
     		rectangulo=true;
-
 
1334
     	}else{
-
 
1335
     		$(this).removeClass("fa");
-
 
1336
			 $('.color_fondo_cuadro').css('display','none')
-
 
1337
     		diez=false;
-
 
1338
     		actualizar2();
-
 
1339
     		rectangulo=false;
-
 
1340
     	}
-
 
1341
 
-
 
1342
     })
-
 
1343
     var r=0,g=0,b=0;
-
 
1344
	 $(document).on("change input", "#colorrect", function(){
-
 
1345
    	colorrect=$(this).val();
-
 
1346
    	r=parseInt(colorrect.slice(1,3),16);
-
 
1347
    	g=parseInt(colorrect.slice(3,5),16);
-
 
1348
    	b=parseInt(colorrect.slice(5,7),16);
-
 
1349
    	seis=true;
-
 
1350
    	actualizar2();
-
 
1351
    })
-
 
1352
    var a=1;
-
 
1353
	
-
 
1354
	$(document).on("mousemove change ", "#opacidad", function(){
-
 
1355
    	a=$(this).val();
-
 
1356
    	a=a/100;
-
 
1357
    	seis=true;
-
 
1358
    	actualizar2();
-
 
1359
    })
-
 
1360
	var imaNoti = new Image();
-
 
1361
	function filter(brillo=1, contraste=1, rojo=1, verde=1, azul=1, valor=1){
-
 
1362
		cuatro=false;
-
 
1363
		restaurar(brillo, contraste);
-
 
1364
		datos=imagenOriginal.data;
-
 
1365
		if(valor==2){
-
 
1366
			for (var i =  0; i <datos.length; i+=4) {
-
 
1367
				datos[i]=datos[i]+rojo;
-
 
1368
				datos[i+1]=datos[i+1]+verde;
-
 
1369
				datos[i+2]=datos[i+2]+azul;
-
 
1370
			}
-
 
1371
		}else{
-
 
1372
			for (var i =  0; i <datos.length; i+=4) {
-
 
1373
				datos[i]=datos[i]*rojo;
-
 
1374
				datos[i+1]=datos[i+1]*verde;
-
 
1375
				datos[i+2]=datos[i+2]*azul
-
 
1376
			}	
-
 
1377
		}
-
 
1378
		editor.putImageData(imagenOriginal,0,0)
-
 
1379
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
-
 
1380
	    imaNoti.src = imagenNoticia;
-
 
1381
		actualizar2();
-
 
1382
	}
-
 
1383
	function filtergris(brillo=1, contraste=1){
-
 
1384
		cuatro=false;
-
 
1385
		restaurar(brillo, contraste);
-
 
1386
		datos=imagenOriginal.data;
-
 
1387
		var auxiliar;
-
 
1388
		for (var i =  0; i <datos.length; i+=4) {
-
 
1389
			auxiliar = 0.34 * datos[i] + 0.5 *datos[i+1] + 0.1/6 * datos[i+2]; 
-
 
1390
			datos[i]=auxiliar;
-
 
1391
			datos[i+1]=auxiliar;
-
 
1392
			datos[i+2]=auxiliar;
-
 
1393
		}	
-
 
1394
		
-
 
1395
		editor.putImageData(imagenOriginal,0,0)
-
 
1396
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
-
 
1397
	    imaNoti.src = imagenNoticia;
-
 
1398
		actualizar2();
-
 
1399
	}
-
 
1400
	function restaurar(brillo = 1, contraste=1){
-
 
1401
		editor.filter = "none"
-
 
1402
		editor.filter = 'contrast('+contraste+') brightness('+brillo+') saturate(1) sepia(0)';
-
 
1403
		editor.fillStyle="rgba(255,255,255,1)"
-
 
1404
		editor.fillRect(0,0,ancho,alto);
-
 
1405
		editor.fillStyle=""+color+"";
-
 
1406
		var pxf=0,pyf=0;
-
 
1407
			if(xf>=(yf/recorte)){
-
 
1408
				pxf=xf/ancho;
-
 
1409
				pyf=yf/pxf;
-
 
1410
				py=(alto/2)-(pyf/2);
-
 
1411
				editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
-
 
1412
			}else{
-
 
1413
				pyf=yf/alto;
-
 
1414
				pxf=xf/pyf;
-
 
1415
				px=(ancho/2)-(pxf/2);
-
 
1416
				editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
-
 
1417
			}
-
 
1418
		imagenOriginal = editor.getImageData(0,0,ancho,alto)
-
 
1419
	}
-
 
1420
	var ocho=false;
-
 
1421
	function actualizar2(){
-
 
1422
		if(recorte_listo){
-
 
1423
		if(cuatro){
-
 
1424
			imagenOriginal = editor.getImageData(0,0,ancho,alto)
-
 
1425
			var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
-
 
1426
	    	imaNoti.src = imagenNoticia;
-
 
1427
	    	cuatro=false;
-
 
1428
		}
-
 
1429
		editor.filter = "none"
-
 
1430
		$(imaNoti).ready(function(e){	
-
 
1431
			noticia.drawImage(imaNoti,0,0,pw,ph);
-
 
1432
			editor.drawImage(imaNoti,0,0,ancho,alto)
-
 
1433
			if(texto_actualizar){
-
 
1434
				if(texto!=""){
-
 
1435
					if(seis){
-
 
1436
						ancho_imaNoti = imaNoti.width;
-
 
1437
						
-
 
1438
						scale_noticia = -(((ancho_imaNoti-pw)/ancho_imaNoti)-1);
-
 
1439
						editor.fillStyle=""+color+"";
-
 
1440
						editor.strokeStyle="rgb(255,255,255)";
-
 
1441
						if(nueve){
-
 
1442
							editor.shadowColor="rgba(0,0,0,.5)";
-
 
1443
							editor.shadowOffsetX=6;
-
 
1444
							editor.shadowOffsetY=6;
-
 
1445
							editor.shadowBlur=6;
-
 
1446
							noticia.shadowColor="rgba(0,0,0,.5)";
-
 
1447
							noticia.shadowOffsetX=6*scale_noticia;
-
 
1448
							noticia.shadowOffsetY=6*scale_noticia;
-
 
1449
							noticia.shadowBlur=6*scale_noticia;
-
 
1450
						}else{
-
 
1451
							editor.shadowColor="rgba(0,0,0,0)";
-
 
1452
							noticia.shadowColor="rgba(0,0,0,0)";
-
 
1453
						}
-
 
1454
						editor.font=""+ita+" "+bold+" "+size+"px "+fontfamily+"";
-
 
1455
						editor.textAlign="start";
-
 
1456
						editor.textBaseline="top";
-
 
1457
		
-
 
1458
						var sizeNoticia = size*scale_noticia;
-
 
1459
						noticia.fillStyle=""+color+"";
-
 
1460
						noticia.font=""+ita+" "+bold+" "+sizeNoticia+"px "+fontfamily+"";
-
 
1461
						noticia.textAlign="start";
-
 
1462
						noticia.textBaseline="top";
-
 
1463
						seis=false;
-
 
1464
					}
-
 
1465
					if(siete){
-
 
1466
						dimencionesTexto = editor.measureText(texto);
-
 
1467
						txf=dimencionesTexto.width+20;
-
 
1468
						tyf= (20+size);	
-
 
1469
						siete=false;
-
 
1470
					}
-
 
1471
					if(cinco){
-
 
1472
						dimencionesTexto = editor.measureText(texto);
-
 
1473
						if(xf>=(yf/recorte)){
-
 
1474
							tx=(xf/2)-(dimencionesTexto.width/2);
-
 
1475
							ty=(xf*recorte/2)-(size/2);
-
 
1476
						}else{
-
 
1477
							tx=(yf/recorte/2)-(dimencionesTexto.width/2);
-
 
1478
							ty=(yf/2)-(size/2);
-
 
1479
						}
-
 
1480
						
-
 
1481
						txf=dimencionesTexto.width+20;
-
 
1482
						tyf= size+20;	
-
 
1483
						cinco=false;
-
 
1484
					}
-
 
1485
					if(diez){
-
 
1486
						editor.fillStyle="rgba("+r+","+g+","+b+","+a+")";
-
 
1487
						noticia.fillStyle="rgba("+r+","+g+","+b+","+a+")";
-
 
1488
						editor.fillRect(tx-10,ty-10,txf,tyf);
-
 
1489
						noticia.fillRect(((tx-10)*scale_noticia),((ty-10)*scale_noticia),txf*scale_noticia,tyf*scale_noticia);
-
 
1490
						editor.fillStyle=""+color+"";
-
 
1491
						noticia.fillStyle=""+color+"";
-
 
1492
 
-
 
1493
					}
-
 
1494
					editor.fillText(texto,tx,ty);
-
 
1495
					noticia.fillText(texto,(tx*scale_noticia),ty*scale_noticia);
-
 
1496
					if(ocho){
-
 
1497
						editor.strokeRect(tx-10,ty-10,txf,tyf)
-
 
1498
						editor.arc(tx+txf,ty+tyf,10,0,Math.PI*2,false);
-
 
1499
						editor.fill();
-
 
1500
						editor.beginPath();
-
 
1501
					}
-
 
1502
					texto_listo=true;
-
 
1503
				}
-
 
1504
			}
-
 
1505
		})
-
 
1506
		
-
 
1507
	}
-
 
1508
	}
-
 
1509
	function actualizar(){
-
 
1510
				
-
 
1511
			$(imagen).ready(function(e){
-
 
1512
				
-
 
1513
				if(uno){
-
 
1514
					elemento2.height=ph;
-
 
1515
					elemento2.width=pw;
-
 
1516
					ancho=imagen.width, alto = imagen.height;
-
 
1517
					elemento.width = ancho;
-
 
1518
					elemento.height = alto;
-
 
1519
					
-
 
1520
					$(".scale").css("display","flex");
-
 
1521
					if(ancho<=alto){
-
 
1522
					 scale = -(((alto-450)/alto)-1);
-
 
1523
					
-
 
1524
					
-
 
1525
					}else{					
-
 
1526
					 scale = -(((ancho-500)/ancho)-1);
-
 
1527
				
-
 
1528
					}
-
 
1529
					scale=scale*0.80;
-
 
1530
					if(edit){
-
 
1531
						if((ancho*recorte)<=alto){
-
 
1532
							xf=ancho*.70;
-
 
1533
							yf=xf*recorte;
-
 
1534
						}else{
-
 
1535
							yf=alto*.70;
-
 
1536
							xf=yf/recorte;
-
 
1537
						}
-
 
1538
					}
-
 
1539
					cuadro_dimencion=Math.round(12/scale);
-
 
1540
					
-
 
1541
					if(xf<50||yf<50){
-
 
1542
						xf=50;
-
 
1543
						yf=xf*recorte;
-
 
1544
					}
-
 
1545
					mitadX=ancho/2;
-
 
1546
					mitadY=alto/2;
-
 
1547
					x=mitadX-xf/2;
-
 
1548
					y=mitadY-yf/2;
-
 
1549
					
-
 
1550
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1551
					$("#ancho").html(ancho+"px");
-
 
1552
					$("#alto").html(alto+"px");
-
 
1553
					uno=false;
-
 
1554
				}
-
 
1555
				if(dos){
-
 
1556
					
-
 
1557
					if(xf>=(yf/recorte)){
-
 
1558
						alto=xf*recorte;
-
 
1559
						ancho=xf;
-
 
1560
					}else{
-
 
1561
						ancho=yf/recorte;
-
 
1562
						alto=yf;
-
 
1563
 
-
 
1564
					}
-
 
1565
					elemento.width = ancho;
-
 
1566
					elemento.height = alto;
-
 
1567
					elemento2.height=ph;
-
 
1568
					elemento2.width=pw;
-
 
1569
					if(xf<=yf){
-
 
1570
					 scale = -(((yf-450)/yf)-1);
-
 
1571
					 
-
 
1572
					}else{					
-
 
1573
					 scale = -(((xf-500)/xf)-1);
-
 
1574
					}
-
 
1575
					
-
 
1576
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
-
 
1577
					$("#ancho").html(Math.round(xf)+"px");
-
 
1578
					$("#alto").html(Math.round(yf)+"px");
-
 
1579
					dos=false;
-
 
1580
				}
-
 
1581
 
-
 
1582
					var pxf=0,pyf=0;
-
 
1583
					noticia.fillStyle="rgba(255,255,255,1)"
-
 
1584
					noticia.fillRect(0,0,pw,ph);
-
 
1585
				if(xf>=(yf/recorte)){
-
 
1586
					pxf=xf/pw;
-
 
1587
					pyf=yf/pxf;
-
 
1588
					py=(ph/2)-(pyf/2);
-
 
1589
					noticia.drawImage(imagen,x,y,xf,yf,0,py,pw,pyf);
-
 
1590
				}else{
-
 
1591
					pyf=yf/ph;
-
 
1592
					pxf=xf/pyf;
-
 
1593
					px=(pw/2)-(pxf/2);
-
 
1594
					noticia.drawImage(imagen,x,y,xf,yf,px,0,pxf,ph);
-
 
1595
				}
-
 
1596
				
-
 
1597
				$("#editorNoticia").css({"transform": "scale("+scale+")"});
-
 
1598
				if(!recorte_listo){
-
 
1599
					editor.drawImage(imagen,0,0,ancho,alto);
-
 
1600
					editor.fillStyle="rgba(0,0,0,.2)"
-
 
1601
					editor.fillRect(0,0,ancho,alto);
-
 
1602
					editor.fillStyle="rgba(255,255,255,.2)"
-
 
1603
					editor.fillRect(x,y,xf,yf);
-
 
1604
					editor.fillStyle="rgba(255,255,255,0.8)"
-
 
1605
					editor.fillRect(x,y,cuadro_dimencion,cuadro_dimencion);
-
 
1606
					editor.fillRect((x+xf)-cuadro_dimencion,y,cuadro_dimencion,cuadro_dimencion);
-
 
1607
					editor.fillRect(x,y+yf-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
-
 
1608
					editor.fillRect(x+xf-cuadro_dimencion,yf+y-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
-
 
1609
					esta=true;
-
 
1610
				}else{
-
 
1611
					var pxf=0,pyf=0;
-
 
1612
					
-
 
1613
					editor.fillStyle="rgba(255,255,255,1)"
-
 
1614
					editor.fillRect(0,0,ancho,alto);
-
 
1615
					if(xf>=(yf/recorte)){
-
 
1616
						pxf=xf/ancho;
-
 
1617
						pyf=yf/pxf;
-
 
1618
						py=(alto/2)-(pyf/2);
-
 
1619
						editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
-
 
1620
					}else{
-
 
1621
						pyf=yf/alto;
-
 
1622
						pxf=xf/pyf;
-
 
1623
						px=(ancho/2)-(pxf/2);
-
 
1624
						editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
-
 
1625
				}
-
 
1626
					
-
 
1627
				}
-
 
1628
			})
-
 
1629
		}
-
 
1630
	var imagenOriginal
-
 
1631
	var x,y,xf=pw,yf =ph, elemento,elemento2,editor,centro, total,scale,dimencionesTexto,ancho_imaNoti,
-
 
1632
	recorte_listo=false,alto,ancho,tx,ty,txf,tyf,cuatro=true,texto_actualizar=false,cinco=true,seis=true,cuatro;
-
 
1633
	var  mitadY,mitadX, uno=true,dos=false, recorte=ph/pw, imagen_noticias, scale_noticia, tres=true,rotar=false, cortar=false;;
-
 
1634
	var translateX, cuadro_dimencion;
-
 
1635
		
-
 
1636
	$(document).on("click", ".recortar10", function(e){
-
 
1637
		
-
 
1638
		e.preventDefault();
-
 
1639
		recorte_listo=false;
-
 
1640
		uno=true;
-
 
1641
		$("#boton_recortar").addClass("recortar").text("LABEL_CUT").removeClass("info_noticia");
-
 
1642
		$("#boton_recortar3").addClass("recortar").text("LABEL_CUT").removeClass("info_noticia3");
-
 
1643
		$(".contenido_text").css("display", "none");
-
 
1644
		$(".contenido_filter").css("display", "none");
-
 
1645
		$(".recortar10").addClass("recortar");
-
 
1646
		$(".canvas").addClass("recortar")
-
 
1647
		$(".oa").removeClass("oa");
-
 
1648
		$("#normal").addClass("oa");
-
 
1649
		$(".b1").removeClass("paso");
-
 
1650
		$(".titulo_pasos").html("LABEL_STEP_2");
-
 
1651
		window.clearInterval(actualizar2);
-
 
1652
		actualizar();
-
 
1653
 
-
 
1654
	})
-
 
1655
 
-
 
1656
	
-
 
1657
	blockCelda=true;
-
 
1658
	$(document).on("click", "#blockCelda", function(e){
-
 
1659
		e.preventDefault();
-
 
1660
		if(blockCelda){
-
 
1661
			$(this).html('<span class="fa fa-unlock"></span>')
-
 
1662
			
-
 
1663
			blockCelda=false;
-
 
1664
		}else{
-
 
1665
			$(this).html('<span class="fa fa-lock"></span>')
-
 
1666
			blockCelda=true;
-
 
1667
		}
-
 
1668
		t4=true;
-
 
1669
		
-
 
1670
	})
-
 
1671
	var imagen 
-
 
1672
	function editorNoticia(img){
-
 
1673
		 cortar=true;
-
 
1674
		imagen= new Image();
-
 
1675
		$(".canvas").html(canvas);
-
 
1676
		elemento = document.getElementById("editorNoticia");
-
 
1677
		editor = elemento.getContext("2d");
-
 
1678
		elemento2 = document.getElementById("imagen_noticias");
-
 
1679
		noticia = elemento2.getContext("2d");
-
 
1680
 
-
 
1681
		$(document).on("click", ".boton_marino.recortar",function(e){
-
 
1682
			e.preventDefault();
-
 
1683
			recorte_listo=true;
-
 
1684
			$(".fondo_oscuro").css("display","none");
-
 
1685
			if(fileToggle){
-
 
1686
				$("#boton_recortar").removeClass("recortar").text("LABEL_ATTACH_IMAGE").addClass("info_noticia");
-
 
1687
			}else{
-
 
1688
				$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
-
 
1689
			}
-
 
1690
			$(".recortar10").removeClass("recortar");
-
 
1691
			$(".canvas").removeClass("recortar");
-
 
1692
			$(".b1").addClass("paso");
-
 
1693
			$(".titulo_pasos").html("LABEL_STEP_3");
-
 
1694
			if(texto!=""){
-
 
1695
				seis=true;
-
 
1696
				siete=true;
-
 
1697
			}
-
 
1698
			cinco=true;
-
 
1699
			dos=true;
-
 
1700
			cuatro=true;
-
 
1701
			setTimeout(() => {
-
 
1702
				actualizar2();		
-
 
1703
			}, actualizar());
-
 
1704
		
-
 
Línea 1705... Línea -...
1705
		})
-
 
1706
 
-
 
1707
		var cli = false, t1= false, t2=false,t3=false,t4=false,tcli=false;
-
 
1708
		var mouse =[];
-
 
1709
 
-
 
1710
	
-
 
1711
		function raton(elemento, e){
-
 
1712
			return {
-
 
1713
				x:((e.pageX - elemento.offsetLeft - ((ancho/2)-((ancho*scale)/2)))/scale),
-
 
1714
				y:((e.pageY - elemento.offsetTop - ((alto/2)-((alto*scale)/2)))/scale)
-
 
1715
			}
-
 
1716
		}
-
 
1717
 
-
 
1718
		imagen.src=img;
-
 
1719
		$(".recortar10").addClass("recortar");
-
 
1720
		$("#boton_recortar").removeClass("boton_normal").addClass("recortar boton_marino").text("LABEL_CUT")
-
 
1721
		actualizar();
782
 
1722
 
783
 
1723
		$(elemento).mousemove(function(e){
-
 
1724
			mouse = raton(this, e);
-
 
1725
			//console.log("raton x: "+mouse.x+ " raton Y: " +mouse.y+ " tx: "+tx+" ty: "+ty+" txf:"+(txf+tx)+" tyf:"+(tyf+ty) )
-
 
1726
			if(!recorte_listo){
-
 
1727
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
-
 
1728
					if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
-
 
1729
			 			$(elemento).css("cursor","nw-resize");
-
 
1730
			 		}else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
-
 
1731
			 			$(elemento).css("cursor","ne-resize");
-
 
1732
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
-
 
1733
			 			$(elemento).css("cursor","se-resize");
-
 
1734
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
-
 
1735
			 			$(elemento).css("cursor","sw-resize");
-
 
1736
			 		}else{
-
 
1737
						$(elemento).css("cursor","move");
-
 
1738
					}
-
 
1739
			 	}else{
-
 
1740
			 		$(elemento).css("cursor","default");
-
 
1741
			 	}
-
 
1742
			}else if(texto_listo){
784
  $('#form-add #file').fileinput({
1743
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
-
 
1744
			 		$(elemento).css("cursor","move");
-
 
1745
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
-
 
1746
			 		$(elemento).css("cursor","pointer");
785
                theme: 'fa',
1747
			 	}else{
-
 
1748
			 		$(elemento).css("cursor","default");
-
 
1749
			 	}
-
 
1750
			}
786
                language: 'es',
1751
			else{
-
 
1752
				$(elemento).css("cursor","default");
-
 
1753
			}
787
                showUpload: false,
1754
		})
-
 
1755
		$(elemento).mousedown(function(e){
-
 
1756
			mouse = raton(this, e);
788
                dropZoneEnabled: false,
1757
			if(!recorte_listo){
-
 
1758
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
-
 
1759
			 		
-
 
1760
					 if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
-
 
1761
						 t4 = true;
-
 
1762
					 }else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
-
 
1763
						 t3 = true;
-
 
1764
					 }else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
-
 
1765
						 t1 = true;
-
 
1766
					 }else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
-
 
1767
						 t2 = true;
-
 
1768
					 }else{
-
 
1769
						 cli = true;
-
 
1770
					 }
-
 
1771
				  }
-
 
1772
			}else if(texto_listo){
-
 
1773
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
-
 
1774
			 		tcli=true;
-
 
1775
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
-
 
1776
			 		rotar=true;
-
 
1777
			 	}
-
 
1778
			}		 	
-
 
1779
			
-
 
1780
		 })
-
 
1781
 
-
 
1782
		 $('.editorNoticia').mousemove(function(e){
-
 
1783
		 	mouse = raton(this, e);
-
 
1784
		 	if(!recorte_listo){
-
 
1785
			 	if(cli){
-
 
1786
			 		if((mouse.y-(yf/2))>=0&&(mouse.y+(yf/2))<=alto){
-
 
1787
				 		y = (mouse.y-(yf/2));
-
 
1788
			 		}else{
-
 
1789
			 			if((mouse.y-(yf/2))<0){
-
 
1790
			 				y=0;
-
 
1791
			 			}
-
 
1792
			 			if((mouse.y+(yf/2))>alto){
-
 
1793
			 				y=alto-yf;
-
 
1794
			 			}
789
                maxFileCount: 1,
1795
			 		}
-
 
1796
			 		if((mouse.x-(xf/2))>=0&&(mouse.x+(xf/2))<=ancho){
-
 
1797
			 			x = (mouse.x-(xf/2));
-
 
1798
			 		}else{
-
 
1799
			 			if((mouse.x-(xf/2))<0){
-
 
1800
			 				x=0;
-
 
1801
			 			}
-
 
1802
			 			if((mouse.x+(xf/2))>ancho){
-
 
1803
			 				x=(ancho)-xf;
-
 
1804
			 			}
-
 
1805
			 		}	 			
-
 
1806
			 	}
-
 
1807
				 if(blockCelda){
-
 
1808
			 	if(t4){
-
 
1809
					cal1=mouse.y-y;
-
 
1810
			 		cal2=cal1/recorte;
-
 
1811
					cal3=x+cal2;
-
 
1812
					if(cal2>50){
-
 
1813
						if(cal3<=ancho&&mouse.y<=alto){
-
 
1814
							yf=cal1;	
-
 
1815
				 			xf=cal2;
-
 
1816
						}else if(cal3<=ancho&&mouse.y>alto){
-
 
1817
							yf=alto-y;
-
 
1818
							xf=yf/recorte
-
 
1819
						}else if(cal3>=ancho&&mouse.y<=alto){
-
 
1820
							xf=ancho-x;
-
 
1821
							yf=xf*recorte;	
-
 
1822
						}
-
 
1823
				 	}
-
 
1824
			 	}
-
 
1825
			 	if(t3){
-
 
1826
					cal1=yf+(y-mouse.y);
-
 
1827
			 		cal2=cal1/recorte;
-
 
1828
					cal3=x+cal2;
-
 
1829
					if(cal2>50){
-
 
1830
						if(cal3<=ancho&&mouse.y>=0){
-
 
1831
							yf=cal1;	
-
 
1832
				 			xf=cal2;
-
 
1833
							y=mouse.y;	
-
 
1834
						}else if(cal3<=ancho&&mouse.y<0){
-
 
1835
							yf=yf+y;
-
 
1836
							xf=yf/recorte
-
 
1837
							y=0;
-
 
1838
						}else if(cal3>=ancho&&mouse.y>=0){
-
 
1839
							xf=ancho-x;
-
 
1840
							y=y+(yf-xf*recorte);
-
 
1841
							yf=xf*recorte;	
-
 
1842
						}
-
 
1843
					 	
-
 
1844
				 	}
-
 
1845
				 		
-
 
1846
			 	}
-
 
1847
			 	if(t2){
-
 
1848
 
-
 
1849
					cal1=mouse.y-y;
-
 
1850
					cal2=cal1/recorte;
-
 
1851
					cal3=x+(yf-cal1)/recorte;cal2;
-
 
1852
					if(cal2>50){
-
 
1853
						if(cal3>=0&&mouse.y<=alto){
-
 
1854
							x=cal3;
-
 
1855
							yf=cal1;	
-
 
1856
							xf=cal2;
-
 
1857
						}else if(cal3>0&&mouse.y>alto){
-
 
1858
							yf=alto-y;
-
 
1859
							x=x+(xf-yf/recorte);
-
 
1860
							xf=yf/recorte
-
 
1861
						}else if(cal3<0&&mouse.y<=alto){
-
 
1862
							xf=xf+x;
-
 
1863
							yf=xf*recorte;
-
 
1864
							x=0;	
-
 
1865
						}
-
 
1866
					}	
-
 
1867
					
-
 
1868
				}
-
 
1869
				if(t1){
-
 
1870
					cal0=y-mouse.y;
-
 
1871
					cal1=yf+cal0;
-
 
1872
					cal2=cal1/recorte;
-
 
1873
					cal3=x-cal0/recorte;
-
 
1874
					if(cal2>50){
-
 
1875
						if(cal3>=0&&mouse.y>=0){
-
 
1876
							yf=cal1;
-
 
1877
							xf=cal2;
-
 
1878
							x=cal3;
-
 
1879
							y=mouse.y;
-
 
1880
						}else if(cal3>0&&mouse.y<0){
-
 
1881
							yf=yf+y;
-
 
1882
							x=x+(xf-yf/recorte);
-
 
1883
							xf=yf/recorte
-
 
1884
							y=0;
-
 
1885
						}else if(cal3<0&&mouse.y>=0){
-
 
1886
							xf=xf+x;
-
 
1887
							y=y+(yf-xf*recorte);
-
 
1888
							yf=xf*recorte;
-
 
1889
							x=0;	
-
 
1890
						}
-
 
1891
					}	
-
 
1892
 
-
 
1893
				}
-
 
1894
				}else{
-
 
1895
				if(t4){
-
 
1896
			 		
-
 
1897
					cal1=mouse.y-y;
-
 
1898
					cal2=mouse.x-x;
-
 
1899
					if(cal1>50){
-
 
1900
						yf=mouse.y<=alto?cal1:alto-y;				
-
 
1901
				 	}
-
 
1902
					if(cal2>50){
-
 
1903
						xf=mouse.x<=ancho?cal2:ancho-x;
-
 
1904
					}
-
 
1905
			 	}
-
 
1906
				
-
 
1907
			 	if(t3){
-
 
1908
					cal1=yf-(mouse.y-y);
-
 
1909
					cal2=mouse.x-x;
-
 
1910
					if(cal1>50){
-
 
1911
						
-
 
1912
						if(mouse.y>=0){
-
 
1913
							yf=cal1;
-
 
1914
							y=mouse.y;	
-
 
1915
						}else{
-
 
1916
							yf=yf+y;
-
 
1917
							y=0;
-
 
1918
						}
-
 
1919
				 	}
-
 
1920
					if(cal2>50){
-
 
1921
						xf=mouse.x<=ancho?cal2:ancho-x;
-
 
1922
					}
-
 
1923
			 	}
-
 
1924
				/* Izquierda abajo */
-
 
1925
			 	if(t2){
-
 
1926
					cal1=mouse.y-y;
-
 
1927
					cal2=xf-(mouse.x-x);
-
 
1928
					if(cal1>50){
-
 
1929
						yf=yf=mouse.y<=alto?cal1:alto-y;
-
 
1930
					}
-
 
1931
					if(cal2>50){
-
 
1932
						if(mouse.x>=0){	
-
 
1933
							xf=cal2;
-
 
1934
							x=mouse.x;
-
 
1935
						}else{
-
 
1936
							xf=xf+x;
-
 
1937
							x=0;
-
 
1938
						}
-
 
1939
					}
-
 
1940
			 	}
-
 
1941
				/* izquierda arriba */
-
 
1942
			 	if(t1){
-
 
1943
 
-
 
1944
					cal1=yf-(mouse.y-y);
-
 
1945
					cal2=xf-(mouse.x-x);
-
 
1946
					if(cal1>50){
-
 
1947
						
-
 
1948
						if(mouse.y>=0){
-
 
1949
							yf=cal1;
-
 
1950
							y=mouse.y;	
-
 
1951
						}else{
-
 
1952
							yf=yf+y;
-
 
1953
							y=0;
-
 
1954
						}
-
 
1955
				 	}
-
 
1956
					if(cal2>50){
-
 
1957
						if(mouse.x>=0){	
-
 
1958
							xf=cal2;
-
 
1959
							x=mouse.x;
-
 
1960
						}else{
-
 
1961
							xf=xf+x;
-
 
1962
							x=0;
-
 
1963
						}
-
 
1964
					}
-
 
1965
					
-
 
1966
			 	}
-
 
1967
				}
-
 
1968
			 	
-
 
1969
		 	actualizar();
-
 
1970
		 	}else if(texto_listo){
-
 
1971
		 		if(tcli){
-
 
1972
		 			tx=mouse.x-(txf/2)
-
 
1973
		 			ty=mouse.y-(tyf/2)
-
 
1974
		 		}else if(rotar){
-
 
1975
 
-
 
1976
		 		}
-
 
1977
 
-
 
1978
		 		actualizar2();
-
 
1979
		 	}
-
 
1980
		 })
-
 
1981
		 $('body').mouseup(function(e){
790
                placeholder:  'LABEL_RECOMMENDED_SIZE $image_size',
1982
		 	if(!recorte_listo){
-
 
1983
			 	cli=false;
-
 
1984
			 	t1=false;
-
 
1985
			 	t2=false;
-
 
1986
			 	t3=false;
-
 
1987
			 	t4=false;
-
 
1988
		 	}else if (texto_listo) {
-
 
1989
		 		tcli=false;
-
 
Línea -... Línea 791...
-
 
791
                allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
792
            });
-
 
793
 
-
 
794
  $('#form-add #marketplace').fileinput({
-
 
795
                theme: 'fa',
-
 
796
                language: 'es',
-
 
797
                showUpload: false,
-
 
798
                dropZoneEnabled: false,
-
 
799
                maxFileCount: 1,
-
 
800
                placeholder:  'LABEL_RECOMMENDED_SIZE $marketplace_size',
-
 
801
                allowedFileExtensions: ['jpeg', 'jpg', 'png'],
-
 
802
            });
-
 
803
    
-
 
804
            $('#form-edit #file').fileinput({
-
 
805
                theme: 'fa',
-
 
806
                language: 'es',
-
 
807
                showUpload: false,
-
 
808
                dropZoneEnabled: false,
-
 
809
                maxFileCount: 1,
Línea 1990... Línea -...
1990
		 	}
-
 
1991
		 })
-
 
1992
 
-
 
1993
 
-
 
1994
	}
810
                placeholder:  'LABEL_RECOMMENDED_SIZE $image_size',
1995
	/* Titulo */
811
                allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1996
	
812
            });
1997
var titulo_noticia, censor_titulo = true, numero_titulo=0;
813
 
1998
	$(document).on("keyup change", "#name", function(e){
-
 
1999
	console.log(numero_titulo)
-
 
2000
	titulo_noticia = $(this).val();
814
  $('#form-add #marketplace').fileinput({
2001
	titulo_elemento= $(".titulo_topico");
-
 
2002
	if(titulo_noticia!=""){
815
                theme: 'fa',
2003
		if(censor_titulo){
-
 
2004
			titulo_elemento.html(titulo_noticia);
816
                language: 'es',
2005
			if(titulo_elemento.height()>38){
-
 
2006
				var titulo_noticia2 = "";
-
 
2007
				for(var i =0; i <titulo_noticia.length;i++){
817
                showUpload: false,
2008
					titulo_noticia2 = titulo_noticia2 + titulo_noticia.split("")[i];
-
 
2009
					titulo_elemento.html(titulo_noticia2);
-
 
2010
					if(titulo_elemento.height()>38){
-
 
2011
						titulo_noticia2 = titulo_noticia2.slice(0,-5) + "...";
818
                dropZoneEnabled: false,
2012
						titulo_elemento.html(titulo_noticia2);
-
 
2013
						numero_titulo = titulo_noticia2.length;
819
                maxFileCount: 1,
2014
						censor_titulo=false;
-
 
2015
						break;
-
 
2016
					}
-
 
2017
 
-
 
2018
				}
-
 
2019
			}else{
820
                placeholder:  'LABEL_RECOMMENDED_SIZE $marketplace_size',
2020
				numero_titulo=0;
821
                allowedFileExtensions: ['jpeg', 'jpg', 'png'],
2021
			}
822
            });
2022
		}else{
-
 
2023
			if(numero_titulo+1>=titulo_noticia.length){
-
 
2024
				titulo_elemento.html(titulo_noticia);
-
 
2025
				censor_titulo=true;
823
       
2026
			}
824
        $('body').on('click', 'button.btn-cancel', function(e) {
2027
		}
825
            e.preventDefault();
2028
	}else{
826
            $('#row-add').hide();
Línea 2029... Línea 827...
2029
		titulo_elemento.html("LABEL_TITLE");
827
            $('#row-edit').hide();
2030
		censor_titulo = true;
828
            $('#row-listing').show();
2031
	}
829
            
2032
})     
830
        });
Línea 2033... Línea -...
2033
 
-
 
2034
});
-
 
2035
JS;
-
 
2036
$this->inlineScript()->captureEnd();
831
 
2037
?>
832
});
2038
 
833
JS;
2039
 
834
$this->inlineScript()->captureEnd();
2040
 
835
?>
2041
<!-- Content Header (Page header) -->
-
 
2042
<section class="content-header">
-
 
2043
	<div class="container-fluid">
-
 
2044
		<div class="row mb-2">
-
 
2045
			<div class="col-sm-12">
-
 
2046
				<h1>LABEL_CAPSULES</h1>
-
 
2047
			</div>
-
 
2048
		</div>
-
 
2049
	</div><!-- /.container-fluid -->
-
 
2050
</section>
836
 
2051
 
837
 
2052
<section class="content" id="content1">
838
<div class="container">
2053
	<div class="container-fluid">
839
	<div class="card" id="row-listing">
2054
		<div class="row">
840
	 	<div class="card-header">
2055
			<div class="col-12 mt-3">
841
	 		<h6 class="card-title">LABEL_CAPSULES</h6>
2056
				<div class="card">
842
	 	</div>
Línea 2057... Línea 843...
2057
					<div class="card-header">
843
	 	<div class="card-body">
2058
						<?php
844
	 						<?php
2059
						$form = $this->form;
845
						$form = $this->form;
2060
						$form->setAttributes([
846
						$form->setAttributes([
-
 
847
							'name'    => 'form-filter',
2061
							'name'    => 'form-filter',
848
							'id'      => 'form-filter',
2062
							'id'      => 'form-filter',
849
						]);
Línea 2063... Línea 850...
2063
						]);
850
 
2064
 
851
						$form->prepare();
2065
						$form->prepare();
852
						echo $this->form()->openTag($form);
2066
						echo $this->form()->openTag($form);
853
						?>
2067
						?>
854
						<div class="row">
-
 
855
	 	         <div class="col-12 mt-3">
-
 
856
							<?php
2068
						<div class="form-group">
857
							$element = $form->get('topic_uuid');
2069
							<?php
858
 
2070
							$element = $form->get('topic_uuid');
859
							$element->setAttributes(['class' => 'form-control']);
2071
 
860
							$element->setLabel('LABEL_TOPIC');
2072
							$element->setAttributes(['class' => 'form-control']);
861
							echo $this->formLabel($element);
2073
							$element->setLabel('LABEL_TOPIC');
862
							echo $this->formSelect($element);
2074
							echo $this->formLabel($element);
863
							?>
2075
							echo $this->formSelect($element);
864
			
2076
							?>
865
	 	         </div>
2077
						</div>
866
	 	     </div>
2078
						<?php echo $this->form()->closeTag($form); ?>
867
						<?php echo $this->form()->closeTag($form); ?>
2079
					</div>
868
			<div class="row">
2080
					<div class="card-body">
869
	 	         <div class="col-12 mt-3">	
2081
						<table id="gridTable" class="table   table-bordered">
870
					<table id="gridTable" class="table   table-bordered">
2082
							<thead>
871
							<thead>
2083
								<tr>
872
								<tr>
-
 
873
									<th>LABEL_NAME</th>
-
 
874
									<th>LABEL_DETAILS</th>
2084
									<th>LABEL_NAME</th>
875
									<th>LABEL_IMAGES</th>
2085
									<th>LABEL_DETAILS</th>
876
									<th>LABEL_ACTIONS</th>
2086
									<th>LABEL_IMAGES</th>
-
 
2087
									<th>LABEL_ACTIONS</th>
877
								</tr>
2088
								</tr>
878
							</thead>
2089
							</thead>
879
						<tbody>
2090
							<tbody>
880
						</tbody>
2091
							</tbody>
-
 
2092
						</table>
-
 
2093
					</div>
-
 
2094
					<div class="card-footer clearfix">
881
					</table>
2095
						<div style="float:right;">
-
 
2096
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
2097
							<?php if ($allowAdd) : ?>
-
 
2098
								<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
2099
							<?php endif; ?>
-
 
2100
						</div>
-
 
2101
					</div>
-
 
2102
				</div>
-
 
2103
			</div>
-
 
2104
		</div>
-
 
2105
	</div>
-
 
2106
</section>
-
 
2107
 
-
 
2108
 
-
 
2109
<!-- The Modal -->
882
	 	         </div>
-
 
883
	 	     </div>
2110
<div id="modalCapsuleAdd" style='display:none'>
884
	 	</div>
2111
 
885
	 	<div class="card-footer text-right">
-
 
886
			<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
887
			<?php if ($allowAdd) : ?>
2112
 
888
			<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
2113
	<!-- Modal Header -->
889
			<?php endif; ?>
2114
 
890
	 	</div>
2115
	<div class="d-flex justify-content-center tituloEditor">
891
	</div>
2116
		<h4>LABEL_ADD_CAPSULE</h6>
892
	
2117
 
893
	<div class="card" id="row-add" style="display: none">
2118
	</div>
894
	 	<div class="card-header">
2119
	<!-- Modal body -->
895
	 		<h6 class="card-title">LABEL_ADD_CAPSULE</h6>
Línea 2120... Línea 896...
2120
	<div class="grid-padre">
896
	 	</div>
2121
		<?php
897
	 	<?php
2122
		$form = $this->formAdd;
898
		$form = $this->formAdd;
2123
		$form->setAttributes([
899
		$form->setAttributes([
-
 
900
			'method'  => 'post',
-
 
901
			'action'  => '',
2124
			'method'  => 'post',
902
			'name'    => 'form-add',
2125
			'action'  => '',
903
			'id'      => 'form-add',
2126
			'name'    => 'form-capsule-add',
904
		]);
2127
			'id'      => 'form-capsule-add',
905
 
2128
		]);
906
		$form->prepare();
2129
 
907
		echo $this->form()->openTag($form);
2130
		$form->prepare();
908
		?>
2131
		echo $this->form()->openTag($form);
909
	 	<div class="card-body">
2132
		?>
910
	 		<div class="row">
2133
		<div class="form-group grid-1-2">
-
 
2134
			<?php
-
 
2135
			$element = $form->get('name');
-
 
2136
 
-
 
2137
			$element->setAttributes(['class' => 'form-control']);
-
 
2138
			$element->setOptions(['label' => 'LABEL_NAME']);
-
 
2139
			echo $this->formLabel($element);
-
 
2140
			echo $this->formText($element);
-
 
2141
			?>
911
	 	         <div class="col-12 mt-3">
2142
		</div>
912
    			<?php
2143
		<div class="form-group grid-1-2">
-
 
2144
			<?php
-
 
2145
			$element = $form->get('description');
-
 
2146
			$element->setAttributes(['id' => 'description_add', 'class' => 'form-control', 'rows' => '2', 'class' => 'form-control']);
-
 
2147
			$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
2148
			echo $this->formLabel($element);
-
 
2149
			echo $this->formTextArea($element);
-
 
2150
			?>
-
 
2151
		</div>
-
 
2152
		<div class="form-group grid-1-2">
913
    			$element = $form->get('name');
2153
			<?php
914
    
2154
			$element = $form->get('order');
915
    			$element->setAttributes(['class' => 'form-control']);
2155
			$element->setAttributes(['class' => 'form-control']);
916
    			$element->setOptions(['label' => 'LABEL_NAME']);
2156
			$element->setOptions(['label' => 'LABEL_ORDER']);
917
    			echo $this->formLabel($element);
2157
			echo $this->formLabel($element);
918
    			echo $this->formText($element);
2158
			echo $this->formText($element);
919
    			?>
2159
			?>
920
    			</div>
2160
		</div>
921
    		</div>	
2161
 
-
 
2162
		<div class="form-group grid-1-2">
-
 
2163
			<?php
-
 
2164
			$element = $form->get('status');
-
 
2165
			$element->setAttributes(['class' => 'form-control']);
-
 
2166
			$element->setOptions(['label' => 'LABEL_STATUS']);
-
 
2167
			echo $this->formLabel($element);
-
 
2168
			echo $this->formSelect($element);
-
 
2169
			?>
922
	 		<div class="row">
2170
		</div>
923
	 	         <div class="col-12 mt-3">
2171
		<div class="form-group grid-1-2">
-
 
2172
			<?php
-
 
2173
			$element = $form->get('privacy');
-
 
2174
			$element->setAttributes(['class' => 'form-control']);
-
 
2175
			$element->setOptions(['label' => 'LABEL_PRIVACY']);
-
 
2176
			echo $this->formLabel($element);
924
        			<?php
2177
			echo $this->formSelect($element);
-
 
2178
			?>
-
 
2179
		</div>
-
 
2180
		<div class="form-group grid-1-2">
925
        			$element = $form->get('description');
2181
			<?php
926
        			$element->setAttributes(['id' => 'description_add', 'class' => 'form-control', 'rows' => '2', 'class' => 'form-control']);
2182
			$element = $form->get('type');
927
        			$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
2183
			$element->setAttributes(['class' => 'form-control']);
928
        			echo $this->formLabel($element);
2184
			$element->setOptions(['label' => 'LABEL_TYPE']);
929
        			echo $this->formTextArea($element);
2185
			echo $this->formLabel($element);
930
        			?>
2186
			echo $this->formSelect($element);
931
        		</div>
2187
			?>
932
        	</div>	
2188
		</div>
-
 
2189
		<div class="form-group grid-1-2" id="form-row-cost">
-
 
2190
			<?php
-
 
2191
			$element = $form->get('cost');
-
 
2192
			$element->setAttributes(['class' => 'form-control']);
-
 
2193
			$element->setOptions(['label' => 'LABEL_COST']);
-
 
2194
			echo $this->formLabel($element);
-
 
2195
			echo $this->formText($element);
-
 
2196
			?>
-
 
2197
		</div>
-
 
2198
 
-
 
2199
		<?php
-
 
2200
		$element = $form->get('marketplace');
-
 
2201
		$element->setAttributes(['class' => 'marketplace']);
-
 
2202
		echo $this->formHidden($element);
-
 
2203
		?>
933
	 		<div class="row">
-
 
934
	 	         <div class="col-12 mt-3">
-
 
935
        			<?php
-
 
936
        			$element = $form->get('order');
-
 
937
        			$element->setAttributes(['class' => 'form-control']);
-
 
938
        			$element->setOptions(['label' => 'LABEL_ORDER']);
-
 
939
        			echo $this->formLabel($element);
-
 
940
        			echo $this->formText($element);
-
 
941
        			?>
-
 
942
        		</div>
-
 
943
			</div>
2204
		<?php
944
	 		<div class="row">
-
 
945
	 	         <div class="col-12 mt-3">
-
 
946
    			<?php
-
 
947
    			$element = $form->get('status');
-
 
948
    			$element->setAttributes(['class' => 'form-control']);
-
 
949
    			$element->setOptions(['label' => 'LABEL_STATUS']);
2205
		$element = $form->get('file');
950
    			echo $this->formLabel($element);
-
 
951
    			echo $this->formSelect($element);
-
 
952
    			?>
-
 
953
				</div>
-
 
954
			</div>	
-
 
955
	 		<div class="row">
-
 
956
	 	         <div class="col-12 mt-3">
2206
		$element->setAttributes(['class' => 'file']);
957
        			<?php
-
 
958
        			$element = $form->get('privacy');
-
 
959
        			$element->setAttributes(['class' => 'form-control']);
-
 
960
        			$element->setOptions(['label' => 'LABEL_PRIVACY']);
-
 
961
        			echo $this->formLabel($element);
-
 
962
        			echo $this->formSelect($element);
-
 
963
        			?>
-
 
964
        		</div>
-
 
965
        	</div>	
-
 
966
			<div class="row">
2207
		echo $this->formHidden($element);
967
	 			<div class="col-12 mt-3">
-
 
968
        			<?php
-
 
969
        			$element = $form->get('type');
-
 
970
        			$element->setAttributes(['class' => 'form-control']);
-
 
971
        			$element->setOptions(['label' => 'LABEL_TYPE']);
-
 
972
        			echo $this->formLabel($element);
-
 
973
        			echo $this->formSelect($element);
2208
		?>
974
        			?>
-
 
975
        		</div>
-
 
976
        	</div>	
2209
		<div class="form-group grid-1-2 ">
977
 
2210
			<div class="imagen-contaner">
-
 
2211
				<label for="marketplaceImg">LABEL_IMAGE_MARKETPLACE</label>
-
 
2212
				<img class='marketplaceImg' src='' class="img img-responsive" style="width: 100px; height: auto"></img>
-
 
2213
			</div>
978
		  	<div class="row"  id="form-row-cost">
2214
		</div>
-
 
2215
		<h5 style="text-align:center " class="form-group grid-1-2" id='titleTypeImage'>LABEL_IMAGE_MARKETPLACE</h5>
-
 
-
 
979
	 			<div class="col-12 mt-3">
-
 
980
        			<?php
-
 
981
        			$element = $form->get('cost');
-
 
982
        			$element->setAttributes(['class' => 'form-control']);
-
 
983
        			$element->setOptions(['label' => 'LABEL_COST']);
-
 
984
        			echo $this->formLabel($element);
-
 
985
        			echo $this->formText($element);
-
 
986
        			?>
-
 
987
				</div>
-
 
988
			</div>	
-
 
989
			<div class="row">
2216
		<div class="contenido form-group " id="contenido"></div>
990
	 	 		<div class="col-12 mt-3">
-
 
991
                        <?php
-
 
992
                        $element = $form->get('file');
-
 
993
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
-
 
994
                        $element->setAttributes(['class' => 'form-control']);
-
 
995
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
-
 
996
                        echo $this->formLabel($element);
-
 
997
                        echo $this->formFile($element);
-
 
998
                        ?>
2217
 
999
            	</div>
2218
		<?php echo $this->form()->closeTag($form); ?>
-
 
2219
	</div>
-
 
-
 
1000
           	</div> 
-
 
1001
           	<div class="row">
2220
 
1002
	 	         <div class="col-12 mt-3">
2221
 
1003
                        <?php
2222
 
1004
                        $element = $form->get('marketplace');
2223
</div>
1005
                        $element->setOptions(['label' => 'LABEL_MARKETPLACE']);
-
 
1006
                        $element->setAttributes(['class' => 'form-control']);
2224
 
1007
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
-
 
1008
                        echo $this->formLabel($element);
2225
 
1009
                        echo $this->formFile($element);
-
 
1010
                        ?>
2226
<!-- The Modal -->
1011
          		</div>
2227
<div id="modalCapsuleEdit" style='display:none'>
1012
          	</div> 
-
 
1013
	 	</div>
-
 
1014
	 	<div class="card-footer text-right">
2228
 
1015
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2229
 
1016
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2230
	<!-- Modal Header -->
1017
	 	</div>
2231
 
1018
	 	<?php echo $this->form()->closeTag($form); ?>
2232
	<div class="d-flex justify-content-center tituloEditor">
1019
	</div>
2233
		<h4>LABEL_EDIT_CAPSULE</h6>
1020
	
2234
 
1021
	<div class="card" id="row-edit" style="display: none">
Línea 2235... Línea 1022...
2235
	</div>
1022
	 	<div class="card-header">
2236
	<!-- Modal body -->
1023
	 		<h6 class="card-title">LABEL_EDIT_CAPSULE</h6>
2237
	<div class="grid-padre">
1024
	 	</div>
2238
		<?php
1025
	 	<?php
-
 
1026
		$form = $this->formEdit;
-
 
1027
		$form->setAttributes([
2239
		$form = $this->formEdit;
1028
		    'method'    => 'post',
2240
		$form->setAttributes([
1029
		    'name'      => 'form-edit',
2241
			'method'    => 'post',
1030
		    'id'        => 'form-edit'
2242
			'name'      => 'form-capsule-edit',
1031
		]);
2243
			'id'        => 'form-capsule-edit'
1032
 
2244
		]);
1033
		$form->prepare();
2245
 
1034
		echo $this->form()->openTag($form);
2246
		$form->prepare();
1035
		?>
2247
		echo $this->form()->openTag($form);
1036
	 	<div class="card-body">
2248
		?>
-
 
2249
		<div class="form-group grid-1-2">
-
 
2250
			<?php
-
 
2251
			$element = $form->get('name');
-
 
2252
 
-
 
2253
			$element->setAttributes(['class' => 'form-control']);
-
 
2254
			$element->setOptions(['label' => 'LABEL_NAME']);
-
 
2255
			echo $this->formLabel($element);
-
 
2256
			echo $this->formText($element);
1037
	 		<div class="row">
2257
			?>
1038
	 	         <div class="col-12 mt-3">
2258
		</div>
-
 
2259
		<div class="form-group grid-1-2">
-
 
2260
			<?php
-
 
2261
			$element = $form->get('description');
-
 
2262
			$element->setAttributes(['id' => 'description_edit', 'class' => 'form-control', 'rows' => '2', 'class' => 'form-control']);
-
 
2263
			$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
2264
			echo $this->formLabel($element);
-
 
2265
			echo $this->formTextArea($element);
-
 
2266
			?>
-
 
2267
		</div>
1039
    			<?php
2268
		<div class="form-group grid-1-2">
1040
    			$element = $form->get('name');
2269
			<?php
1041
    
2270
			$element = $form->get('order');
1042
    			$element->setAttributes(['class' => 'form-control']);
2271
			$element->setAttributes(['class' => 'form-control']);
1043
    			$element->setOptions(['label' => 'LABEL_NAME']);
2272
			$element->setOptions(['label' => 'LABEL_ORDER']);
1044
    			echo $this->formLabel($element);
2273
			echo $this->formLabel($element);
1045
    			echo $this->formText($element);
2274
			echo $this->formText($element);
1046
    			?>
2275
			?>
1047
    			</div>
2276
		</div>
-
 
2277
 
-
 
2278
		<div class="form-group grid-1-2">
-
 
2279
			<?php
-
 
2280
			$element = $form->get('status');
-
 
2281
			$element->setAttributes(['class' => 'form-control']);
-
 
2282
			$element->setOptions(['label' => 'LABEL_STATUS']);
-
 
2283
			echo $this->formLabel($element);
-
 
2284
			echo $this->formSelect($element);
1048
    		</div>	
2285
			?>
1049
	 		<div class="row">
2286
		</div>
-
 
2287
		<div class="form-group grid-1-2">
-
 
2288
			<?php
-
 
2289
			$element = $form->get('privacy');
-
 
2290
			$element->setAttributes(['class' => 'form-control']);
-
 
2291
			$element->setOptions(['label' => 'LABEL_PRIVACY']);
1050
	 	         <div class="col-12 mt-3">
2292
			echo $this->formLabel($element);
-
 
2293
			echo $this->formSelect($element);
-
 
2294
			?>
-
 
2295
		</div>
1051
        			<?php
2296
		<div class="form-group grid-1-2">
1052
        			$element = $form->get('description');
2297
			<?php
1053
        			$element->setAttributes(['id' => 'description_edit', 'class' => 'form-control', 'rows' => '2', 'class' => 'form-control']);
2298
			$element = $form->get('type');
1054
        			$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
2299
			$element->setAttributes(['class' => 'form-control']);
1055
        			echo $this->formLabel($element);
2300
			$element->setOptions(['label' => 'LABEL_TYPE']);
1056
        			echo $this->formTextArea($element);
2301
			echo $this->formLabel($element);
1057
        			?>
2302
			echo $this->formSelect($element);
1058
        		</div>
2303
			?>
-
 
2304
		</div>
-
 
2305
		<div class="form-group grid-1-2" id="form-row-cost">
-
 
2306
			<?php
-
 
2307
			$element = $form->get('cost');
-
 
2308
			$element->setAttributes(['class' => 'form-control']);
-
 
2309
			$element->setOptions(['label' => 'LABEL_COST']);
-
 
2310
			echo $this->formLabel($element);
-
 
2311
			echo $this->formText($element);
-
 
2312
			?>
-
 
2313
		</div>
-
 
2314
 
-
 
2315
		<?php
-
 
2316
		$element = $form->get('marketplace');
-
 
2317
		$element->setAttributes(['class' => 'marketplace']);
-
 
2318
		echo $this->formHidden($element);
1059
        	</div>	
-
 
1060
	 		<div class="row">
-
 
1061
	 	         <div class="col-12 mt-3">
-
 
1062
        			<?php
-
 
1063
        			$element = $form->get('order');
-
 
1064
        			$element->setAttributes(['class' => 'form-control']);
-
 
1065
        			$element->setOptions(['label' => 'LABEL_ORDER']);
-
 
1066
        			echo $this->formLabel($element);
-
 
1067
        			echo $this->formText($element);
-
 
1068
        			?>
-
 
1069
        		</div>
2319
		?>
1070
			</div>
-
 
1071
	 		<div class="row">
-
 
1072
	 	         <div class="col-12 mt-3">
-
 
1073
    			<?php
-
 
1074
    			$element = $form->get('status');
-
 
1075
    			$element->setAttributes(['class' => 'form-control']);
2320
		<?php
1076
    			$element->setOptions(['label' => 'LABEL_STATUS']);
-
 
1077
    			echo $this->formLabel($element);
-
 
1078
    			echo $this->formSelect($element);
-
 
1079
    			?>
-
 
1080
				</div>
-
 
1081
			</div>	
-
 
1082
	 		<div class="row">
2321
		$element = $form->get('file');
1083
	 	         <div class="col-12 mt-3">
-
 
1084
        			<?php
-
 
1085
        			$element = $form->get('privacy');
-
 
1086
        			$element->setAttributes(['class' => 'form-control']);
-
 
1087
        			$element->setOptions(['label' => 'LABEL_PRIVACY']);
-
 
1088
        			echo $this->formLabel($element);
-
 
1089
        			echo $this->formSelect($element);
-
 
1090
        			?>
-
 
1091
        		</div>
-
 
1092
        	</div>	
2322
		$element->setAttributes(['class' => 'file']);
1093
			<div class="row">
-
 
1094
	 			<div class="col-12 mt-3">
-
 
1095
        			<?php
-
 
1096
        			$element = $form->get('type');
-
 
1097
        			$element->setAttributes(['class' => 'form-control']);
-
 
1098
        			$element->setOptions(['label' => 'LABEL_TYPE']);
-
 
1099
        			echo $this->formLabel($element);
-
 
1100
        			echo $this->formSelect($element);
-
 
1101
        			?>
-
 
1102
        		</div>
-
 
1103
        	</div>	
-
 
1104
 
-
 
1105
		  	<div class="row"  id="form-row-cost">
-
 
1106
	 			<div class="col-12 mt-3">
-
 
1107
        			<?php
-
 
1108
        			$element = $form->get('cost');
-
 
1109
        			$element->setAttributes(['class' => 'form-control']);
-
 
1110
        			$element->setOptions(['label' => 'LABEL_COST']);
-
 
1111
        			echo $this->formLabel($element);
-
 
1112
        			echo $this->formText($element);
-
 
1113
        			?>
-
 
1114
				</div>
-
 
1115
			</div>	
-
 
1116
			<div class="row">
-
 
1117
	 	 		<div class="col-12 mt-3">
-
 
1118
                        <?php
-
 
1119
                        $element = $form->get('file');
-
 
1120
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
-
 
1121
                        $element->setAttributes(['class' => 'form-control']);
-
 
1122
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
-
 
1123
                        echo $this->formLabel($element);
-
 
1124
                        echo $this->formFile($element);
-
 
1125
                        ?>
-
 
1126
            	</div>
-
 
1127
           	</div> 
-
 
1128
           	<div class="row">
-
 
1129
	 	         <div class="col-12 mt-3">
-
 
1130
                        <?php
-
 
1131
                        $element = $form->get('marketplace');
-
 
1132
                        $element->setOptions(['label' => 'LABEL_MARKETPLACE']);
-
 
1133
                        $element->setAttributes(['class' => 'form-control']);
2323
		echo $this->formHidden($element);
1134
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2324
		?>
1135
                        echo $this->formLabel($element);
-
 
1136
                        echo $this->formFile($element);
-
 
1137
                        ?>
Línea 2325... Línea -...
2325
		<div class="form-group grid-1-2 ">
-
 
Línea 2326... Línea 1138...
2326
			<div class="imagen-contaner">
1138
          		</div>
2327
				<label for="marketplaceImg">LABEL_IMAGE_MARKETPLACE</label>
1139
          	</div> 
2328
				<img class='marketplaceImg' src='' class="img img-responsive" style="width: 100px; height: auto"></img>
1140
	 	</div>
2329
			</div>
1141
	 	<div class="card-footer text-right">
2330
		</div>
1142
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2331
		<h5 style="text-align:center " class="form-group grid-1-2" id='titleTypeImage'>LABEL_IMAGE_MARKETPLACE</h5>
1143
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2332
		<div class="contenido form-group " id="contenido"></div>
1144
	 	</div>
Línea 2362... Línea 1174...
2362
	</div>
1174
	</div>
2363
</div>
1175
</div>
Línea 2364... Línea 1176...
2364
 
1176
 
2365
 
1177
 
2366
<!-- The Modal -->
1178
<!-- The Modal -->
2367
<div class="modal" id="modalImageApp">
1179
<div class="modal" id="modalPreviewImage">
Línea 2368... Línea 1180...
2368
	<div class="modal-dialog ">
1180
	<div class="modal-dialog ">
2369
		<div class="modal-content">
1181
		<div class="modal-content">
Línea 2404... Línea 1216...
2404
			</div>
1216
			</div>
Línea 2405... Línea 1217...
2405
 
1217
 
2406
			<!-- Modal body -->
1218
			<!-- Modal body -->
2407
			<div class="modal-body">
1219
			<div class="modal-body">
2408
				<form>
1220
				<form>
-
 
1221
					<div class="row">
2409
					<div class="form-group">
1222
						<div class="col-12 mt-3">
2410
						<label>LABEL_TOPIC</label>
1223
						<label>LABEL_TOPIC</label>
-
 
1224
						<input type="text" readonly="readonly" id="table-users-topic" class="form-control">
2411
						<input type="text" readonly="readonly" id="table-users-topic" class="form-control">
1225
						</div>
2412
					</div>
1226
					</div>	
-
 
1227
					<div class="row">
2413
					<div class="form-group">
1228
						<div class="col-12 mt-3">
2414
						<label>LABEL_CAPSULE</label>
1229
						<label>LABEL_CAPSULE</label>
-
 
1230
						<input type="text" readonly="readonly" id="table-users-capsule" class="form-control">
2415
						<input type="text" readonly="readonly" id="table-users-capsule" class="form-control">
1231
						</div>
2416
					</div>
1232
					</div>	
-
 
1233
				</form>
-
 
1234
				<div class="row">
2417
				</form>
1235
					<div class="col-12 mt-3">
2418
				<div style="height: 300px;overflow: scroll;">
1236
        				<div style="height: 300px;overflow: scroll;">
2419
					<table id="gridTableUsers" style="width: 100%" class="table   table-bordered">
1237
        					<table id="gridTableUsers" style="width: 100%" class="table   table-bordered">
2420
						<thead>
1238
        						<thead>
2421
							<tr>
1239
        							<tr>
2422
								<th>LABEL_FIRST_NAME</th>
1240
        								<th>LABEL_FIRST_NAME</th>
2423
								<th>LABEL_LAST_NAME</th>
1241
        								<th>LABEL_LAST_NAME</th>
2424
								<th>LABEL_EMAIL</th>
1242
        								<th>LABEL_EMAIL</th>
2425
								<th>LABEL_DETAILS</th>
1243
        								<th>LABEL_DETAILS</th>
2426
							</tr>
1244
        							</tr>
2427
						</thead>
1245
        						</thead>
2428
						<tbody>
1246
        						<tbody>
2429
						</tbody>
1247
        						</tbody>
-
 
1248
        					</table>
2430
					</table>
1249
        				</div>
-
 
1250
    				</div>
Línea 2431... Línea 1251...
2431
				</div>
1251
    			</div>	
Línea 2432... Línea 1252...
2432
 
1252
 
2433
			</div>
1253
			</div>