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