Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
 
5
$roleName = $currentUser->getUserTypeId();
6
 
7
 
8
$routeAdd       = $this->url('microlearning/content/topics/add');
9
$routeDatatable = $this->url('microlearning/content/topics');
10
 
11
$allowAdd               = $acl->isAllowed($roleName, 'microlearning/content/topics/add') ? 1 : 0;
12
$allowEdit              = $acl->isAllowed($roleName, 'microlearning/content/topics/edit') ? 1 : 0;
13
$allowDelete            = $acl->isAllowed($roleName, 'microlearning/content/topics/delete') ? 1 : 0;
14
 
15
 
16
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
17
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
18
 
19
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
20
 
21
 
22
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
23
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
24
 
25
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
26
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
27
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
28
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
29
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
31
 
32
 
33
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
34
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
35
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
36
 
37
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
38
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
4797 nelberth 39
$this->headLink()->appendStylesheet($this->basePath('plugins/nelberth-editor/style.css'));
1 www 40
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
41
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
42
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
43
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
44
 
45
 
46
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
47
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
48
 
49
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
50
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
51
 
52
 
53
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
54
 
55
 
56
$status_active = \LeadersLinked\Model\Degree::STATUS_ACTIVE;
57
 
4697 nelberth 58
 
59
 
4737 nelberth 60
 
