Changeset 660341
- Timestamp:
- 01/28/2013 09:47:04 PM (13 years ago)
- Location:
- abundatrade-plugin
- Files:
-
- 6 edited
- 1 copied
-
tags/1.7 (copied) (copied from abundatrade-plugin/trunk)
-
tags/1.7/abundatrade_pugin.php (modified) (3 diffs)
-
tags/1.7/js/remote.js (modified) (18 diffs)
-
tags/1.7/readme.txt (modified) (2 diffs)
-
trunk/abundatrade_pugin.php (modified) (3 diffs)
-
trunk/js/remote.js (modified) (18 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abundatrade-plugin/tags/1.7/abundatrade_pugin.php
r653215 r660341 2 2 /** 3 3 * @package abundatrade_plugin 4 * @version 1. 6.74 * @version 1.7 5 5 * @author Robert Landers (landers.robert@gmail.com) 6 6 */ … … 10 10 Description: Earn extra income for your site via the Abundatrade affiliate program! 11 11 Author: withinboredom 12 Version: 1. 6.712 Version: 1.7 13 13 Author URI: http://withinboredom.info 14 14 */ … … 165 165 </tfoot>--> 166 166 <tbody id="abundaCalcBody_process"> 167 <tr><td colspan="6" class="center"> </td></tr>167 <tr><td colspan="6" id="ready2go" class="center"> </td></tr> 168 168 </tbody> 169 169 <tbody > -
abundatrade-plugin/tags/1.7/js/remote.js
r653215 r660341 99 99 if (jQuery('#abundaGadgetInput').length > 0 && jQuery('#gadget_abundatrade').css('display') == 'block') { 100 100 // for gadget side 101 jQuery.prompt(gadgetstates); 101 102 } 102 103 else { … … 130 131 request.done(function(data) { 131 132 if (data.status) { 132 jQuery('#login_status_abundatrade').get(0).innerHTML = "Hello " + data.first_name + " " + data.last_name + " <em><a onclick=\"abundatrade_logout()\">logout</a></em>" + tour;133 jQuery('#login_status_abundatrade').get(0).innerHTML = "Hello " + data.first_name + " " + data.last_name + ", <em>view your <a href='http://abundatrade.com/trade/user/profile/' title='View your information, and edit past valuations!'>profile</a></em> <em>(<a onclick=\"abundatrade_logout()\">logout</a>)</em>" + tour; 133 134 if (data.first_name == 'Super Cow') 134 135 loggedIn = false; … … 230 231 * 231 232 */ 232 function display_totals(data) { 233 jQuery('#product_code').val(''); 233 function display_totals(data, no_reset) { 234 if (!no_reset) { 235 jQuery('#product_code').val(''); 236 } 234 237 jQuery('#item_count').html(data.total_qty); 235 238 jQuery('#total_item_count').html(data.total_qty); … … 254 257 // 255 258 jQuery('.delete_this_row').attr('onclick', 'delete_the_row(this); return false;'); 256 jQuery('#product_qty').val('1'); 257 jQuery('#product_code').focus(); 259 if (!no_reset) { 260 jQuery('#product_qty').val('1'); 261 jQuery('#product_code').focus(); 262 } 258 263 } 259 264 … … 336 341 337 342 if (data.on == 1 && data.total == 1) { 338 jQuery("#progress").get(0).innerHTML = "Processing complete -- building your email ";343 jQuery("#progress").get(0).innerHTML = "Processing complete -- building your email<br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 339 344 } 340 345 else if (data.on == 2 && data.total == 2) { … … 342 347 clearInterval(stop); 343 348 jQuery("#bar").css('width', percent + "%") 344 jQuery("#progress").get(0).innerHTML = "Processing complete -- sending your valuation to you ";349 jQuery("#progress").get(0).innerHTML = "Processing complete -- sending your valuation to you<br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 345 350 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "%"; 346 351 … … 358 363 jQuery("#bar").css('width', percent + "%") 359 364 jQuery("#progress").get(0).innerHTML = data.on + " of approx. " + data.total; 360 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "% ";365 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "% <br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 361 366 } 362 367 } … … 437 442 * 438 443 */ 439 function load_previous_session(pretty ) {444 function load_previous_session(pretty, ignore_errors) { 440 445 var request = jQuery.ajax( 441 446 { … … 467 472 } 468 473 469 display_totals(part );474 display_totals(part, ignore_errors); 470 475 } 471 476 //build_row(data); … … 476 481 477 482 request.fail(function (jqXHR, textStatus, errorThrown) { 478 report_error('load_previous_session', jqXHR); 483 if (!ignore_errors) { 484 report_error('load_previous_session', jqXHR); 485 } 479 486 }); 480 487 } … … 595 602 596 603 if (!loggedIn) { 597 return '<label for="user">Email Address:</label><br/><input type="text" id="abundatrade_user" name="abundatrade_user" value="" /><br/>'+ 604 return '<p>If you have an account, please login</p>' + 605 '<label for="user">Email Address:</label><br/><input type="text" id="abundatrade_user" name="abundatrade_user" value="" /><br/>' + 598 606 '<label for="password">Password:</label><br/><input type="password" name="abundatrade_password" id="abundatrade_password" value=""/><br/>'+ 599 607 '<div style="display:none" id="logging_on"><img src="'+abundacalc.url+'/images/spinner.gif">Logging in -- please wait</div><span id="login_error" class="abundatrade_error" style="display:none;">Invalid Password/Email</span><br/>'+ … … 717 725 } 718 726 727 /** Live Lookups */ 728 function check_for_new() { 729 var stop = setInterval(function () { 730 if (loggedIn) { 731 load_previous_session(false, true); 732 } 733 }, 2000); 734 } 735 719 736 /** Submit a list */ 720 737 function submit_modal(callback_to_submit, final_display, custom_message) { … … 1210 1227 jQuery('#abundaGadgetInput').submit(function () { addGadget(jQuery('#gadget_code').val(), jQuery('#header_condition').val()); }); 1211 1228 } 1229 1230 check_for_new(); 1212 1231 } 1213 1232 }); 1214 1233 1215 function transform_into_full_calc() { 1216 jQuery("#gadget_abundatrade").fadeOut(); 1217 jQuery("#bulk").slideUp(500); 1218 jQuery("#top_input_section").fadeIn(500); 1219 jQuery("#second_content").slideDown(500); 1220 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1221 jQuery("#bulk_button").slideDown(1000); 1222 jQuery("#very_bottom").slideDown(500); 1223 load_previous_session(false); 1234 function transform_into_full_calc(mode) { 1235 if (mode == 'gadget') { 1236 jQuery("#gadget_abundatrade").fadeIn(); 1237 jQuery("#bulk").slideUp(500); 1238 //jQuery("#top_input_section").fadeIn(500); 1239 jQuery("#second_content").slideDown(500); 1240 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1241 //jQuery("#bulk_button").slideDown(1000); 1242 jQuery("#very_bottom").slideDown(500); 1243 load_previous_session(false); 1244 } 1245 else { 1246 jQuery("#gadget_abundatrade").fadeOut(); 1247 jQuery("#bulk").slideUp(500); 1248 jQuery("#top_input_section").fadeIn(500); 1249 jQuery("#second_content").slideDown(500); 1250 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1251 jQuery("#bulk_button").slideDown(1000); 1252 jQuery("#very_bottom").slideDown(500); 1253 load_previous_session(false); 1254 } 1224 1255 return false; 1225 1256 } … … 1236 1267 } 1237 1268 1269 var gadgetstates = [ 1270 { 1271 title: 'Welcome', 1272 html: 'Register and edit your past submissions, get paid and mark them as heading our way', 1273 buttons: { Next: 1 }, 1274 focus: 1, 1275 position: { container: '#login_status_abundatrade', x: 0, y: 50, width: 200, arrow: 'tl' }, 1276 submit: tour_func 1277 }, 1278 { 1279 title: 'Getting Started', 1280 html: 'Choose your gadget you want to sell to us from here.', 1281 buttons: { Back: -1, Next: 1 }, 1282 focus: 1, 1283 position: { container: '#gadget_code', x: 0, y: 50, width: 200, arrow: 'tl' }, 1284 submit: tour_func 1285 }, 1286 { 1287 title: 'Add it', 1288 html: 'Add your item to your working trade list, you can signin, signup, or submit as a guest for an instant quote.', 1289 buttons: { Done: 2 }, 1290 focus: 1, 1291 position: { container: '#abundaGadgetInput .submit_holder', x: 0, y: 50, width: 200, arrow: 'tl' }, 1292 submit: tour_func 1293 }, 1294 ]; 1295 1238 1296 var tourstates = [ 1239 1297 { 1240 1298 title: 'Welcome', 1241 html: 'Re ady to take a tour of the AbundaTrade Calculator?',1299 html: 'Register and edit your past submissions, get paid, and mark them as heading our way', 1242 1300 buttons: { Next: 1 }, 1243 1301 focus: 1, 1244 position: { container: '# abundatrade', x: 0, y:0, width: 200, arrow: 'tl' },1302 position: { container: '#login_status_abundatrade', x: 0, y: 50, width: 200, arrow: 'tl' }, 1245 1303 submit: tour_func 1246 1304 }, … … 1325 1383 1326 1384 request.done(function (data) { 1385 transform_into_full_calc('gadget'); 1327 1386 // No errors 1328 / /1387 /* 1329 1388 if (data != '') { 1330 1389 display_totals(data); … … 1349 1408 data.responseText = data; 1350 1409 report_error('addGadget', data); 1351 } 1410 }*/ 1352 1411 }); 1353 1412 … … 1415 1474 1416 1475 if (jQuery("#ready2go").length > 0) { 1417 jQuery("#ready2go").remove();1476 //jQuery("#ready2go").remove(); 1418 1477 } 1419 1478 … … 1451 1510 /** Write out the html for the row */ 1452 1511 function write_html(data, row) { 1512 if (row.category == 'Gadget') { 1513 row.title += ' (Like New)'; 1514 } 1453 1515 return "<tr class='new response'> <td class='upc'>" + row.product_code + "</td> <td class='details'> <div class='td_image'> <img src='" + row.images + "' alt='" + row.title + "' /> </div><div class='td_details'> <strong>" + row.title + "</strong><br /><em>" + (row.author == null ? '' : row.author) + "</em><br/>" + (row.category == null ? "" : row.category) + "</div> </div></td> <td class='quantity'>" + row.quantity + "</td> <td class='item'>" + (row.worthless == true ? "<p class='blatent'>No Abunda Value</p>" : "") + (row.overstocked == true ? "<span class='blatent'>Over Stocked Item</span>" : "") + "<div class='item'>" + data.currency_for_total + row_price + "</div></td> <td class='values'>" + data.currency_for_total + row_total + "</td> <td class='delete'> <a href='#' alt='Delete' class='delete_this_row' id='del_" + row.item_id + "'>Delete</a></tr>"; 1454 1516 } -
abundatrade-plugin/tags/1.7/readme.txt
r653215 r660341 6 6 Requires at least: 3.3 7 7 Tested up to: 3.5 8 Stable tag: 1. 6.78 Stable tag: 1.7 9 9 10 10 Earn extra income for your site via the Abundatrade affiliate program. The shortcode puts the calculator on your website that shows visitors how much cash they will get for their used CDs, DVDs, and books. … … 67 67 68 68 == Changelog == 69 70 = v1.7 (Jan 28, 2013) = 71 72 * Fixed javascript errors 69 73 70 74 = v1.6.7 (Jan 15, 2013) = -
abundatrade-plugin/trunk/abundatrade_pugin.php
r653215 r660341 2 2 /** 3 3 * @package abundatrade_plugin 4 * @version 1. 6.74 * @version 1.7 5 5 * @author Robert Landers (landers.robert@gmail.com) 6 6 */ … … 10 10 Description: Earn extra income for your site via the Abundatrade affiliate program! 11 11 Author: withinboredom 12 Version: 1. 6.712 Version: 1.7 13 13 Author URI: http://withinboredom.info 14 14 */ … … 165 165 </tfoot>--> 166 166 <tbody id="abundaCalcBody_process"> 167 <tr><td colspan="6" class="center"> </td></tr>167 <tr><td colspan="6" id="ready2go" class="center"> </td></tr> 168 168 </tbody> 169 169 <tbody > -
abundatrade-plugin/trunk/js/remote.js
r653215 r660341 99 99 if (jQuery('#abundaGadgetInput').length > 0 && jQuery('#gadget_abundatrade').css('display') == 'block') { 100 100 // for gadget side 101 jQuery.prompt(gadgetstates); 101 102 } 102 103 else { … … 130 131 request.done(function(data) { 131 132 if (data.status) { 132 jQuery('#login_status_abundatrade').get(0).innerHTML = "Hello " + data.first_name + " " + data.last_name + " <em><a onclick=\"abundatrade_logout()\">logout</a></em>" + tour;133 jQuery('#login_status_abundatrade').get(0).innerHTML = "Hello " + data.first_name + " " + data.last_name + ", <em>view your <a href='http://abundatrade.com/trade/user/profile/' title='View your information, and edit past valuations!'>profile</a></em> <em>(<a onclick=\"abundatrade_logout()\">logout</a>)</em>" + tour; 133 134 if (data.first_name == 'Super Cow') 134 135 loggedIn = false; … … 230 231 * 231 232 */ 232 function display_totals(data) { 233 jQuery('#product_code').val(''); 233 function display_totals(data, no_reset) { 234 if (!no_reset) { 235 jQuery('#product_code').val(''); 236 } 234 237 jQuery('#item_count').html(data.total_qty); 235 238 jQuery('#total_item_count').html(data.total_qty); … … 254 257 // 255 258 jQuery('.delete_this_row').attr('onclick', 'delete_the_row(this); return false;'); 256 jQuery('#product_qty').val('1'); 257 jQuery('#product_code').focus(); 259 if (!no_reset) { 260 jQuery('#product_qty').val('1'); 261 jQuery('#product_code').focus(); 262 } 258 263 } 259 264 … … 336 341 337 342 if (data.on == 1 && data.total == 1) { 338 jQuery("#progress").get(0).innerHTML = "Processing complete -- building your email ";343 jQuery("#progress").get(0).innerHTML = "Processing complete -- building your email<br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 339 344 } 340 345 else if (data.on == 2 && data.total == 2) { … … 342 347 clearInterval(stop); 343 348 jQuery("#bar").css('width', percent + "%") 344 jQuery("#progress").get(0).innerHTML = "Processing complete -- sending your valuation to you ";349 jQuery("#progress").get(0).innerHTML = "Processing complete -- sending your valuation to you<br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 345 350 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "%"; 346 351 … … 358 363 jQuery("#bar").css('width', percent + "%") 359 364 jQuery("#progress").get(0).innerHTML = data.on + " of approx. " + data.total; 360 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "% ";365 jQuery("#percent").get(0).innerHTML = Math.round(percent) + "% <br>Edit after uploading from your <a href='http://abundatrade.com/trade/user/profile/'>profile</a>"; 361 366 } 362 367 } … … 437 442 * 438 443 */ 439 function load_previous_session(pretty ) {444 function load_previous_session(pretty, ignore_errors) { 440 445 var request = jQuery.ajax( 441 446 { … … 467 472 } 468 473 469 display_totals(part );474 display_totals(part, ignore_errors); 470 475 } 471 476 //build_row(data); … … 476 481 477 482 request.fail(function (jqXHR, textStatus, errorThrown) { 478 report_error('load_previous_session', jqXHR); 483 if (!ignore_errors) { 484 report_error('load_previous_session', jqXHR); 485 } 479 486 }); 480 487 } … … 595 602 596 603 if (!loggedIn) { 597 return '<label for="user">Email Address:</label><br/><input type="text" id="abundatrade_user" name="abundatrade_user" value="" /><br/>'+ 604 return '<p>If you have an account, please login</p>' + 605 '<label for="user">Email Address:</label><br/><input type="text" id="abundatrade_user" name="abundatrade_user" value="" /><br/>' + 598 606 '<label for="password">Password:</label><br/><input type="password" name="abundatrade_password" id="abundatrade_password" value=""/><br/>'+ 599 607 '<div style="display:none" id="logging_on"><img src="'+abundacalc.url+'/images/spinner.gif">Logging in -- please wait</div><span id="login_error" class="abundatrade_error" style="display:none;">Invalid Password/Email</span><br/>'+ … … 717 725 } 718 726 727 /** Live Lookups */ 728 function check_for_new() { 729 var stop = setInterval(function () { 730 if (loggedIn) { 731 load_previous_session(false, true); 732 } 733 }, 2000); 734 } 735 719 736 /** Submit a list */ 720 737 function submit_modal(callback_to_submit, final_display, custom_message) { … … 1210 1227 jQuery('#abundaGadgetInput').submit(function () { addGadget(jQuery('#gadget_code').val(), jQuery('#header_condition').val()); }); 1211 1228 } 1229 1230 check_for_new(); 1212 1231 } 1213 1232 }); 1214 1233 1215 function transform_into_full_calc() { 1216 jQuery("#gadget_abundatrade").fadeOut(); 1217 jQuery("#bulk").slideUp(500); 1218 jQuery("#top_input_section").fadeIn(500); 1219 jQuery("#second_content").slideDown(500); 1220 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1221 jQuery("#bulk_button").slideDown(1000); 1222 jQuery("#very_bottom").slideDown(500); 1223 load_previous_session(false); 1234 function transform_into_full_calc(mode) { 1235 if (mode == 'gadget') { 1236 jQuery("#gadget_abundatrade").fadeIn(); 1237 jQuery("#bulk").slideUp(500); 1238 //jQuery("#top_input_section").fadeIn(500); 1239 jQuery("#second_content").slideDown(500); 1240 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1241 //jQuery("#bulk_button").slideDown(1000); 1242 jQuery("#very_bottom").slideDown(500); 1243 load_previous_session(false); 1244 } 1245 else { 1246 jQuery("#gadget_abundatrade").fadeOut(); 1247 jQuery("#bulk").slideUp(500); 1248 jQuery("#top_input_section").fadeIn(500); 1249 jQuery("#second_content").slideDown(500); 1250 jQuery("#abundaCalcTbl").delay(100).fadeIn(400); 1251 jQuery("#bulk_button").slideDown(1000); 1252 jQuery("#very_bottom").slideDown(500); 1253 load_previous_session(false); 1254 } 1224 1255 return false; 1225 1256 } … … 1236 1267 } 1237 1268 1269 var gadgetstates = [ 1270 { 1271 title: 'Welcome', 1272 html: 'Register and edit your past submissions, get paid and mark them as heading our way', 1273 buttons: { Next: 1 }, 1274 focus: 1, 1275 position: { container: '#login_status_abundatrade', x: 0, y: 50, width: 200, arrow: 'tl' }, 1276 submit: tour_func 1277 }, 1278 { 1279 title: 'Getting Started', 1280 html: 'Choose your gadget you want to sell to us from here.', 1281 buttons: { Back: -1, Next: 1 }, 1282 focus: 1, 1283 position: { container: '#gadget_code', x: 0, y: 50, width: 200, arrow: 'tl' }, 1284 submit: tour_func 1285 }, 1286 { 1287 title: 'Add it', 1288 html: 'Add your item to your working trade list, you can signin, signup, or submit as a guest for an instant quote.', 1289 buttons: { Done: 2 }, 1290 focus: 1, 1291 position: { container: '#abundaGadgetInput .submit_holder', x: 0, y: 50, width: 200, arrow: 'tl' }, 1292 submit: tour_func 1293 }, 1294 ]; 1295 1238 1296 var tourstates = [ 1239 1297 { 1240 1298 title: 'Welcome', 1241 html: 'Re ady to take a tour of the AbundaTrade Calculator?',1299 html: 'Register and edit your past submissions, get paid, and mark them as heading our way', 1242 1300 buttons: { Next: 1 }, 1243 1301 focus: 1, 1244 position: { container: '# abundatrade', x: 0, y:0, width: 200, arrow: 'tl' },1302 position: { container: '#login_status_abundatrade', x: 0, y: 50, width: 200, arrow: 'tl' }, 1245 1303 submit: tour_func 1246 1304 }, … … 1325 1383 1326 1384 request.done(function (data) { 1385 transform_into_full_calc('gadget'); 1327 1386 // No errors 1328 / /1387 /* 1329 1388 if (data != '') { 1330 1389 display_totals(data); … … 1349 1408 data.responseText = data; 1350 1409 report_error('addGadget', data); 1351 } 1410 }*/ 1352 1411 }); 1353 1412 … … 1415 1474 1416 1475 if (jQuery("#ready2go").length > 0) { 1417 jQuery("#ready2go").remove();1476 //jQuery("#ready2go").remove(); 1418 1477 } 1419 1478 … … 1451 1510 /** Write out the html for the row */ 1452 1511 function write_html(data, row) { 1512 if (row.category == 'Gadget') { 1513 row.title += ' (Like New)'; 1514 } 1453 1515 return "<tr class='new response'> <td class='upc'>" + row.product_code + "</td> <td class='details'> <div class='td_image'> <img src='" + row.images + "' alt='" + row.title + "' /> </div><div class='td_details'> <strong>" + row.title + "</strong><br /><em>" + (row.author == null ? '' : row.author) + "</em><br/>" + (row.category == null ? "" : row.category) + "</div> </div></td> <td class='quantity'>" + row.quantity + "</td> <td class='item'>" + (row.worthless == true ? "<p class='blatent'>No Abunda Value</p>" : "") + (row.overstocked == true ? "<span class='blatent'>Over Stocked Item</span>" : "") + "<div class='item'>" + data.currency_for_total + row_price + "</div></td> <td class='values'>" + data.currency_for_total + row_total + "</td> <td class='delete'> <a href='#' alt='Delete' class='delete_this_row' id='del_" + row.item_id + "'>Delete</a></tr>"; 1454 1516 } -
abundatrade-plugin/trunk/readme.txt
r653215 r660341 6 6 Requires at least: 3.3 7 7 Tested up to: 3.5 8 Stable tag: 1. 6.78 Stable tag: 1.7 9 9 10 10 Earn extra income for your site via the Abundatrade affiliate program. The shortcode puts the calculator on your website that shows visitors how much cash they will get for their used CDs, DVDs, and books. … … 67 67 68 68 == Changelog == 69 70 = v1.7 (Jan 28, 2013) = 71 72 * Fixed javascript errors 69 73 70 74 = v1.6.7 (Jan 15, 2013) =
Note: See TracChangeset
for help on using the changeset viewer.