Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 10804 | Rev 10806 | 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;
10804 nelberth 579
		blockCelda=false;
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;
10803 nelberth 613
		blockCelda=false;
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
	})
10792 nelberth 710
	$(window).resize(function() {
711
		anchoFondoOscuro = $(".articulo_noticia").width();
712
		altoFondoOscuro = $(".editor_imagenes").height();
713
		$(".fondo_oscuro").css("width",""+anchoFondoOscuro+"px");
714
		$(".fondo_oscuro").css("height",""+altoFondoOscuro+"px");
715
	});
5129 nelberth 716
 
4798 nelberth 717
	$(document).on("dragover", "#imagen_noticia", function(e){
718
		e.preventDefault();
719
		e.stopPropagation();
720
		$(this).css({"background":"rgba(0,0,0,.2)"})
721
	})
722
	$(document).on("drop", "#imagen_noticia", function(e){
723
		e.preventDefault();
724
		e.stopPropagation();
725
		$(this).css("background", "none");
726
		var archivo = e.originalEvent.dataTransfer.files;
727
		var img=archivo[0];
5926 nelberth 728
		if(img.type =="image/jpeg"||img.type =="image/png"){
4798 nelberth 729
			$(".modificar").removeClass("animated");
730
			var render = new FileReader();
731
			render.readAsDataURL(img);
732
			render.onload = function(e){
8345 nelberth 733
				imagen2=new Image();
734
				imagen2.src=e.target.result;
8349 nelberth 735
 
736
				$(imagen2).ready(function(e){
8517 nelberth 737
					if(imagen2.width<200||imagen2.height<200){
8360 nelberth 738
						$.fn.showError('LABEL_MINIMUM_IMAGE_SIZE');
8349 nelberth 739
					}else{
740
						$(".volver").css("display","block")
741
						$(".a1").addClass("paso");
742
						$(".titulo_pasos").html("LABEL_STEP_2");
8351 nelberth 743
						editorNoticia(imagen2.src)
8349 nelberth 744
					}
8350 nelberth 745
				})
8349 nelberth 746
			}
8344 nelberth 747
		}else{
8360 nelberth 748
			$.fn.showError('LABEL_SUPPORTED_FORMATS');
5926 nelberth 749
		}
8346 nelberth 750
	})
8347 nelberth 751
 
4798 nelberth 752
	$(document).on("dragover", "body", function(e){
753
		e.preventDefault();
754
		e.stopPropagation();
755
	})
756
	$(document).on("drop", "body", function(e){
757
		e.preventDefault();
758
		e.stopPropagation();
759
	})
760
 
5741 nelberth 761
	var canvas='<div class="editorNoticia"><canvas id="editorNoticia">LABEL_NOT_SUPPORTED</canvas></div>';
4798 nelberth 762
	$(document).on("mouseover", ".editorNoticia", function(){
763
		$("body").css({"overflow": "hidden"});
5707 nelberth 764
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "17px")
5146 nelberth 765
		$(".barra,.footer").css("padding-right","17px")
4798 nelberth 766
 
767
 
768
	})
769
	$(document).on("mouseover", "#editorNoticia", function(){
770
		if(recorte_listo){
771
			ocho=true;
772
		}
773
	})
774
	$(document).on("mouseout", "#editorNoticia", function(){
775
		if(recorte_listo){
776
			ocho=false;
777
			actualizar2()
778
		}
779
	})
780
	$(document).on("mouseout", ".editorNoticia",function(){
781
		$("body").css({"overflow": "auto"})
5707 nelberth 782
		$(".cuadro_noticias, .fixed_noticia,.tituloEditor,.grid-padre").css("margin-right", "0px")
4798 nelberth 783
		$(".barra,.footer").css("padding-right","0px")
784
 
785
	})
786
	$(document).on('mousewheel', ".editorNoticia",function(e){
787
		var ruedita = e.originalEvent.wheelDelta
788
		if(ruedita>0){
789
			scale = scale+(scale/10);
790
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
791
		}else{
792
			scale = scale-(scale/10);
793
			$("#porciento_scale").html((scale*100).toFixed(2)+"%")
794
		}
795
		$("#editorNoticia").css({"transform": "scale("+scale+")"});
796
	})
797
	$(document).on("click", ".as", function(e){
798
		e.preventDefault();
799
		 scale = $(this).data("scale");
800
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
801
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
802
 
803
	})
804
	$(document).on("click", ".ps", function(e){
805
		e.preventDefault();
806
		$(".cantidades_scale").slideToggle(200).css("display", "block");
807
	})
5789 nelberth 808
	$(document).on("click", "#cerrar_filter_modal, .icon_filter", function(e){
809
		e.preventDefault();
5854 nelberth 810
		if(recorte_listo){
5789 nelberth 811
		$(".contenido_filter").slideToggle(200).css("display", "block");
5854 nelberth 812
		}
5789 nelberth 813
	})
5805 nelberth 814
	$(document).on("click", "#cerrar_text_modal, .icon_text", function(e){
815
		e.preventDefault();
5854 nelberth 816
		if(recorte_listo){
5855 nelberth 817
			$(".contenido_text").slideToggle(200).css("display", "block");
5854 nelberth 818
		}
5805 nelberth 819
	})
5865 nelberth 820
 
5816 nelberth 821
	$(document).on("click", "#cerrar_cut_modal, .icon_cut", function(e){
822
		e.preventDefault();
5861 nelberth 823
		if(cortar){
5854 nelberth 824
			$(".contenido_cut").slideToggle(200).css("display", "block");
5861 nelberth 825
		}
5854 nelberth 826
 
5816 nelberth 827
	})
4798 nelberth 828
	$(document).on("click", "#menos_scale", function(e){
829
		e.preventDefault();
830
		scale = scale-(scale/10);
831
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
832
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
833
	})
834
 
835
	$(document).on("click", "#mas_scale", function(e){
836
		e.preventDefault();
837
		scale = scale+(scale/10);
838
		 $("#porciento_scale").html((scale*100).toFixed(2)+"%")
839
		 $("#editorNoticia").css({"transform": "scale("+scale+")"});
840
	})
10747 nelberth 841
	$(document).on('change', '#selectFiltro', function(e){
10770 nelberth 842
 
10747 nelberth 843
		data=$(this).val()
10786 nelberth 844
		if(data=="normal"){
845
			filter();
10788 nelberth 846
		}else{
847
			data=data.split(',');
10805 nelberth 848
			if(data[2]=='gris'){
10788 nelberth 849
				filtergris(data[0],data[1]);
10805 nelberth 850
			}else{
10788 nelberth 851
				filter(Number(data[0]),Number(data[1]),Number(data[2]),Number(data[3]),Number(data[4]),Number(data[5]));
852
			}
10770 nelberth 853
		}
854
 
10783 nelberth 855
 
10788 nelberth 856
 
10747 nelberth 857
	})
10764 nelberth 858
 
10789 nelberth 859
 
4798 nelberth 860
	var texto_listo=false,siete=false;
861
	var texto;
862
	$(document).on("keyup", "#texto_input", function(e){
863
		e.preventDefault();
864
		texto = $(this).val();
865
		if(texto_actualizar){
866
			siete=true;
867
		}
868
		if(texto!=""){
869
			texto_actualizar=true;
870
			actualizar2();
871
		}else{
872
			actualizar2();
873
		}
874
 
875
	})
876
	var color="#ffffff";
10734 nelberth 877
 
4798 nelberth 878
	$(document).on("change", "#color", function(){
879
    	color=$(this).val();
880
    	seis=true;
881
    	actualizar2();
882
    })
883
    var size=48;
884
    $(document).on("keyup change", "#font-size", function(){
885
    	size=$(this).val();
886
    	size = parseInt(size);
887
    	seis=true;
888
    	siete=true;
889
    	actualizar2();
890
    })
891
    var negritas=false, bold="";
892
    $(document).on("click", "#negritas", function(e){
893
    	e.preventDefault();
894
    	if(!negritas){
895
    		bold="bold";
896
    		$(this).addClass("fa");
897
    		seis=true;
898
    		siete=true;
899
    		actualizar2();
900
    		negritas=true;
901
    	}else{
902
    		bold="";
903
    		$(this).removeClass("fa");
904
    		seis=true;
905
    		siete=true;
906
    		actualizar2();
907
    		negritas=false;
908
    	}
909
    })
910
    var italic=false, ita="";
911
     $(document).on("click", "#italic", function(e){
912
    	e.preventDefault();
913
    	if(!italic){
914
    		ita="italic";
915
    		$(this).addClass("fa");
916
    		seis=true;
917
    		siete=true;
918
    		actualizar2();
919
    		italic=true;
920
    	}else{
921
    		ita="";
922
    		$(this).removeClass("fa");
923
    		seis=true;
924
    		siete=true;
925
    		actualizar2();
926
    		italic=false;
927
    	}
928
    })
929
     var fontfamily="Arial";
