| @@ -23,19 +23,8 @@ | ||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | function showTextEditor(button) { |
| 26 | 26 | if( button.attr( 'data-current' ) === 'chart'){ |
| 27 | - | |
| 28 | - $('body').off('visualizer:change:action').on('visualizer:change:action', function(e){ | |
| 29 | - button.val( button.attr( 'data-t-chart' ) ); | |
| 30 | - button.html( button.attr( 'data-t-chart' ) ); | |
| 31 | - button.attr( 'data-current', 'chart' ); | |
| 32 | - $('p.viz-editor-selection').show(); | |
| 33 | - $('.viz-text-editor').hide(); | |
| 34 | - $('.viz-simple-editor').hide(); | |
| 35 | - $( '#canvas' ).css('z-index', '1').show(); | |
| 36 | - }); | |
| 37 | - | |
| 38 | 27 | // showing the editor |
| 39 | 28 | button.val( button.attr( 'data-t-editor' ) ); |
| 40 | 29 | button.html( button.attr( 'data-t-editor' ) ); |
| 41 | 30 | button.attr( 'data-current', 'editor' ); |
| @@ -67,19 +56,8 @@ | ||
| 67 | 56 | } |
| 68 | 57 | |
| 69 | 58 | function showTableEditor(button) { |
| 70 | 59 | if( button.attr( 'data-current' ) === 'chart'){ |
| 71 | - | |
| 72 | - $('body').off('visualizer:change:action').on('visualizer:change:action', function(e){ | |
| 73 | - button.val( button.attr( 'data-t-chart' ) ); | |
| 74 | - button.html( button.attr( 'data-t-chart' ) ); | |
| 75 | - button.attr( 'data-current', 'chart' ); | |
| 76 | - $('p.viz-editor-selection').show(); | |
| 77 | - $('.viz-table-editor').hide(); | |
| 78 | - $('.viz-simple-editor').hide(); | |
| 79 | - $( '#canvas' ).css('z-index', '1').show(); | |
| 80 | - }); | |
| 81 | - | |
| 82 | 60 | // showing the editor |
| 83 | 61 | button.val( button.attr( 'data-t-editor' ) ); |
| 84 | 62 | button.html( button.attr( 'data-t-editor' ) ); |
| 85 | 63 | button.attr( 'data-current', 'editor' ); |