PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.4
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.4
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 3.10.4 All 148 releases
visualizer / js / frame.js

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

104 lines 3.9 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 $('#remote-data').val(url);
25 $('#csv-file').val('');
26 $('#canvas').lock();
27 $('#csv-form').submit();
28 } else {
29 alert(visualizer.l10n.invalid_source);
30 }
31 }
32 });
33
34 $('#csv-file').change(function() {
35 if ($.trim($(this).val()) != '') {
36 $('#remote-data').val('');
37 $('#canvas').lock();
38 $('#csv-form').submit();
39 }
40 });
41
42 $('#thehole').load(function() {
43 $('#canvas').unlock();
44 });
45
46 $('.section-title').click(function() {
47 $(this).toggleClass('open').parent().find('.section-items').toggle();
48 });
49
50 $('.more-info').click(function() {
51 $(this).parent().find('.section-description:first').toggle();
52 return false;
53 });
54 });
55 })(jQuery);
56
57 (function($) {
58 $.fn.lock = function() {
59 $(this).each(function() {
60 var $this = $(this);
61 var position = $this.css('position');
62
63 if (!position) {
64 position = 'static';
65 }
66
67 switch(position) {
68 case 'absolute':
69 case 'relative':
70 break;
71 default:
72 $this.css('position', 'relative');
73 break;
74 }
75 $this.data('position', position);
76
77 var width = $this.width(),
78 height = $this.height();
79
80 var locker = $('<div class="locker"></div>');
81 locker.width(width).height(height);
82
83 var loader = $('<div class="locker-loader"></div>');
84 loader.width(width).height(height);
85
86 locker.append(loader);
87 $this.append(locker);
88 $(window).resize(function() {
89 $this.find('.locker,.locker-loader').width($this.width()).height($this.height());
90 });
91 });
92
93 return $(this);
94 }
95
96 $.fn.unlock = function() {
97 $(this).each(function() {
98 $(this).find('.locker').remove();
99 $(this).css('position', $(this).data('position'));
100 });
101
102 return $(this);
103 }
104 })(jQuery);