| @@ -5,9 +5,8 @@ | ||
| 5 | 5 | */ |
| 6 | 6 | jQuery( function ( $ ) { |
| 7 | 7 | |
| 8 | 8 | $( document.body ) |
| 9 | - | |
| 10 | 9 | .on( 'init_tooltips', function() { |
| 11 | 10 | activateTipTip(); |
| 12 | 11 | }); |
| 13 | 12 | |
| @@ -13,8 +12,21 @@ | ||
| 13 | 12 | |
| 14 | 13 | // Tooltips |
| 15 | 14 | $( document.body ).trigger( 'init_tooltips' ); |
| 16 | 15 | |
| 16 | + $( '#ph_dismiss_notice_retired_template_assistant' ).click(function(e) | |
| 17 | + { | |
| 18 | + e.preventDefault(); | |
| 19 | + | |
| 20 | + var data = { | |
| 21 | + 'action': 'propertyhive_dismiss_notice_retired_template_assistant' | |
| 22 | + }; | |
| 23 | + | |
| 24 | + $.post( ajaxurl, data, function(response) { | |
| 25 | + $( '#ph_notice_retired_template_assistant' ).fadeOut(); | |
| 26 | + }); | |
| 27 | + }); | |
| 28 | + | |
| 17 | 29 | $( '#ph_dismiss_notice_leave_review' ).click(function(e) |
| 18 | 30 | { |
| 19 | 31 | e.preventDefault(); |
| 20 | 32 | |
| @@ -26,8 +38,34 @@ | ||
| 26 | 38 | $( '#ph_notice_leave_review' ).fadeOut(); |
| 27 | 39 | }); |
| 28 | 40 | }); |
| 29 | 41 | |
| 42 | + $( '#ph_dismiss_notice_epl' ).click(function(e) | |
| 43 | + { | |
| 44 | + e.preventDefault(); | |
| 45 | + | |
| 46 | + var data = { | |
| 47 | + 'action': 'propertyhive_dismiss_notice_epl' | |
| 48 | + }; | |
| 49 | + | |
| 50 | + $.post( ajaxurl, data, function(response) { | |
| 51 | + $( '#ph_notice_epl' ).fadeOut(); | |
| 52 | + }); | |
| 53 | + }); | |
| 54 | + | |
| 55 | + $( '#ph_dismiss_notice_demo_data' ).click(function(e) | |
| 56 | + { | |
| 57 | + e.preventDefault(); | |
| 58 | + | |
| 59 | + var data = { | |
| 60 | + 'action': 'propertyhive_dismiss_notice_demo_data' | |
| 61 | + }; | |
| 62 | + | |
| 63 | + $.post( ajaxurl, data, function(response) { | |
| 64 | + $( '#ph_notice_demo_data' ).fadeOut(); | |
| 65 | + }); | |
| 66 | + }); | |
| 67 | + | |
| 30 | 68 | $( '#ph_dismiss_notice_missing_search_results' ).click(function(e) |
| 31 | 69 | { |
| 32 | 70 | e.preventDefault(); |
| 33 | 71 | |
| @@ -64,8 +102,57 @@ | ||
| 64 | 102 | $.post( ajaxurl, data, function(response) { |
| 65 | 103 | $( '#ph_notice_invalid_expired_license_key' ).fadeOut(); |
| 66 | 104 | }); |
| 67 | 105 | }); |
| 106 | + | |
| 107 | + $( '#ph_dismiss_notice_email_cron_not_running' ).click(function(e) | |
| 108 | + { | |
| 109 | + e.preventDefault(); | |
| 110 | + | |
| 111 | + var data = { | |
| 112 | + 'action': 'propertyhive_dismiss_notice_email_cron_not_running' | |
| 113 | + }; | |
| 114 | + | |
| 115 | + $.post( ajaxurl, data, function(response) { | |
| 116 | + $( '#ph_notice_email_cron_not_running' ).fadeOut(); | |
| 117 | + }); | |
| 118 | + }); | |
| 119 | + | |
| 120 | + if ( propertyhive_admin.ajax_actions && propertyhive_admin.ajax_actions.length > 0 ) | |
| 121 | + { | |
| 122 | + for ( var i in propertyhive_admin.ajax_actions ) | |
| 123 | + { | |
| 124 | + var ajax_action = propertyhive_admin.ajax_actions[i].split('^'); | |
| 125 | + | |
| 126 | + jQuery('#' + ajax_action[0].replace('get_', 'propertyhive_')).html('Loading...'); | |
| 127 | + | |
| 128 | + if ( ajax_action[2] ) // callback | |
| 129 | + { | |
| 130 | + eval(ajax_action[2]); | |
| 131 | + } | |
| 132 | + else | |
| 133 | + { | |
| 134 | + var data = { | |
| 135 | + action: 'propertyhive_' + ajax_action[0], | |
| 136 | + post_id: propertyhive_admin.post_id, | |
| 137 | + security: ajax_action[1] | |
| 138 | + } | |
| 139 | + | |
| 140 | + jQuery.ajax({ | |
| 141 | + type: "POST", | |
| 142 | + url: ajaxurl, | |
| 143 | + data: data, | |
| 144 | + target_div: '#' + ajax_action[0].replace('get_', 'propertyhive_'), | |
| 145 | + success: function(response) | |
| 146 | + { | |
| 147 | + jQuery(this.target_div).html(response); | |
| 148 | + activateTipTip(); | |
| 149 | + }, | |
| 150 | + dataType: 'html' | |
| 151 | + }); | |
| 152 | + } | |
| 153 | + } | |
| 154 | + } | |
| 68 | 155 | }); |
| 69 | 156 | |
| 70 | 157 | function activateTipTip() { |
| 71 | 158 | var tiptip_args = { |