10616 nelberth 930
     $(document).on("change", "#selectFuente", function(e){
4798 nelberth 931
    	e.preventDefault();
10618 nelberth 932
    	fontfamily= $(this).val();
4798 nelberth 933
    	seis=true;
934
    	siete=true;
935
    	actualizar2();
936
 
5149 nelberth 937
    })
4798 nelberth 938
     var shadow = true, nueve=true;
5149 nelberth 939
     $(document).on("click","#shadow", function(e){
4798 nelberth 940
     	e.preventDefault();
941
     	if(shadow){
942
     		$(this).removeClass("fa");
943
     		seis=true;
944
     		nueve=false;
945
     		actualizar2();
946
     		shadow=false;
947
     	}else{
948
     		$(this).addClass("fa");
949
     		seis=true;
950
     		nueve=true;
951
     		actualizar2();
952
     		shadow=true;
953
     	}
954
 
5149 nelberth 955
     })
4798 nelberth 956
     var rectangulo=false, diez=false, colorrect="#000000";
5149 nelberth 957
     $(document).on("click", "#rectangulo", function(e){
4798 nelberth 958
     	e.preventDefault();
959
     	if(!rectangulo){
960
     		$(this).addClass("fa");
10691 nelberth 961
			$('.color_fondo_cuadro').css('display','flex')
4798 nelberth 962
     		diez=true;
963
     		actualizar2();
964
     		rectangulo=true;
965
     	}else{
966
     		$(this).removeClass("fa");
10689 nelberth 967
			 $('.color_fondo_cuadro').css('display','none')
4798 nelberth 968
     		diez=false;
969
     		actualizar2();
970
     		rectangulo=false;
971
     	}
972
 
5149 nelberth 973
     })
4798 nelberth 974
     var r=0,g=0,b=0;
975
    $(document).on("change", "#colorrect", function(){
976
    	colorrect=$(this).val();
8315 nelberth 977
    	r=parseInt(colorrect.slice(1,3),16);
978
    	g=parseInt(colorrect.slice(3,5),16);
979
    	b=parseInt(colorrect.slice(5,7),16);
4798 nelberth 980
    	seis=true;
981
    	actualizar2();
982
    })
983
    var a=1;
5149 nelberth 984
 
4798 nelberth 985
    $(document).on("keyup change", "#opacidad", function(){
986
    	a=$(this).val();
987
    	a=a/100;
988
    	seis=true;
989
    	actualizar2();
5149 nelberth 990
    })
4798 nelberth 991
	var imaNoti = new Image();
992
	function filter(brillo=1, contraste=1, rojo=1, verde=1, azul=1, valor=1){
5073 nelberth 993
		cuatro=false;
5414 nelberth 994
		restaurar(brillo, contraste);
4798 nelberth 995
		datos=imagenOriginal.data;
10783 nelberth 996
		if(valor==2){
4798 nelberth 997
			for (var i =  0; i <datos.length; i+=4) {
998
				datos[i]=datos[i]+rojo;
999
				datos[i+1]=datos[i+1]+verde;
1000
				datos[i+2]=datos[i+2]+azul;
1001
			}
1002
		}else{
1003
			for (var i =  0; i <datos.length; i+=4) {
1004
				datos[i]=datos[i]*rojo;
1005
				datos[i+1]=datos[i+1]*verde;
1006
				datos[i+2]=datos[i+2]*azul
1007
			}
1008
		}
1009
		editor.putImageData(imagenOriginal,0,0)
1010
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1011
	    imaNoti.src = imagenNoticia;
1012
		actualizar2();
1013
	}
1014
	function filtergris(brillo=1, contraste=1){
1015
		cuatro=false;
1016
		restaurar(brillo, contraste);
1017
		datos=imagenOriginal.data;
1018
		var auxiliar;
1019
		for (var i =  0; i <datos.length; i+=4) {
8315 nelberth 1020
			auxiliar = 0.34 * datos[i] + 0.5 *datos[i+1] + 0.16 * datos[i+2];
4798 nelberth 1021
			datos[i]=auxiliar;
1022
			datos[i+1]=auxiliar;
1023
			datos[i+2]=auxiliar;
1024
		}
5429 nelberth 1025
 
4798 nelberth 1026
		editor.putImageData(imagenOriginal,0,0)
1027
		var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1028
	    imaNoti.src = imagenNoticia;
1029
		actualizar2();
1030
	}
1031
	function restaurar(brillo = 1, contraste=1){
1032
		editor.filter = "none"
1033
		editor.filter = 'contrast('+contraste+') brightness('+brillo+') saturate(1) sepia(0)';
5429 nelberth 1034
		editor.fillStyle="rgba(255,255,255,1)"
1035
		editor.fillRect(0,0,ancho,alto);
5458 nelberth 1036
		editor.fillStyle=""+color+"";
5414 nelberth 1037
		var pxf=0,pyf=0;
1038
			if(xf>=(yf/recorte)){
5459 nelberth 1039
				pxf=xf/ancho;
1040
				pyf=yf/pxf;
1041
				py=(alto/2)-(pyf/2);
1042
				editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
1043
			}else{
1044
				pyf=yf/alto;
5461 nelberth 1045
				pxf=xf/pyf;
5459 nelberth 1046
				px=(ancho/2)-(pxf/2);
1047
				editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
1048
			}
4798 nelberth 1049
		imagenOriginal = editor.getImageData(0,0,ancho,alto)
1050
	}
1051
	var ocho=false;
1052
	function actualizar2(){
1053
		if(recorte_listo){
1054
		if(cuatro){
1055
			imagenOriginal = editor.getImageData(0,0,ancho,alto)
1056
			var imagenNoticia = elemento.toDataURL("image/jpeg", 1.0);
1057
	    	imaNoti.src = imagenNoticia;
1058
	    	cuatro=false;
1059
		}
1060
		editor.filter = "none"
5428 nelberth 1061
		$(imaNoti).ready(function(e){
5433 nelberth 1062
			noticia.drawImage(imaNoti,0,0,320,480);
5394 nelberth 1063
			editor.drawImage(imaNoti,0,0,ancho,alto)
4798 nelberth 1064
			if(texto_actualizar){
1065
				if(texto!=""){
1066
					if(seis){
1067
						ancho_imaNoti = imaNoti.width;
5439 nelberth 1068
 
1069
						scale_noticia = -(((ancho_imaNoti-320)/ancho_imaNoti)-1);
4798 nelberth 1070
						editor.fillStyle=""+color+"";
1071
						editor.strokeStyle="rgb(255,255,255)";
1072
						if(nueve){
1073
							editor.shadowColor="rgba(0,0,0,.5)";
1074
							editor.shadowOffsetX=6;
1075
							editor.shadowOffsetY=6;
1076
							editor.shadowBlur=6;
1077
							noticia.shadowColor="rgba(0,0,0,.5)";
1078
							noticia.shadowOffsetX=6*scale_noticia;
1079
							noticia.shadowOffsetY=6*scale_noticia;
1080
							noticia.shadowBlur=6*scale_noticia;
1081
						}else{
1082
							editor.shadowColor="rgba(0,0,0,0)";
1083
							noticia.shadowColor="rgba(0,0,0,0)";
1084
						}
1085
						editor.font=""+ita+" "+bold+" "+size+"px "+fontfamily+"";
1086
						editor.textAlign="start";
1087
						editor.textBaseline="top";
1088
 
1089
						var sizeNoticia = size*scale_noticia;
1090
						noticia.fillStyle=""+color+"";
1091
						noticia.font=""+ita+" "+bold+" "+sizeNoticia+"px "+fontfamily+"";
1092
						noticia.textAlign="start";
1093
						noticia.textBaseline="top";
1094
						seis=false;
1095
					}
1096
					if(siete){
1097
						dimencionesTexto = editor.measureText(texto);
1098
						txf=dimencionesTexto.width+20;
1099
						tyf= (20+size);
1100
						siete=false;
1101
					}
5443 nelberth 1102
					if(cinco){
4798 nelberth 1103
						dimencionesTexto = editor.measureText(texto);
5441 nelberth 1104
						if(xf>=(yf/recorte)){
1105
							tx=(xf/2)-(dimencionesTexto.width/2);
1106
							ty=(xf*recorte/2)-(size/2);
1107
						}else{
1108
							tx=(yf/recorte/2)-(dimencionesTexto.width/2);
1109
							ty=(yf/2)-(size/2);
1110
						}
1111
 
4798 nelberth 1112
						txf=dimencionesTexto.width+20;
1113
						tyf= size+20;
1114
						cinco=false;
5443 nelberth 1115
					}
4798 nelberth 1116
					if(diez){
1117
						editor.fillStyle="rgba("+r+","+g+","+b+","+a+")";
1118
						noticia.fillStyle="rgba("+r+","+g+","+b+","+a+")";
1119
						editor.fillRect(tx-10,ty-10,txf,tyf);
5387 nelberth 1120
						noticia.fillRect(((tx-10)*scale_noticia),((ty-10)*scale_noticia),txf*scale_noticia,tyf*scale_noticia);
4798 nelberth 1121
						editor.fillStyle=""+color+"";
1122
						noticia.fillStyle=""+color+"";
1123
 
1124
					}
1125
					editor.fillText(texto,tx,ty);
5440 nelberth 1126
					noticia.fillText(texto,(tx*scale_noticia),ty*scale_noticia);
4798 nelberth 1127
					if(ocho){
1128
						editor.strokeRect(tx-10,ty-10,txf,tyf)
1129
						editor.arc(tx+txf,ty+tyf,10,0,Math.PI*2,false);
1130
						editor.fill();
1131
						editor.beginPath();
1132
					}
1133
					texto_listo=true;
1134
				}
1135
			}
1136
		})
1137
 
1138
	}
1139
	}
