Plugin Directory

Changeset 660341


Ignore:
Timestamp:
01/28/2013 09:47:04 PM (13 years ago)
Author:
withinboredom
Message:

v1.7

Location:
abundatrade-plugin
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • abundatrade-plugin/tags/1.7/abundatrade_pugin.php

    r653215 r660341  
    22/**
    33 * @package abundatrade_plugin
    4  * @version 1.6.7
     4 * @version 1.7
    55 * @author Robert Landers (landers.robert@gmail.com)
    66 */
     
    1010Description: Earn extra income for your site via the Abundatrade affiliate program!
    1111Author: withinboredom
    12 Version: 1.6.7
     12Version: 1.7
    1313Author URI: http://withinboredom.info
    1414 */
     
    165165                  </tfoot>-->
    166166                  <tbody id="abundaCalcBody_process">
    167           <tr><td colspan="6" class="center">&nbsp;</td></tr>
     167          <tr><td colspan="6" id="ready2go" class="center">&nbsp;</td></tr>
    168168        </tbody>
    169169        <tbody >
  • abundatrade-plugin/tags/1.7/js/remote.js

    r653215 r660341  
    9999    if (jQuery('#abundaGadgetInput').length > 0 && jQuery('#gadget_abundatrade').css('display') == 'block') {
    100100        // for gadget side
     101        jQuery.prompt(gadgetstates);
    101102    }
    102103    else {
     
    130131        request.done(function(data) {
    131132            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;
    133134                if (data.first_name == 'Super Cow')
    134135                    loggedIn = false;
     
    230231*
    231232*/
    232 function display_totals(data) {
    233     jQuery('#product_code').val('');
     233function display_totals(data, no_reset) {
     234    if (!no_reset) {
     235        jQuery('#product_code').val('');
     236    }
    234237    jQuery('#item_count').html(data.total_qty);
    235238    jQuery('#total_item_count').html(data.total_qty);
     
    254257    //
    255258    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    }
    258263}
    259264
     
    336341
    337342                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>";
    339344                }
    340345                else if (data.on == 2 && data.total == 2) {
     
    342347                    clearInterval(stop);
    343348                    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>";
    345350                    jQuery("#percent").get(0).innerHTML = Math.round(percent) + "%";
    346351
     
    358363                    jQuery("#bar").css('width', percent + "%")
    359364                    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>";
    361366                }
    362367            }
     
    437442*
    438443*/
    439 function load_previous_session(pretty) {
     444function load_previous_session(pretty, ignore_errors) {
    440445    var request = jQuery.ajax(
    441446        {
     
    467472            }
    468473
    469             display_totals(part);
     474            display_totals(part, ignore_errors);
    470475        }
    471476        //build_row(data);
     
    476481
    477482    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        }
    479486    });
    480487}
     
    595602
    596603    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/>' +
    598606            '<label for="password">Password:</label><br/><input type="password" name="abundatrade_password" id="abundatrade_password" value=""/><br/>'+
    599607            '<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/>'+
     
    717725}
    718726
     727/** Live Lookups */
     728function check_for_new() {
     729    var stop = setInterval(function () {
     730        if (loggedIn) {
     731            load_previous_session(false, true);
     732        }
     733    }, 2000);
     734}
     735
    719736/** Submit a list */
    720737function submit_modal(callback_to_submit, final_display, custom_message) {
     
    12101227            jQuery('#abundaGadgetInput').submit(function () { addGadget(jQuery('#gadget_code').val(), jQuery('#header_condition').val()); });
    12111228        }
     1229
     1230        check_for_new();
    12121231    }
    12131232});
    12141233
    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);
     1234function 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    }
    12241255    return false;
    12251256}
     
    12361267}
    12371268
     1269var 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
    12381296var tourstates = [
    12391297    {
    12401298        title: 'Welcome',
    1241         html: 'Ready 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',
    12421300        buttons: { Next: 1 },
    12431301        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' },
    12451303        submit: tour_func
    12461304    },
     
    13251383
    13261384    request.done(function (data) {
     1385        transform_into_full_calc('gadget');
    13271386        // No errors
    1328         //
     1387        /*
    13291388        if (data != '') {
    13301389            display_totals(data);
     
    13491408            data.responseText = data;
    13501409            report_error('addGadget', data);
    1351         }
     1410        }*/
    13521411    });
    13531412
     
    14151474
    14161475    if (jQuery("#ready2go").length > 0) {
    1417         jQuery("#ready2go").remove();
     1476        //jQuery("#ready2go").remove();
    14181477    }
    14191478
     
    14511510/** Write out the html for the row */
    14521511function write_html(data, row) {
     1512    if (row.category == 'Gadget') {
     1513        row.title += ' (Like New)';
     1514    }
    14531515    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>";
    14541516}
  • abundatrade-plugin/tags/1.7/readme.txt

    r653215 r660341  
    66Requires at least: 3.3
    77Tested up to: 3.5
    8 Stable tag: 1.6.7
     8Stable tag: 1.7
    99
    1010Earn 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.
     
    6767
    6868== Changelog ==
     69
     70= v1.7 (Jan 28, 2013) =
     71
     72* Fixed javascript errors
    6973
    7074= v1.6.7 (Jan 15, 2013) =
  • abundatrade-plugin/trunk/abundatrade_pugin.php

    r653215 r660341  
    22/**
    33 * @package abundatrade_plugin
    4  * @version 1.6.7
     4 * @version 1.7
    55 * @author Robert Landers (landers.robert@gmail.com)
    66 */
     
    1010Description: Earn extra income for your site via the Abundatrade affiliate program!
    1111Author: withinboredom
    12 Version: 1.6.7
     12Version: 1.7
    1313Author URI: http://withinboredom.info
    1414 */
     
    165165                  </tfoot>-->
    166166                  <tbody id="abundaCalcBody_process">
    167           <tr><td colspan="6" class="center">&nbsp;</td></tr>
     167          <tr><td colspan="6" id="ready2go" class="center">&nbsp;</td></tr>
    168168        </tbody>
    169169        <tbody >
  • abundatrade-plugin/trunk/js/remote.js

    r653215 r660341  
    9999    if (jQuery('#abundaGadgetInput').length > 0 && jQuery('#gadget_abundatrade').css('display') == 'block') {
    100100        // for gadget side
     101        jQuery.prompt(gadgetstates);
    101102    }
    102103    else {
     
    130131        request.done(function(data) {
    131132            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;
    133134                if (data.first_name == 'Super Cow')
    134135                    loggedIn = false;
     
    230231*
    231232*/
    232 function display_totals(data) {
    233     jQuery('#product_code').val('');
     233function display_totals(data, no_reset) {
     234    if (!no_reset) {
     235        jQuery('#product_code').val('');
     236    }
    234237    jQuery('#item_count').html(data.total_qty);
    235238    jQuery('#total_item_count').html(data.total_qty);
     
    254257    //
    255258    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    }
    258263}
    259264
     
    336341
    337342                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>";
    339344                }
    340345                else if (data.on == 2 && data.total == 2) {
     
    342347                    clearInterval(stop);
    343348                    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>";
    345350                    jQuery("#percent").get(0).innerHTML = Math.round(percent) + "%";
    346351
     
    358363                    jQuery("#bar").css('width', percent + "%")
    359364                    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>";
    361366                }
    362367            }
     
    437442*
    438443*/
    439 function load_previous_session(pretty) {
     444function load_previous_session(pretty, ignore_errors) {
    440445    var request = jQuery.ajax(
    441446        {
     
    467472            }
    468473
    469             display_totals(part);
     474            display_totals(part, ignore_errors);
    470475        }
    471476        //build_row(data);
     
    476481
    477482    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        }
    479486    });
    480487}
     
    595602
    596603    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/>' +
    598606            '<label for="password">Password:</label><br/><input type="password" name="abundatrade_password" id="abundatrade_password" value=""/><br/>'+
    599607            '<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/>'+
     
    717725}
    718726
     727/** Live Lookups */
     728function check_for_new() {
     729    var stop = setInterval(function () {
     730        if (loggedIn) {
     731            load_previous_session(false, true);
     732        }
     733    }, 2000);
     734}
     735
    719736/** Submit a list */
    720737function submit_modal(callback_to_submit, final_display, custom_message) {
     
    12101227            jQuery('#abundaGadgetInput').submit(function () { addGadget(jQuery('#gadget_code').val(), jQuery('#header_condition').val()); });
    12111228        }
     1229
     1230        check_for_new();
    12121231    }
    12131232});
    12141233
    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);
     1234function 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    }
    12241255    return false;
    12251256}
     
    12361267}
    12371268
     1269var 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
    12381296var tourstates = [
    12391297    {
    12401298        title: 'Welcome',
    1241         html: 'Ready 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',
    12421300        buttons: { Next: 1 },
    12431301        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' },
    12451303        submit: tour_func
    12461304    },
     
    13251383
    13261384    request.done(function (data) {
     1385        transform_into_full_calc('gadget');
    13271386        // No errors
    1328         //
     1387        /*
    13291388        if (data != '') {
    13301389            display_totals(data);
     
    13491408            data.responseText = data;
    13501409            report_error('addGadget', data);
    1351         }
     1410        }*/
    13521411    });
    13531412
     
    14151474
    14161475    if (jQuery("#ready2go").length > 0) {
    1417         jQuery("#ready2go").remove();
     1476        //jQuery("#ready2go").remove();
    14181477    }
    14191478
     
    14511510/** Write out the html for the row */
    14521511function write_html(data, row) {
     1512    if (row.category == 'Gadget') {
     1513        row.title += ' (Like New)';
     1514    }
    14531515    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>";
    14541516}
  • abundatrade-plugin/trunk/readme.txt

    r653215 r660341  
    66Requires at least: 3.3
    77Tested up to: 3.5
    8 Stable tag: 1.6.7
     8Stable tag: 1.7
    99
    1010Earn 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.
     
    6767
    6868== Changelog ==
     69
     70= v1.7 (Jan 28, 2013) =
     71
     72* Fixed javascript errors
    6973
    7074= v1.6.7 (Jan 15, 2013) =
Note: See TracChangeset for help on using the changeset viewer.