Changeset 1822814
- Timestamp:
- 02/15/2018 02:35:11 PM (8 years ago)
- Location:
- insert-post-ads
- Files:
-
- 8 edited
-
tags/1.3.1/css/admin.css (modified) (2 diffs)
-
tags/1.3.1/includes/inpostads.php (modified) (1 diff)
-
tags/1.3.1/js/admin.js (modified) (12 diffs)
-
tags/1.3.1/readme.txt (modified) (1 diff)
-
trunk/css/admin.css (modified) (2 diffs)
-
trunk/includes/inpostads.php (modified) (1 diff)
-
trunk/js/admin.js (modified) (12 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
insert-post-ads/tags/1.3.1/css/admin.css
r1811853 r1822814 104 104 width: calc(100% - 40px) !important; 105 105 } 106 .postbox.vi-choose .insert_ads_popup_content_wrapper div p:nth-child(3), .postbox.vi-choose .insert_ads_popup_content_wrapper h3 , .postbox.vi-choose .insert_ads_popup_content_wrapper{106 .postbox.vi-choose .insert_ads_popup_content_wrapper div p:nth-child(3), .postbox.vi-choose .insert_ads_popup_content_wrapper h3{ 107 107 display:none; 108 108 } … … 327 327 max-width: 550px; 328 328 } 329 } 329 }.insert_ads_popup_content_wrapper + .insert_ads_popup_content_wrapper{ 330 display:none; 331 } -
insert-post-ads/tags/1.3.1/includes/inpostads.php
r1811853 r1822814 357 357 } 358 358 update_option('insert_ads_inpostads', $inpostAds); 359 360 echo $inpostAds['above']['status']; 359 361 } 360 362 /* End Shared UI Functions */ -
insert-post-ads/tags/1.3.1/js/admin.js
r1811853 r1822814 670 670 } 671 671 jQuery(document).on('click', '#insert_ads_vi_signup2', function(){ 672 console.log(location.search);672 //console.log(location.search); 673 673 if(location.search == '?post_type=insertpostads&page=insert-post-ads'){ 674 674 jQuery('#insert_ads_vi_signup').trigger('click'); … … 679 679 function insert_ads_click_handler(target, title, width, height, openAction, UpdateAction, closeAction) { 680 680 jQuery('#'+target).click(function() { 681 console.log(jQuery('#insert_ads_nonce').val(), jQuery('#insert_ads_admin_ajax').val());682 console.log(target);681 //console.log(jQuery('#insert_ads_nonce').val(), jQuery('#insert_ads_admin_ajax').val()); 682 //console.log(target); 683 683 jQuery('<div id="'+target+'_dialog"></div>').html('<div class="insert_ads_ajaxloader"></div>').dialog({ 684 684 'modal': true, … … 840 840 if(response.indexOf('###SUCCESS###') !== -1) { 841 841 //jQuery('.wrap #poststuff').before(response.replace('###SUCCESS###', '')); 842 console.log('succ');842 //console.log('succ'); 843 843 location.reload(); 844 844 } else if(response.indexOf('###FAIL###') !== -1) { 845 845 jQuery('.wrap #poststuff').before(response.replace('###FAIL###', '')); 846 console.log('fail')846 //console.log('fail') 847 847 //setTimeout(function(){location.reload()}, 2000); 848 848 } else { … … 1163 1163 }) 1164 1164 1165 function showInp(){1165 /*function showInp(){ 1166 1166 var loadSel = jQuery('input[name="cur-pos-rad"]:checked').val(); 1167 1167 if(loadSel == 'above'){ … … 1174 1174 jQuery('.vi-choose .insert_ads_popup_content_wrapper').hide(); 1175 1175 } 1176 } 1176 }*/ 1177 1177 function notifyInp(){ 1178 1178 jQuery('.funcnot').each(function(){ … … 1187 1187 } 1188 1188 notifyInp(); 1189 showInp();1189 //showInp(); 1190 1190 jQuery('#cur-pos-sel input').on('click', function(){ 1191 showInp();1192 console.log(jQuery('input[name="cur-pos-rad"]:checked').val());1191 //showInp(); 1192 //console.log(jQuery('input[name="cur-pos-rad"]:checked').val()); 1193 1193 }) 1194 1194 jQuery('.postbox.vi-choose .ipcheckbox').on('click', function(){ … … 1211 1211 ); 1212 1212 }); 1213 1214 jQuery('#insert_ads_inpostads_above_status + div').click(function(){ 1215 if(jQuery('#insert_ads_inpostads_above_status').is(':checked')){ 1216 //console.log('true'); 1217 } else { 1218 //console.log('false') 1219 } 1220 }) 1213 1221 jQuery('body').on('click', '#set-update', function(){ 1214 console.log('fdsfs'); 1222 jQuery.post( 1223 jQuery('#insert_ads_admin_ajax').val(), { 1224 'action':'insert_ads_inpostads_above_form_save_action', 1225 'insert_ads_nonce': jQuery('#insert_ads_nonce').val(), 1226 'insert_ads_inpostads_above_status':'false', 1227 'insert_ads_inpostads_above_primary_ad_code_type':'vicode' 1228 }) 1229 jQuery.post( 1230 jQuery('#insert_ads_admin_ajax').val(), { 1231 'action':'insert_ads_inpostads_middle_form_save_action', 1232 'insert_ads_nonce': jQuery('#insert_ads_nonce').val(), 1233 'insert_ads_inpostads_middle_status':'false', 1234 'insert_ads_inpostads_middle_primary_ad_code_type':'vicode' 1235 }) 1236 //console.log('fdsfs'); 1215 1237 var insert_ads_vi_code_settings_ad_unit_type = jQuery('#insert_ads_vi_code_settings_ad_unit_type').val(); 1216 1238 var insert_ads_vi_code_settings_keywords = jQuery('#insert_ads_vi_code_settings_keywords').val(); … … 1226 1248 var insert_ads_vi_code_settings_optional_3 = jQuery('#insert_ads_vi_code_settings_optional_3').val(); 1227 1249 var curLoc = jQuery('input[name="cur-pos-rad"]:checked').val(); 1228 var curStat = jQuery('#insert_ads_inpostads_'+curLoc+'_status').is(':checked') ? true : false; 1250 var disLoc = jQuery('input[name="cur-pos-rad"]').not(':checked').val(); 1251 var curStat = jQuery('#insert_ads_inpostads_above_status').is(':checked') ? true : false; 1229 1252 jQuery('.ui-dialog-content').html('<div class="insert_ads_ajaxloader"></div>'); 1230 1253 jQuery('.insert_ads_ajaxloader').show(); … … 1251 1274 jQuery('#poststuff').before(successText); 1252 1275 jQuery(document).find('#sucessText').delay('2000').fadeOut('1000'); 1253 console.log('othe');1276 //console.log(curLoc, disLoc); 1254 1277 var ajData= {}, 1255 1278 ajAction = 'action', … … 1267 1290 jQuery.post( 1268 1291 jQuery('#insert_ads_admin_ajax').val(), ajData, function(response){ 1269 console.log('saved');1292 //console.log('saved'); 1270 1293 var sucdial = jQuery('<div id="sucdial">Succesfully updated!</div>').hide().fadeIn('1000'); 1271 1294 if(jQuery('#sucdial').length){ … … 1300 1323 var dataForm = jQuery(this).parents('form').serializeArray(); 1301 1324 dataForm.push({name: 'submit', value: 'Save Settings'}); 1302 console.log(dataForm);1325 //console.log(dataForm); 1303 1326 jQuery.ajax({ 1304 1327 url : 'edit.php?post_type=insertpostads&page=insert-post-ads', … … 1316 1339 }) 1317 1340 }) 1341 1342 var statAbove = jQuery('#insert_ads_inpostads_above_status').attr('checked'); 1343 var statMiddle = jQuery('#insert_ads_inpostads_middle_status').attr('checked'); 1344 console.log(statAbove, statMiddle); 1345 1346 if(statMiddle === 'checked'){ 1347 jQuery('#insert_ads_inpostads_above_status').attr('checked', true); 1348 jQuery('#insert_ads_inpostads_above_status + div').addClass('checked'); 1349 jQuery('#cur-pos-above').attr('checked', false); 1350 jQuery('#cur-pos-middle').attr('checked', true); 1351 } 1318 1352 }); -
insert-post-ads/tags/1.3.1/readme.txt
r1811853 r1822814 3 3 Tags: ad injection, ads, ads plugin, adsense, adsense injection, google adsense, insert ads in post, insert post ads, wordpress ads plugin, advertising plugin, banners plugin, post ads 4 4 Requires at least: 3.6 5 Tested up to: 4.9. 25 Tested up to: 4.9.4 6 6 Stable tag: 1.3.1 7 7 License: GPLv2 or later -
insert-post-ads/trunk/css/admin.css
r1808480 r1822814 104 104 width: calc(100% - 40px) !important; 105 105 } 106 .postbox.vi-choose .insert_ads_popup_content_wrapper div p:nth-child(3), .postbox.vi-choose .insert_ads_popup_content_wrapper h3 , .postbox.vi-choose .insert_ads_popup_content_wrapper{106 .postbox.vi-choose .insert_ads_popup_content_wrapper div p:nth-child(3), .postbox.vi-choose .insert_ads_popup_content_wrapper h3{ 107 107 display:none; 108 108 } … … 327 327 max-width: 550px; 328 328 } 329 } 329 }.insert_ads_popup_content_wrapper + .insert_ads_popup_content_wrapper{ 330 display:none; 331 } -
insert-post-ads/trunk/includes/inpostads.php
r1811131 r1822814 357 357 } 358 358 update_option('insert_ads_inpostads', $inpostAds); 359 360 echo $inpostAds['above']['status']; 359 361 } 360 362 /* End Shared UI Functions */ -
insert-post-ads/trunk/js/admin.js
r1811131 r1822814 670 670 } 671 671 jQuery(document).on('click', '#insert_ads_vi_signup2', function(){ 672 console.log(location.search);672 //console.log(location.search); 673 673 if(location.search == '?post_type=insertpostads&page=insert-post-ads'){ 674 674 jQuery('#insert_ads_vi_signup').trigger('click'); … … 679 679 function insert_ads_click_handler(target, title, width, height, openAction, UpdateAction, closeAction) { 680 680 jQuery('#'+target).click(function() { 681 console.log(jQuery('#insert_ads_nonce').val(), jQuery('#insert_ads_admin_ajax').val());682 console.log(target);681 //console.log(jQuery('#insert_ads_nonce').val(), jQuery('#insert_ads_admin_ajax').val()); 682 //console.log(target); 683 683 jQuery('<div id="'+target+'_dialog"></div>').html('<div class="insert_ads_ajaxloader"></div>').dialog({ 684 684 'modal': true, … … 840 840 if(response.indexOf('###SUCCESS###') !== -1) { 841 841 //jQuery('.wrap #poststuff').before(response.replace('###SUCCESS###', '')); 842 console.log('succ');842 //console.log('succ'); 843 843 location.reload(); 844 844 } else if(response.indexOf('###FAIL###') !== -1) { 845 845 jQuery('.wrap #poststuff').before(response.replace('###FAIL###', '')); 846 console.log('fail')846 //console.log('fail') 847 847 //setTimeout(function(){location.reload()}, 2000); 848 848 } else { … … 1163 1163 }) 1164 1164 1165 function showInp(){1165 /*function showInp(){ 1166 1166 var loadSel = jQuery('input[name="cur-pos-rad"]:checked').val(); 1167 1167 if(loadSel == 'above'){ … … 1174 1174 jQuery('.vi-choose .insert_ads_popup_content_wrapper').hide(); 1175 1175 } 1176 } 1176 }*/ 1177 1177 function notifyInp(){ 1178 1178 jQuery('.funcnot').each(function(){ … … 1187 1187 } 1188 1188 notifyInp(); 1189 showInp();1189 //showInp(); 1190 1190 jQuery('#cur-pos-sel input').on('click', function(){ 1191 showInp();1192 console.log(jQuery('input[name="cur-pos-rad"]:checked').val());1191 //showInp(); 1192 //console.log(jQuery('input[name="cur-pos-rad"]:checked').val()); 1193 1193 }) 1194 1194 jQuery('.postbox.vi-choose .ipcheckbox').on('click', function(){ … … 1211 1211 ); 1212 1212 }); 1213 1214 jQuery('#insert_ads_inpostads_above_status + div').click(function(){ 1215 if(jQuery('#insert_ads_inpostads_above_status').is(':checked')){ 1216 //console.log('true'); 1217 } else { 1218 //console.log('false') 1219 } 1220 }) 1213 1221 jQuery('body').on('click', '#set-update', function(){ 1214 console.log('fdsfs'); 1222 jQuery.post( 1223 jQuery('#insert_ads_admin_ajax').val(), { 1224 'action':'insert_ads_inpostads_above_form_save_action', 1225 'insert_ads_nonce': jQuery('#insert_ads_nonce').val(), 1226 'insert_ads_inpostads_above_status':'false', 1227 'insert_ads_inpostads_above_primary_ad_code_type':'vicode' 1228 }) 1229 jQuery.post( 1230 jQuery('#insert_ads_admin_ajax').val(), { 1231 'action':'insert_ads_inpostads_middle_form_save_action', 1232 'insert_ads_nonce': jQuery('#insert_ads_nonce').val(), 1233 'insert_ads_inpostads_middle_status':'false', 1234 'insert_ads_inpostads_middle_primary_ad_code_type':'vicode' 1235 }) 1236 //console.log('fdsfs'); 1215 1237 var insert_ads_vi_code_settings_ad_unit_type = jQuery('#insert_ads_vi_code_settings_ad_unit_type').val(); 1216 1238 var insert_ads_vi_code_settings_keywords = jQuery('#insert_ads_vi_code_settings_keywords').val(); … … 1226 1248 var insert_ads_vi_code_settings_optional_3 = jQuery('#insert_ads_vi_code_settings_optional_3').val(); 1227 1249 var curLoc = jQuery('input[name="cur-pos-rad"]:checked').val(); 1228 var curStat = jQuery('#insert_ads_inpostads_'+curLoc+'_status').is(':checked') ? true : false; 1250 var disLoc = jQuery('input[name="cur-pos-rad"]').not(':checked').val(); 1251 var curStat = jQuery('#insert_ads_inpostads_above_status').is(':checked') ? true : false; 1229 1252 jQuery('.ui-dialog-content').html('<div class="insert_ads_ajaxloader"></div>'); 1230 1253 jQuery('.insert_ads_ajaxloader').show(); … … 1251 1274 jQuery('#poststuff').before(successText); 1252 1275 jQuery(document).find('#sucessText').delay('2000').fadeOut('1000'); 1253 console.log('othe');1276 //console.log(curLoc, disLoc); 1254 1277 var ajData= {}, 1255 1278 ajAction = 'action', … … 1267 1290 jQuery.post( 1268 1291 jQuery('#insert_ads_admin_ajax').val(), ajData, function(response){ 1269 console.log('saved');1292 //console.log('saved'); 1270 1293 var sucdial = jQuery('<div id="sucdial">Succesfully updated!</div>').hide().fadeIn('1000'); 1271 1294 if(jQuery('#sucdial').length){ … … 1300 1323 var dataForm = jQuery(this).parents('form').serializeArray(); 1301 1324 dataForm.push({name: 'submit', value: 'Save Settings'}); 1302 console.log(dataForm);1325 //console.log(dataForm); 1303 1326 jQuery.ajax({ 1304 1327 url : 'edit.php?post_type=insertpostads&page=insert-post-ads', … … 1316 1339 }) 1317 1340 }) 1341 1342 var statAbove = jQuery('#insert_ads_inpostads_above_status').attr('checked'); 1343 var statMiddle = jQuery('#insert_ads_inpostads_middle_status').attr('checked'); 1344 console.log(statAbove, statMiddle); 1345 1346 if(statMiddle === 'checked'){ 1347 jQuery('#insert_ads_inpostads_above_status').attr('checked', true); 1348 jQuery('#insert_ads_inpostads_above_status + div').addClass('checked'); 1349 jQuery('#cur-pos-above').attr('checked', false); 1350 jQuery('#cur-pos-middle').attr('checked', true); 1351 } 1318 1352 }); -
insert-post-ads/trunk/readme.txt
r1811853 r1822814 3 3 Tags: ad injection, ads, ads plugin, adsense, adsense injection, google adsense, insert ads in post, insert post ads, wordpress ads plugin, advertising plugin, banners plugin, post ads 4 4 Requires at least: 3.6 5 Tested up to: 4.9. 25 Tested up to: 4.9.4 6 6 Stable tag: 1.3.1 7 7 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.