1140
	function actualizar(){
1141
			$(imagen).ready(function(e){
1142
				if(uno){
1143
					ancho=imagen.width, alto = imagen.height;
5388 nelberth 1144
					elemento.width = ancho;
1145
					elemento.height = alto;
4798 nelberth 1146
					$(".scale").css("display","flex");
1147
					if(ancho<=alto){
1148
					 scale = -(((alto-450)/alto)-1);
8329 nelberth 1149
 
8339 nelberth 1150
 
8329 nelberth 1151
					}else{
1152
					 scale = -(((ancho-500)/ancho)-1);
8339 nelberth 1153
 
4798 nelberth 1154
					}
10598 nelberth 1155
					scale=scale*0.85;
8578 nelberth 1156
					if(edit){
8577 nelberth 1157
						if((ancho*recorte)<=alto){
1158
							xf=ancho*.70;
1159
							yf=xf*recorte;
1160
						}else{
1161
							yf=alto*.70;
1162
							xf=yf/recorte;
1163
						}
1164
					}
10597 nelberth 1165
 
8343 nelberth 1166
					cuadro_dimencion=Math.round(12/scale);
8328 nelberth 1167
 
8308 nelberth 1168
					if(xf<50||yf<50){
1169
						xf=50;
1170
						yf=xf*recorte;
1171
					}
8304 nelberth 1172
					console.log(xf+' '+yf)
8301 nelberth 1173
					mitadX=ancho/2;
1174
					mitadY=alto/2;
1175
					x=mitadX-xf/2;
1176
					y=mitadY-yf/2;
1177
 
4798 nelberth 1178
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
1179
					$("#ancho").html(ancho+"px");
1180
					$("#alto").html(alto+"px");
1181
					uno=false;
1182
				}
1183
				if(dos){
5402 nelberth 1184
 
1185
					if(xf>=(yf/recorte)){
5405 nelberth 1186
						alto=xf*recorte;
5404 nelberth 1187
						ancho=xf;
5402 nelberth 1188
					}else{
5435 nelberth 1189
						ancho=yf/recorte;
5404 nelberth 1190
						alto=yf;
1191
 
5402 nelberth 1192
					}
1193
					elemento.width = ancho;
1194
					elemento.height = alto;
5451 nelberth 1195
					if(xf<=yf){
5411 nelberth 1196
					 scale = -(((yf-450)/yf)-1);
5433 nelberth 1197
 
4798 nelberth 1198
					}else{
5411 nelberth 1199
					 scale = -(((xf-500)/xf)-1);
4798 nelberth 1200
					}
1201
 
1202
					$("#porciento_scale").html((scale*100).toFixed(2)+"%")
5411 nelberth 1203
					$("#ancho").html(Math.round(xf)+"px");
1204
					$("#alto").html(Math.round(yf)+"px");
4798 nelberth 1205
					dos=false;
1206
				}
5235 nelberth 1207
 
5408 nelberth 1208
					var pxf=0,pyf=0;
1209
					noticia.fillStyle="rgba(255,255,255,1)"
1210
					noticia.fillRect(0,0,320,480);
1211
				if(xf>=(yf/recorte)){
1212
					pxf=xf/320;
1213
					pyf=yf/pxf;
1214
					py=(480/2)-(pyf/2);
1215
					noticia.drawImage(imagen,x,y,xf,yf,0,py,320,pyf);
5409 nelberth 1216
				}else{
5408 nelberth 1217
					pyf=yf/480;
1218
					pxf=xf/pyf;
1219
					px=(320/2)-(pxf/2);
1220
					noticia.drawImage(imagen,x,y,xf,yf,px,0,pxf,480);
5409 nelberth 1221
				}
5407 nelberth 1222
 
4840 nelberth 1223
				$("#editorNoticia").css({"transform": "scale("+scale+")"});
4798 nelberth 1224
				if(!recorte_listo){
1225
					editor.drawImage(imagen,0,0,ancho,alto);
8320 nelberth 1226
					editor.fillStyle="rgba(0,0,0,.2)"
4798 nelberth 1227
					editor.fillRect(0,0,ancho,alto);
8320 nelberth 1228
					editor.fillStyle="rgba(255,255,255,.2)"
4798 nelberth 1229
					editor.fillRect(x,y,xf,yf);
8324 nelberth 1230
					editor.fillStyle="rgba(255,255,255,0.8)"
8315 nelberth 1231
					editor.fillRect(x,y,cuadro_dimencion,cuadro_dimencion);
1232
					editor.fillRect((x+xf)-cuadro_dimencion,y,cuadro_dimencion,cuadro_dimencion);
1233
					editor.fillRect(x,y+yf-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
1234
					editor.fillRect(x+xf-cuadro_dimencion,yf+y-cuadro_dimencion,cuadro_dimencion,cuadro_dimencion);
4798 nelberth 1235
					esta=true;
1236
				}else{
5406 nelberth 1237
					var pxf=0,pyf=0;
5427 nelberth 1238
 
5428 nelberth 1239
					editor.fillStyle="rgba(255,255,255,1)"
1240
					editor.fillRect(0,0,ancho,alto);
5406 nelberth 1241
					if(xf>=(yf/recorte)){
1242
						pxf=xf/ancho;
1243
						pyf=yf/pxf;
1244
						py=(alto/2)-(pyf/2);
1245
						editor.drawImage(imagen,x,y,xf,yf,0,py,ancho,pyf);
1246
					}else{
1247
						pyf=yf/alto;
1248
						pxf=xf/pyf;
1249
						px=(ancho/2)-(pxf/2);
1250
						editor.drawImage(imagen,x,y,xf,yf,px,0,pxf,alto);
4798 nelberth 1251
				}
5406 nelberth 1252
 
1253
				}
4798 nelberth 1254
			})
1255
		}
1256
	var imagenOriginal;
8356 nelberth 1257
	var x,y,xf=320,yf =480, elemento,editor,centro, total,scale,dimencionesTexto,ancho_imaNoti,
4798 nelberth 1258
	recorte_listo=false,alto,ancho,tx,ty,txf,tyf,cuatro=true,texto_actualizar=false,cinco=true,seis=true,cuatro;
5865 nelberth 1259
	var  mitadY,mitadX, uno=true,dos=false, recorte=480/320, imagen_noticias, scale_noticia, tres=true,rotar=false, cortar=false;;
8317 nelberth 1260
	var translateX, cuadro_dimencion;
4798 nelberth 1261
 
5822 nelberth 1262
	$(document).on("click", ".recortar10", function(e){
5540 nelberth 1263
 
4798 nelberth 1264
		e.preventDefault();
1265
		recorte_listo=false;
1266
		uno=true;
1267
		$(".fondo_oscuro").css("display","block");
1268
		$("#boton_recortar").addClass("recortar").text("Recortar").removeClass("info_noticia");
1269
		$("#boton_recortar3").addClass("recortar").text("Recortar").removeClass("info_noticia3");
5855 nelberth 1270
		$(".contenido_text").css("display", "none");
1271
		$(".contenido_filter").css("display", "none");
5822 nelberth 1272
		$(".recortar10").addClass("recortar");
4798 nelberth 1273
		$(".canvas").addClass("recortar")
1274
		$(".oa").removeClass("oa");
1275
		$("#normal").addClass("oa");
1276
		$(".b1").removeClass("paso");
5741 nelberth 1277
		$(".titulo_pasos").html("LABEL_STEP_2");
4798 nelberth 1278
		window.clearInterval(actualizar2);
1279
		actualizar();
1280
 
1281
	})
5789 nelberth 1282
 
1283
 
10803 nelberth 1284
	blockCelda=false;
5488 nelberth 1285
	$(document).on("click", "#blockCelda", function(e){
1286
		e.preventDefault();
5490 nelberth 1287
		if(blockCelda){
1288
			$(this).html('<span class="fa fa-unlock"></span>')
5495 nelberth 1289
 
5490 nelberth 1290
			blockCelda=false;
1291
		}else{
1292
			$(this).html('<span class="fa fa-lock"></span>')
1293
			blockCelda=true;
1294
		}
5495 nelberth 1295
		t4=true;
5488 nelberth 1296
 
1297
	})
4798 nelberth 1298
	var imagen
1299
	function editorNoticia(img){
5865 nelberth 1300
		 cortar=true;
4798 nelberth 1301
		imagen= new Image();
1302
		$(".canvas").html(canvas);
1303
		elemento = document.getElementById("editorNoticia");
1304
		editor = elemento.getContext("2d");
1305
		elemento2 = document.getElementById("imagen_noticias");
1306
		noticia = elemento2.getContext("2d");
1307
 
1308
		$(document).on("click", ".boton_marino.recortar",function(e){
1309
			e.preventDefault();
1310
			recorte_listo=true;
1311
			$(".fondo_oscuro").css("display","none");
5741 nelberth 1312
			$("#boton_recortar").removeClass("recortar").text("LABEL_SEND").addClass("info_noticia").attr('type','submit');
5822 nelberth 1313
			$(".recortar10").removeClass("recortar");
4798 nelberth 1314
			$(".canvas").removeClass("recortar");
1315
			$(".b1").addClass("paso");
5741 nelberth 1316
			$(".titulo_pasos").html("LABEL_STEP_3");
4798 nelberth 1317
			if(texto!=""){
1318
				seis=true;
1319
				siete=true;
1320
			}
1321
			cinco=true;
1322
			dos=true;
1323
			cuatro=true;
1324
			actualizar();
1325
		})
1326
 
1327
		var cli = false, t1= false, t2=false,t3=false,t4=false,tcli=false;
1328
		var mouse =[];
1329
 
1330
 
1331
		function raton(elemento, e){
1332
			return {
1333
				x:((e.pageX - elemento.offsetLeft - ((ancho/2)-((ancho*scale)/2)))/scale),
1334
				y:((e.pageY - elemento.offsetTop - ((alto/2)-((alto*scale)/2)))/scale)
1335
			}
1336
		}
1337
 
1338
		imagen.src=img;
5822 nelberth 1339
		$(".recortar10").addClass("recortar");
5741 nelberth 1340
		$("#boton_recortar").removeClass("boton_normal").addClass("recortar boton_marino").text("LABEL_CUT")
4798 nelberth 1341
		actualizar();
1342
 
1343
		$(elemento).mousemove(function(e){
1344
			mouse = raton(this, e);
10535 nelberth 1345
 
4798 nelberth 1346
			if(!recorte_listo){
8335 nelberth 1347
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
1348
					if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
1349
			 			$(elemento).css("cursor","nw-resize");
1350
			 		}else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1351
			 			$(elemento).css("cursor","ne-resize");
1352
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1353
			 			$(elemento).css("cursor","se-resize");
1354
			 		}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
1355
			 			$(elemento).css("cursor","sw-resize");
1356
			 		}else{
1357
						$(elemento).css("cursor","move");
1358
					}
4798 nelberth 1359
			 	}else{
1360
			 		$(elemento).css("cursor","default");
1361
			 	}
1362
			}else if(texto_listo){
1363
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
1364
			 		$(elemento).css("cursor","move");
1365
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
1366
			 		$(elemento).css("cursor","pointer");
1367
			 	}else{
1368
			 		$(elemento).css("cursor","default");
1369
			 	}