1 www 61
$this->inlineScript()->captureStart();
62
echo <<<JS
63
    jQuery( document ).ready(function( $ ) {
64
 
65
        $.validator.setDefaults({
66
            debug: true,
67
            highlight: function(element) {
68
                $(element).addClass('is-invalid');
69
            },
70
            unhighlight: function(element) {
71
                $(element).removeClass('is-invalid');
72
            },
73
            errorElement: 'span',
74
            errorClass: 'error invalid-feedback',
75
            errorPlacement: function(error, element) {
76
                if(element.parent('.btn-file').length) {
77
                    error.insertAfter(element.parent().parent());
78
                } else if(element.parent('.toggle').length) {
79
                    error.insertAfter(element.parent().parent());
80
                } else {
81
                    error.insertAfter(element.parent());
82
                }
83
            }
84
        });
85
 
86
 
87
        $.fn.showFormErrorValidator = function(fieldname, errors) {
88
            var field = $(fieldname);
89
            if(field) {
90
                $(field).addClass('is-invalid');
91
 
92
 
93
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
5541 nelberth 94
              /*  if(element.parent('.btn-file').length) {
5539 nelberth 95
                    error.insertAfter(element.parent().parent());
96
                } else if(element.parent('.toggle').length) {
97
                    error.insertAfter(element.parent().parent());
98
                } else {
99
                    error.insertAfter(element.parent());
5541 nelberth 100
                }*/
1 www 101
            }
102
        };
103
 
104
 
105
 
106
 
107
        var allowEdit   = $allowEdit;
108
        var allowDelete = $allowDelete;
109
 
110
        var gridTable = $('#gridTable').dataTable( {
111
            'processing': true,
112
            'serverSide': true,
113
            'searching': true,
114
            'order': [[ 0, 'asc' ]],
115
            'ordering':  true,
116
            'ordenable' : true,
117
            'responsive': true,
118
            'select' : false,
119
        	'paging': true,
120
            'pagingType': 'simple_numbers',
121
    		'ajax': {
122
    			'url' : '$routeDatatable',
123
    			'type' : 'get',
124
                'beforeSend': function (request) {
125
                  NProgress.start();
126
                },
127
                'dataFilter': function(response) {
128
                    var response = jQuery.parseJSON( response );
129
 
130
                    var json                = {};
131
                    json.recordsTotal       = 0;
132
                    json.recordsFiltered    = 0;
133
                    json.data               = [];
134
 
135
 
136
                    if(response.success) {
137
                        json.recordsTotal       = response.data.total;
138
                        json.recordsFiltered    = response.data.total;
139
                        json.data               = response.data.items;
140
                    } else {
141
                        $.fn.showError(response.data)
142
                    }
143
 
144
                    return JSON.stringify( json );
145
                }
146
    		},
147
            'language' : {
148
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
149
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
150
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
151
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
152
                'sInfo':           'LABEL_DATATABLE_SINFO',
153
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
154
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
155
                'sInfoPostFix':    '',
156
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
157
                'sUrl':            '',
158
                'sInfoThousands':  ',',
159
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
160
                'oPaginate': {
161
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
162
                    'sLast':     'LABEL_DATATABLE_SLAST',
163
                    'sNext':     'LABEL_DATATABLE_SNEXT',
164
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
165
                },
166
                'oAria': {
167
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
168
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
169
                },
170
            },
171
            'drawCallback': function( settings ) {
172
                NProgress.done();
173
                $('button.btn-delete').confirmation({
174
                    rootSelector: 'button.btn-delete',
175
                    title : 'LABEL_ARE_YOU_SURE',
176
                    singleton : true,
177
                    btnOkLabel: 'LABEL_YES',
178
                    btnCancelLabel: 'LABEL_NO',
179
                    onConfirm: function(value) {
180
                        action = $(this).data('href');
181
                        NProgress.start();
182
                        $.ajax({
183
                            'dataType'  : 'json',
184
                            'accept'    : 'application/json',
185
                            'method'    : 'post',
186
                            'url'       :  action,
187
                        }).done(function(response) {
188
                            if(response['success']) {
189
                                $.fn.showSuccess(response['data']);
190
                                gridTable.api().ajax.reload(null, false);
191
                            } else {
192
                                $.fn.showError(response['data']);
193
                            }
194
                        }).fail(function( jqXHR, textStatus, errorThrown) {
195
                            $.fn.showError(textStatus);
196
                        }).always(function() {
197
                            NProgress.done();
198
                        });
199
                    },
200
                });
201
            },
202
            'aoColumns': [
203
                { 'mDataProp': 'name' },
204
                { 'mDataProp': 'status' },
205
                { 'mDataProp': 'image' },
206
                { 'mDataProp': 'actions' },
207
    	    ],
208
            'columnDefs': [
209
                {
210
                    'targets': 0,
211
                    'className' : 'text-vertical-middle',
212
                },
213
                {
214
                    'targets': -2,
215
                    'orderable': false,
216
                    'render' : function ( data, type, row ) {
217
                        s = '&nbsp;';
218
 
219
                        if( data )  {
220
                            s = s + '&nbsp;<img class="btn-view-image-app" data-href="' + data + '" data-toggle="tooltip" src="'+data+'" title="LABEL_VIEW" style="width: 40px; object-fit: cover; height: 40px;" /> '
221
                        }  else {
222
                            s = s + '&nbsp;LABEL_IMAGE: <br>';
223
                        }
224
 
225
 
226
                        return s;
227
                    }
228
                },
229
 
230
 
231
                {
232
                    'targets': -1,
233
                    'orderable': false,
234
                    'render' : function ( data, type, row ) {
235
                        s = '';
236
 
237
                        if(allowEdit && data['link_edit']  ) {
238
                            s = s + '<button class="btn btn-info btn-sm btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
239
                        }
240
                        if(allowDelete && data['link_delete']  ) {
241
                            s = s + '<button class="btn btn-danger btn-sm btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
242
                        }
243
                        return s;
244
                    }
245
                }
246
              ],
247
        });
248
 
249
 
250
    var validatorAdd = $('#form-topic-add').validate({
251
        debug: true,
252
        onclick: false,
253
        onkeyup: false,
254
        ignore: [],
255
        rules: {
256
            'name': {
257
                required: true,
258
                maxlength: 128,
259
            },
260
            'description': {
261
                updateCkeditor:function() {
262
                        CKEDITOR.instances.description_add.updateElement();
263
                },
264
                required: true
265
            },
266
           'file': {
267
                required: true,
268
            },
269
            'order' : {
270
                required: true,
271
                digits: true,
272
                min: 1,
273
                max: 250
274
            },
275
            'status' : {
276
                required: true,
277
            },
278
        },
279
        submitHandler: function(form)
280
        {
281
            var formdata = false;
282
            if (window.FormData){
283
                formdata = new FormData(form); //form[0]);
284
            }
5709 nelberth 285
 
286
 
287
			$('.info_noticia').prop('disabled', true);
5703 nelberth 288
			NProgress.start();
1 www 289
            $.ajax({
290
                'dataType'  : 'json',
291
                'accept'    : 'application/json',
292
                'method'    : 'post',
293
                'url'       :  $('#form-topic-add').attr('action'),
294
                'data'      :  formdata,
295
                'processData': false,
296
                'contentType': false,
297
            }).done(function(response) {
5542 nelberth 298
				console.log(response)
299
				if(response['success']) {
1 www 300
                    $.fn.showSuccess(response['data']);
5708 nelberth 301
                    $('body, html').animate({scrollTop: '0px'}, 300);
5703 nelberth 302
					$('#content1').css('display','block');
303
            		$('#addImage').css('display','none');
1 www 304
                    gridTable.api().ajax.reload(null, false);
305
                } else {
306
                    validatorAdd.resetForm();
307
                    if(jQuery.type(response['data']) == 'string') {
308
                        $.fn.showError(response['data']);
309
                    } else  {
310
                        $.each(response['data'], function( fieldname, errors ) {
311
                            $.fn.showFormErrorValidator('#form-topic-add #' + fieldname, errors);
312
                        });
313
                    }
314
                }
315
            }).fail(function( jqXHR, textStatus, errorThrown) {
5709 nelberth 316
 
5575 nelberth 317
				console.log(jqXHR)
1 www 318
                $.fn.showError(textStatus);
319
            }).always(function() {
5709 nelberth 320
				$('.info_noticia').prop('disabled', false);
1 www 321
                NProgress.done();
322
            });
323
            return false;
324
        },
325
        invalidHandler: function(form, validator) {
326
 
327
        }
328
    });
329
 
330
    var validatorEdit  = $('#form-topic-edit').validate({
331
        debug: true,
332
        onclick: false,
333
        onkeyup: false,
334
        ignore: [],
335
        rules: {
336
            'name': {
337
                required: true,
338
                maxlength: 128,
339
            },
340
            'description': {
341
                updateCkeditor:function() {
342
                        CKEDITOR.instances.description_edit.updateElement();
343
                },
344
                required: true
345
            },
346
           'file': {
5982 nelberth 347
                required: true,
1 www 348
            },
349
            'order' : {
350
                required: true,
351
                digits: true,
352
                min: 1,
353
                max: 250
354
            },
355
            'status' : {
356
                required: true,
357
            },
358
 
359
        },
360
        submitHandler: function(form)
361
        {
362
            var formdata = false;
363
            if (window.FormData){
364
                formdata = new FormData(form); //form[0]);
365
            }
366
 
7060 nelberth 367
            $('.info_noticia').prop('disabled', true);
5982 nelberth 368
			NProgress.start();
1 www 369
            $.ajax({
370
                'dataType'  : 'json',
371
                'accept'    : 'application/json',
372
                'method'    : 'post',
373
                'url'       :  $('#form-topic-edit').attr('action'),
374
                'data'      :  formdata,
375
                'processData': false,
376
                'contentType': false,
377
            }).done(function(response) {
378
                if(response['success']) {
379
                    $.fn.showSuccess(response['data']);
380
 
5994 nelberth 381
                    $('body, html').animate({scrollTop: '0px'}, 300);
5898 nelberth 382
					$('#content1').css('display','block');
383
            		$('#topicEdit').css('display','none');
1 www 384
                    gridTable.api().ajax.reload(null, false);
385
                } else {
386
                    validatorAdd.resetForm();
387
                    if(jQuery.type(response['data']) == 'string') {
388
                        $.fn.showError(response['data']);
389
                    } else  {
390
                        $.each(response['data'], function( fieldname, errors ) {
391
                            $.fn.showFormErrorValidator('#form-topic-edit #' + fieldname, errors);
392
                        });
393
                    }
394
                }
395
            }).fail(function( jqXHR, textStatus, errorThrown) {
396
                $.fn.showError(textStatus);
397
            }).always(function() {
7060 nelberth 398
 
399
				$('.info_noticia').prop('disabled', false);
1 www 400
                NProgress.done();
401
            });
402
            return false;
403
        },
404
        invalidHandler: function(form, validator) {
405
 
406
        }
407
    });
408
 
409
 
410
 
411
        $('body').on('click', '.btn-view-image-app', function(e) {
412
            e.preventDefault();
413
 
414
            $('#image-app').attr('src', $(this).data('href'));
415
            $('#modalImageApp').modal('show');
416
            return false;
417
        });
418
 
419
        $('#form-topic-add #order').inputNumberFormat({decimal: 0});
5741 nelberth 420
 
1 www 421
 
422
 
423
        $('body').on('click', 'button.btn-add', function(e) {
424
            e.preventDefault();
6015 nelberth 425
 
1 www 426
            $('#form-topic-add #name').val('');
427
            $('#form-topic-add #order').val('1');
5536 nelberth 428
            $('#form-topic-add #name').val('');
1 www 429
 
430
            $('#form-topic-add #status').val('');
431
 
432
 
433
            CKEDITOR.instances.description_add.setData('');
434
            validatorAdd.resetForm();
4693 nelberth 435
            $('#content1').css('display','none');
436
            $('#addImage').css('display','block');
4829 nelberth 437
			iniciarEditor()
4693 nelberth 438
 
1 www 439
            return false;
440
        });
5646 nelberth 441
		$('body').on('click', '#ir_atras', function(e) {
442
            e.preventDefault();
443
 
444
 
5710 nelberth 445
			$('body, html').animate({scrollTop: '0px'}, 300);
5646 nelberth 446
            $('#content1').css('display','block');
447
            $('#addImage').css('display','none');
5910 nelberth 448
			$('#topicEdit').css('display','none');
1 www 449
 
5646 nelberth 450
 
451
            return false;
452
        });
453
 
1 www 454
 
455
        $('#form-topic-edit #order').inputNumberFormat({decimal: 0});
456
 
5902 nelberth 457
       /* $('#form-topic-edit #file').fileinput({
1 www 458
            theme: 'fas',
459
            language: 'es',
460
            showUpload: false,
461
            dropZoneEnabled: false,
462
            maxFileCount: 1,
463
            allowedFileExtensions: ['jpeg', 'jpg', 'png'],
464
            msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
5902 nelberth 465
        });*/
1 www 466
 
8591 nelberth 467
 
1 www 468
        $('body').on('click', 'button.btn-edit', function(e) {
469
            e.preventDefault();
6015 nelberth 470
 
1 www 471
            var url = $(this).data('href');
5900 nelberth 472
			NProgress.start();
1 www 473
            $.ajax({
474
                'dataType'  : 'json',
475
                'accept'    : 'application/json',
476
                'method'    : 'get',
477
                'url'       :  url,
478
            }).done(function(response) {
479
                if(response['success']) {
5913 nelberth 480
					console.log(response['data'])
1 www 481
                    $('#form-topic-edit')[0].reset();
482
 
483
                    $('#form-topic-edit').attr('action',url);
6078 nelberth 484
                    $('#form-topic-edit #name').val(response['data']['name']);
1 www 485
                    $('#form-topic-edit #order').val(response['data']['order']);
486
 
5919 nelberth 487
					 $('#form-topic-edit #status').val(response['data']['status']);
1 www 488
 
489
                    CKEDITOR.instances.description_edit.setData(response['data']['description']);
490
                    validatorEdit.resetForm();
5898 nelberth 491
					$('#content1').css('display','none');
492
            		$('#topicEdit').css('display','block');
6015 nelberth 493
					iniciarEditor(false,response['data']['image']);
1 www 494
                } else {
495
                    validatorEdit.resetForm();
496
                    if(jQuery.type(response['data']) == 'string') {
497
                        $.fn.showError(response['data']);
498
                    } else  {
499
                        $.each(response['data'], function( fieldname, errors ) {
500
                            $.fn.showFormErrorValidator('#form-topic-edit #' + fieldname, errors);
501
                        });
502
                    }
503
                }
504
            }).fail(function( jqXHR, textStatus, errorThrown) {
505
                $.fn.showError(textStatus);
506
            }).always(function() {
507
                NProgress.done();
508
            });
509
        });
510
 
511
        $('body').on('click', 'button.btn-cancel', function(e) {
512
            e.preventDefault();
513
            $('#modalTopicAdd').modal('hide');
5895 nelberth 514
            $('#topicEdit').modal('hide');
1 www 515
        });
516
 
517
        $('body').on('click', 'button.btn-refresh', function(e) {
518
            e.preventDefault();
519
            gridTable.api().ajax.reload(null, false);
520
        });
521
 
8290 stevensc 522
        CKEDITOR.replace('description_add', {
523
			toolbar: [
524
                    { name: 'editing', items: ['Scayt'] },
525
                    { name: 'links', items: ['Link', 'Unlink'] },
526
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
527
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
528
                    '/',
529
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
530
                    { name: 'styles', items: ['Styles', 'Format'] },
531
                    { name: 'tools', items: ['Maximize'] }
532
                ],
533
                removePlugins: 'elementspath,Anchor',
534
                heigth: 100
535
		});
536
        CKEDITOR.replace('description_edit', {
537
			toolbar: [
538
                    { name: 'editing', items: ['Scayt'] },
539
                    { name: 'links', items: ['Link', 'Unlink'] },
540
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
541
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
542
                    '/',
543
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
544
                    { name: 'styles', items: ['Styles', 'Format'] },
545
                    { name: 'tools', items: ['Maximize'] }
546
                ],
547
                removePlugins: 'elementspath,Anchor',
548
                heigth: 100
549
		});
1 www 550
 
4798 nelberth 551
 
552
 
553
		/*Script del editor (Aqui comienza el cielo y la tierra) */
4803 nelberth 554
		var imagenServidorNoticia;
555
		var scroll_altura,viente;
556
		var nombre_user = $(".perfil_u_nombre").text();
557
		var primer_nombre = nombre_user.split(" ")[0];
10616 nelberth 558
		//var nuevoHtmlImagen='<div class="articulo_noticia animated fadeIn"><div class="pasos"><div class="titulo_pasos animated fadeInDown delay-04 fast">LABEL_STEP_1</div><div class="paso_opcion"><div class="responsing_cut"><div class="icon_cut"><span class="fa fa-scissors"></span></div><div class="contenido_cut"><div class="animated fadeInRight delay-04 fast"><div><div class="titulo_cut"><div>LABEL_CUT</div><div class="fa fa-times" id="cerrar_cut_modal"></div></div><div class="opcion_editor recortar10"><div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div></div></div></div><div class="responsing_text"><div class="icon_text"><span class="fa fa-text-width"></span></div><div class="contenido_text"><div class="animated fadeInRight delay-04 fast"><div class="texto"><div class="titulo_text"><div>LABEL_ADD_TEXT</div><div class="fa fa-times" id="cerrar_text_modal"></div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"><div class="fonts"><div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"> <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48"></div><div class="fonts"><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"></div><div class="fonts_style"><div class="fs at" id="arial">LABEL_FONT_ARIAL</div><div class="fs" id="calibri">LABEL_FONT_CALIBRI</div><div class="fs" id="forte">LABEL_FONT_FORTE</div><div class="fs" id="impact">LABEL_FONT_IMPACT</div><div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div><div class="fs" id="mb">LABEL_FONT_MV_BOLI</div><div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div><div class="fs" id="verdana">LABEL_FONT_VERDANA</div><div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div></div></div></div></div></div><div class="responsing_filtros"><div class="icon_filter"><span class="fa fa-eyedropper"></span></div><div class="contenido_filter"><div class="titulo_filtro"><div>LABEL_FILTERS</div><div class="fa fa-times" id="cerrar_filter_modal"></div></div><div class="opciones_imagen"><div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div></div><div class="volver"><span class="icon-undo"></span>LABEL_START_OVER</div><div class="paso_1 paso animated bounceInDown delay-04 fast">1</div><div class="paso_2 a1 animated bounceInDown delay-06 fast">2</div><div class="paso_2 b1 animated bounceInDown delay-08 fast">3</div></div></div><div class="editor_imagenes"><div class="fondo_oscuro"></div><div class="editor_imagenes2"><div class="filtros animated fadeInLeft delay-04 fast"><div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div><div class="opciones_imagen"><div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div><div class="canvas_imagen"><div class="canvas recortar"><div class="canvas_subir" id="imagen_noticia">LABEL_DRAG_IMAGE_HERE</div></div></div><div class="modificar animated fadeInRight delay-04 fast"><div><div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors"></span>LABEL_CUT</div><div class="opcion_editor recortar10"><div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div><div class="texto"><div class="titulo_texto"><span class="icon-plus fa fa-text-width"></span>LABEL_ADD_TEXT</div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"><div class="fonts"><div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"> <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48"></div><div class="fonts"><div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"></div><div class="fonts_style"><div class="fs at" id="arial">LABEL_FONT_ARIAL</div><div class="fs" id="calibri">LABEL_FONT_CALIBRI</div><div class="fs" id="forte">LABEL_FONT_FORTE</div><div class="fs" id="impact">LABEL_FONT_IMPACT</div><div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div><div class="fs" id="mb">LABEL_FONT_MV_BOLI</div><div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div><div class="fs" id="verdana">LABEL_FONT_VERDANA</div><div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div></div></div></div></div><div class="botones_dimenciones"><div class="scale"><div class="dimenciones"><div id="ancho">1240px</div><div>x</div><div id="alto">720px</div></div><div class="porciento"><div id="menos_scale"><span class="icon-minus fa fa-minus"></span></div><div class="ps"><ul class="cantidades_scale"><li data-scale="2" class="as">200%</li><li data-scale="1" class="as">100%</li><li data-scale="0.75" class="as">75%</li><li data-scale="0.5" class="as">50%</li><li data-scale="0.25" class="as">25%</li></ul><div id="porciento_scale">50%</div></div><div id="mas_scale"><span class="icon-plus fa fa-plus"></span></div></div></div><div class="botones"><button class="boton_normal" id="ir_atras">LABEL_GO_BACK</button><button class="boton_normal" id="boton_recortar">LABEL_DATATABLE_SNEXT</button></div></div></div></div><dav class="fixed_noticia"></dav><dav class="cuadro_noticias animated bounceInUp delay-04" id="cuadro_noticias"><dav class="relative"><div class="titulo_topico">LABEL_TITLE_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>'
10621 nelberth 559
		var nuevoHtmlImagen='<div class="articulo_noticia animated fadeIn"> <div class="pasos"> <div class="titulo_pasos animated fadeInDown delay-04 fast">LABEL_STEP_1</div><div class="paso_opcion"> <div class="responsing_cut"> <div class="icon_cut"><span class="fa fa-scissors"></span></div><div class="contenido_cut"> <div class="animated fadeInRight delay-04 fast"> <div> <div class="titulo_cut"> <div>LABEL_CUT</div><div class="fa fa-times" id="cerrar_cut_modal"></div></div><div class="opcion_editor recortar10"> <div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div></div></div></div><div class="responsing_text"> <div class="icon_text"><span class="fa fa-text-width"></span></div><div class="contenido_text"> <div class="animated fadeInRight delay-04 fast"> <div class="texto"> <div class="titulo_text"> <div>LABEL_ADD_TEXT</div><div class="fa fa-times" id="cerrar_text_modal"></div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"/> <div class="fonts"> <div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"/> <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48"/> </div><div class="fonts"> <div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"/> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"/> </div><div class="fonts_style"> <div class="fs at" id="arial">LABEL_FONT_ARIAL</div><div class="fs" id="calibri">LABEL_FONT_CALIBRI</div><div class="fs" id="forte">LABEL_FONT_FORTE</div><div class="fs" id="impact">LABEL_FONT_IMPACT</div><div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div><div class="fs" id="mb">LABEL_FONT_MV_BOLI</div><div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div><div class="fs" id="verdana">LABEL_FONT_VERDANA</div><div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div></div></div></div></div></div><div class="responsing_filtros"> <div class="icon_filter"><span class="fa fa-eyedropper"></span></div><div class="contenido_filter"> <div class="titulo_filtro"> <div>LABEL_FILTERS</div><div class="fa fa-times" id="cerrar_filter_modal"></div></div><div class="opciones_imagen"> <div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div></div><div class="volver"><span class="icon-undo"></span>LABEL_START_OVER</div><div class="paso_1 paso animated bounceInDown delay-04 fast">1</div><div class="paso_2 a1 animated bounceInDown delay-06 fast">2</div><div class="paso_2 b1 animated bounceInDown delay-08 fast">3</div></div></div><div class="editor_imagenes"> <div class="fondo_oscuro"></div><div class="editor_imagenes2"> <div class="filtros animated fadeInLeft delay-04 fast"> <div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div><div class="opciones_imagen"> <div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div><div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div><div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div><div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div><div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div><div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div><div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div><div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div><div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div><div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div><div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div><div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div><div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div><div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div><div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div><div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div><div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div><div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div><div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div><div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div><div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div><div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div><div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div><div class="opcion_editor" id="70">LABEL_FILTER_70S</div><div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div><div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div><div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div><div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div><div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div><div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div><div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div><div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div><div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div><div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div><div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div><div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div><div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div><div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div></div></div><div class="canvas_imagen"> <div class="canvas recortar"><div class="canvas_subir" id="imagen_noticia">LABEL_DRAG_IMAGE_HERE</div></div></div><div class="modificar animated fadeInRight delay-04 fast"> <div> <div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors"></span>LABEL_CUT</div><div class="opcion_editor recortar10"> <div>LABEL_CUT</div><div id="blockCelda"><span class="fa fa-lock"></span></div></div></div><div class="texto"> <div class="titulo_texto"><span class="icon-plus fa fa-text-width"></span>Fuentes</div><div class="fonts"> <select name="fuentes" id="selectFuente" class="select-custom"> <option value="arial">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="d-flex justify-content-between"> <div class="titulo_texto"><span class="icon-plus fa fa-text-width"></span>Texto</div><div class="fonts"> <div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div><div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div><input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff"/> </div></div><input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE"/> <div class="fonts"> <div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div><div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div><input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo"/> <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo"/> </div></div></div></div><div class="botones_dimenciones"> <div class="scale"> <div class="dimenciones"> <div id="ancho">1240px</div><div>x</div><div id="alto">720px</div></div><div class="porciento"> <div id="menos_scale"><span class="icon-minus fa fa-minus"></span></div><div class="ps"> <ul class="cantidades_scale"> <li data-scale="2" class="as">200%</li><li data-scale="1" class="as">100%</li><li data-scale="0.75" class="as">75%</li><li data-scale="0.5" class="as">50%</li><li data-scale="0.25" class="as">25%</li></ul> <div id="porciento_scale">50%</div></div><div id="mas_scale"><span class="icon-plus fa fa-plus"></span></div></div></div><div class="botones"><button class="boton_normal" id="ir_atras">LABEL_GO_BACK</button><button class="boton_normal" id="boton_recortar">LABEL_DATATABLE_SNEXT</button></div></div></div></div><dav class="fixed_noticia"></dav><dav class="cuadro_noticias animated bounceInUp delay-04" id="cuadro_noticias"> <dav class="relative"> <div class="titulo_topico">LABEL_TITLE_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>'
5207 nelberth 560
		$(document).on("click", ".info_noticia", function(e){
5709 nelberth 561
			imagenServidorNoticia = elemento.toDataURL("image/jpeg", 1.0);
562
			console.log(imagenServidorNoticia.split(','))
5989 nelberth 563
			$('.file').val(imagenServidorNoticia.split(',')[1]);
564
			console.log($('.file').val())
5709 nelberth 565
			$(".c1").addClass("paso");
5703 nelberth 566
 
5513 nelberth 567
 
5709 nelberth 568
		})
6045 nelberth 569
		var edit;
6015 nelberth 570
		function iniciarEditor(add=true, image=''){
5864 nelberth 571
		 cortar=false;
4803 nelberth 572
		recorte_listo=false;
573
		texto="";
574
		seis=true;
575
		color="#ffffff";
576
		texto_listo=false,siete=false;
577
		uno=true;
578
		size=48;
6850 nelberth 579
		blockCelda=true;
4803 nelberth 580
		cinco=true;
4944 nelberth 581
		xf=320,yf =480;
4803 nelberth 582
		negritas=false, bold="";
583
		shadow = true, nueve=true;
584
		italic=false, ita="";
585
		rectangulo=false, diez=false;
586
     	fontfamily="Arial";
587
     	r=0,g=0,b=0,a=1;
6049 nelberth 588
		 edit=add;
6046 nelberth 589
		console.log(edit)
4806 nelberth 590
		window.clearInterval(editorNoticia);
5202 nelberth 591
		setTimeout(function(){
592
			scroll_altura=$(".articulo_noticia").offset().top-110;
4821 nelberth 593
			anchoFondoOscuro = $(".articulo_noticia").width();
4823 nelberth 594
			altoFondoOscuro = $(".editor_imagenes").height();
4821 nelberth 595
			$(".fondo_oscuro").css("width",""+anchoFondoOscuro+"px");
4825 nelberth 596
			$(".fondo_oscuro").css("height",""+altoFondoOscuro+"px");
5202 nelberth 597
 
6022 nelberth 598
		},navegacion(nuevoHtmlImagen,edit,image));
5202 nelberth 599
 
4829 nelberth 600
		}
4798 nelberth 601
 
4801 nelberth 602
		$(document).on("click", ".volver", function(){
603
		var nombre_user = $(".perfil_u_nombre").text();
604
		var primer_nombre = nombre_user.split(" ")[0];
5864 nelberth 605
		 cortar=false;
4801 nelberth 606
		cinco=true;
607
		recorte_listo=false;
608
		texto="";
609
		seis=true;
610
		color="#ffffff";
611
		texto_listo=false,siete=false;
612
		uno=true;
6850 nelberth 613
		blockCelda=true;
4801 nelberth 614
		size=48;
8591 nelberth 615
 
8593 nelberth 616
 
4944 nelberth 617
		xf=320,yf =480;
4801 nelberth 618
		negritas=false, bold="";
619
		shadow = true, nueve=true;
620
		italic=false, ita="";
621
		rectangulo=false, diez=false;
622
     	fontfamily="Arial";
623
     	r=0,g=0,b=0,a=1;
4804 nelberth 624
		 var imagenServidorNoticia;
6048 nelberth 625
		 console.log(edit)
4801 nelberth 626
		window.clearInterval(editorNoticia);
627
		setTimeout(function(){
628
			scroll_altura=$(".articulo_noticia").offset().top-110;
629
			anchoFondoOscuro = $(".articulo_noticia").width();
4823 nelberth 630
			altoFondoOscuro = $(".editor_imagenes").height();
4801 nelberth 631
			$(".fondo_oscuro").css("width",""+anchoFondoOscuro+"px");
4825 nelberth 632
			$(".fondo_oscuro").css("height",""+altoFondoOscuro+"px");
4801 nelberth 633
 
6022 nelberth 634
		},navegacion(nuevoHtmlImagen,edit,'',false));
4815 nelberth 635
 
4816 nelberth 636
		})
4801 nelberth 637
 
6018 nelberth 638
		function navegacion(nuevoHtmlImagen,add,image,reload=true){
5908 nelberth 639
			if(add){
8594 nelberth 640
				edit=true;
10623 nelberth 641
				//$('#contenido2').html('')
642
				//$('#contenido').html(nuevoHtmlImagen)
6001 nelberth 643
 
5908 nelberth 644
			}else{
6017 nelberth 645
				if(reload){
646
					$('#contenido').html('')
647
					const getBase64FromUrl = async (url) => {
648
						const data = await fetch(url);
649
						const blob = await data.blob();
650
						return new Promise((resolve) => {
651
							const reader = new FileReader();
652
							reader.readAsDataURL(blob);
653
							reader.onloadend = function() {
654
							const base64data = reader.result;
655
							resolve(base64data);
656
							}
657
						});
658
					}
659
 
660
					getBase64FromUrl(image).then(function(e){
6080 nelberth 661
						$('#form-topic-edit #name').trigger('change');
6017 nelberth 662
						$(".volver").css("display","block")
663
						$(".a1").addClass("paso");
664
						$(".titulo_pasos").html("LABEL_STEP_2");
665
						setTimeout(function(){
666
							recorte_listo=true;
667
							$(".fondo_oscuro").css("display","none");
668
							$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
669
							$(".recortar10").removeClass("recortar");
670
							$(".canvas").removeClass("recortar");
671
							$(".b1").addClass("paso");
672
							$(".titulo_pasos").html("LABEL_STEP_3");
673
							if(texto!=""){
674
								seis=true;
675
								siete=true;
676
							}
677
							cinco=true;
678
							dos=true;
679
							cuatro=true;
680
							actualizar();
5979 nelberth 681
 
6017 nelberth 682
						},editorNoticia(e));
683
 
684
 
685
					})
6021 nelberth 686
 
687
					setTimeout(function(){
6017 nelberth 688
						$(".canvas_subir").html('<span class="icon-plus fa fa-spinner"></span> Cargando...')
6081 nelberth 689
						$('#form-topic-edit #name').trigger('change');
6017 nelberth 690
					},$('#contenido2').html(nuevoHtmlImagen));
691
				}else{
8595 nelberth 692
 
8596 nelberth 693
					edit=true;
6017 nelberth 694
					$('#contenido').html('')
6082 nelberth 695
					setTimeout(function(){
696
						$('#form-topic-edit #name').trigger('change');
697
					},$('#contenido2').html(nuevoHtmlImagen));
6017 nelberth 698
				}
5978 nelberth 699
			}
700
		}
4816 nelberth 701
 
4798 nelberth 702
		$(window).on("scroll", function(){
5132 nelberth 703
			console.log(scroll_altura)
4798 nelberth 704
		if($(window).scrollTop()>scroll_altura){
705
			$("#cuadro_noticias").addClass("fixed");
706
		}else{
707
			$("#cuadro_noticias").removeClass("fixed");
708
		}
709
	})
5129 nelberth 710
 
4798 nelberth 711
	$(document).on("dragover", "#imagen_noticia", function(e){
712
		e.preventDefault();
713
		e.stopPropagation();
714
		$(this).css({"background":"rgba(0,0,0,.2)"})
715
	})
716
	$(document).on("drop", "#imagen_noticia", function(e){
717
		e.preventDefault();
718
		e.stopPropagation();
719
		$(this).css("background", "none");
720
		var archivo = e.originalEvent.dataTransfer.files;
721
		var img=archivo[0];
5926 nelberth 722
		if(img.type =="image/jpeg"||img.type =="image/png"){
4798 nelberth 723
			$(".modificar").removeClass("animated");
724
			var render = new FileReader();
725
			render.readAsDataURL(img);
726
			render.onload = function(e){
8345 nelberth 727
				imagen2=new Image();
728
				imagen2.src=e.target.result;
8349 nelberth 729
 
730
				$(imagen2).ready(function(e){
8517 nelberth 731
					if(imagen2.width<200||imagen2.height<200){
8360 nelberth 732
						$.fn.showError('LABEL_MINIMUM_IMAGE_SIZE');
8349 nelberth 733
					}else{
734
						$(".volver").css("display","block")
735
						$(".a1").addClass("paso");
736
						$(".titulo_pasos").html("LABEL_STEP_2");
8351 nelberth 737
						editorNoticia(imagen2.src)
8349 nelberth 738
					}
8350 nelberth 739
				})
8349 nelberth 740
			}
8344 nelberth 741
		}else{
8360 nelberth 742
			$.fn.showError('LABEL_SUPPORTED_FORMATS');
5926 nelberth 743
		}
8346 nelberth 744
	})
8347 nelberth 745
 
4798 nelberth 746
	$(document).on("dragover", "body", function(e){
747
		e.preventDefault();
748
		e.stopPropagation();
749
	})
750
	$(document).on("drop", "body", function(e){
751
		e.preventDefault();
752
		e.stopPropagation();
753
	})
754
 
5741 nelberth 755
	var canvas='<div class="editorNoticia"><canvas id="editorNoticia">LABEL_NOT_SUPPORTED</canvas></div>';
4798 nelberth 756
	$(document).on("mouseover", ".editorNoticia", function(){
757
		$("body").css({"overflow": "hidden"});
5707 nelberth 758
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "17px")
5146 nelberth 759
		$(".barra,.footer").css("padding-right","17px")
4798 nelberth 760
 
761
 
762
	})
763
	$(document).on("mouseover", "#editorNoticia", function(){
764
		if(recorte_listo){
765
			ocho=true;
766
		}
767
	})
768
	$(document).on("mouseout", "#editorNoticia", function(){
769
		if(recorte_listo){
770
			ocho=false;
771
			actualizar2()
772
		}
773
	})
774
	$(document).on("mouseout", ".editorNoticia",function(){
775
		$("body").css({"overflow": "auto"})
5707 nelberth 776
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "0px")
4798 nelberth 777
		$(".barra,.footer").css("padding-right","0px")
778
 
779
	})
