| @@ -1,6 +1,4 @@ | ||
| 1 | -/* global visualizer */ | |
| 2 | -/* global console */ | |
| 3 | 1 | (function($, v) { |
| 4 | 2 | var timeout; |
| 5 | 3 | |
| 6 | 4 | $(document).ready(function() { |
| @@ -20,17 +18,8 @@ | ||
| 20 | 18 | v.render(); |
| 21 | 19 | }, 1000); |
| 22 | 20 | } |
| 23 | 21 | |
| 24 | - function validateJSON() { | |
| 25 | - $('#visualizer-error-manual').remove(); | |
| 26 | - try{ | |
| 27 | - var options = JSON.parse($(this).val()); | |
| 28 | - }catch(error){ | |
| 29 | - $('<div class="visualizer-error" id="visualizer-error-manual">Invalid JSON: ' + error + '</div>').insertAfter($(this)); | |
| 30 | - } | |
| 31 | - } | |
| 32 | - | |
| 33 | 22 | $('.control-text').change(updateChart).keyup(updateChart); |
| 34 | 23 | $('.control-select, .control-checkbox').change(updateChart); |
| 35 | 24 | $('.color-picker-hex').wpColorPicker({ |
| 36 | 25 | change: updateChart, |
| @@ -35,10 +24,8 @@ | ||
| 35 | 24 | $('.color-picker-hex').wpColorPicker({ |
| 36 | 25 | change: updateChart, |
| 37 | 26 | clear: updateChart |
| 38 | 27 | }); |
| 39 | - $('textarea[name="manual"]').change(validateJSON).keyup(validateJSON); | |
| 40 | - | |
| 41 | 28 | }); |
| 42 | 29 | })(jQuery, visualizer); |
| 43 | 30 | |
| 44 | 31 | (function($) { |