1370
			}
1371
			else{
1372
				$(elemento).css("cursor","default");
1373
			}
1374
		})
1375
		$(elemento).mousedown(function(e){
1376
			mouse = raton(this, e);
1377
			if(!recorte_listo){
8334 nelberth 1378
				if(x<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+yf)>mouse.y){
8333 nelberth 1379
 
1380
					if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y && (y+yf)>mouse.y){
1381
						t4 = true;
1382
					}else if((xf+x-cuadro_dimencion)<mouse.x &&(xf+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1383
						t3 = true;
1384
					}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && y<mouse.y && (y+cuadro_dimencion)>mouse.y){
1385
						t1 = true;
1386
					}else if(x<mouse.x &&(cuadro_dimencion+x)>mouse.x && (y+yf-cuadro_dimencion)<mouse.y &&(y+yf)>mouse.y){
1387
						t2 = true;
1388
					}else{
1389
						cli = true;
1390
					}
4798 nelberth 1391
			 	}
8333 nelberth 1392
 
4798 nelberth 1393
			}else if(texto_listo){
1394
				if(tx-10<mouse.x && tx-10+txf>mouse.x && ty-10<mouse.y && ty-10+tyf>mouse.y){
1395
			 		tcli=true;
1396
			 	}else if((txf+tx-10)<mouse.x &&(txf+tx-10+20)>mouse.x && (ty-10+tyf)<mouse.y && (ty-10+tyf+20)>mouse.y){
1397
			 		rotar=true;
1398
			 	}
1399
			}
1400
 
1401
		 })
1402
 
10515 nelberth 1403
		 $('.editorNoticia').mousemove(function(e){
4798 nelberth 1404
		 	mouse = raton(this, e);
10594 nelberth 1405
			//console.log("raton x: "+mouse.x+ " raton Y: " +mouse.y+ " xf: "+xf+" yf: "+yf)
10597 nelberth 1406
			//console.log('t1: '+t1+' t2: '+t2+' t3: '+t3+' t4: '+t4)
4798 nelberth 1407
		 	if(!recorte_listo){
1408
			 	if(cli){
1409
			 		if((mouse.y-(yf/2))>=0&&(mouse.y+(yf/2))<=alto){
1410
				 		y = (mouse.y-(yf/2));
1411
			 		}else{
1412
			 			if((mouse.y-(yf/2))<0){
1413
			 				y=0;
1414
			 			}
1415
			 			if((mouse.y+(yf/2))>alto){
1416
			 				y=alto-yf;
1417
			 			}
1418
			 		}
1419
			 		if((mouse.x-(xf/2))>=0&&(mouse.x+(xf/2))<=ancho){
1420
			 			x = (mouse.x-(xf/2));
1421
			 		}else{
1422
			 			if((mouse.x-(xf/2))<0){
1423
			 				x=0;
1424
			 			}
1425
			 			if((mouse.x+(xf/2))>ancho){
1426
			 				x=(ancho)-xf;
1427
			 			}
1428
			 		}
1429
			 	}
5492 nelberth 1430
				if(blockCelda){
1431
			 	if(t4){
10494 nelberth 1432
					cal1=mouse.y-y;
1433
			 		cal2=cal1/recorte;
10571 nelberth 1434
					cal3=x+cal2;
10564 nelberth 1435
					if(cal2>50){
10571 nelberth 1436
						if(cal3<=ancho&&mouse.y<=alto){
10568 nelberth 1437
							yf=cal1;
1438
				 			xf=cal2;
10572 nelberth 1439
						}else if(cal3<=ancho&&mouse.y>alto){
1440
							yf=alto-y;
1441
							xf=yf/recorte
10571 nelberth 1442
						}else if(cal3>=ancho&&mouse.y<=alto){
10570 nelberth 1443
							xf=ancho-x;
10571 nelberth 1444
							yf=xf*recorte;
10568 nelberth 1445
						}
10489 nelberth 1446
				 	}
4798 nelberth 1447
			 	}
1448
			 	if(t3){
10495 nelberth 1449
					cal1=yf+(y-mouse.y);
1450
			 		cal2=cal1/recorte;
10572 nelberth 1451
					cal3=x+cal2;
10579 nelberth 1452
					if(cal2>50){
10572 nelberth 1453
						if(cal3<=ancho&&mouse.y>=0){
1454
							yf=cal1;
1455
				 			xf=cal2;
1456
							y=mouse.y;
1457
						}else if(cal3<=ancho&&mouse.y<0){
1458
							yf=yf+y;
1459
							xf=yf/recorte
1460
							y=0;
10578 nelberth 1461
						}else if(cal3>=ancho){
10575 nelberth 1462
							xf=ancho-x;
10578 nelberth 1463
							y=y+(yf-xf*recorte);
10580 nelberth 1464
							yf=xf*recorte;
10572 nelberth 1465
						}
1466
 
10496 nelberth 1467
				 	}
1468
 
4798 nelberth 1469
			 	}
1470
			 	if(t2){
10580 nelberth 1471
 
10498 nelberth 1472
					cal1=mouse.y-y;
1473
			 		cal2=cal1/recorte;
10580 nelberth 1474
					cal3=x+(yf-cal1)/recorte;cal2;
1475
					if(cal2>50){
1476
						if(cal3>=0&&mouse.y<=alto){
1477
							x=cal3;
1478
							yf=cal1;
1479
				 			xf=cal2;
10593 nelberth 1480
						}else if(mouse.y>alto||cal3<0&&mouse.y>alto){
10580 nelberth 1481
							yf=alto-y;
10583 nelberth 1482
							x=x+(xf-yf/recorte);
10580 nelberth 1483
							xf=yf/recorte
10593 nelberth 1484
						}else if(cal3<0){
10584 nelberth 1485
							xf=xf+x;
1486
							yf=xf*recorte;
1487
							x=0;
10580 nelberth 1488
						}
10586 nelberth 1489
				 	}
10499 nelberth 1490
 
5215 nelberth 1491
			 	}
1492
			 	if(t1){
10506 nelberth 1493
					cal0=y-mouse.y;
1494
					cal1=yf+cal0;
10500 nelberth 1495
			 		cal2=cal1/recorte;
10506 nelberth 1496
					cal3=x-cal0/recorte;
10586 nelberth 1497
					if(cal2>50){
1498
						if(cal3>=0&&mouse.y>=0){
1499
							yf=cal1;
1500
					 		xf=cal2;
1501
					 		x=cal3;
1502
					 		y=mouse.y;
10593 nelberth 1503
						}else if(mouse.y<0||cal3<0&&mouse.y<0){
10590 nelberth 1504
							yf=yf+y;
1505
							x=x+(xf-yf/recorte);
10586 nelberth 1506
							xf=yf/recorte
10590 nelberth 1507
							y=0;
10593 nelberth 1508
						}else if(cal3<0){
10589 nelberth 1509
							xf=xf+x;
10588 nelberth 1510
							y=y+(yf-xf*recorte);
10586 nelberth 1511
							yf=xf*recorte;
1512
							x=0;
1513
						}
1514
				 	}
1515
 
10504 nelberth 1516
				}
5492 nelberth 1517
				}else{
10586 nelberth 1518
				if(t4){
10537 nelberth 1519
 
10541 nelberth 1520
					cal1=mouse.y-y;
1521
					cal2=mouse.x-x;
1522
					if(cal1>50){
1523
						yf=mouse.y<=alto?cal1:alto-y;
1524
				 	}
1525
					if(cal2>50){
1526
						xf=mouse.x<=ancho?cal2:ancho-x;
1527
					}
5215 nelberth 1528
			 	}
10543 nelberth 1529
 
5215 nelberth 1530
			 	if(t3){
10542 nelberth 1531
					cal1=yf-(mouse.y-y);
1532
					cal2=mouse.x-x;
1533
					if(cal1>50){
10553 nelberth 1534
 
10551 nelberth 1535
						if(mouse.y>=0){
1536
							yf=cal1;
1537
							y=mouse.y;
1538
						}else{
10552 nelberth 1539
							yf=yf+y;
10551 nelberth 1540
							y=0;
1541
						}
10542 nelberth 1542
				 	}
1543
					if(cal2>50){
10547 nelberth 1544
						xf=mouse.x<=ancho?cal2:ancho-x;
10542 nelberth 1545
					}
10543 nelberth 1546
			 	}
5332 nelberth 1547
				/* Izquierda abajo */
5215 nelberth 1548
			 	if(t2){
10555 nelberth 1549
					cal1=mouse.y-y;
1550
					cal2=xf-(mouse.x-x);
1551
					if(cal1>50){
1552
						yf=yf=mouse.y<=alto?cal1:alto-y;
1553
					}
1554
					if(cal2>50){
10556 nelberth 1555
						if(mouse.x>=0){
10555 nelberth 1556
							xf=cal2;
10559 nelberth 1557
							x=mouse.x;
10555 nelberth 1558
						}else{
1559
							xf=xf+x;
1560
							x=0;
1561
						}
1562
					}
4798 nelberth 1563
			 	}
5332 nelberth 1564
				/* izquierda arriba */
4798 nelberth 1565
			 	if(t1){
10560 nelberth 1566
 
1567
					cal1=yf-(mouse.y-y);
1568
					cal2=xf-(mouse.x-x);
1569
					if(cal1>50){
1570
 
1571
						if(mouse.y>=0){
1572
							yf=cal1;
1573
							y=mouse.y;
1574
						}else{
1575
							yf=yf+y;
1576
							y=0;
1577
						}
1578
				 	}
1579
					if(cal2>50){
1580
						if(mouse.x>=0){
1581
							xf=cal2;
1582
							x=mouse.x;
1583
						}else{
1584
							xf=xf+x;
1585
							x=0;
1586
						}
1587
					}
10562 nelberth 1588
 
4798 nelberth 1589
			 	}
5492 nelberth 1590
			}
4798 nelberth 1591
 
1592
		 	actualizar();
1593
		 	}else if(texto_listo){
1594
		 		if(tcli){
1595
		 			tx=mouse.x-(txf/2)
1596
		 			ty=mouse.y-(tyf/2)
1597
		 		}else if(rotar){
1598
 
1599
		 		}
1600
 
1601
		 		actualizar2();
1602
		 	}
1603
		 })