780
	$(document).on('mousewheel', ".editorNoticia",function(e){
781
		var ruedita = e.originalEvent.wheelDelta
782
		if(ruedita>0){
783
			scale = scale+(scale/10);
784
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
785
		}else{
786
			scale = scale-(scale/10);
787
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
788
		}
789
		$("#editorNoticia").css({"transform": "scale("+scale+")"});
790
	})
791
	$(document).on("click", ".as", function(e){
792
		e.preventDefault();
793
		 scale = $(this).data("scale");
794
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
795
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
796
 
797
	})
798
	$(document).on("click", ".ps", function(e){
799
		e.preventDefault();
800
		$(".cantidades_scale").slideToggle(200).css("display", "block");
801
	})
5789 nelberth 802
	$(document).on("click", "#cerrar_filter_modal, .icon_filter", function(e){
803
		e.preventDefault();
5854 nelberth 804
		if(recorte_listo){
5789 nelberth 805
		$(".contenido_filter").slideToggle(200).css("display", "block");
5854 nelberth 806
		}
5789 nelberth 807
	})
5805 nelberth 808
	$(document).on("click", "#cerrar_text_modal, .icon_text", function(e){
809
		e.preventDefault();
5854 nelberth 810
		if(recorte_listo){
5855 nelberth 811
			$(".contenido_text").slideToggle(200).css("display", "block");
5854 nelberth 812
		}
5805 nelberth 813
	})
5865 nelberth 814
 
5816 nelberth 815
	$(document).on("click", "#cerrar_cut_modal, .icon_cut", function(e){
816
		e.preventDefault();
5861 nelberth 817
		if(cortar){
5854 nelberth 818
			$(".contenido_cut").slideToggle(200).css("display", "block");
5861 nelberth 819
		}
5854 nelberth 820
 
5816 nelberth 821
	})
4798 nelberth 822
	$(document).on("click", "#menos_scale", function(e){
823
		e.preventDefault();
824
		scale = scale-(scale/10);
825
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
826
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
827
	})
828
 
829
	$(document).on("click", "#mas_scale", function(e){
830
		e.preventDefault();
831
		scale = scale+(scale/10);
832
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
833
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
834
	})
10747 nelberth 835
	$(document).on('change', '#selectFiltro', function(e){
10770 nelberth 836
 
10747 nelberth 837
		data=$(this).val()
10756 nelberth 838
		data=data.split(',');
10770 nelberth 839
		if(data[2]='gris'){
840
 
841
			filtergris(data[0],data[1]);
842
		}else{
843
 
844
			filter(data[0],data[1],data[2],data[3],data[4]);
845
		}
846
 
10747 nelberth 847
	})
10764 nelberth 848
 
4798 nelberth 849
	$(document).on("click", "#orange", function(){
850
		$(".oa").removeClass("oa")
851
		filter( .8,1,1.6,1.45,1.49);
852
		$(this).addClass("oa")
853
	})
854
	$(document).on("click", "#relieve", function(){
855
		$(".oa").removeClass("oa")
856
		filter( .7,1.2,1.60,1.66,1.58);
857
		$(this).addClass("oa")
858
	})
859
	$(document).on("click", "#bosque", function(){
860
		$(".oa").removeClass("oa")
861
		filter( .85,.75,1.47,1.66,1.54);
862
		$(this).addClass("oa")
863
	})
864
	$(document).on("click", "#desierto", function(){
865
		$(".oa").removeClass("oa")
866
		filter( .8,.9,1.66,1.43,1.28);
867
		$(this).addClass("oa")
868
	})
869
	$(document).on("click", "#villa", function(){
870
		$(".oa").removeClass("oa")
871
		filter( .8,.8,1.71,1.64,1.58);
872
		$(this).addClass("oa")
873
	})
