| @@ -28,48 +28,8 @@ | ||
| 28 | 28 | jQuery("#rownum_" + rownum + " td div").addClass("row-actions"); |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | -function wpda_list_table_favourite( schema_name, table_name ) { | |
| 33 | - if (jQuery('#span_favourites_'+ table_name).hasClass('dashicons-star-empty')) { | |
| 34 | - action = 'wpda_add_favourite'; | |
| 35 | - } else { | |
| 36 | - action = 'wpda_rem_favourite'; | |
| 37 | - } | |
| 38 | - url = location.pathname + '?action=' + action; | |
| 39 | - jQuery.ajax({ | |
| 40 | - method: 'POST', | |
| 41 | - url: url, | |
| 42 | - data: { | |
| 43 | - wpdaschema_name: schema_name, | |
| 44 | - table_name: table_name | |
| 45 | - } | |
| 46 | - }).done( | |
| 47 | - function (msg) { | |
| 48 | - if (msg === '1') { | |
| 49 | - if (jQuery('#span_favourites_' + table_name).hasClass('dashicons-star-empty')) { | |
| 50 | - jQuery('#span_favourites_' + table_name) | |
| 51 | - .removeClass('dashicons-star-empty') | |
| 52 | - .addClass('dashicons-star-filled') | |
| 53 | - .prop('title', 'Remove from favourites'); | |
| 54 | - } else { | |
| 55 | - jQuery('#span_favourites_' + table_name) | |
| 56 | - .removeClass('dashicons-star-filled') | |
| 57 | - .addClass('dashicons-star-empty') | |
| 58 | - .prop('title', 'Add to favourites'); | |
| 59 | - } | |
| 60 | - if (jQuery('#wpda_main_favourites_list').val()!=='') { | |
| 61 | - jQuery("#wpda_main_form :input[name='action']").val('-1'); | |
| 62 | - jQuery("#wpda_main_form :input[name='action2']").val('-1'); | |
| 63 | - jQuery('#wpda_main_form').submit(); | |
| 64 | - } | |
| 65 | - } else { | |
| 66 | - alert('Adding to favourites failed!'); | |
| 67 | - } | |
| 68 | - } | |
| 69 | - ); | |
| 70 | -} | |
| 71 | - | |
| 72 | 32 | function wpda_main_export_start() { |
| 73 | 33 | jQuery("#wpda_main_export_form").submit(); |
| 74 | 34 | jQuery("#wpda_row_export_anchor").empty(); |
| 75 | 35 | |