10446 nelberth 1604
		 $('body').mouseup(function(e){
10599 nelberth 1605
			console.log('levanto el mouse')
4798 nelberth 1606
		 	if(!recorte_listo){
1607
			 	cli=false;
1608
			 	t1=false;
1609
			 	t2=false;
1610
			 	t3=false;
1611
			 	t4=false;
1612
		 	}else if (texto_listo) {
1613
		 		tcli=false;
1614
		 	}
1615
		 })
1616
 
5129 nelberth 1617
 
4798 nelberth 1618
	}
5500 nelberth 1619
	/* Titulo */
5501 nelberth 1620
 
6073 nelberth 1621
var titulo_noticia, censor_titulo = true, numero_titulo=0;
5500 nelberth 1622
	$(document).on("keyup change", "#name", function(e){
5501 nelberth 1623
	console.log(numero_titulo)
5500 nelberth 1624
	titulo_noticia = $(this).val();
1625
	titulo_elemento= $(".titulo_topico");
1626
	if(titulo_noticia!=""){
5505 nelberth 1627
		if(censor_titulo){
5500 nelberth 1628
			titulo_elemento.html(titulo_noticia);
1629
			if(titulo_elemento.height()>38){
5508 nelberth 1630
				var titulo_noticia2 = "";
5500 nelberth 1631
				for(var i =0; i <titulo_noticia.length;i++){
1632
					titulo_noticia2 = titulo_noticia2 + titulo_noticia.split("")[i];
1633
					titulo_elemento.html(titulo_noticia2);
1634
					if(titulo_elemento.height()>38){
1635
						titulo_noticia2 = titulo_noticia2.slice(0,-5) + "...";
1636
						titulo_elemento.html(titulo_noticia2);
1637
						numero_titulo = titulo_noticia2.length;
1638
						censor_titulo=false;
1639
						break;
1640
					}
4798 nelberth 1641
 
5500 nelberth 1642
				}
1643
			}else{
1644
				numero_titulo=0;
1645
			}
1646
		}else{
1647
			if(numero_titulo+1>=titulo_noticia.length){
1648
				titulo_elemento.html(titulo_noticia);
1649
				censor_titulo=true;
1650
			}
5505 nelberth 1651
		}
5500 nelberth 1652
	}else{
5741 nelberth 1653
		titulo_elemento.html("LABEL_TITLE_TOPIC");
5500 nelberth 1654
		censor_titulo = true;
1655
	}
1656
})
1 www 1657
    });
1658
JS;
1659
$this->inlineScript()->captureEnd();
1660
?>
1661
 
1662
 
1663
 
1664
<!-- Content Header (Page header) -->
1665
<section class="content-header">
1666
	<div class="container-fluid">
1667
    	<div class="row mb-2">
1668
        	<div class="col-sm-12">
1669
            	<h1>LABEL_TOPICS</h1>
1670
			</div>
1671
		</div>
1672
	</div><!-- /.container-fluid -->
1673
</section>
1674
 
4693 nelberth 1675
<section class="content" id='content1'>
1 www 1676
	<div class="container-fluid">
1677
    	<div class="row">
1678
        	<div class="col-12">
1679
				<div class="card">
1680
					<div class="card-body">
20 steven 1681
        	    		<table id="gridTable" class="table   table-hover">
1 www 1682
                      		<thead>
1683
        						<tr>
1684
                                	<th>LABEL_NAME</th>
1685
                                  	<th>LABEL_STATUS</th>
1686
                                  	<th>LABEL_DETAILS</th>
1687
                                  	<th>LABEL_ACTIONS</th>
1688
                                </tr>
1689
                       		</thead>
1690
                         	<tbody>
1691
                         	</tbody>
1692
                    	</table>
1693
                   	</div>
1694
                   	<div class="card-footer clearfix">
1695
                   		<div style="float:right;">
1696
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH  </button>
1697
							<?php if($allowAdd) : ?>
1698
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
1699
							<?php endif; ?>
1700
						</div>
1701
                 	</div>
1702
          		</div>
1703
           	</div>
1704
        </div>
1705
 	</div>
1706
</section>
5467 nelberth 1707
<section id="addImage" style='display:none' class="">
5463 nelberth 1708
<div class="d-flex justify-content-center tituloEditor">
5701 nelberth 1709
        <h4>LABEL_ADD_TOPIC</h4>
5463 nelberth 1710
 
1711
    </div>
5687 nelberth 1712
	<div class="grid-padre" >
5487 nelberth 1713
				<?php
5462 nelberth 1714
       			 $form = $this->formAdd;
1715
            		$form->setAttributes([
1716
                        'method'  => 'post',
1717
            		    'action'  => $routeAdd,
1718
                        'name'    => 'form-topic-add',
1719
                        'id'      => 'form-topic-add',
1720
                    ]);