874
	$(document).on("click", "#magia", function(){
875
		$(".oa").removeClass("oa")
876
		filter( .7,1.2,1.49,1.49,1.6);
877
		$(this).addClass("oa")
878
	})
879
	$(document).on("click", "#luz", function(){
880
		$(".oa").removeClass("oa")
881
		filter( .9,.9,1.45,1.54,1.54);
882
		$(this).addClass("oa")
883
	})
884
	$(document).on("click", "#retoque", function(){
885
		$(".oa").removeClass("oa")
886
		filter( .9,1.3,1,1,1);
887
		$(this).addClass("oa")
888
	})
889
	$(document).on("click", "#saturacion", function(){
890
		$(".oa").removeClass("oa")
891
		filter( 1,1.5,1,1,1);
892
		$(this).addClass("oa")
893
	})
894
	$(document).on("click", "#rosa", function(){
895
		$(".oa").removeClass("oa")
896
		filter( .8,1.2,1.24,.99,1);
897
		$(this).addClass("oa")
898
	})
899
	$(document).on("click", "#historia", function(){
900
		$(".oa").removeClass("oa")
901
		filter( .9,1.1,1.33,1.19,.91);
902
		$(this).addClass("oa")
903
	})
904
	$(document).on("click", "#encantador", function(){
905
		$(".oa").removeClass("oa")
906
		filter( .9,1.2,26,-12,0,2);
907
		$(this).addClass("oa")
908
	})
909
	$(document).on("click", "#emocion", function(){
910
		$(".oa").removeClass("oa")
911
		filter( 1.1,1.4,40,12,-6,2);
912
		$(this).addClass("oa")
913
	})
914
	$(document).on("click", "#beige", function(){
915
		$(".oa").removeClass("oa")
4943 nelberth 916
		filter( .9,1.32,56,47,17,2);
4798 nelberth 917
		$(this).addClass("oa")
918
	})
919
	$(document).on("click", "#fine", function(){
920
		$(".oa").removeClass("oa")
921
		filter( .87,1.19,55,37,23,2);
922
		$(this).addClass("oa")
923
	})
924
	$(document).on("click", "#lord", function(){
925
		$(".oa").removeClass("oa")
926
		filter( 1.2,.9,67,13,-23,2);
927
		$(this).addClass("oa")
928
	})
929
	$(document).on("click", "#70", function(){
930
		$(".oa").removeClass("oa")
931
		filter( 1.2,1.2,35,7,18,2);
932
		$(this).addClass("oa")
933
	})
934
	$(document).on("click", "#arbol", function(){
935
		$(".oa").removeClass("oa")
936
		filter(.92,1.23,-11,11,11,2);
937
		$(this).addClass("oa")
938
	})
939
	$(document).on("click", "#verano", function(){
940
		$(".oa").removeClass("oa")
941
		filter( 1,1.4,-3,-1,-12,2);
942
		$(this).addClass("oa")
943
	})
944
	$(document).on("click", "#cf", function(){
945
		$(".oa").removeClass("oa")
946
		filter( .85,1.26,-15,2,-1,2);
947
		$(this).addClass("oa")
948
	})
949
	$(document).on("click", "#angeles", function(){
950
		$(".oa").removeClass("oa")
951
		filter( 1,1.4,5,12,1,2);
952
		$(this).addClass("oa")
953
	})
954
	$(document).on("click", "#caliente", function(){
955
		$(".oa").removeClass("oa")
956
		filter( .9,1.2,43,-17,-55,2);
957
		$(this).addClass("oa")
958
	})
959
	$(document).on("click", "#otono", function(){
960
		$(".oa").removeClass("oa")
961
		filter( 1,1.29,29,26,17,2);
962
		$(this).addClass("oa")
963
	})
964
	$(document).on("click", "#marzo", function(){
965
		$(".oa").removeClass("oa")
966
		filter( .85,1.3,43,25,-11,2);
967
		$(this).addClass("oa")
968
	})
969
	$(document).on("click", "#pera", function(){
970
		$(".oa").removeClass("oa")
971
		filter( .8,1.25,31,41,12,2);
972
		$(this).addClass("oa")
973
	})
974
	$(document).on("click", "#comun", function(){
975
		$(".oa").removeClass("oa")
976
		filter( 1,1.36,4,5,1,2);
977
		$(this).addClass("oa")
978
	})
979
	$(document).on("click", "#oro", function(){
980
		$(".oa").removeClass("oa")
981
		filter( .9,1.3,37,-25,1,2);
982
		$(this).addClass("oa")
983
	})
984
	$(document).on("click", "#gotico", function(){
985
		$(".oa").removeClass("oa")
986
		filter( 1.1,1.3,-47,-42,-30,2);
987
		$(this).addClass("oa")
988
	})
989
	$(document).on("click", "#forestal", function(){
990
		$(".oa").removeClass("oa")
991
		filter( 1,1.4,-5,42,11,2);
992
		$(this).addClass("oa")
993
	})
994
	$(document).on("click", "#luna", function(){
995
		$(".oa").removeClass("oa")
996
		filter( .9,1.2,-5,-7,4,2);
997
		$(this).addClass("oa")
998
	})
999
	$(document).on("click", "#fiesta", function(){
1000
		$(".oa").removeClass("oa")
1001
		filter( 1.1,1.3,-1,-1,26,2);
1002
		$(this).addClass("oa")
1003
	})
1004
	$(document).on("click", "#gris", function(){
1005
		$(".oa").removeClass("oa")
1006
		filtergris(1,1)
1007
		$(this).addClass("oa")
1008
	})
1009
	$(document).on("click", "#lhs", function(){
1010
		$(".oa").removeClass("oa")
1011
		filtergris(.8,1.5);
1012
		$(this).addClass("oa")
1013
	})
5786 nelberth 1014
	$(document).on("click", "#normal", function(){
4798 nelberth 1015
		$(".oa").removeClass("oa")
1016
		$(this).addClass("oa")
1017
		filter();
1018
	})
1019
	var texto_listo=false,siete=false;
1020
	var texto;
1021
	$(document).on("keyup", "#texto_input", function(e){
1022
		e.preventDefault();
1023
		texto = $(this).val();
1024
		if(texto_actualizar){
1025
			siete=true;
1026
		}
1027
		if(texto!=""){
1028
			texto_actualizar=true;
1029
			actualizar2();
1030
		}else{
1031
			actualizar2();
1032
		}
1033
 
1034
	})
1035
	var color="#ffffff";
10734 nelberth 1036
 
4798 nelberth 1037
	$(document).on("change", "#color", function(){
1038
    	color=$(this).val();
1039
    	seis=true;
1040
    	actualizar2();
1041
    })
1042
    var size=48;
1043
    $(document).on("keyup change", "#font-size", function(){
1044
    	size=$(this).val();
1045
    	size = parseInt(size);
1046
    	seis=true;
1047
    	siete=true;
1048
    	actualizar2();
1049
    })
1050
    var negritas=false, bold="";
1051
    $(document).on("click", "#negritas", function(e){
1052
    	e.preventDefault();
1053
    	if(!negritas){
1054
    		bold="bold";
1055
    		$(this).addClass("fa");
1056
    		seis=true;
1057
    		siete=true;
1058
    		actualizar2();
1059
    		negritas=true;
1060
    	}else{
1061
    		bold="";
1062
    		$(this).removeClass("fa");
1063
    		seis=true;
1064
    		siete=true;
1065
    		actualizar2();
1066
    		negritas=false;
1067
    	}
1068
    })
1069
    var italic=false, ita="";
1070
     $(document).on("click", "#italic", function(e){
1071
    	e.preventDefault();
1072
    	if(!italic){
1073
    		ita="italic";
1074
    		$(this).addClass("fa");
1075
    		seis=true;
1076
    		siete=true;
1077
    		actualizar2();
1078
    		italic=true;
1079
    	}else{
1080
    		ita="";
1081
    		$(this).removeClass("fa");
1082
    		seis=true;
1083
    		siete=true;
1084
    		actualizar2();
1085
    		italic=false;
1086
    	}
1087
    })
1088
     var fontfamily="Arial";
10616 nelberth 1089
     $(document).on("change", "#selectFuente", function(e){
4798 nelberth 1090
    	e.preventDefault();
10618 nelberth 1091
    	fontfamily= $(this).val();
4798 nelberth 1092
    	seis=true;
1093
    	siete=true;
1094
    	actualizar2();
1095
 
5149 nelberth 1096
    })
4798 nelberth 1097
     var shadow = true, nueve=true;
5149 nelberth 1098
     $(document).on("click","#shadow", function(e){
4798 nelberth 1099
     	e.preventDefault();
1100
     	if(shadow){
1101
     		$(this).removeClass("fa");
1102
     		seis=true;
1103
     		nueve=false;
1104
     		actualizar2();
1105
     		shadow=false;
1106
     	}else{
1107
     		$(this).addClass("fa");
1108
     		seis=true;
1109
     		nueve=true;
1110
     		actualizar2();
1111
     		shadow=true;
1112
     	}
1113
 
5149 nelberth 1114
     })
4798 nelberth 1115
     var rectangulo=false, diez=false, colorrect="#000000";
5149 nelberth 1116
     $(document).on("click", "#rectangulo", function(e){
4798 nelberth 1117
     	e.preventDefault();
1118
     	if(!rectangulo){
1119
     		$(this).addClass("fa");
10691 nelberth 1120
			$('.color_fondo_cuadro').css('display','flex')
4798 nelberth 1121
     		diez=true;
1122
     		actualizar2();
1123
     		rectangulo=true;
1124
     	}else{
1125
     		$(this).removeClass("fa");
10689 nelberth 1126
			 $('.color_fondo_cuadro').css('display','none')
4798 nelberth 1127
     		diez=false;
1128
     		actualizar2();
1129
     		rectangulo=false;
1130
     	}
1131
 
5149 nelberth 1132
     })
4798 nelberth 1133
     var r=0,g=0,b=0;
1134
    $(document).on("change", "#colorrect", function(){
1135
    	colorrect=$(this).val();
8315 nelberth 1136
    	r=parseInt(colorrect.slice(1,3),16);
1137
    	g=parseInt(colorrect.slice(3,5),16);
1138
    	b=parseInt(colorrect.slice(5,7),16);
4798 nelberth 1139
    	seis=true;
1140
    	actualizar2();
1141
    })
1142
    var a=1;
5149 nelberth 1143
 
4798 nelberth 1144
    $(document).on("keyup change", "#opacidad", function(){
1145
    	a=$(this).val();
1146
    	a=a/100;
1147
    	seis=true;
1148
    	actualizar2();
5149 nelberth 1149
    })
4798 nelberth 1150
	var imaNoti = new Image();
1151
	function filter(brillo=1, contraste=1, rojo=1, verde=1, azul=1, valor=1){
5073 nelberth 1152
		cuatro=false;
5414 nelberth 1153
		restaurar(brillo, contraste);
4798 nelberth 1154
		datos=imagenOriginal.data;
1155
		if(valor==2){
1156
			for (var i =  0; i <datos.length; i+=4) {
1157
				datos[i]=datos[i]+rojo;
1158
				datos[i+1]=datos[i+1]+verde;
1159
				datos[i+2]=datos[i+2]+azul;
1160
			}
1161
		}else{
1162
			for (var i =  0; i <datos.length; i+=4) {
1163
				datos[i]=datos[i]*rojo;
1164
				datos[i+1]=datos[i+1]*verde;
1165
				datos[i+2]=datos[i+2]*azul
1166
			}
1167
		}
1168
		editor.putImageData(imagenOriginal,0,0)
1169
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1170
	    imaNoti.src = imagenNoticia;
1171
		actualizar2();
1172
	}
1173
	function filtergris(brillo=1, contraste=1){
1174
		cuatro=false;
1175
		restaurar(brillo, contraste);
1176
		datos=imagenOriginal.data;
1177
		var auxiliar;
1178
		for (var i =  0; i <datos.length; i+=4) {
8315 nelberth 1179
			auxiliar = 0.34 * datos[i] + 0.5 *datos[i+1] + 0.16 * datos[i+2];
4798 nelberth 1180
			datos[i]=auxiliar;
1181
			datos[i+1]=auxiliar;
1182
			datos[i+2]=auxiliar;
1183
		}
5429 nelberth 1184
 
4798 nelberth 1185
		editor.putImageData(imagenOriginal,0,0)
1186
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1187
	    imaNoti.src = imagenNoticia;
1188
		actualizar2();
1189
	}
1190
	function restaurar(brillo = 1, contraste=1){
1191
		editor.filter = "none"
1192
		editor.filter = 'contrast('+contraste+') brightness('+brillo+') saturate(1) sepia(0)';
5429 nelberth 1193
		editor.fillStyle="rgba(255,255,255,1)"
1194
		editor.fillRect(0,0,ancho,alto);
5458 nelberth 1195
		editor.fillStyle=""+color+"";
5414 nelberth 1196
		var pxf=0,pyf=0;
1197
			if(xf>=(yf/recorte)){
5459 nelberth 1198
				pxf=xf/ancho;
1199
				pyf=yf/pxf;
1200
				py=(alto/2)-(pyf/2);
1201
				editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
1202
			}else{
1203
				pyf=yf/alto;
5461 nelberth 1204
				pxf=xf/pyf;
5459 nelberth 1205
				px=(ancho/2)-(pxf/2);
1206
				editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
1207
			}
4798 nelberth 1208
		imagenOriginal = editor.getImageData(0,0,ancho,alto)
1209
	}
1210
	var ocho=false;
