PluginProbe ʕ •ᴥ•ʔ
Tutor LMS – eLearning and online course solution / 1.7.9
Tutor LMS – eLearning and online course solution v1.7.9
4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.11 1.2.12 1.2.13 1.2.20 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.15 1.9.16 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / assets / js / tutor-admin.js
tutor / assets / js Last commit date
Chart.bundle.min.js 5 years ago gutenberg_blocks.js 5 years ago mce-button.js 5 years ago tutor-admin.js 5 years ago tutor-front.js 5 years ago tutor-setup.js 5 years ago tutor.js 5 years ago
tutor-admin.js
714 lines
1 jQuery(document).ready(function($){
2 'use strict';
3
4 /**
5 * Color Picker
6 * @since v.1.2.21
7 */
8 if (jQuery().wpColorPicker) {
9 $('.tutor_colorpicker').wpColorPicker();
10 }
11
12 if (jQuery().select2){
13 $('.tutor_select2').select2();
14 }
15
16 /**
17 * Option Settings Nav Tab
18 */
19 $('.tutor-option-nav-tabs li a').click(function(e){
20 e.preventDefault();
21 var tab_page_id = $(this).attr('data-tab');
22 $('.option-nav-item').removeClass('current');
23 $(this).closest('li').addClass('current');
24 $('.tutor-option-nav-page').hide();
25 $(tab_page_id).addClass('current-page').show();
26 window.history.pushState('obj', '', $(this).attr('href'));
27 });
28
29 $('#save_tutor_option').click(function (e) {
30 e.preventDefault();
31 $(this).closest('form').submit();
32 });
33 $('#tutor-option-form').submit(function(e){
34 e.preventDefault();
35
36 var $form = $(this);
37 var data = $form.serializeObject();
38
39 $.ajax({
40 url : ajaxurl,
41 type : 'POST',
42 data : data,
43 beforeSend: function () {
44 $form.find('.button').addClass('tutor-updating-message');
45 },
46 success: function (data) {
47 if (data.success) {
48 //window.location.reload();
49 }
50 },
51 complete: function () {
52 $form.find('.button').removeClass('tutor-updating-message');
53 }
54 });
55 });
56
57 /**
58 * Withdraw nav tabs
59 * @since v.1.1.2
60 */
61 $(document).on('click', '.withdraw-method-nav li a', function(e){
62 e.preventDefault();
63 var tab_page_id = $(this).attr('data-target-id');
64 $('.withdraw-method-form-wrap').hide();
65 $('#'+tab_page_id).show();
66 });
67
68 /**
69 * End Withdraw nav tabs
70 */
71
72 /**
73 * Don't move it to anywhere?
74 */
75 function enable_sorting_topic_lesson(){
76 if (jQuery().sortable) {
77 $(".course-contents").sortable({
78 handle: ".course-move-handle",
79 start: function (e, ui) {
80 ui.placeholder.css('visibility', 'visible');
81 },
82 stop: function (e, ui) {
83 tutor_sorting_topics_and_lesson();
84 },
85 });
86 $(".tutor-lessons:not(.drop-lessons)").sortable({
87 connectWith: ".tutor-lessons",
88 items: "div.course-content-item",
89 start: function (e, ui) {
90 ui.placeholder.css('visibility', 'visible');
91 },
92 stop: function (e, ui) {
93 tutor_sorting_topics_and_lesson();
94 },
95 });
96 }
97 }
98 enable_sorting_topic_lesson();
99 function tutor_sorting_topics_and_lesson(){
100 var topics = {};
101 $('.tutor-topics-wrap').each(function(index, item){
102 var $topic = $(this);
103 var topics_id = parseInt($topic.attr('id').match(/\d+/)[0], 10);
104 var lessons = {};
105
106 $topic.find('.course-content-item').each(function(lessonIndex, lessonItem){
107 var $lesson = $(this);
108 var lesson_id = parseInt($lesson.attr('id').match(/\d+/)[0], 10);
109
110 lessons[lessonIndex] = lesson_id;
111 });
112 topics[index] = { 'topic_id' : topics_id, 'lesson_ids' : lessons };
113 });
114 $('#tutor_topics_lessons_sorting').val(JSON.stringify(topics));
115 }
116
117 /**
118 * Lesson Update or Create Modal
119 */
120 $(document).on( 'click', '.update_lesson_modal_btn', function( event ){
121 event.preventDefault();
122
123 var $that = $(this);
124 var content;
125 var inputid = 'tutor_lesson_modal_editor';
126 var editor = tinyMCE.get(inputid);
127 if (editor) {
128 content = editor.getContent();
129 } else {
130 content = $('#'+inputid).val();
131 }
132
133 var form_data = $(this).closest('form').serializeObject();
134 form_data.lesson_content = content;
135
136 $.ajax({
137 url : ajaxurl,
138 type : 'POST',
139 data : form_data,
140 beforeSend: function () {
141 $that.addClass('tutor-updating-message');
142 },
143 success: function (data) {
144 if (data.success){
145 $('#tutor-course-content-wrap').html(data.data.course_contents);
146 enable_sorting_topic_lesson();
147
148 //Close the modal
149 $('.tutor-lesson-modal-wrap').removeClass('show');
150 }
151 },
152 complete: function () {
153 $that.removeClass('tutor-updating-message');
154 }
155 });
156 });
157
158 /**
159 * Lesson Video
160 */
161 $(document).on('change', '.tutor_lesson_video_source', function(e){
162 var selector = $(this).val();
163 $('[class^="video_source_wrap"]').hide();
164 $('.video_source_wrap_'+selector).show();
165
166 if (selector === 'html5'){
167 $('.tutor-video-poster-field').show();
168 } else{
169 $('.tutor-video-poster-field').hide();
170 }
171 });
172
173 $(document).on( 'click', '.video_source_wrap_html5 .video_upload_btn', function( event ){
174 event.preventDefault();
175
176 var $that = $(this);
177 var frame;
178 // If the media frame already exists, reopen it.
179 if ( frame ) {
180 frame.open();
181 return;
182 }
183
184 // Create a new media frame
185 frame = wp.media({
186 title: 'Select or Upload Media Of Your Chosen Persuasion',
187 button: {
188 text: 'Use this media'
189 },
190 library: { type: 'video' },
191 multiple: false // Set to true to allow multiple files to be selected
192 });
193
194 // When an image is selected in the media frame...
195 frame.on( 'select', function() {
196 // Get media attachment details from the frame state
197 var attachment = frame.state().get('selection').first().toJSON();
198 $that.closest('.video_source_wrap_html5').find('span.video_media_id').text(attachment.id).closest('p').show();
199 $that.closest('.video_source_wrap_html5').find('input.input_source_video_id').val(attachment.id);
200 });
201 // Finally, open the modal on click
202 frame.open();
203 });
204
205 $(document).on('click', 'a.tutor-delete-attachment', function(e){
206 e.preventDefault();
207 $(this).closest('.tutor-added-attachment').remove();
208 });
209
210 $(document).on('click', '.tutorUploadAttachmentBtn', function(e){
211 e.preventDefault();
212
213 var $that = $(this);
214 var frame;
215 // If the media frame already exists, reopen it.
216 if ( frame ) {
217 frame.open();
218 return;
219 }
220 // Create a new media frame
221 frame = wp.media({
222 title: 'Select or Upload Media Of Your Chosen Persuasion',
223 button: {
224 text: 'Use this media'
225 },
226 multiple: true // Set to true to allow multiple files to be selected
227 });
228 // When an image is selected in the media frame...
229 frame.on( 'select', function() {
230 // Get media attachment details from the frame state
231 var attachments = frame.state().get('selection').toJSON();
232 if (attachments.length){
233 for (var i=0; i < attachments.length; i++){
234 var attachment = attachments[i];
235
236 var inputHtml = '<div class="tutor-added-attachment"><i class="tutor-icon-archive"></i> <a href="javascript:;" class="tutor-delete-attachment tutor-icon-line-cross"></a> <span> <a href="'+attachment.url+'">'+attachment.filename+'</a> </span><input type="hidden" name="tutor_attachments[]" value="'+attachment.id+'"></div>';
237 $that.closest('.tutor-lesson-attachments-metabox').find('.tutor-added-attachments-wrap').append(inputHtml);
238 }
239 }
240 });
241 // Finally, open the modal on click
242 frame.open();
243 });
244
245 /**
246 * Open Sidebar Menu
247 */
248 if (tutor_data.open_tutor_admin_menu){
249 var $adminMenu = $('#adminmenu');
250 $adminMenu.find('[href="admin.php?page=tutor"]').closest('li.wp-has-submenu').addClass('wp-has-current-submenu');
251 $adminMenu.find('[href="admin.php?page=tutor"]').closest('li.wp-has-submenu').find('a.wp-has-submenu').removeClass('wp-has-current-submenu').addClass('wp-has-current-submenu');
252 }
253
254 $(document).on('click', '.tutor-option-media-upload-btn', function(e){
255 e.preventDefault();
256
257 var $that = $(this);
258 var frame;
259 if ( frame ) {
260 frame.open();
261 return;
262 }
263 frame = wp.media({
264 title: 'Select or Upload Media Of Your Chosen Persuasion',
265 button: {
266 text: 'Use this media'
267 },
268 multiple: false
269 });
270 frame.on( 'select', function() {
271 var attachment = frame.state().get('selection').first().toJSON();
272 $that.closest('.option-media-wrap').find('.option-media-preview').html('<img src="'+attachment.url+'" alt="" />');
273 $that.closest('.option-media-wrap').find('input').val(attachment.id);
274 $that.closest('.option-media-wrap').find('.tutor-media-option-trash-btn').show();
275 });
276 frame.open();
277 });
278
279 /**
280 * Remove option media
281 * @since v.1.4.3
282 */
283 $(document).on('click', '.tutor-media-option-trash-btn', function(e){
284 e.preventDefault();
285
286 var $that = $(this);
287 $that.closest('.option-media-wrap').find('img').remove();
288 $that.closest('.option-media-wrap').find('input').val('');
289 $that.closest('.option-media-wrap').find('.tutor-media-option-trash-btn').hide();
290 });
291
292
293 $(document).on('change', '.tutor_addons_list_item', function(e) {
294 var $that = $(this);
295
296 var isEnable = $that.prop('checked') ? 1 : 0;
297 var addonFieldName = $that.attr('name');
298
299 $.ajax({
300 url : ajaxurl,
301 type : 'POST',
302 data : {isEnable:isEnable, addonFieldName:addonFieldName, action : 'addon_enable_disable'},
303 success: function (data) {
304 if (data.success){
305 //Success
306 }
307 }
308 });
309 });
310
311 /**
312 * Add instructor
313 * @since v.1.0.3
314 */
315 $(document).on('submit', '#new-instructor-form', function(e){
316 e.preventDefault();
317
318 var $that = $(this);
319 var formData = $that.serializeObject();
320 formData.action = 'tutor_add_instructor';
321
322 $.ajax({
323 url : ajaxurl,
324 type : 'POST',
325 data : formData,
326 success: function (data) {
327 if (data.success){
328 $that.trigger("reset");
329 $('#form-response').html('<p class="tutor-status-approved-context">'+data.data.msg+'</p>');
330 }else{
331 var errorMsg = '';
332
333 var errors = data.data.errors;
334 if (errors && Object.keys(errors).length){
335 $.each(data.data.errors, function( index, value ) {
336 if (isObject(value)){
337 $.each(value, function( key, value1 ) {
338 errorMsg += '<p class="tutor-required-fields">'+value1[0]+'</p>';
339 });
340 } else{
341 errorMsg += '<p class="tutor-required-fields">'+value+'</p>';
342 }
343 });
344 $('#form-response').html(errorMsg);
345 }
346
347 }
348 }
349 });
350 });
351
352
353 /**
354 * Instructor block unblock action
355 * @since v.1.5.3
356 */
357
358 $(document).on('click', 'a.instructor-action', function(e){
359 e.preventDefault();
360
361 var $that = $(this);
362 var action = $that.attr('data-action');
363 var instructor_id = $that.attr('data-instructor-id');
364
365 var prompt_message = $that.attr('data-prompt-message');
366 if(prompt_message && !confirm(prompt_message)){
367 // Avoid Accidental CLick
368 return;
369 }
370
371 var nonce_key = tutor_data.nonce_key;
372 var json_data = { instructor_id : instructor_id, action_name : action, action: 'instructor_approval_action'};
373 json_data[nonce_key] = tutor_data[nonce_key];
374
375 $.ajax({
376 url : ajaxurl,
377 type : 'POST',
378 data : json_data,
379 beforeSend: function () {
380 $that.addClass('tutor-updating-message');
381 },
382 success: function (data) {
383 location.reload(true);
384 },
385 complete: function () {
386 $that.removeClass('tutor-updating-message');
387 }
388 });
389 });
390
391 function isObject (value) {
392 return value && typeof value === 'object' && value.constructor === Object;
393 }
394
395 /**
396 * Tutor Assignments JS
397 * @since v.1.3.3
398 */
399 $(document).on('click', '.tutor-create-assignments-btn', function(e){
400 e.preventDefault();
401
402 var $that = $(this);
403 var topic_id = $(this).attr('data-topic-id');
404 var course_id = $('#post_ID').val();
405
406 $.ajax({
407 url : ajaxurl,
408 type : 'POST',
409 data : {topic_id : topic_id, course_id : course_id, action: 'tutor_load_assignments_builder_modal'},
410 beforeSend: function () {
411 $that.addClass('tutor-updating-message');
412 },
413 success: function (data) {
414 $('.tutor-lesson-modal-wrap .modal-container').html(data.data.output);
415 $('.tutor-lesson-modal-wrap').attr('data-topic-id', topic_id).addClass('show');
416
417 $(document).trigger('assignment_modal_loaded', {topic_id : topic_id, course_id : course_id});
418
419 tinymce.init(tinyMCEPreInit.mceInit.tutor_editor_config);
420 tinymce.execCommand( 'mceRemoveEditor', false, 'tutor_assignments_modal_editor' );
421 tinyMCE.execCommand('mceAddEditor', false, "tutor_assignments_modal_editor");
422 },
423 complete: function () {
424 quicktags({id : "tutor_assignments_modal_editor"});
425 $that.removeClass('tutor-updating-message');
426 }
427 });
428 });
429
430 $(document).on('click', '.open-tutor-assignment-modal', function(e){
431 e.preventDefault();
432
433 var $that = $(this);
434 var assignment_id = $that.attr('data-assignment-id');
435 var topic_id = $that.attr('data-topic-id');
436 var course_id = $('#post_ID').val();
437
438 $.ajax({
439 url : ajaxurl,
440 type : 'POST',
441 data : {assignment_id : assignment_id, topic_id : topic_id, course_id : course_id, action: 'tutor_load_assignments_builder_modal'},
442 beforeSend: function () {
443 $that.addClass('tutor-updating-message');
444 },
445 success: function (data) {
446 $('.tutor-lesson-modal-wrap .modal-container').html(data.data.output);
447 $('.tutor-lesson-modal-wrap').attr({'data-assignment-id' : assignment_id, 'data-topic-id':topic_id}).addClass('show');
448
449 $(document).trigger('assignment_modal_loaded', {assignment_id : assignment_id, topic_id : topic_id, course_id : course_id});
450
451 tinymce.init(tinyMCEPreInit.mceInit.tutor_editor_config);
452 tinymce.execCommand( 'mceRemoveEditor', false, 'tutor_assignments_modal_editor' );
453 tinyMCE.execCommand('mceAddEditor', false, "tutor_assignments_modal_editor");
454 },
455 complete: function () {
456 quicktags({id : "tutor_assignments_modal_editor"});
457 $that.removeClass('tutor-updating-message');
458 }
459 });
460 });
461
462 /**
463 * Update Assignment Data
464 */
465 $(document).on( 'click', '.update_assignment_modal_btn', function( event ){
466 event.preventDefault();
467
468 var $that = $(this);
469 var content;
470 var inputid = 'tutor_assignments_modal_editor';
471 var editor = tinyMCE.get(inputid);
472 if (editor) {
473 content = editor.getContent();
474 } else {
475 content = $('#'+inputid).val();
476 }
477
478 var form_data = $(this).closest('form').serializeObject();
479 form_data.assignment_content = content;
480
481 $.ajax({
482 url : ajaxurl,
483 type : 'POST',
484 data : form_data,
485 beforeSend: function () {
486 $that.addClass('tutor-updating-message');
487 },
488 success: function (data) {
489 if (data.success){
490 $('#tutor-course-content-wrap').html(data.data.course_contents);
491 enable_sorting_topic_lesson();
492
493 //Close the modal
494 $('.tutor-lesson-modal-wrap').removeClass('show');
495 }
496 },
497 complete: function () {
498 $that.removeClass('tutor-updating-message');
499 }
500 });
501 });
502
503 /**
504 * Add Assignment
505 */
506 $(document).on( 'click', '.add-assignment-attachments', function( event ){
507 event.preventDefault();
508
509 var $that = $(this);
510 var frame;
511 // If the media frame already exists, reopen it.
512 if ( frame ) {
513 frame.open();
514 return;
515 }
516
517 // Create a new media frame
518 frame = wp.media({
519 title: 'Select or Upload Media Of Your Chosen Persuasion',
520 button: {
521 text: 'Use this media'
522 },
523 multiple: false // Set to true to allow multiple files to be selected
524 });
525
526 // When an image is selected in the media frame...
527 frame.on( 'select', function() {
528 // Get media attachment details from the frame state
529 var attachment = frame.state().get('selection').first().toJSON();
530
531 var field_markup = '<div class="tutor-individual-attachment-file"><p class="attachment-file-name">'+attachment.filename+'</p><input type="hidden" name="tutor_assignment_attachments[]" value="'+attachment.id+'"><a href="javascript:;" class="remove-assignment-attachment-a text-muted"> &times; Remove</a></div>';
532
533 $('#assignment-attached-file').append(field_markup);
534 $that.closest('.video_source_wrap_html5').find('input').val(attachment.id);
535 });
536 // Finally, open the modal on click
537 frame.open();
538 });
539
540 $(document).on( 'click', '.remove-assignment-attachment-a', function( event ){
541 event.preventDefault();
542 $(this).closest('.tutor-individual-attachment-file').remove();
543 });
544
545 /**
546 * Used for backend profile photo upload.
547 */
548
549 //tutor_video_poster_upload_btn
550 $(document).on( 'click', '.tutor_video_poster_upload_btn', function( event ){
551 event.preventDefault();
552
553 var $that = $(this);
554 var frame;
555 // If the media frame already exists, reopen it.
556 if ( frame ) {
557 frame.open();
558 return;
559 }
560
561 // Create a new media frame
562 frame = wp.media({
563 title: 'Select or Upload Media Of Your Chosen Persuasion',
564 button: {
565 text: 'Use this media'
566 },
567 multiple: false // Set to true to allow multiple files to be selected
568 });
569
570 // When an image is selected in the media frame...
571 frame.on( 'select', function() {
572 // Get media attachment details from the frame state
573 var attachment = frame.state().get('selection').first().toJSON();
574 $that.closest('.tutor-video-poster-wrap').find('.video-poster-img').html('<img src="'+attachment.url+'" alt="" />');
575 $that.closest('.tutor-video-poster-wrap').find('input').val(attachment.id);
576 });
577 // Finally, open the modal on click
578 frame.open();
579 });
580
581
582 /**
583 * Tutor Memberships toggle in Paid Membership Pro panel
584 * @since v.1.3.6
585 */
586
587 $(document).on( 'change', '#tutor_pmpro_membership_model_select', function( e ){
588 e.preventDefault();
589
590 var $that = $(this);
591
592 if ($that.val() === 'category_wise_membership'){
593 $('.membership_course_categories').show();
594 } else{
595 $('.membership_course_categories').hide();
596 }
597 });
598
599 $(document).on( 'change', '#tutor_pmpro_membership_model_select', function( e ){
600 e.preventDefault();
601
602 var $that = $(this);
603
604 if ($that.val() === 'category_wise_membership'){
605 $('.membership_course_categories').show();
606 } else{
607 $('.membership_course_categories').hide();
608 }
609 });
610
611 /**
612 * Find user/student from select2
613 * @since v.1.4.0
614 */
615
616 $('#select2_search_user_ajax').select2({
617 allowClear: true,
618 placeholder: "Search students",
619 minimumInputLength: '1',
620 escapeMarkup: function( m ) {
621 return m;
622 },
623 ajax: {
624 url : ajaxurl,
625 type : 'POST',
626 dataType: 'json',
627 delay: 1000,
628 data: function( params ) {
629 return {
630 term: params.term,
631 action: 'tutor_json_search_students'
632 };
633 },
634 processResults: function( data ) {
635 var terms = [];
636 if ( data ) {
637 $.each( data, function( id, text ) {
638 terms.push({
639 id: id,
640 text: text
641 });
642 });
643 }
644 return {
645 results: terms
646 };
647
648 },
649 cache: true
650 }
651 });
652
653 /**
654 * Confirm Alert for deleting enrollments data
655 *
656 * @since v.1.4.0
657 */
658 $(document).on( 'click', 'table.enrolments .delete a', function( e ){
659 if (! confirm(tutor_data.delete_confirm_text)) {
660 e.preventDefault();
661 }
662 });
663
664
665 /**
666 * Show hide is course public checkbox (backend dashboard editor)
667 *
668 * @since v.1.7.2
669 */
670 var price_type = $('#tutor-attach-product [name="tutor_course_price_type"]');
671 if(price_type.length==0){
672 $('#_tutor_is_course_public_meta_checkbox').show();
673 }
674 else{
675 price_type.change(function(){
676 if($(this).prop('checked')){
677 var method = $(this).val()=='paid' ? 'hide' : 'show';
678 $('#_tutor_is_course_public_meta_checkbox')[method]();
679 }
680 }).trigger('change');
681 }
682
683
684 /**
685 * Focus selected instructor layout in setting page
686 *
687 * @since v.1.7.5
688 */
689 $(document).on('click', '.instructor-layout-template', function(){
690 $('.instructor-layout-template').removeClass('selected-template');
691 $(this).addClass('selected-template');
692 });
693
694
695
696 /**
697 * Programmatically open preview link. For some reason it's not working normally.
698 *
699 * @since v.1.7.9
700 */
701 $('#preview-action a.preview').click(function(e) {
702 var href = $(this).attr('href');
703
704 if(href) {
705 e.preventDefault();
706 window.open(href, '_blank');
707 }
708 });
709
710
711
712 });
713
714