1721
 
1722
                    $form->prepare();
1723
                    echo $this->form()->openTag($form);
1724
                    ?>
5684 nelberth 1725
    			<div class="form-group grid-1-2">
5462 nelberth 1726
    				<?php
1727
                        $element = $form->get('name');
1728
 
1729
                        $element->setAttributes(['class' => 'form-control']);
1730
                        $element->setOptions(['label' => 'LABEL_NAME']);
1731
                        echo $this->formLabel($element);
1732
                        echo $this->formText($element);
1733
                    ?>
1734
				</div>
5487 nelberth 1735
 
5684 nelberth 1736
                <div class="form-group grid-1-2">
5462 nelberth 1737
                	<?php
1738
                    $element = $form->get('description');
1739
                    $element->setAttributes(['id' => 'description_add', 'class' => 'form-control', 'rows' => '2','class' => 'form-control']);
1740
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1741
                    echo $this->formLabel($element);
1742
                    echo $this->formTextArea($element);
1743
                    ?>
1744
   				</div>
5684 nelberth 1745
				<div class="form-group grid-1-2">
5462 nelberth 1746
    				<?php
1747
                        $element = $form->get('order');
1748
                        $element->setAttributes(['class' => 'form-control']);
1749
                        $element->setOptions(['label' => 'LABEL_ORDER']);
1750
                        echo $this->formLabel($element);
1751
                        echo $this->formText($element);
1752
                    ?>
1753
				</div>
5678 nelberth 1754
 
5462 nelberth 1755
               		<?php
5531 nelberth 1756
                    $element = $form->get('file');
5991 nelberth 1757
					$element->setAttributes([ 'class' => 'file']);
5653 nelberth 1758
                    echo $this->formHidden($element); ?>
5678 nelberth 1759
 
5684 nelberth 1760
          		<div class="form-group grid-1-2">
5462 nelberth 1761
    				<?php
1762
                        $element = $form->get('status');
1763
                        $element->setAttributes(['class' => 'form-control']);
1764
                        $element->setOptions(['label' => 'LABEL_STATUS']);
1765
                        echo $this->formLabel($element);
1766
                        echo $this->formSelect($element);
1767
                    ?>
1768
				</div>
1769
 
5747 nelberth 1770
				<div class="contenido form-group" id="contenido">
10622 nelberth 1771
				<div class="articulo_noticia animated fadeIn">
1772
    <div class="pasos">
1773
        <div class="titulo_pasos animated fadeInDown delay-04 fast">LABEL_STEP_1</div>
1774
        <div class="paso_opcion">
1775
            <div class="responsing_cut">
1776
                <div class="icon_cut"><span class="fa fa-scissors"></span></div>
1777
                <div class="contenido_cut">
1778
                    <div class="animated fadeInRight delay-04 fast">
1779
                        <div>
1780
                            <div class="titulo_cut">
1781
                                <div>LABEL_CUT</div>
1782
                                <div class="fa fa-times" id="cerrar_cut_modal"></div>
1783
                            </div>
1784
                            <div class="opcion_editor recortar10">
1785
                                <div>LABEL_CUT</div>
10803 nelberth 1786
                                <div id="blockCelda"><span class="fa fa-unlock"></span></div>
10622 nelberth 1787
                            </div>
1788
                        </div>
1789
                    </div>
1790
                </div>
1791
            </div>
1792
            <div class="responsing_text">
1793
                <div class="icon_text"><span class="fa fa-text-width"></span></div>
1794
                <div class="contenido_text">
1795
                    <div class="animated fadeInRight delay-04 fast">
1796
                        <div class="texto">
1797
                            <div class="titulo_text">
1798
                                <div>LABEL_ADD_TEXT</div>
1799
                                <div class="fa fa-times" id="cerrar_text_modal"></div>
1800
                            </div>
10797 nelberth 1801
                            <div class="fonts  mb-20">
1802
								<select name="fuentes" id="selectFuente" class="select-custom mr-2">
1803
									<option value="arial" selected>LABEL_FONT_ARIAL</option>
1804
									<option  value="calibri">LABEL_FONT_CALIBRI</option>
1805
									<option value="forte">LABEL_FONT_FORTE</option>
1806
									<option value="impact">LABEL_FONT_IMPACT</option>
1807
									<option  value="jokerman">LABEL_FONT_JOKERMAN</option>
1808
									<option  value="mv boli">LABEL_FONT_MV_BOLI</option>
1809
									<option  value="times new roman">LABEL_FONT_TIMES_NEW_ROMAN</option>
1810
									<option value="verdana">LABEL_FONT_VERDANA</option>
1811
									<option value="vivaldi">LABEL_FONT_VIVALDI</option>
1812
								</select>
1813
								<input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48" />
1814
							</div>
1815
							<div class="fonts mb-20">
1816
									<div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div>
1817
									<div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div>
1818
									<div class="color_letra font">
1819
										<label>A</label>
1820
										<input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff" />
1821
 
1822
									</div>
1823
									<div class="font fa" data-tooltip="Sombra de la letra" id="shadow">S</div>
1824
									<div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">F</div></div>
1825
							</div>
1826
 
1827
							<div class='color_fondo_cuadro mb-20' style="display:none">
1828
									<input type="color" name="" id="colorrect" value="#000000" class="w-25" data-tooltip="Color del fondo" class="mr-2" />
1829
									<input type="range" id="opacidad" max="100" min="1" step="1" value="100" class="w-75" >
1830
							</div>
1831
 
1832
 
1833
							<input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE" />
10622 nelberth 1834
                        </div>
1835
                    </div>
1836
                </div>
1837
            </div>
1838
            <div class="responsing_filtros">
1839
                <div class="icon_filter"><span class="fa fa-eyedropper"></span></div>
1840
                <div class="contenido_filter">
10790 nelberth 1841
                    <div class="titulo_filtro mb-20">
1842
                        <div>LABEL_FILTERS</div>
1843
                        <div class="fa fa-times" id="cerrar_filter_modal"></div>
10622 nelberth 1844
                    </div>
10789 nelberth 1845
					<div class="fonts  mb-20">
1846
                        <select name="filtros" id="selectFiltro" class="select-custom">
1847
							<option class="opcion_editor" value="normal">LABEL_FILTER_NORMAL</option>
1848
							<option class="opcion_editor" value=".5,1.3,1.31,1.33,1.38">LABEL_FILTER_NIGHT</option>
1849
							<option class="opcion_editor" value=".7,1.1,1.64,1.66,1.50">LABEL_FILTER_SAINT_ANA</option>
1850
							<option class="opcion_editor" value=".75,1,1.66,1.60,1.51">LABEL_FILTER_CREAM</option>
1851
							<option class="opcion_editor" value=".7,1.2,1.49,1.49,1.6">LABEL_FILTER_MAGIC</option>
1852
							<option class="opcion_editor" value=".7,1.2,1.60,1.66,1.58">LABEL_FILTER_RELIEF</option>
1853
							<option class="opcion_editor" value=".9,.9,1.45,1.54,1.54">LABEL_FILTER_LIGHT</option>
1854
							<option class="opcion_editor" value="1,1.5,1,1,1">LABEL_FILTER_SATURATION</option>
1855
							<option class="opcion_editor" value=".9,1.3,1,1,1">LABEL_FILTER_RETOUCH</option>
1856
							<option class="opcion_editor" value=".8,1,1.6,1.45,1.49">LABEL_FILTER_ORANGE</option>
1857
							<option class="opcion_editor" value=".8,.75,1.60,1.66,1.58">LABEL_FILTER_WIND</option>
1858
							<option class="opcion_editor" value=".8,.9,1.66,1.43,1.28">LABEL_FILTER_DESERT</option>
1859
							<option class="opcion_editor" value=".85,.75,1.47,1.66,1.54">LABEL_FILTER_FOREST</option>
1860
							<option class="opcion_editor" value=".8,.8,1.71,1.64,1.58">LABEL_FILTER_TOWN</option>
1861
							<option class="opcion_editor" value=".8,1.2,1.24,.99,1">LABEL_FILTER_PINK</option>
1862
							<option class="opcion_editor" value=".9,1.1,1.33,1.19,.91">LABEL_FILTER_HISTORY</option>
1863
							<option class="opcion_editor" value="1,1,gris">LABEL_FILTER_GRAY</option>
1864
							<option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_OLD_PICTURE</option>
1865
							<option class="opcion_editor" value=".9,1.2,26,-12,0,2">LABEL_FILTER_CHARMING</option>
1866
							<option class="opcion_editor" value="1.1,1.4,40,12,-6,2">LABEL_FILTER_EMOTION</option>
1867
							<option class="opcion_editor" value=".9,1.32,56,47,17,2">LABEL_FILTER_BEIGE</option>
1868
							<option class="opcion_editor" value=".87,1.19,55,37,23,2">LABEL_FILTER_FINE</option>