1211
	function actualizar2(){
1212
		if(recorte_listo){
1213
		if(cuatro){
1214
			imagenOriginal = editor.getImageData(0,0,ancho,alto)
1215
			var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1216
	    	imaNoti.src = imagenNoticia;
1217
	    	cuatro=false;
1218
		}
1219
		editor.filter = "none"
5428 nelberth 1220
		$(imaNoti).ready(function(e){
5433 nelberth 1221
			noticia.drawImage(imaNoti,0,0,320,480);
5394 nelberth 1222
			editor.drawImage(imaNoti,0,0,ancho,alto)
4798 nelberth 1223
			if(texto_actualizar){
1224
				if(texto!=""){
1225
					if(seis){
1226
						ancho_imaNoti = imaNoti.width;
5439 nelberth 1227
 
1228
						scale_noticia = -(((ancho_imaNoti-320)/ancho_imaNoti)-1);
4798 nelberth 1229
						editor.fillStyle=""+color+"";
1230
						editor.strokeStyle="rgb(255,255,255)";
1231
						if(nueve){
1232
							editor.shadowColor="rgba(0,0,0,.5)";
1233
							editor.shadowOffsetX=6;
1234
							editor.shadowOffsetY=6;
1235
							editor.shadowBlur=6;
1236
							noticia.shadowColor="rgba(0,0,0,.5)";
1237
							noticia.shadowOffsetX=6*scale_noticia;
1238
							noticia.shadowOffsetY=6*scale_noticia;
1239
							noticia.shadowBlur=6*scale_noticia;
1240
						}else{
1241
							editor.shadowColor="rgba(0,0,0,0)";
1242
							noticia.shadowColor="rgba(0,0,0,0)";
1243
						}
1244
						editor.font=""+ita+" "+bold+" "+size+"px "+fontfamily+"";
1245
						editor.textAlign="start";
1246
						editor.textBaseline="top";
1247
 
1248
						var sizeNoticia = size*scale_noticia;
1249
						noticia.fillStyle=""+color+"";
1250
						noticia.font=""+ita+" "+bold+" "+sizeNoticia+"px "+fontfamily+"";
1251
						noticia.textAlign="start";
1252
						noticia.textBaseline="top";
1253
						seis=false;
1254
					}
1255
					if(siete){
1256
						dimencionesTexto = editor.measureText(texto);
1257
						txf=dimencionesTexto.width+20;
1258
						tyf= (20+size);
1259
						siete=false;
1260
					}
5443 nelberth 1261
					if(cinco){
4798 nelberth 1262
						dimencionesTexto = editor.measureText(texto);
5441 nelberth 1263
						if(xf>=(yf/recorte)){
1264
							tx=(xf/2)-(dimencionesTexto.width/2);
1265
							ty=(xf*recorte/2)-(size/2);
1266
						}else{
1267
							tx=(yf/recorte/2)-(dimencionesTexto.width/2);
1268
							ty=(yf/2)-(size/2);
1269
						}
1270
 
4798 nelberth 1271
						txf=dimencionesTexto.width+20;
1272
						tyf= size+20;
1273
						cinco=false;
5443 nelberth 1274
					}
4798 nelberth 1275
					if(diez){
1276
						editor.fillStyle="rgba("+r+","+g+","+b+","+a+")";
1277
						noticia.fillStyle="rgba("+r+","+g+","+b+","+a+")";
1278
						editor.fillRect(tx-10,ty-10,txf,tyf);
5387 nelberth 1279
						noticia.fillRect(((tx-10)*scale_noticia),((ty-10)*scale_noticia),txf*scale_noticia,tyf*scale_noticia);
4798 nelberth 1280
						editor.fillStyle=""+color+"";
1281
						noticia.fillStyle=""+color+"";
1282
 
1283
					}
1284
					editor.fillText(texto,tx,ty);
5440 nelberth 1285
					noticia.fillText(texto,(tx*scale_noticia),ty*scale_noticia);
4798 nelberth 1286
					if(ocho){
1287
						editor.strokeRect(tx-10,ty-10,txf,tyf)
1288
						editor.arc(tx+txf,ty+tyf,10,0,Math.PI*2,false);
1289
						editor.fill();
1290
						editor.beginPath();
1291
					}
1292
					texto_listo=true;
1293
				}
1294
			}
1295
		})
1296
 
1297
	}
1298
	}
1299
	function actualizar(){
1300
			$(imagen).ready(function(e){
1301
				if(uno){
1302
					ancho=imagen.width, alto = imagen.height;
5388 nelberth 1303
					elemento.width = ancho;
1304
					elemento.height = alto;
4798 nelberth 1305
					$(".scale").css("display","flex");
1306
					if(ancho<=alto){
1307
					 scale = -(((alto-450)/alto)-1);
8329 nelberth 1308
 
8339 nelberth 1309
 
8329 nelberth 1310
					}else{
1311
					 scale = -(((ancho-500)/ancho)-1);
8339 nelberth 1312
 
4798 nelberth 1313
					}
10598 nelberth 1314
					scale=scale*0.85;
8578 nelberth 1315
					if(edit){
8577 nelberth 1316
						if((ancho*recorte)<=alto){
1317
							xf=ancho*.70;
1318
							yf=xf*recorte;
1319
						}else{
1320
							yf=alto*.70;
1321
							xf=yf/recorte;
1322
						}
1323
					}
10597 nelberth 1324
 
8343 nelberth 1325
					cuadro_dimencion=Math.round(12/scale);
8328 nelberth 1326
 
8308 nelberth 1327
					if(xf<50||yf<50){
1328
						xf=50;
1329
						yf=xf*recorte;
1330
					}
8304 nelberth 1331
					console.log(xf+' '+yf)
8301 nelberth 1332
					mitadX=ancho/2;
1333
					mitadY=alto/2;
1334
					x=mitadX-xf/2;
1335
					y=mitadY-yf/2;
1336
 
4798 nelberth 1337
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
1338
					$("#ancho").html(ancho+"px");
1339
					$("#alto").html(alto+"px");
1340
					uno=false;
1341
				}
1342
				if(dos){
5402 nelberth 1343
 
1344
					if(xf>=(yf/recorte)){
5405 nelberth 1345
						alto=xf*recorte;
5404 nelberth 1346
						ancho=xf;
5402 nelberth 1347
					}else{
5435 nelberth 1348
						ancho=yf/recorte;
5404 nelberth 1349
						alto=yf;
1350
 
5402 nelberth 1351
					}
1352
					elemento.width = ancho;
1353
					elemento.height = alto;
5451 nelberth 1354
					if(xf<=yf){
5411 nelberth 1355
					 scale = -(((yf-450)/yf)-1);
5433 nelberth 1356
 
4798 nelberth 1357
					}else{
5411 nelberth 1358
					 scale = -(((xf-500)/xf)-1);
4798 nelberth 1359
					}
1360
 
1361
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
5411 nelberth 1362
					$("#ancho").html(Math.round(xf)+"px");
1363
					$("#alto").html(Math.round(yf)+"px");
4798 nelberth 1364
					dos=false;
1365
				}
5235 nelberth 1366
 
5408 nelberth 1367
					var pxf=0,pyf=0;
1368
					noticia.fillStyle="rgba(255,255,255,1)"
1369
					noticia.fillRect(0,0,320,480);
1370
				if(xf>=(yf/recorte)){
1371
					pxf=xf/320;
1372
					pyf=yf/pxf;
1373
					py=(480/2)-(pyf/2);
1374
					noticia.drawImage(imagen,x,y,xf,yf,0,py,320,pyf);
5409 nelberth 1375
				}else{
5408 nelberth 1376
					pyf=yf/480;
1377
					pxf=xf/pyf;
1378
					px=(320/2)-(pxf/2);
1379
					noticia.drawImage(imagen,x,y,xf,yf,px,0,pxf,480);
5409 nelberth 1380
				}
5407 nelberth 1381
 
4840 nelberth 1382
				$("#editorNoticia").css({"transform": "scale("+scale+")"});
4798 nelberth 1383
				if(!recorte_listo){
1384
					editor.drawImage(imagen,0,0,ancho,alto);
8320 nelberth 1385
					editor.fillStyle="rgba(0,0,0,.2)"
4798 nelberth 1386
					editor.fillRect(0,0,ancho,alto);
8320 nelberth 1387
					editor.fillStyle="rgba(255,255,255,.2)"
4798 nelberth 1388
					editor.fillRect(x,y,xf,yf);
8324 nelberth 1389
					editor.fillStyle="rgba(255,255,255,0.8)"
8315 nelberth 1390
					editor.fillRect(x,y,cuadro_dimencion,cuadro_dimencion);
1391
					editor.fillRect((x+xf)-cuadro_dimencion,y,cuadro_dimencion,cuadro_dimencion);
1392
					editor.fillRect(x,y+yf-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
1393
					editor.fillRect(x+xf-cuadro_dimencion,yf+y-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
4798 nelberth 1394
					esta=true;
1395
				}else{
5406 nelberth 1396
					var pxf=0,pyf=0;
5427 nelberth 1397
 
5428 nelberth 1398
					editor.fillStyle="rgba(255,255,255,1)"
1399
					editor.fillRect(0,0,ancho,alto);
5406 nelberth 1400
					if(xf>=(yf/recorte)){
1401
						pxf=xf/ancho;
1402
						pyf=yf/pxf;
1403
						py=(alto/2)-(pyf/2);
1404
						editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
1405
					}else{
1406
						pyf=yf/alto;
1407
						pxf=xf/pyf;
1408
						px=(ancho/2)-(pxf/2);
1409
						editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
4798 nelberth 1410
				}
5406 nelberth 1411
 
1412
				}
4798 nelberth 1413
			})
1414
		}
1415
	var imagenOriginal;
8356 nelberth 1416
	var x,y,xf=320,yf =480, elemento,editor,centro, total,scale,dimencionesTexto,ancho_imaNoti,
4798 nelberth 1417
	recorte_listo=false,alto,ancho,tx,ty,txf,tyf,cuatro=true,texto_actualizar=false,cinco=true,seis=true,cuatro;
5865 nelberth 1418
	var  mitadY,mitadX, uno=true,dos=false, recorte=480/320, imagen_noticias, scale_noticia, tres=true,rotar=false, cortar=false;;
8317 nelberth 1419
	var translateX, cuadro_dimencion;
4798 nelberth 1420
 
5822 nelberth 1421
	$(document).on("click", ".recortar10", function(e){
5540 nelberth 1422
 
4798 nelberth 1423
		e.preventDefault();
1424
		recorte_listo=false;
1425
		uno=true;
1426
		$(".fondo_oscuro").css("display","block");
1427
		$("#boton_recortar").addClass("recortar").text("Recortar").removeClass("info_noticia");
1428
		$("#boton_recortar3").addClass("recortar").text("Recortar").removeClass("info_noticia3");
5855 nelberth 1429
		$(".contenido_text").css("display", "none");
1430
		$(".contenido_filter").css("display", "none");
5822 nelberth 1431
		$(".recortar10").addClass("recortar");
4798 nelberth 1432
		$(".canvas").addClass("recortar")
1433
		$(".oa").removeClass("oa");
1434
		$("#normal").addClass("oa");
1435
		$(".b1").removeClass("paso");
5741 nelberth 1436
		$(".titulo_pasos").html("LABEL_STEP_2");
4798 nelberth 1437
		window.clearInterval(actualizar2);
1438
		actualizar();
1439
 
1440
	})
5789 nelberth 1441
 
1442
 
5490 nelberth 1443
	blockCelda=true;
5488 nelberth 1444
	$(document).on("click", "#blockCelda", function(e){
1445
		e.preventDefault();
5490 nelberth 1446
		if(blockCelda){
1447
			$(this).html('<span class="fa fa-unlock"></span>')
5495 nelberth 1448
 
5490 nelberth 1449
			blockCelda=false;
1450
		}else{
1451
			$(this).html('<span class="fa fa-lock"></span>')
1452
			blockCelda=true;
1453
		}
5495 nelberth 1454
		t4=true;
5488 nelberth 1455
 
1456
	})
4798 nelberth 1457
	var imagen
1458
	function editorNoticia(img){
5865 nelberth 1459
		 cortar=true;
4798 nelberth 1460
		imagen= new Image();
1461
		$(".canvas").html(canvas);
1462
		elemento = document.getElementById("editorNoticia");
1463
		editor = elemento.getContext("2d");
1464
		elemento2 = document.getElementById("imagen_noticias");
1465
		noticia = elemento2.getContext("2d");
1466
 
1467
		$(document).on("click", ".boton_marino.recortar",function(e){
1468
			e.preventDefault();
1469
			recorte_listo=true;
1470
			$(".fondo_oscuro").css("display","none");
5741 nelberth 1471
			$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
5822 nelberth 1472
			$(".recortar10").removeClass("recortar");
4798 nelberth 1473
			$(".canvas").removeClass("recortar");
1474
			$(".b1").addClass("paso");
5741 nelberth 1475
			$(".titulo_pasos").html("LABEL_STEP_3");
4798 nelberth 1476
			if(texto!=""){
1477
				seis=true;
1478
				siete=true;
1479
			}
1480
			cinco=true;
1481
			dos=true;
1482
			cuatro=true;
1483
			actualizar();
1484
		})
1485
 
1486
		var cli = false, t1= false, t2=false,t3=false,t4=false,tcli=false;
1487
		var mouse =[];
1488
 
1489
 
1490
		function raton(elemento, e){
1491
			return {
1492
				x:((e.pageX - elemento.offsetLeft - ((ancho/2)-((ancho*scale)/2)))/scale),
1493
				y:((e.pageY - elemento.offsetTop - ((alto/2)-((alto*scale)/2)))/scale)
1494
			}
1495
		}
1496
 
1497
		imagen.src=img;
5822 nelberth 1498
		$(".recortar10").addClass("recortar");
5741 nelberth 1499
		$("#boton_recortar").removeClass("boton_normal").addClass("recortar boton_marino").text("LABEL_CUT")
4798 nelberth 1500
		actualizar();
1501
 
1502
		$(elemento).mousemove(function(e){
1503
			mouse = raton(this, e);
10535 nelberth 1504
 
4798 nelberth 1505
			if(!recorte_listo){
8335 nelberth 1506
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
1507
					if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
1508
			 			$(elemento).css("cursor","nw-resize");
1509
			 		}else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1510
			 			$(elemento).css("cursor","ne-resize");
1511
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1512
			 			$(elemento).css("cursor","se-resize");
1513
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
1514
			 			$(elemento).css("cursor","sw-resize");
1515
			 		}else{
1516
						$(elemento).css("cursor","move");
1517
					}
4798 nelberth 1518
			 	}else{
1519
			 		$(elemento).css("cursor","default");
1520
			 	}
1521
			}else if(texto_listo){
1522
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
1523
			 		$(elemento).css("cursor","move");
1524
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
1525
			 		$(elemento).css("cursor","pointer");
1526
			 	}else{
1527
			 		$(elemento).css("cursor","default");
1528
			 	}
1529
			}
1530
			else{
1531
				$(elemento).css("cursor","default");
1532
			}
1533
		})
