PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.5.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.5.3
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
visualizer / js / frame.js

frame.js in Visualizer – Tables & Charts Manager with Built-in AI Generator 1.5.3, at js/frame.js

125 lines 4.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function($) {
2 $(document).ready(function() {
3 $('.type-radio').change(function() {
4 $('.type-label-selected').removeClass('type-label-selected');
5 $(this).parent().addClass('type-label-selected');
6 });
7
8 $('.group-title').click(function() {
9 var parent = $(this).parent();
10
11 if (parent.hasClass('open')) {
12 parent.removeClass('open');
13 } else {
14 $('.group.open').removeClass('open');
15 parent.addClass('open');
16 }
17 });
18
19 $('#remote-file').click(function() {
20 var url = $.trim(prompt(visualizer.l10n.remotecsv_prompt));
21
22 if (url != '') {
23 if (/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(url)) {
24 if (url.substr(url.length - 8) == '/pubhtml') {
25 url = url.substring(0, url.length - 8) + '/export?format=csv';
26 }
27
28 $('#remote-data').val(url);
29 $('#csv-file').val('');
30 $('#canvas').lock();
31 $('#csv-form').submit();
32 } else {
33 alert(visualizer.l10n.invalid_source);
34 }
35 }
36 });
37
38 $('#csv-file').change(function() {
39 if ($.trim($(this).val()) != '') {
40 $('#remote-data').val('');
41 $('#canvas').lock();
42 $('#csv-form').submit();
43 }
44 });
45
46 $('#thehole').load(function() {
47 $('#canvas').unlock();
48 });
49
50 $('.section-title').click(function() {
51 $(this).toggleClass('open').parent().find('.section-items').toggle();
52 });
53
54 $('.more-info').click(function() {
55 $(this).parent().find('.section-description:first').toggle();
56 return false;
57 });
58 });
59 })(jQuery);
60
61 (function($) {
62 $.fn.lock = function() {
63 $(this).each(function() {
64 var $this = $(this);
65 var position = $this.css('position');
66
67 if (!position) {
68 position = 'static';
69 }
70
71 switch(position) {
72 case 'absolute':
73 case 'relative':
74 break;
75 default:
76 $this.css('position', 'relative');
77 break;
78 }
79 $this.data('position', position);
80
81 var width = $this.width(),
82 height = $this.height();
83
84 var locker = $('<div class="locker"></div>');
85 locker.width(width).height(height);
86
87 var loader = $('<div class="locker-loader"></div>');
88 loader.width(width).height(height);
89
90 locker.append(loader);
91 $this.append(locker);
92 $(window).resize(function() {
93 $this.find('.locker,.locker-loader').width($this.width()).height($this.height());
94 });
95 });
96
97 return $(this);
98 }
99
100 $.fn.unlock = function() {
101 $(this).each(function() {
102 $(this).find('.locker').remove();
103 $(this).css('position', $(this).data('position'));
104 });
105
106 return $(this);
107 }
108 })(jQuery);
109
110 //Hide / show settings in sidebar
111 (function($) {
112 $(document).ready(function() {
113
114 $('.advanced-settings-btn').click(function(){
115 $('.second-screen, .return-settings-btn').removeClass("hidden-setting");
116 $('.initial-screen').addClass("hidden-setting");
117 });
118
119 $('.return-settings-btn').click(function(){
120 $('.second-screen, .return-settings-btn').addClass("hidden-setting");
121 $('.initial-screen').removeClass("hidden-setting");
122 });
123 });
124 })(jQuery);
125