1869
							<option class="opcion_editor" value="1.2,.9,67,13,-23,2">LABEL_FILTER_LORD</option>
1870
							<option class="opcion_editor" value="1.2,1.2,35,7,18,2">LABEL_FILTER_70S</option>
1871
							<option class="opcion_editor" value=".92,1.23,-11,11,11,2">LABEL_FILTER_TREE</option>
1872
							<option class="opcion_editor" value=" 1,1.4,-3,-1,-12,2">LABEL_FILTER_SUMMER</option>
1873
							<option class="opcion_editor" value=".85,1.26,-15,2,-1,2">LABEL_FILTER_COLD_WEATHER</option>
1874
							<option class="opcion_editor" value="1,1.4,5,12,1,2">LABEL_FILTER_ANGELS</option>
1875
							<option class="opcion_editor" value=".9,1.2,43,-17,-55,2">LABEL_FILTER_HOT</option>
1876
							<option class="opcion_editor" value="1,1.29,29,26,17,2">LABEL_FILTER_FALL</option>
1877
							<option class="opcion_editor" value=".85,1.3,43,25,-11,2">LABEL_FILTER_MARCH</option>
1878
							<option class="opcion_editor" value=".8,1.25,31,41,12,2">LABEL_FILTER_PEAR</option>
1879
							<option class="opcion_editor" value="1,1.36,4,5,1,2">LABEL_FILTER_COMMON</option>
1880
							<option class="opcion_editor" value=".9,1.3,37,-25,1,2">LABEL_FILTER_GOLD</option>
1881
							<option class="opcion_editor" value="1.1,1.3,-47,-42,-30,2">LABEL_FILTER_GOTHIC</option>
1882
							<option class="opcion_editor" value="1,1.4,-5,42,11,2">LABEL_FILTER_FORESTRY</option>
1883
							<option class="opcion_editor" value=".9,1.2,-5,-7,4,2">LABEL_FILTER_MOON</option>
1884
							<option class="opcion_editor" value="1.1,1.3,-1,-1,26,2">LABEL_FILTER_PARTY</option>
1885
                        </select>
10622 nelberth 1886
                    </div>
1887
                </div>
1888
            </div>
1889
            <div class="volver"><span class="icon-undo"></span>LABEL_START_OVER</div>
1890
            <div class="paso_1 paso animated bounceInDown delay-04 fast">1</div>
1891
            <div class="paso_2 a1 animated bounceInDown delay-06 fast">2</div>
1892
            <div class="paso_2 b1 animated bounceInDown delay-08 fast">3</div>
1893
        </div>
1894
    </div>
1895
    <div class="editor_imagenes">
1896
        <div class="fondo_oscuro"></div>
10649 nelberth 1897
        <div class="editor_imagenes2 ">
10794 nelberth 1898
           <div>
10797 nelberth 1899
				<div class="canvas_imagen">
1900
						<div class="canvas recortar"><div class="canvas_subir" id="imagen_noticia">LABEL_DRAG_IMAGE_HERE</div></div>
1901
					</div>
1902
				<div class="botones_dimenciones">
1903
					<div class="scale">
1904
						<div class="dimenciones">
1905
							<div id="ancho">1240px</div>
1906
							<div>x</div>
1907
							<div id="alto">720px</div>
1908
						</div>
1909
						<div class="porciento">
1910
							<div id="menos_scale"><span class="icon-minus fa fa-minus"></span></div>
1911
							<div class="ps">
1912
								<ul class="cantidades_scale">
1913
									<li data-scale="2" class="as">200%</li>
1914
									<li data-scale="1" class="as">100%</li>
1915
									<li data-scale="0.75" class="as">75%</li>
1916
									<li data-scale="0.5" class="as">50%</li>
1917
									<li data-scale="0.25" class="as">25%</li>
1918
								</ul>
1919
								<div id="porciento_scale">50%</div>
1920
							</div>
1921
							<div id="mas_scale"><span class="icon-plus fa fa-plus"></span></div>
1922
						</div>
1923
					</div>
1924
					<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>
1925
				</div>
10794 nelberth 1926
		   </div>
1927
 
10622 nelberth 1928
            <div class="modificar animated fadeInRight delay-04 fast">
1929
                <div>
1930
                    <div class="titulo_recortar"><span class="icon-ungroup fa fa-scissors"></span>LABEL_CUT</div>
1931
                    <div class="opcion_editor recortar10">
10801 nelberth 1932
                        <div class="recortar_texto">LABEL_CUT</div>
10803 nelberth 1933
                        <div id="blockCelda"><span class="fa fa-unlock"></span></div>
10622 nelberth 1934
                    </div>
1935
                </div>
1936
                <div class="texto">
10660 nelberth 1937
 
1938
 
1939
                    <div class="mb-20">
1940
                        <div class="titulo_texto "><span class="icon-plus fa fa-text-width"></span>Texto</div>
1941
 
1942
                    </div>
1943
					<div class="fonts  mb-20">
10631 nelberth 1944
                        <select name="fuentes" id="selectFuente" class="select-custom mr-2">
10630 nelberth 1945
                            <option value="arial" selected>LABEL_FONT_ARIAL</option>
10622 nelberth 1946
                            <option  value="calibri">LABEL_FONT_CALIBRI</option>
1947
                            <option value="forte">LABEL_FONT_FORTE</option>
1948
                            <option value="impact">LABEL_FONT_IMPACT</option>
1949
                            <option  value="jokerman">LABEL_FONT_JOKERMAN</option>
1950
                            <option  value="mv boli">LABEL_FONT_MV_BOLI</option>
1951
                            <option  value="times new roman">LABEL_FONT_TIMES_NEW_ROMAN</option>
1952
                            <option value="verdana">LABEL_FONT_VERDANA</option>
1953
                            <option value="vivaldi">LABEL_FONT_VIVALDI</option>
1954
                        </select>
1955
                        <input type="number" class="" data-tooltip="Tamaño de la letra" name="" id="font-size" max="500" min="1" step="1" value="48" />
1956
                    </div>
10674 nelberth 1957
					<div class="fonts mb-20">
10626 nelberth 1958
							<div class="font" id="negritas" data-tooltip="Negritas"><i class="fa fa-bold" aria-hidden="true"></i></div>
1959
							<div class="font" id="italic" data-tooltip="Letra Cursiva"><i class="fa fa-italic" aria-hidden="true"></i></div>
10706 nelberth 1960
							<div class="color_letra font">
10739 nelberth 1961
								<label>A</label>
10736 nelberth 1962
								<input type="color" class="" data-tooltip="Color de la letra" name="" id="color" value="#ffffff" />
10706 nelberth 1963
 
10692 nelberth 1964
							</div>
10661 nelberth 1965
							<div class="font fa" data-tooltip="Sombra de la letra" id="shadow">S</div>
10739 nelberth 1966
							<div class="font" id="rectangulo" data-tooltip="Fondo de la letra"><div class="rectangulo">F</div></div>
10670 nelberth 1967
                    </div>
10687 nelberth 1968
 
10691 nelberth 1969
					<div class='color_fondo_cuadro mb-20' style="display:none">
10741 nelberth 1970
                       		<input type="color" name="" id="colorrect" value="#000000" class="w-25" data-tooltip="Color del fondo" class="mr-2" />
10675 nelberth 1971
							<input type="range" id="opacidad" max="100" min="1" step="1" value="100" class="w-75" >
10670 nelberth 1972
					</div>
10663 nelberth 1973
 
10662 nelberth 1974
 
10622 nelberth 1975
                    <input id="texto_input" type="text" name="texto" placeholder="LABEL_ADD_TEXT_HERE" />
10740 nelberth 1976
					<div class="mb-20">
1977
						<div class="titulo_filtro"><span class="icon-eyedropper fa fa-eyedropper"></span>LABEL_FILTERS</div>
1978
                    </div>
10742 nelberth 1979
					<div class="fonts  mb-20">
10746 nelberth 1980
                        <select name="filtros" id="selectFiltro" class="select-custom">
10745 nelberth 1981
							<option class="opcion_editor" value="normal">LABEL_FILTER_NORMAL</option>
10782 nelberth 1982
							<option class="opcion_editor" value=".5,1.3,1.31,1.33,1.38">LABEL_FILTER_NIGHT</option>
1983
							<option class="opcion_editor" value=".7,1.1,1.64,1.66,1.50">LABEL_FILTER_SAINT_ANA</option>
10764 nelberth 1984
							<option class="opcion_editor" value=".75,1,1.66,1.60,1.51">LABEL_FILTER_CREAM</option>
1985
							<option class="opcion_editor" value=".7,1.2,1.49,1.49,1.6">LABEL_FILTER_MAGIC</option>
1986
							<option class="opcion_editor" value=".7,1.2,1.60,1.66,1.58">LABEL_FILTER_RELIEF</option>
1987
							<option class="opcion_editor" value=".9,.9,1.45,1.54,1.54">LABEL_FILTER_LIGHT</option>