1534
		$(elemento).mousedown(function(e){
1535
			mouse = raton(this, e);
1536
			if(!recorte_listo){
8334 nelberth 1537
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
8333 nelberth 1538
 
1539
					if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
1540
						t4 = true;
1541
					}else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1542
						t3 = true;
1543
					}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1544
						t1 = true;
1545
					}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
1546
						t2 = true;
1547
					}else{
1548
						cli = true;
1549
					}
4798 nelberth 1550
			 	}
8333 nelberth 1551
 
4798 nelberth 1552
			}else if(texto_listo){
1553
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
1554
			 		tcli=true;
1555
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
1556
			 		rotar=true;
1557
			 	}
1558
			}
1559
 
1560
		 })
1561
 
10515 nelberth 1562
		 $('.editorNoticia').mousemove(function(e){
4798 nelberth 1563
		 	mouse = raton(this, e);
10594 nelberth 1564
			//console.log("raton x: "+mouse.x+ " raton Y: " +mouse.y+ " xf: "+xf+" yf: "+yf)
10597 nelberth 1565
			//console.log('t1: '+t1+' t2: '+t2+' t3: '+t3+' t4: '+t4)
4798 nelberth 1566
		 	if(!recorte_listo){
1567
			 	if(cli){
1568
			 		if((mouse.y-(yf/2))>=0&&(mouse.y+(yf/2))<=alto){
1569
				 		y = (mouse.y-(yf/2));
1570
			 		}else{
1571
			 			if((mouse.y-(yf/2))<0){
1572
			 				y=0;
1573
			 			}
1574
			 			if((mouse.y+(yf/2))>alto){
1575
			 				y=alto-yf;
1576
			 			}
1577
			 		}
1578
			 		if((mouse.x-(xf/2))>=0&&(mouse.x+(xf/2))<=ancho){
1579
			 			x = (mouse.x-(xf/2));
1580
			 		}else{
1581
			 			if((mouse.x-(xf/2))<0){
1582
			 				x=0;
1583
			 			}
1584
			 			if((mouse.x+(xf/2))>ancho){
1585
			 				x=(ancho)-xf;
1586
			 			}
1587
			 		}
1588
			 	}
5492 nelberth 1589
				if(blockCelda){
1590
			 	if(t4){
10494 nelberth 1591
					cal1=mouse.y-y;
1592
			 		cal2=cal1/recorte;
10571 nelberth 1593
					cal3=x+cal2;
10564 nelberth 1594
					if(cal2>50){
10571 nelberth 1595
						if(cal3<=ancho&&mouse.y<=alto){
10568 nelberth 1596
							yf=cal1;
1597
				 			xf=cal2;
10572 nelberth 1598
						}else if(cal3<=ancho&&mouse.y>alto){
1599
							yf=alto-y;
1600
							xf=yf/recorte
10571 nelberth 1601
						}else if(cal3>=ancho&&mouse.y<=alto){
10570 nelberth 1602
							xf=ancho-x;
10571 nelberth 1603
							yf=xf*recorte;
10568 nelberth 1604
						}
10489 nelberth 1605
				 	}
4798 nelberth 1606
			 	}
1607
			 	if(t3){
10495 nelberth 1608
					cal1=yf+(y-mouse.y);
1609
			 		cal2=cal1/recorte;
10572 nelberth 1610
					cal3=x+cal2;
10579 nelberth 1611
					if(cal2>50){
10572 nelberth 1612
						if(cal3<=ancho&&mouse.y>=0){
1613
							yf=cal1;
1614
				 			xf=cal2;
1615
							y=mouse.y;
1616
						}else if(cal3<=ancho&&mouse.y<0){
1617
							yf=yf+y;
1618
							xf=yf/recorte
1619
							y=0;
10578 nelberth 1620
						}else if(cal3>=ancho){
10575 nelberth 1621
							xf=ancho-x;
10578 nelberth 1622
							y=y+(yf-xf*recorte);
10580 nelberth 1623
							yf=xf*recorte;
10572 nelberth 1624
						}
1625
 
10496 nelberth 1626
				 	}
1627
 
4798 nelberth 1628
			 	}
1629
			 	if(t2){
10580 nelberth 1630
 
10498 nelberth 1631
					cal1=mouse.y-y;
1632
			 		cal2=cal1/recorte;
10580 nelberth 1633
					cal3=x+(yf-cal1)/recorte;cal2;
1634
					if(cal2>50){
1635
						if(cal3>=0&&mouse.y<=alto){
1636
							x=cal3;
1637
							yf=cal1;
1638
				 			xf=cal2;
10593 nelberth 1639
						}else if(mouse.y>alto||cal3<0&&mouse.y>alto){
10580 nelberth 1640
							yf=alto-y;
10583 nelberth 1641
							x=x+(xf-yf/recorte);
10580 nelberth 1642
							xf=yf/recorte
10593 nelberth 1643
						}else if(cal3<0){
10584 nelberth 1644
							xf=xf+x;
1645
							yf=xf*recorte;
1646
							x=0;
10580 nelberth 1647
						}
10586 nelberth 1648
				 	}
10499 nelberth 1649
 
5215 nelberth 1650
			 	}
1651
			 	if(t1){
10506 nelberth 1652
					cal0=y-mouse.y;
1653
					cal1=yf+cal0;
10500 nelberth 1654
			 		cal2=cal1/recorte;
10506 nelberth 1655
					cal3=x-cal0/recorte;
10586 nelberth 1656
					if(cal2>50){
1657
						if(cal3>=0&&mouse.y>=0){
1658
							yf=cal1;
1659
					 		xf=cal2;
1660
					 		x=cal3;
1661
					 		y=mouse.y;
10593 nelberth 1662
						}else if(mouse.y<0||cal3<0&&mouse.y<0){
10590 nelberth 1663
							yf=yf+y;
1664
							x=x+(xf-yf/recorte);
10586 nelberth 1665
							xf=yf/recorte
10590 nelberth 1666
							y=0;
10593 nelberth 1667
						}else if(cal3<0){
10589 nelberth 1668
							xf=xf+x;
10588 nelberth 1669
							y=y+(yf-xf*recorte);
10586 nelberth 1670
							yf=xf*recorte;
1671
							x=0;
1672
						}
1673
				 	}
1674
 
10504 nelberth 1675
				}
5492 nelberth 1676
				}else{
10586 nelberth 1677
				if(t4){
10537 nelberth 1678
 
10541 nelberth 1679
					cal1=mouse.y-y;
1680
					cal2=mouse.x-x;
1681
					if(cal1>50){
1682
						yf=mouse.y<=alto?cal1:alto-y;
1683
				 	}
1684
					if(cal2>50){
1685
						xf=mouse.x<=ancho?cal2:ancho-x;
1686
					}
5215 nelberth 1687
			 	}
10543 nelberth 1688
 
5215 nelberth 1689
			 	if(t3){
10542 nelberth 1690
					cal1=yf-(mouse.y-y);
1691
					cal2=mouse.x-x;
1692
					if(cal1>50){
10553 nelberth 1693
 
10551 nelberth 1694
						if(mouse.y>=0){
1695
							yf=cal1;
1696
							y=mouse.y;
1697
						}else{
10552 nelberth 1698
							yf=yf+y;
10551 nelberth 1699
							y=0;
1700
						}
10542 nelberth 1701
				 	}
1702
					if(cal2>50){
10547 nelberth 1703
						xf=mouse.x<=ancho?cal2:ancho-x;
10542 nelberth 1704
					}
10543 nelberth 1705
			 	}
5332 nelberth 1706
				/* Izquierda abajo */
5215 nelberth 1707
			 	if(t2){
10555 nelberth 1708
					cal1=mouse.y-y;
1709
					cal2=xf-(mouse.x-x);
1710
					if(cal1>50){
1711
						yf=yf=mouse.y<=alto?cal1:alto-y;
1712
					}
1713
					if(cal2>50){
10556 nelberth 1714
						if(mouse.x>=0){
10555 nelberth 1715
							xf=cal2;
10559 nelberth 1716
							x=mouse.x;
10555 nelberth 1717
						}else{
1718
							xf=xf+x;
1719
							x=0;
1720
						}
1721
					}
4798 nelberth 1722
			 	}
5332 nelberth 1723
				/* izquierda arriba */
4798 nelberth 1724
			 	if(t1){
10560 nelberth 1725
 
1726
					cal1=yf-(mouse.y-y);
1727
					cal2=xf-(mouse.x-x);
1728
					if(cal1>50){
1729
 
1730
						if(mouse.y>=0){
1731
							yf=cal1;
1732
							y=mouse.y;
1733
						}else{
1734
							yf=yf+y;
1735
							y=0;
1736
						}
1737
				 	}
1738
					if(cal2>50){
1739
						if(mouse.x>=0){
1740
							xf=cal2;
1741
							x=mouse.x;
1742
						}else{
1743
							xf=xf+x;
1744
							x=0;
1745
						}
1746
					}
10562 nelberth 1747
 
4798 nelberth 1748
			 	}
5492 nelberth 1749
			}
4798 nelberth 1750
 
1751
		 	actualizar();
1752
		 	}else if(texto_listo){
1753
		 		if(tcli){
1754
		 			tx=mouse.x-(txf/2)
1755
		 			ty=mouse.y-(tyf/2)
1756
		 		}else if(rotar){
1757
 
1758
		 		}
1759
 
1760
		 		actualizar2();
1761
		 	}
1762
		 })
10446 nelberth 1763
		 $('body').mouseup(function(e){
10599 nelberth 1764
			console.log('levanto el mouse')
4798 nelberth 1765
		 	if(!recorte_listo){
1766
			 	cli=false;
1767
			 	t1=false;
1768
			 	t2=false;
1769
			 	t3=false;
1770
			 	t4=false;
1771
		 	}else if (texto_listo) {
1772
		 		tcli=false;
1773
		 	}
1774
		 })
1775
 
5129 nelberth 1776
 
4798 nelberth 1777
	}
5500 nelberth 1778
	/* Titulo */
5501 nelberth 1779
 
6073 nelberth 1780
var titulo_noticia, censor_titulo = true, numero_titulo=0;
5500 nelberth 1781
	$(document).on("keyup change", "#name", function(e){
5501 nelberth 1782
	console.log(numero_titulo)
5500 nelberth 1783
	titulo_noticia = $(this).val();
1784
	titulo_elemento= $(".titulo_topico");
1785
	if(titulo_noticia!=""){
5505 nelberth 1786
		if(censor_titulo){
5500 nelberth 1787
			titulo_elemento.html(titulo_noticia);
1788
			if(titulo_elemento.height()>38){
5508 nelberth 1789
				var titulo_noticia2 = "";
5500 nelberth 1790
				for(var i =0; i <titulo_noticia.length;i++){
1791
					titulo_noticia2 = titulo_noticia2 + titulo_noticia.split("")[i];
1792
					titulo_elemento.html(titulo_noticia2);
1793
					if(titulo_elemento.height()>38){
1794
						titulo_noticia2 = titulo_noticia2.slice(0,-5) + "...";
1795
						titulo_elemento.html(titulo_noticia2);
1796
						numero_titulo = titulo_noticia2.length;
1797
						censor_titulo=false;
1798
						break;
1799
					}
4798 nelberth 1800
 
5500 nelberth 1801
				}
1802
			}else{
1803
				numero_titulo=0;
1804
			}
1805
		}else{
1806
			if(numero_titulo+1>=titulo_noticia.length){
1807
				titulo_elemento.html(titulo_noticia);
1808
				censor_titulo=true;
1809
			}
5505 nelberth 1810
		}
5500 nelberth 1811
	}else{
5741 nelberth 1812
		titulo_elemento.html("LABEL_TITLE_TOPIC");
5500 nelberth 1813
		censor_titulo = true;
1814
	}
1815
})
1 www 1816
    });
1817
JS;
1818
$this->inlineScript()->captureEnd();
1819
?>
1820
 
1821
 
1822
 
1823
<!-- Content Header (Page header) -->
1824
<section class="content-header">
1825
	<div class="container-fluid">
1826
    	<div class="row mb-2">
1827
        	<div class="col-sm-12">
1828
            	<h1>LABEL_TOPICS</h1>
1829
			</div>
1830
		</div>
1831
	</div><!-- /.container-fluid -->
1832
</section>
1833
 
