PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | js/library.js +6 -55 3.10.103.4.2 View file →
@@ -22,13 +22,9 @@
22 22 self.createIframeStates();
23 23 },
24 24
25 25 open: function () {
26 - try{
27 - wpmv.MediaFrame.prototype.open.apply(this, arguments);
28 - }catch(error){
29 - alert(visualizer.i10n.conflict);
30 - }
26 + wpmv.MediaFrame.prototype.open.apply(this, arguments);
31 27 this.$el.addClass('hide-menu');
32 28 }
33 29 });
34 30 })(wp.media.view);
@@ -41,17 +37,9 @@
41 37 var width = $('#visualizer-library').width(),
42 38 margin = width * 0.02;
43 39
44 40 width *= 0.305;
45 - $(this).prev( '.visualizer-chart-title' ).width(width - 14);
46 - var ChartHeight = width * 0.93;
47 - if ( $( '.visualizer-nochart-canvas' ).length === 0 ) {
48 - ChartHeight = width * 0.78;
49 - if ( $( '#visualizer-sidebar' ).hasClass('one-columns') ) {
50 - ChartHeight = width * 0.92;
51 - }
52 - }
53 - $(this).width(width).height( ChartHeight );
41 + $(this).width(width - 14).height(width * 0.75).parent().css('margin-right', margin + 'px').css('margin-bottom', margin + 'px');
54 42 });
55 43 };
56 44
57 45 $('.visualizer-chart-canvas').adjust();
@@ -56,27 +44,10 @@
56 44
57 45 $('.visualizer-chart-canvas').adjust();
58 46
59 47 $(document).ready(function () {
60 - // clears the filters in the library form and submits.
61 - $('#viz-lib-reset').on('click', function(e){
62 - e.preventDefault();
63 - $(this).parent('form')[0].reset();
64 - $(this).parent('form').find('.viz-filter').each(function(index, el){
65 - var tag = $(el).prop('tagName').toLowerCase() + (typeof $(el).attr('type') !== 'undefined' ? $(el).attr('type').toLowerCase() : '');
66 - switch(tag){
67 - case 'select':
68 - $(el).prop('selectedIndex', 0);
69 - break;
70 - case 'inputtext':
71 - $(el).val('');
72 - break;
73 - }
48 + $('.visualizer-chart, .visualizer-library-pagination').fadeIn(500);
74 49
75 - });
76 - $(this).parent('form').submit();
77 - });
78 -
79 50 $('.visualizer-chart-shortcode').click(function (e) {
80 51 var range, selection;
81 52
82 53 if (window.getSelection && document.createRange) {
@@ -91,22 +62,11 @@
91 62 range.select();
92 63 }
93 64 });
94 65
95 - $( '.visualizer-languages-list' ).on( 'click', '[data-lang_code]', function() {
96 - if ( $(this).find( 'i' ).hasClass( 'otgs-ico-add' ) ) {
97 - vu.create = vu.create + '&lang=' + $(this).data('lang_code') + '&parent_chart_id=' + $(this).data('chart');
98 - $('.add-new-chart').click();
99 - } else {
100 - vu.edit = vu.edit + '&lang=' + $(this).data('lang_code') + '&chart=' + $(this).data('chart');
101 - $('.visualizer-chart-edit').click();
102 - }
103 - } );
104 -
105 66 $('.add-new-chart').click(function () {
106 67 var wnd = window,
107 68 view = new vmv.Chart({action: vu.create});
108 - vu.create = vu.create.replace(/[\?&]lang=[^&]+/, '').replace(/[\?&]parent_chart_id=[^&]+/, '');
109 69
110 70 window.parent.addEventListener('message', function(event){
111 71 switch(event.data) {
112 72 case 'visualizer:mediaframe:close':
@@ -126,13 +86,10 @@
126 86 return false;
127 87 });
128 88
129 89 $('.visualizer-chart-edit').click(function () {
130 - var wnd = window;
131 - var view = new vmv.Chart( {
132 - action: vu.edit.indexOf('&chart') != -1 ? vu.edit : vu.edit + '&chart=' + $(this).attr('data-chart')
133 - } );
134 - vu.edit = vu.edit.replace(/[\?&]lang=[^&]+/, '');
90 + var wnd = window,
91 + view = new vmv.Chart({action: vu.edit + '&chart=' + $(this).attr('data-chart')});
135 92
136 93 wnd.send_to_editor = function () {
137 94 wnd.location.href = wnd.location.href.replace(/vaction/, '');
138 95 };
@@ -162,16 +119,11 @@
162 119 });
163 120 return false;
164 121 });
165 122
166 - $(".visualizer-chart-image").on("click", function () {
167 - $('body').trigger('visualizer:action:specificchart', {action: 'image', id: $(this).attr("data-chart"), data: null, dataObj: {name: $(this).attr("data-chart-title")}});
168 - return false;
169 - });
170 -
171 123 // if vaction=addnew is found as a GET request parameter, show the modal.
172 124 if(location.href.indexOf('vaction=addnew') !== -1){
173 - $('.add-new-chart').first().trigger('click');
125 + $('.add-new-chart').trigger('click');
174 126 }
175 127
176 128 $(window).resize(function () {
177 129 clearTimeout(resizeTimeout);
@@ -182,7 +134,6 @@
182 134
183 135 $('.visualizer-error i.error').on('click', function(){
184 136 alert( $(this).attr('data-viz-error') );
185 137 });
186 - $('.visualizer-chart:not(.visualizer-chart-display), .visualizer-library-pagination').fadeIn(500);
187 138 });
188 139 })(jQuery, visualizer.media.view, visualizer.urls);