1988
							<option class="opcion_editor" value="1,1.5,1,1,1">LABEL_FILTER_SATURATION</option>
1989
							<option class="opcion_editor" value=".9,1.3,1,1,1">LABEL_FILTER_RETOUCH</option>
1990
							<option class="opcion_editor" value=".8,1,1.6,1.45,1.49">LABEL_FILTER_ORANGE</option>
1991
							<option class="opcion_editor" value=".8,.75,1.60,1.66,1.58">LABEL_FILTER_WIND</option>
1992
							<option class="opcion_editor" value=".8,.9,1.66,1.43,1.28">LABEL_FILTER_DESERT</option>
1993
							<option class="opcion_editor" value=".85,.75,1.47,1.66,1.54">LABEL_FILTER_FOREST</option>
1994
							<option class="opcion_editor" value=".8,.8,1.71,1.64,1.58">LABEL_FILTER_TOWN</option>
1995
							<option class="opcion_editor" value=".8,1.2,1.24,.99,1">LABEL_FILTER_PINK</option>
1996
							<option class="opcion_editor" value=".9,1.1,1.33,1.19,.91">LABEL_FILTER_HISTORY</option>
10771 nelberth 1997
							<option class="opcion_editor" value="1,1,gris">LABEL_FILTER_GRAY</option>
10770 nelberth 1998
							<option class="opcion_editor" value=".8,1.5,gris">LABEL_FILTER_OLD_PICTURE</option>
10764 nelberth 1999
							<option class="opcion_editor" value=".9,1.2,26,-12,0,2">LABEL_FILTER_CHARMING</option>
2000
							<option class="opcion_editor" value="1.1,1.4,40,12,-6,2">LABEL_FILTER_EMOTION</option>
2001
							<option class="opcion_editor" value=".9,1.32,56,47,17,2">LABEL_FILTER_BEIGE</option>
2002
							<option class="opcion_editor" value=".87,1.19,55,37,23,2">LABEL_FILTER_FINE</option>
2003
							<option class="opcion_editor" value="1.2,.9,67,13,-23,2">LABEL_FILTER_LORD</option>
2004
							<option class="opcion_editor" value="1.2,1.2,35,7,18,2">LABEL_FILTER_70S</option>
2005
							<option class="opcion_editor" value=".92,1.23,-11,11,11,2">LABEL_FILTER_TREE</option>
2006
							<option class="opcion_editor" value=" 1,1.4,-3,-1,-12,2">LABEL_FILTER_SUMMER</option>
2007
							<option class="opcion_editor" value=".85,1.26,-15,2,-1,2">LABEL_FILTER_COLD_WEATHER</option>
2008
							<option class="opcion_editor" value="1,1.4,5,12,1,2">LABEL_FILTER_ANGELS</option>
2009
							<option class="opcion_editor" value=".9,1.2,43,-17,-55,2">LABEL_FILTER_HOT</option>
2010
							<option class="opcion_editor" value="1,1.29,29,26,17,2">LABEL_FILTER_FALL</option>
2011
							<option class="opcion_editor" value=".85,1.3,43,25,-11,2">LABEL_FILTER_MARCH</option>
2012
							<option class="opcion_editor" value=".8,1.25,31,41,12,2">LABEL_FILTER_PEAR</option>
2013
							<option class="opcion_editor" value="1,1.36,4,5,1,2">LABEL_FILTER_COMMON</option>
2014
							<option class="opcion_editor" value=".9,1.3,37,-25,1,2">LABEL_FILTER_GOLD</option>
2015
							<option class="opcion_editor" value="1.1,1.3,-47,-42,-30,2">LABEL_FILTER_GOTHIC</option>
2016
							<option class="opcion_editor" value="1,1.4,-5,42,11,2">LABEL_FILTER_FORESTRY</option>
2017
							<option class="opcion_editor" value=".9,1.2,-5,-7,4,2">LABEL_FILTER_MOON</option>
2018
							<option class="opcion_editor" value="1.1,1.3,-1,-1,26,2">LABEL_FILTER_PARTY</option>
10742 nelberth 2019
                        </select>
2020
                    </div>
10655 nelberth 2021
 
10622 nelberth 2022
 
2023
                </div>
2024
            </div>
2025
        </div>
10794 nelberth 2026
 
10622 nelberth 2027
    </div>
2028
</div>
2029
<dav class="fixed_noticia"></dav>
2030
<dav class="cuadro_noticias animated bounceInUp delay-04" id="cuadro_noticias">
2031
    <dav class="relative">
2032
        <div class="titulo_topico">LABEL_TITLE_TOPIC</div>
2033
        <canvas class="imagen_noticias" id="imagen_noticias" width="320" height="480"></canvas>
2034
    </dav>
2035
    <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>
2036
</dav>
5812 nelberth 2037
 
5747 nelberth 2038
 
10622 nelberth 2039
 
5747 nelberth 2040
				</div>
5916 nelberth 2041
 
5549 nelberth 2042
 
5462 nelberth 2043
     	      		<?php echo $this->form()->closeTag($form); ?>
2044
      		</div>
2045
 
5463 nelberth 2046
 
4691 nelberth 2047
</section>
1 www 2048
 
5895 nelberth 2049
<section id="topicEdit" style='display:none' class="">
2050
<div class="d-flex justify-content-center tituloEditor">
5912 nelberth 2051
        <h4>LABEL_EDIT_TOPIC</h4>
1 www 2052
 
5895 nelberth 2053
    </div>
2054
	<div class="grid-padre" >
5899 nelberth 2055
					<?php
2056
       			  $form = $this->formEdit;
1 www 2057
            		$form->setAttributes([
5899 nelberth 2058
                        'method'    => 'post',
2059
                        'name'      => 'form-topic-edit',
2060
                        'id'        => 'form-topic-edit'
1 www 2061
                    ]);
2062
 
2063
                    $form->prepare();
2064
                    echo $this->form()->openTag($form);
2065
                    ?>
5895 nelberth 2066
    			<div class="form-group grid-1-2">
1 www 2067
    				<?php
2068
                        $element = $form->get('name');
2069
 
2070
                        $element->setAttributes(['class' => 'form-control']);
2071
                        $element->setOptions(['label' => 'LABEL_NAME']);
2072
                        echo $this->formLabel($element);
2073
                        echo $this->formText($element);
2074
                    ?>
2075
				</div>
5904 nelberth 2076
				<div class="form-group grid-1-2">
1 www 2077
                	<?php
2078
                    $element = $form->get('description');
5904 nelberth 2079
                    $element->setAttributes(['id' => 'description_edit', 'rows' => '2', 'class' => 'form-control',   'class' => 'form-control']);
1 www 2080
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
2081
                    echo $this->formLabel($element);
2082
                    echo $this->formTextArea($element);
2083
                    ?>
2084
   				</div>
5895 nelberth 2085
				<div class="form-group grid-1-2">
1 www 2086
    				<?php
2087
                        $element = $form->get('order');
2088
                        $element->setAttributes(['class' => 'form-control']);
2089
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2090
                        echo $this->formLabel($element);
2091
                        echo $this->formText($element);
2092
                    ?>
2093
				</div>
5895 nelberth 2094
 
1 www 2095
               		<?php
2096
                    $element = $form->get('file');
5990 nelberth 2097
					$element->setAttributes([ 'class' => 'file']);
2098
                    echo $this->formHidden($element);
2099
					?>
5895 nelberth 2100
 
2101
          		<div class="form-group grid-1-2">
1 www 2102
    				<?php
2103
                        $element = $form->get('status');
2104
                        $element->setAttributes(['class' => 'form-control']);
2105
                        $element->setOptions(['label' => 'LABEL_STATUS']);
2106
                        echo $this->formLabel($element);
2107
                        echo $this->formSelect($element);
2108
                    ?>
2109
				</div>
2110
 
5908 nelberth 2111
				<div class="contenido form-group" id="contenido2">
5895 nelberth 2112
				</div>
5981 nelberth 2113
 
1 www 2114
     	      		<?php echo $this->form()->closeTag($form); ?>
2115
      		</div>
2116
 
5895 nelberth 2117
 
2118
</section>
1 www 2119
 
2120
 
2121
 
2122
<!-- The Modal -->
2123
<div class="modal" id="modalImageApp">
2124
	<div class="modal-dialog ">
2125
    	<div class="modal-content">
2126
 
2127
            <!-- Modal Header -->
2128
      		<div class="modal-header">
2129
        		<h4 class="modal-title">LABEL_IMAGE</h4>
2130
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
2131
      		</div>
2132
 
2133
            <!-- Modal body -->
2134
            <div class="modal-body text-center">
2135
				<img src="" class="img img-responsive" style="width: 300px; height: auto" id="image-app" />
2136
      		</div>
2137
 
2138
            <!-- Modal footer -->
2139
      		<div class="modal-footer">
2140
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
2141
          	</div>
2142
         </div>
2143
	</div>
2144
</div>
2145
 
2146
 
2147
 
2148
 
2149
 
2150
 
2151
 
2152
 
2153
 
2154