4693 nelberth 1834
<section class="content" id='content1'>
1 www 1835
	<div class="container-fluid">
1836
    	<div class="row">
1837
        	<div class="col-12">
1838
				<div class="card">
1839
					<div class="card-body">
20 steven 1840
        	    		<table id="gridTable" class="table   table-hover">
1 www 1841
                      		<thead>
1842
        						<tr>
1843
                                	<th>LABEL_NAME</th>
1844
                                  	<th>LABEL_STATUS</th>
1845
                                  	<th>LABEL_DETAILS</th>
1846
                                  	<th>LABEL_ACTIONS</th>
1847
                                </tr>
1848
                       		</thead>
1849
                         	<tbody>
1850
                         	</tbody>
1851
                    	</table>
1852
                   	</div>
1853
                   	<div class="card-footer clearfix">
1854
                   		<div style="float:right;">
1855
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH  </button>
1856
							<?php if($allowAdd) : ?>
1857
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
1858
							<?php endif; ?>
1859
						</div>
1860
                 	</div>
1861
          		</div>
1862
           	</div>
1863
        </div>
1864
 	</div>
1865
</section>
5467 nelberth 1866
<section id="addImage" style='display:none' class="">
5463 nelberth 1867
<div class="d-flex justify-content-center tituloEditor">
5701 nelberth 1868
        <h4>LABEL_ADD_TOPIC</h4>
5463 nelberth 1869
 
1870
    </div>
5687 nelberth 1871
	<div class="grid-padre" >
5487 nelberth 1872
				<?php
5462 nelberth 1873
       			 $form = $this->formAdd;
1874
            		$form->setAttributes([
1875
                        'method'  => 'post',
1876
            		    'action'  => $routeAdd,
1877
                        'name'    => 'form-topic-add',
1878
                        'id'      => 'form-topic-add',
1879
                    ]);
1880
 
1881
                    $form->prepare();
1882
                    echo $this->form()->openTag($form);
1883
                    ?>
5684 nelberth 1884
    			<div class="form-group grid-1-2">
5462 nelberth 1885
    				<?php
1886
                        $element = $form->get('name');
1887
 
1888
                        $element->setAttributes(['class' => 'form-control']);
1889
                        $element->setOptions(['label' => 'LABEL_NAME']);
1890
                        echo $this->formLabel($element);
1891
                        echo $this->formText($element);
1892
                    ?>
1893
				</div>
5487 nelberth 1894
 
5684 nelberth 1895
                <div class="form-group grid-1-2">
5462 nelberth 1896
                	<?php
1897
                    $element = $form->get('description');
1898
                    $element->setAttributes(['id' => 'description_add', 'class' => 'form-control', 'rows' => '2','class' => 'form-control']);
1899
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1900
                    echo $this->formLabel($element);
1901
                    echo $this->formTextArea($element);
1902
                    ?>
1903
   				</div>
5684 nelberth 1904
				<div class="form-group grid-1-2">
5462 nelberth 1905
    				<?php
1906
                        $element = $form->get('order');
1907
                        $element->setAttributes(['class' => 'form-control']);
1908
                        $element->setOptions(['label' => 'LABEL_ORDER']);
1909
                        echo $this->formLabel($element);
1910
                        echo $this->formText($element);
1911
                    ?>
1912
				</div>
5678 nelberth 1913
 
5462 nelberth 1914
               		<?php
5531 nelberth 1915
                    $element = $form->get('file');
5991 nelberth 1916
					$element->setAttributes([ 'class' => 'file']);
5653 nelberth 1917
                    echo $this->formHidden($element); ?>
5678 nelberth 1918
 
5684 nelberth 1919
          		<div class="form-group grid-1-2">
5462 nelberth 1920
    				<?php
1921
                        $element = $form->get('status');
1922
                        $element->setAttributes(['class' => 'form-control']);
1923
                        $element->setOptions(['label' => 'LABEL_STATUS']);
1924
                        echo $this->formLabel($element);
1925
                        echo $this->formSelect($element);
1926
                    ?>
1927
				</div>
1928
 
5747 nelberth 1929
				<div class="contenido form-group" id="contenido">
10622 nelberth 1930
				<div class="articulo_noticia animated fadeIn">
1931
    <div class="pasos">
1932
        <div class="titulo_pasos animated fadeInDown delay-04 fast">LABEL_STEP_1</div>
1933
        <div class="paso_opcion">
1934
            <div class="responsing_cut">
1935
                <div class="icon_cut"><span class="fa fa-scissors"></span></div>
1936
                <div class="contenido_cut">
1937
                    <div class="animated fadeInRight delay-04 fast">
1938
                        <div>
1939
                            <div class="titulo_cut">
1940
                                <div>LABEL_CUT</div>
1941
                                <div class="fa fa-times" id="cerrar_cut_modal"></div>
1942
                            </div>
1943
                            <div class="opcion_editor recortar10">
1944
                                <div>LABEL_CUT</div>
1945
                                <div id="blockCelda"><span class="fa fa-lock"></span></div>
1946
                            </div>
1947
                        </div>
1948
                    </div>
1949
                </div>
1950
            </div>
1951
            <div class="responsing_text">
1952
                <div class="icon_text"><span class="fa fa-text-width"></span></div>
1953
                <div class="contenido_text">
1954
                    <div class="animated fadeInRight delay-04 fast">
1955
                        <div class="texto">
1956
                            <div class="titulo_text">
1957
                                <div>LABEL_ADD_TEXT</div>
1958
                                <div class="fa fa-times" id="cerrar_text_modal"></div>
1959
                            </div>
1960
                            <input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE" />
1961
                            <div class="fonts">
1962
                                <div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div>
1963
                                <div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div>
1964
                                <input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff" />
1965
                                <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48" />
1966
                            </div>
1967
                            <div class="fonts">
1968
                                <div class="font fa" data-tooltip="Sombra de la letra" id="shadow">A</div>
1969
                                <div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">C</div></div>
1970
                                <input type="color" name="" id="colorrect" value="#000000" class="" data-tooltip="Color del fondo" />
1971
                                <input type="number" name="" id="opacidad" max="100" min="1" step="1" value="100" class="" data-tooltip="Transparensia del fondo" />
1972
                            </div>
1973
                            <div class="fonts_style">
1974
                                <div class="fs at" id="arial">LABEL_FONT_ARIAL</div>
1975
                                <div class="fs" id="calibri">LABEL_FONT_CALIBRI</div>
1976
                                <div class="fs" id="forte">LABEL_FONT_FORTE</div>
1977
                                <div class="fs" id="impact">LABEL_FONT_IMPACT</div>
1978
                                <div class="fs" id="jokerman">LABEL_FONT_JOKERMAN</div>
1979
                                <div class="fs" id="mb">LABEL_FONT_MV_BOLI</div>
1980
                                <div class="fs" id="tnr">LABEL_FONT_TIMES_NEW_ROMAN</div>
1981
                                <div class="fs" id="verdana">LABEL_FONT_VERDANA</div>
1982
                                <div class="fs" id="vivaldi">LABEL_FONT_VIVALDI</div>
1983
                            </div>
1984
                        </div>
1985
                    </div>
1986
                </div>
1987
            </div>
1988
            <div class="responsing_filtros">
1989
                <div class="icon_filter"><span class="fa fa-eyedropper"></span></div>
1990
                <div class="contenido_filter">
1991
                    <div class="titulo_filtro">
1992
                        <div>LABEL_FILTERS</div>
1993
                        <div class="fa fa-times" id="cerrar_filter_modal"></div>
1994
                    </div>
1995
                    <div class="opciones_imagen">
1996
                        <div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div>
10750 nelberth 1997
                        <div class="opcion_editor" id="">LABEL_FILTER_NIGHT</div>
10622 nelberth 1998
                        <div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div>
1999
                        <div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div>
2000
                        <div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div>
2001
                        <div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div>
2002
                        <div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div>
2003
                        <div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div>
2004
                        <div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div>
2005
                        <div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div>
2006
                        <div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div>
2007
                        <div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div>
2008
                        <div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div>
2009
                        <div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div>
2010
                        <div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div>
2011
                        <div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div>
2012
                        <div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div>
2013
                        <div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div>
2014
                        <div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div>
2015
                        <div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div>
2016
                        <div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div>
2017
                        <div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div>
2018
                        <div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div>
2019
                        <div class="opcion_editor" id="70">LABEL_FILTER_70S</div>
2020
                        <div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div>
2021
                        <div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div>
2022
                        <div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div>
2023
                        <div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div>
2024
                        <div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div>
2025
                        <div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div>
2026
                        <div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div>
2027
                        <div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div>
2028
                        <div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div>
2029
                        <div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div>
2030
                        <div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div>
2031
                        <div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div>
2032
                        <div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div>
2033
                        <div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div>
2034
                    </div>
2035
                </div>
2036
            </div>
2037
            <div class="volver"><span class="icon-undo"></span>LABEL_START_OVER</div>
2038
            <div class="paso_1 paso animated bounceInDown delay-04 fast">1</div>
2039
            <div class="paso_2 a1 animated bounceInDown delay-06 fast">2</div>
2040
            <div class="paso_2 b1 animated bounceInDown delay-08 fast">3</div>
2041
        </div>
2042
    </div>
2043
    <div class="editor_imagenes">
2044
        <div class="fondo_oscuro"></div>
10649 nelberth 2045
        <div class="editor_imagenes2 ">
10659 nelberth 2046
            <div class="filtros animated fadeInLeft delay-04 fast" >
10622 nelberth 2047
                <div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div>
2048
                <div class="opciones_imagen">
2049
                    <div class="opcion_editor oa" id="normal">LABEL_FILTER_NORMAL</div>
2050
                    <div class="opcion_editor" id="noche">LABEL_FILTER_NIGHT</div>
2051
                    <div class="opcion_editor" id="sa">LABEL_FILTER_SAINT_ANA</div>
2052
                    <div class="opcion_editor" id="crema">LABEL_FILTER_CREAM</div>
2053
                    <div class="opcion_editor" id="magia">LABEL_FILTER_MAGIC</div>
2054
                    <div class="opcion_editor" id="relieve">LABEL_FILTER_RELIEF</div>
2055
                    <div class="opcion_editor" id="luz">LABEL_FILTER_LIGHT</div>
2056
                    <div class="opcion_editor" id="saturacion">LABEL_FILTER_SATURATION</div>
2057
                    <div class="opcion_editor" id="retoque">LABEL_FILTER_RETOUCH</div>
2058
                    <div class="opcion_editor" id="orange">LABEL_FILTER_ORANGE</div>
2059
                    <div class="opcion_editor" id="setenta">LABEL_FILTER_WIND</div>
2060
                    <div class="opcion_editor" id="desierto">LABEL_FILTER_DESERT</div>
2061
                    <div class="opcion_editor" id="bosque">LABEL_FILTER_FOREST</div>
2062
                    <div class="opcion_editor" id="villa">LABEL_FILTER_TOWN</div>
2063
                    <div class="opcion_editor" id="rosa">LABEL_FILTER_PINK</div>
2064
                    <div class="opcion_editor" id="historia">LABEL_FILTER_HISTORY</div>
2065
                    <div class="opcion_editor" id="gris">LABEL_FILTER_GRAY</div>
2066
                    <div class="opcion_editor" id="lhs">LABEL_FILTER_OLD_PICTURE</div>
2067
                    <div class="opcion_editor" id="encantador">LABEL_FILTER_CHARMING</div>
2068
                    <div class="opcion_editor" id="emocion">LABEL_FILTER_EMOTION</div>
2069
                    <div class="opcion_editor" id="beige">LABEL_FILTER_BEIGE</div>
2070
                    <div class="opcion_editor" id="fine">LABEL_FILTER_FINE</div>
2071
                    <div class="opcion_editor" id="lord">LABEL_FILTER_LORD</div>
2072
                    <div class="opcion_editor" id="70">LABEL_FILTER_70S</div>
2073
                    <div class="opcion_editor" id="arbol">LABEL_FILTER_TREE</div>
2074
                    <div class="opcion_editor" id="verano">LABEL_FILTER_SUMMER</div>
2075
                    <div class="opcion_editor" id="cf">LABEL_FILTER_COLD_WEATHER</div>
2076
                    <div class="opcion_editor" id="angeles">LABEL_FILTER_ANGELS</div>
2077
                    <div class="opcion_editor" id="caliente">LABEL_FILTER_HOT</div>
2078
                    <div class="opcion_editor" id="otono">LABEL_FILTER_FALL</div>
2079
                    <div class="opcion_editor" id="marzo">LABEL_FILTER_MARCH</div>
2080
                    <div class="opcion_editor" id="pera">LABEL_FILTER_PEAR</div>
2081
                    <div class="opcion_editor" id="comun">LABEL_FILTER_COMMON</div>
2082
                    <div class="opcion_editor" id="oro">LABEL_FILTER_GOLD</div>
2083
                    <div class="opcion_editor" id="gotico">LABEL_FILTER_GOTHIC</div>
2084
                    <div class="opcion_editor" id="forestal">LABEL_FILTER_FORESTRY</div>
2085
                    <div class="opcion_editor" id="luna">LABEL_FILTER_MOON</div>
2086
                    <div class="opcion_editor" id="fiesta">LABEL_FILTER_PARTY</div>
2087
                </div>
2088
            </div>
2089
            <div class="canvas_imagen">
2090
                <div class="canvas recortar"><div class="canvas_subir" id="imagen_noticia">LABEL_DRAG_IMAGE_HERE</div></div>
2091
            </div>
2092
            <div class="modificar animated fadeInRight delay-04 fast">
2093
                <div>
2094
                    <div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors"></span>LABEL_CUT</div>
2095
                    <div class="opcion_editor recortar10">
2096
                        <div>LABEL_CUT</div>
2097
                        <div id="blockCelda"><span class="fa fa-lock"></span></div>
2098
                    </div>
2099
                </div>
2100
                <div class="texto">
10660 nelberth 2101
 
2102
 
2103
                    <div class="mb-20">
2104
                        <div class="titulo_texto "><span class="icon-plus fa fa-text-width"></span>Texto</div>
2105
 
2106
                    </div>
2107
					<div class="fonts  mb-20">
10631 nelberth 2108
                        <select name="fuentes" id="selectFuente" class="select-custom mr-2">
10630 nelberth 2109
                            <option value="arial" selected>LABEL_FONT_ARIAL</option>
10622 nelberth 2110
                            <option  value="calibri">LABEL_FONT_CALIBRI</option>
2111
                            <option value="forte">LABEL_FONT_FORTE</option>
2112
                            <option value="impact">LABEL_FONT_IMPACT</option>
2113
                            <option  value="jokerman">LABEL_FONT_JOKERMAN</option>
2114
                            <option  value="mv boli">LABEL_FONT_MV_BOLI</option>
2115
                            <option  value="times new roman">LABEL_FONT_TIMES_NEW_ROMAN</option>
2116
                            <option value="verdana">LABEL_FONT_VERDANA</option>
2117
                            <option value="vivaldi">LABEL_FONT_VIVALDI</option>
2118
                        </select>
2119
                        <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48" />
2120
                    </div>
10674 nelberth 2121
					<div class="fonts mb-20">
10626 nelberth 2122
							<div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div>
2123
							<div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div>
10706 nelberth 2124
							<div class="color_letra font">
10739 nelberth 2125
								<label>A</label>
10736 nelberth 2126
								<input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff" />
10706 nelberth 2127
 
10692 nelberth 2128
							</div>
10661 nelberth 2129
							<div class="font fa" data-tooltip="Sombra de la letra" id="shadow">S</div>
10739 nelberth 2130
							<div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">F</div></div>
10670 nelberth 2131
                    </div>
10687 nelberth 2132
 
10691 nelberth 2133
					<div class='color_fondo_cuadro mb-20' style="display:none">
10741 nelberth 2134
                       		<input type="color" name="" id="colorrect" value="#000000" class="w-25" data-tooltip="Color del fondo" class="mr-2" />
10675 nelberth 2135
							<input type="range" id="opacidad" max="100" min="1" step="1" value="100" class="w-75" >
10670 nelberth 2136
					</div>
10663 nelberth 2137
 
10662 nelberth 2138
 
10622 nelberth 2139
                    <input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE" />
10740 nelberth 2140
					<div class="mb-20">
2141
						<div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div>
2142
                    </div>
10742 nelberth 2143
					<div class="fonts  mb-20">
10746 nelberth 2144
                        <select name="filtros" id="selectFiltro" class="select-custom">
10745 nelberth 2145
							<option class="opcion_editor" value="normal">LABEL_FILTER_NORMAL</option>
10750 nelberth 2146
							<option class="opcion_editor" value=".5,1.3,1.31,1.33,1.38">LABEL_FILTER_NIGHT</option>
10754 nelberth 2147
							<option class="opcion_editor" value=".7,1.1,1.64,1.66,1.50">LABEL_FILTER_SAINT_ANA</option>
10764 nelberth 2148
							<option class="opcion_editor" value=".75,1,1.66,1.60,1.51">LABEL_FILTER_CREAM</option>
2149
							<option class="opcion_editor" value=".7,1.2,1.49,1.49,1.6">LABEL_FILTER_MAGIC</option>
2150
							<option class="opcion_editor" value=".7,1.2,1.60,1.66,1.58">LABEL_FILTER_RELIEF</option>
2151
							<option class="opcion_editor" value=".9,.9,1.45,1.54,1.54">LABEL_FILTER_LIGHT</option>
2152
							<option class="opcion_editor" value="1,1.5,1,1,1">LABEL_FILTER_SATURATION</option>
2153
							<option class="opcion_editor" value=".9,1.3,1,1,1">LABEL_FILTER_RETOUCH</option>
2154
							<option class="opcion_editor" value=".8,1,1.6,1.45,1.49">LABEL_FILTER_ORANGE</option>
2155
							<option class="opcion_editor" value=".8,.75,1.60,1.66,1.58">LABEL_FILTER_WIND</option>
2156
							<option class="opcion_editor" value=".8,.9,1.66,1.43,1.28">LABEL_FILTER_DESERT</option>
2157
							<option class="opcion_editor" value=".85,.75,1.47,1.66,1.54">LABEL_FILTER_FOREST</option>
2158
							<option class="opcion_editor" value=".8,.8,1.71,1.64,1.58">LABEL_FILTER_TOWN</option>
2159
							<option class="opcion_editor" value=".8,1.2,1.24,.99,1">LABEL_FILTER_PINK</option>
2160
							<option class="opcion_editor" value=".9,1.1,1.33,1.19,.91">LABEL_FILTER_HISTORY</option>
10770 nelberth 2161
							<option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_GRAY</option>
2162
							<option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_OLD_PICTURE</option>
10764 nelberth 2163
							<option class="opcion_editor" value=".9,1.2,26,-12,0,2">LABEL_FILTER_CHARMING</option>
2164
							<option class="opcion_editor" value="1.1,1.4,40,12,-6,2">LABEL_FILTER_EMOTION</option>
2165
							<option class="opcion_editor" value=".9,1.32,56,47,17,2">LABEL_FILTER_BEIGE</option>
2166
							<option class="opcion_editor" value=".87,1.19,55,37,23,2">LABEL_FILTER_FINE</option>
2167
							<option class="opcion_editor" value="1.2,.9,67,13,-23,2">LABEL_FILTER_LORD</option>
2168
							<option class="opcion_editor" value="1.2,1.2,35,7,18,2">LABEL_FILTER_70S</option>
2169
							<option class="opcion_editor" value=".92,1.23,-11,11,11,2">LABEL_FILTER_TREE</option>
2170
							<option class="opcion_editor" value=" 1,1.4,-3,-1,-12,2">LABEL_FILTER_SUMMER</option>
2171
							<option class="opcion_editor" value=".85,1.26,-15,2,-1,2">LABEL_FILTER_COLD_WEATHER</option>
2172
							<option class="opcion_editor" value="1,1.4,5,12,1,2">LABEL_FILTER_ANGELS</option>
2173
							<option class="opcion_editor" value=".9,1.2,43,-17,-55,2">LABEL_FILTER_HOT</option>
2174
							<option class="opcion_editor" value="1,1.29,29,26,17,2">LABEL_FILTER_FALL</option>
2175
							<option class="opcion_editor" value=".85,1.3,43,25,-11,2">LABEL_FILTER_MARCH</option>
2176
							<option class="opcion_editor" value=".8,1.25,31,41,12,2">LABEL_FILTER_PEAR</option>
2177
							<option class="opcion_editor" value="1,1.36,4,5,1,2">LABEL_FILTER_COMMON</option>
2178
							<option class="opcion_editor" value=".9,1.3,37,-25,1,2">LABEL_FILTER_GOLD</option>
2179
							<option class="opcion_editor" value="1.1,1.3,-47,-42,-30,2">LABEL_FILTER_GOTHIC</option>
2180
							<option class="opcion_editor" value="1,1.4,-5,42,11,2">LABEL_FILTER_FORESTRY</option>
2181
							<option class="opcion_editor" value=".9,1.2,-5,-7,4,2">LABEL_FILTER_MOON</option>
2182
							<option class="opcion_editor" value="1.1,1.3,-1,-1,26,2">LABEL_FILTER_PARTY</option>
10742 nelberth 2183
                        </select>
2184
                    </div>
10655 nelberth 2185
 
10622 nelberth 2186
 
2187
                </div>
2188
            </div>
2189
        </div>
2190
        <div class="botones_dimenciones">
2191
            <div class="scale">
2192
                <div class="dimenciones">
2193
                    <div id="ancho">1240px</div>
2194
                    <div>x</div>
2195
                    <div id="alto">720px</div>
2196
                </div>
2197
                <div class="porciento">
2198
                    <div id="menos_scale"><span class="icon-minus fa fa-minus"></span></div>
2199
                    <div class="ps">
2200
                        <ul class="cantidades_scale">
2201
                            <li data-scale="2" class="as">200%</li>
2202
                            <li data-scale="1" class="as">100%</li>
2203
                            <li data-scale="0.75" class="as">75%</li>
2204
                            <li data-scale="0.5" class="as">50%</li>
2205
                            <li data-scale="0.25" class="as">25%</li>
2206
                        </ul>
2207
                        <div id="porciento_scale">50%</div>
2208
                    </div>
2209
                    <div id="mas_scale"><span class="icon-plus fa fa-plus"></span></div>
2210
                </div>
2211
            </div>
2212
            <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>
2213
        </div>
2214
    </div>
2215
</div>
2216
<dav class="fixed_noticia"></dav>
2217
<dav class="cuadro_noticias animated bounceInUp delay-04" id="cuadro_noticias">
2218
    <dav class="relative">
2219
        <div class="titulo_topico">LABEL_TITLE_TOPIC</div>
2220
        <canvas class="imagen_noticias" id="imagen_noticias" width="320" height="480"></canvas>
2221
    </dav>
2222
    <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>
2223
</dav>
5812 nelberth 2224
 
5747 nelberth 2225
 
10622 nelberth 2226
 
5747 nelberth 2227
				</div>
5916 nelberth 2228
 
5549 nelberth 2229
 
5462 nelberth 2230
     	      		<?php echo $this->form()->closeTag($form); ?>
2231
      		</div>
2232
 
5463 nelberth 2233
 
4691 nelberth 2234
</section>
1 www 2235
 
5895 nelberth 2236
<section id="topicEdit" style='display:none' class="">
2237
<div class="d-flex justify-content-center tituloEditor">
5912 nelberth 2238
        <h4>LABEL_EDIT_TOPIC</h4>
1 www 2239
 
5895 nelberth 2240
    </div>
2241
	<div class="grid-padre" >
5899 nelberth 2242
					<?php
2243
       			  $form = $this->formEdit;
1 www 2244
            		$form->setAttributes([
5899 nelberth 2245
                        'method'    => 'post',
2246
                        'name'      => 'form-topic-edit',
2247
                        'id'        => 'form-topic-edit'
1 www 2248
                    ]);
2249
 
2250
                    $form->prepare();
2251
                    echo $this->form()->openTag($form);
2252
                    ?>
5895 nelberth 2253
    			<div class="form-group grid-1-2">
1 www 2254
    				<?php
2255
                        $element = $form->get('name');
2256
 
2257
                        $element->setAttributes(['class' => 'form-control']);
2258
                        $element->setOptions(['label' => 'LABEL_NAME']);
2259
                        echo $this->formLabel($element);
2260
                        echo $this->formText($element);
2261
                    ?>
2262
				</div>
5904 nelberth 2263
				<div class="form-group grid-1-2">
1 www 2264
                	<?php
2265
                    $element = $form->get('description');
5904 nelberth 2266
                    $element->setAttributes(['id' => 'description_edit', 'rows' => '2', 'class' => 'form-control',   'class' => 'form-control']);
1 www 2267
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
2268
                    echo $this->formLabel($element);
2269
                    echo $this->formTextArea($element);
2270
                    ?>
2271
   				</div>
5895 nelberth 2272
				<div class="form-group grid-1-2">
1 www 2273
    				<?php
2274
                        $element = $form->get('order');
2275
                        $element->setAttributes(['class' => 'form-control']);
2276
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2277
                        echo $this->formLabel($element);
2278
                        echo $this->formText($element);
2279
                    ?>
2280
				</div>
5895 nelberth 2281
 
1 www 2282
               		<?php
2283
                    $element = $form->get('file');
5990 nelberth 2284
					$element->setAttributes([ 'class' => 'file']);
2285
                    echo $this->formHidden($element);
2286
					?>
5895 nelberth 2287
 
2288
          		<div class="form-group grid-1-2">
1 www 2289
    				<?php
2290
                        $element = $form->get('status');
2291
                        $element->setAttributes(['class' => 'form-control']);
2292
                        $element->setOptions(['label' => 'LABEL_STATUS']);
2293
                        echo $this->formLabel($element);
2294
                        echo $this->formSelect($element);
2295
                    ?>
2296
				</div>
2297
 
5908 nelberth 2298
				<div class="contenido form-group" id="contenido2">
5895 nelberth 2299
				</div>
5981 nelberth 2300
 
1 www 2301
     	      		<?php echo $this->form()->closeTag($form); ?>
2302
      		</div>
2303
 
5895 nelberth 2304
 
2305
</section>
1 www 2306
 
2307
 
2308
 
2309
<!-- The Modal -->
2310
<div class="modal" id="modalImageApp">
2311
	<div class="modal-dialog ">
2312
    	<div class="modal-content">
2313
 
2314
            <!-- Modal Header -->
2315
      		<div class="modal-header">
2316
        		<h4 class="modal-title">LABEL_IMAGE</h4>
2317
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
2318
      		</div>
2319
 
2320
            <!-- Modal body -->
2321
            <div class="modal-body text-center">
2322
				<img src="" class="img img-responsive" style="width: 300px; height: auto" id="image-app" />
2323
      		</div>
2324
 
2325
            <!-- Modal footer -->
2326
      		<div class="modal-footer">
2327
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
2328
          	</div>
2329
         </div>
2330
	</div>
2331
</div>
2332
 
2333
 
2334
 
2335
 
2336
 
2337
 
2338
 
2339
 
2340
 
2341