Changeset 681590
- Timestamp:
- 03/14/2013 02:15:02 AM (13 years ago)
- Location:
- abundatrade-plugin
- Files:
-
- 10 edited
- 1 copied
-
tags/1.8 (copied) (copied from abundatrade-plugin/trunk)
-
tags/1.8/abundatrade_pugin.php (modified) (7 diffs)
-
tags/1.8/js/abunda_gadgets_short.js (modified) (7 diffs)
-
tags/1.8/js/register.js (modified) (2 diffs)
-
tags/1.8/js/remote.js (modified) (5 diffs)
-
tags/1.8/readme.txt (modified) (2 diffs)
-
trunk/abundatrade_pugin.php (modified) (7 diffs)
-
trunk/js/abunda_gadgets_short.js (modified) (7 diffs)
-
trunk/js/register.js (modified) (2 diffs)
-
trunk/js/remote.js (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abundatrade-plugin/tags/1.8/abundatrade_pugin.php
r670086 r681590 2 2 /** 3 3 * @package abundatrade_plugin 4 * @version 1. 7.74 * @version 1.8 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. 7.712 Version: 1.8 13 13 Author URI: http://withinboredom.info 14 14 */ … … 90 90 $all_valid = false; 91 91 $show_all = "style='display:none'"; 92 93 preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); 94 95 $use_labels = false; 96 if (count($matches)>1){ 97 //Then we're using IE 98 $version = $matches[1]; 99 100 $use_labels = true; 101 switch(true){ 102 case ($version<=8): 103 //IE 8 or under! 104 $use_labels = true; 105 break; 106 107 case ($version==9): 108 //IE9! 109 $use_labels = true; 110 break; 111 case ($version == 10): 112 $use_labels = false; 113 default: 114 //You get the idea 115 } 116 } 117 118 if (isset($atts['gad_cat'])) { 119 $this->export = array('gad_cat' => $atts['gad_cat']); 120 } 92 121 93 122 if(isset($_REQUEST['gad_cat'])) { … … 188 217 else { 189 218 190 $display = "<form method='get' action='#'><input type='hidden' name='gadget' value='true'/><div id='abundatrade_gadget'>";219 $display = "<form method='get' action='#'><input type='hidden' id='is_gadget' name='gadget' value='true'/><input type='hidden' name='unknown' value='false'><div id='abundatrade_gadget'>"; 191 220 $display .= "<h1 id='finalize' style='display:none'></h1>"; 192 221 $display .= "<div class='category_selector select_container'><div id='category_selection' $gad_cat class='selection sel_center'>This form requires javascript. Please use a javascript enabled browser"; … … 210 239 $display .= "<div class='description_container'><div id='description' class='box_center'>"; 211 240 $display .= "<p id='desc_desc'>Tell us more about your gadget including complete model #, make, etc...</p>"; 212 $display .= "<textarea name='description_entry' ></textarea>";241 $display .= "<textarea name='description_entry' " . ($use_labels ? "rows='10'" : "") . "></textarea>"; 213 242 $display .= $closediv . $closediv; 214 243 $display .= "<div id='master_container_contact' $show_all>"; 215 244 $display .= "<div class='contact_form_container'><div class='contact_form_thirds'>"; 245 if ($use_labels) { 246 $display .= "<label for='my_name'>Your name*</label><br>"; 247 } 216 248 $display .= "<input $name type='text' placeholder='Your name*' name='my_name' value='" . $this->get_value("my_name") . "' /><span class='required'>*</span>"; 217 249 $display .= $closediv; 218 250 $display .= "<div class='contact_form_thirds'>"; 251 if ($use_labels) { 252 $display .= "<label for='email'>Your Email*</label><br>"; 253 } 219 254 $display .= "<input $email type='text' placeholder='Your email*' name='email' value='" . $this->get_value("email") . "'/><span class='required'>*</span>"; 220 255 $display .= $closediv; 221 256 $display .= "<div class='contact_form_thirds'>"; 257 if ($use_labels) { 258 $display .= "<label for='phone'>Your phone #</label><br>"; 259 } 222 260 $display .= "<input $phone type='text' placeholder='Your phone #' name='phone' value = '" . $this->get_value("phone") . "'/>"; 223 261 $display .= $closediv . $closediv; 224 262 $display .= "<div class='contact_form_container'><div class='contact_form_thirds' style='width:49%'>"; 263 if ($use_labels) { 264 $display .= "<label for='address_street'>Address*</label><br>"; 265 } 225 266 $display .= "<input $address_street type='text' placeholder='Address*' name='address_street' value='" . $this->get_value("address_street") . "'/><span class='required'>*</span>"; 226 267 $display .= $closediv; 227 268 $display .= "<div class='contact_form_thirds' style='width:49%'>"; 269 if ($use_labels) { 270 $display .= "<label for='address_street_two'>Address Line 2</label><br>"; 271 } 228 272 $display .= "<input $address_street_two type='text' placeholder='Address Line 2' name='address_street_two' value='" . $this->get_value("address_street_two") . "'/>"; 229 273 $display .= $closediv . $closediv; 230 274 $display .= "<div class='contact_form_container'><div class='contact_form_thirds'>"; 275 if ($use_labels) { 276 $display .= "<label for='address_city'>City*</label><br>"; 277 } 231 278 $display .= "<input $address_city type='text' placeholder='City*' name='address_city' value='" . $this->get_value("address_city") . "'/><span class='required'>*</span>"; 232 279 $display .= $closediv; 233 280 $display .= "<div class='contact_form_thirds'>"; 281 if ($use_labels) { 282 $display .= "<label for='address_state'>State*</label><br>"; 283 } 234 284 $display .= "<input $address_state type='text' placeholder='State*' name='address_state' value='" . $this->get_value("address_state") . "'/><span class='required'>*</span>"; 235 285 $display .= $closediv; 236 286 $display .= "<div class='contact_form_thirds'>"; 287 if ($use_labels) { 288 $display .= "<label for='address_zip'>Zip Code*</label><br>"; 289 } 237 290 $display .= "<input $address_zip type='text' placeholder='Zip Code*' name='address_zip' value='" . $this->get_value("address_zip") . "'/><span class='required'>*</span>"; 238 291 $display .= $closediv . $closediv; … … 252 305 } 253 306 254 if ($_GET['gadget'] == true) { 307 if (!isset($this->export)) { 308 $this->export = array(); 309 } 310 311 $display .= "<script type='text/javascript'> /* <![CDATA[ */ var abundacalc_gad = " . json_encode($this->export) . ";/* ]]> */</script>"; 312 313 if (true) { 255 314 return $display; 256 315 } … … 477 536 wp_enqueue_script("abundatrade_gadgets"); 478 537 $abundacalc = array('server' => 'abundatrade.com', 479 'url' => $this->folders['PluginUrl'], 538 'url' => $this->folders['PluginUrl'], 539 'export' => $this->export, 480 540 'thanks' => $this->settings->Thank_you_page); 481 541 if (isset($_REQUEST['upload_id']) && $_REQUEST['upload_id'] != '') { -
abundatrade-plugin/tags/1.8/js/abunda_gadgets_short.js
r670086 r681590 1 1 // JScript File 2 3 Object.keys = Object.keys || (function () { 4 var hasOwnProperty = Object.prototype.hasOwnProperty, 5 hasDontEnumBug = !{ toString: null }.propertyIsEnumerable("toString"), 6 DontEnums = [ 7 'toString', 8 'toLocaleString', 9 'valueOf', 10 'hasOwnProperty', 11 'isPrototypeOf', 12 'propertyIsEnumerable', 13 'constructor' 14 ], 15 DontEnumsLength = DontEnums.length; 16 17 return function (o) { 18 if (typeof o != "object" && typeof o != "function" || o === null) 19 throw new TypeError("Object.keys called on a non-object"); 20 21 var result = []; 22 for (var name in o) { 23 if (hasOwnProperty.call(o, name)) 24 result.push(name); 25 } 26 27 if (hasDontEnumBug) { 28 for (var i = 0; i < DontEnumsLength; i++) { 29 if (hasOwnProperty.call(o, DontEnums[i])) 30 result.push(DontEnums[i]); 31 } 32 } 33 34 return result; 35 }; 36 })(); 2 37 3 38 function drawCategoryPage(data) { … … 126 161 var setMan = null; 127 162 163 var unknown = false; 164 128 165 function changeCond() { 129 166 var catID = jQuery("#gad_cat").val(); … … 287 324 if (anyDevice == 'featured') { 288 325 jQuery("#desc_desc").get(0).innerHTML = "Please add any additional information such as detailed condition description and accessories included or not included."; 326 makeUnknown('false'); 289 327 } 290 328 else if (anyDevice == 'damaged') { 291 329 jQuery("#desc_desc").get(0).innerHTML = "Please add any additional information such as detailed condition description and accessories included or not included."; 330 makeUnknown('false'); 292 331 } 293 332 else { 294 333 jQuery("#desc_desc").get(0).innerHTML = "Please tell us about your gadget including complete model information, detailed condition description, and accessories included or not included."; 334 makeUnknown('true'); 295 335 } 296 336 if (!jQuery(".description_container").is(":visible")) { … … 341 381 } 342 382 return 4; 383 } 384 385 function makeUnknown(ival) { 386 jQuery("[name='unknown']").val(ival); 387 unknown = ival; 343 388 } 344 389 … … 355 400 phone: getParameterByName('phone'), 356 401 street: getParameterByName('address_street'), 402 street_two: getParameterByName('address_street_two'), 357 403 city: getParameterByName('address_city'), 358 404 state: getParameterByName('address_state'), 359 zip: getParameterByName('address_zip') 405 zip: getParameterByName('address_zip'), 406 cat: getParameterByName('gad_cat'), 407 dvd: getParameterByName('dvd'), 408 unknown: getParameterByName('unknown') 360 409 } 361 410 }); 362 411 363 412 request.success(function (data) { 364 window.location.href = "http://abundatrade.com/free-cd-dvd-with-gadget-trade.php"; 413 if (data.success) { 414 window.location.href = "http://abundatrade.com/free-cd-dvd-with-gadget-trade.php"; 415 } 365 416 }); 366 417 } 367 418 368 419 function determineStart() { 369 if (getParameterByName("gadget") == 'true') { 420 if (jQuery("#is_gadget").val() == 'true' || getParameterByName('gadget') == 'true') { 421 422 if (abundacalc_gad.gad_cat) { 423 setCat = abundacalc_gad.gad_cat; 424 } 370 425 371 426 if (getParameterByName("gad_cat") != "") { 372 427 setCat = getParameterByName("gad_cat"); 373 428 } 429 374 430 if (getParameterByName("gad_man") != "") { 375 431 setMan = getParameterByName("gad_man"); … … 381 437 setDev = getParameterByName("gad_dev"); 382 438 } 439 if (getParameterByName("ean") != "") { 440 setDev = getParameterByName("ean"); 441 } 383 442 if (getParameterByName("gad_cond") != "") { 384 443 setCond = getParameterByName("gad_cond"); … … 389 448 } 390 449 391 jQuery(determineStart ());450 jQuery(determineStart); -
abundatrade-plugin/tags/1.8/js/register.js
r650598 r681590 127 127 jQuery.prompt.goToState('nomatch'); 128 128 } else if (validateEmail(val['email'], val['confirm_email'])) { 129 mystate += but;129 mystate += 4; 130 130 jQuery.prompt.goToState('state' + mystate); 131 131 } … … 133 133 jQuery.prompt.goToState('invalid'); 134 134 } 135 return false;136 }137 else {138 just_logging_in = false;139 jQuery.prompt.close();140 }141 }142 },143 state2: {144 html: passState,145 buttons: {Back: -1,Cancel:0, Next: 1},146 submit: function (ev, but, message, val) {147 mystate = 2;148 if (but > 0) {149 if (val['password'] != null) {150 pass = message.children('password');151 conf = message.children('confirmPass');152 if (val['password'] != val['confirmPass']) {153 jQuery('#password').css("border", "solid #ff0000 2px");154 jQuery('#confirmPass').css("border", "solid #ff0000 2px");155 jQuery('#badpass').show();156 return false;157 }158 if (val['password'].length < 8) {159 jQuery("#password").css("border", "solid #ff0000 2px");160 jQuery("#shortpass").show();161 return false;162 }163 }164 if (val['address_zip'] == '') {165 jQuery("#address_zip").css("border", "solid #ff0000 2px");166 return false;167 }168 if (val['address_state'] == '') {169 jQuery("#address_state").css("border", "solid #ff0000 2px");170 return false;171 }172 if (val['address_city'] == '') {173 jQuery("#address_city").css("border", "solid #ff0000 2px");174 return false;175 }176 if (val['address_street'] == '') {177 jQuery("#address_street").css("border", "solid #ff0000 2px");178 return false;179 }180 }181 182 if (but != 0) {183 mystate+= but;184 jQuery.prompt.goToState('state' + mystate);185 return false;186 }187 just_logging_in = false;188 jQuery.prompt.close();189 }190 },191 state3: {192 buttons: { Back: -1, Cancel: 0, Next: 1 },193 focus: 2,194 submit: function (ev, but, message, val) {195 mystate = 3196 if (but > 0) {197 198 lname = message.children('#referrals');199 200 if (val['hvReferral'] == '9' && val['txtOther'] == '') {201 jQuery('#other').css('border', 'solid #ff0000 2px');202 return false;203 }204 205 if (val['hvReferral'] == '3' && val['referred'] == '') {206 jQuery('#friend').css('border', 'solid #ff0000 2px');207 return false;208 }209 210 if (val['hvReferral'] == '-1') {211 jQuery('#referrals').css("border", "solid #ff0000 2px");212 return false;213 }214 else {215 jQuery('#referrals').css("border", "")216 }217 }218 if (but != 0) {219 220 if (val['phone_request'] == 'on') {221 mystate += but;222 }223 else {224 if (but == 1) {225 mystate += 2;226 }227 else {228 mystate += but;229 }230 }231 if (mystate == 5 && just_logging_in) {232 var str = '';233 jQuery.each(val, function (i, obj) {234 str += '&' + i + '=' + obj;235 });236 237 request = jQuery.ajax(238 {239 type: 'POST',240 url: 'http://' + abundacalc.server + '/trade/process/user/create/',241 data: '?action=create_user' + str,242 dataType: 'jsonp'243 });244 request.done(function(data) {245 get_login_status();246 just_logging_in = false;247 jQuery.prompt.close();248 249 });250 251 }252 else {253 jQuery.prompt.goToState('state' + mystate);254 }255 return false;256 }257 else {258 just_logging_in = false;259 jQuery.prompt.close();260 }261 },262 html: referral263 },264 state4: {265 html: phone,266 buttons: { Back: -1, Cancel: 0, Next: 1 },267 focus: 2,268 submit: function (ev, but, message, val) {269 mystate = 4;270 if (but > 0) {271 lname = message.children('#phone_type');272 273 if (val['phone_type'] == '') {274 lname.css("border", "solid #ff0000 2px");275 return false;276 }277 else {278 lname.css("border", "");279 }280 }281 if (but != 0) {282 283 var str = '';284 mystate += but;285 if (mystate == 5 && just_logging_in) {286 jQuery.each(val, function (i, obj) {287 str += '&' + i + '=' + obj;288 });289 290 request = jQuery.ajax(291 {292 type: 'POST',293 url: 'http://' + abundacalc.server + '/trade/process/user/create/',294 data: '?action=create_user' + str,295 dataType: 'jsonp'296 });297 request.done(function(data) {298 get_login_status();299 just_logging_in = false;300 jQuery.prompt.close();301 302 });303 304 }305 else {306 jQuery.prompt.goToState('state' + mystate);307 }308 309 135 return false; 310 136 } -
abundatrade-plugin/tags/1.8/js/remote.js
r670086 r681590 620 620 return { Cancel: 0, Login: -1, Register: 1 }; 621 621 } 622 return { Cancel: 0, Login: -1, Register: 1, 'Continue as Guest': 2};622 return { Cancel: 0, Login: -1, Submit: 1, }; 623 623 } 624 624 } … … 1094 1094 } 1095 1095 1096 /** Submission of a list done the old fashioned way via jsonp */1096 /** Submission of a list done the old fashioned way via jsonp ACTUAL SUBMISSION */ 1097 1097 function submit_my_list(f) { 1098 1098 str = ""; … … 1101 1101 str += '&' + i + '=' + obj; 1102 1102 }); 1103 1104 str += "&simple=true"; 1103 1105 1104 1106 if (isguest) { … … 1286 1288 { 1287 1289 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.',1290 html: 'Add your item to your working trade list, you can signin or submit for an instant quote.', 1289 1291 buttons: { Done: 2 }, 1290 1292 focus: 1, … … 1345 1347 { 1346 1348 title: 'Submit', 1347 html: 'Once you\'re done building your list how you want it; login , sign up, or submit the list as a guest; print out your shipping information, and send it in. We will keep you up to date while it goes through the receiving process and get you your cash.',1349 html: 'Once you\'re done building your list how you want it; login or submit the list; print out your shipping information, and send it in. We will keep you up to date while it goes through the receiving process and get you your cash.', 1348 1350 buttons: { Back: -1, Next: 1 }, 1349 1351 focus: 1, -
abundatrade-plugin/tags/1.8/readme.txt
r670086 r681590 6 6 Requires at least: 3.3 7 7 Tested up to: 3.5 8 Stable tag: 1. 7.78 Stable tag: 1.8 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.8 = 71 72 * Bug Fixes 73 * No registration required 69 74 70 75 = v1.7.7 (Feb 18, 2013) = -
abundatrade-plugin/trunk/abundatrade_pugin.php
r670086 r681590 2 2 /** 3 3 * @package abundatrade_plugin 4 * @version 1. 7.74 * @version 1.8 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. 7.712 Version: 1.8 13 13 Author URI: http://withinboredom.info 14 14 */ … … 90 90 $all_valid = false; 91 91 $show_all = "style='display:none'"; 92 93 preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); 94 95 $use_labels = false; 96 if (count($matches)>1){ 97 //Then we're using IE 98 $version = $matches[1]; 99 100 $use_labels = true; 101 switch(true){ 102 case ($version<=8): 103 //IE 8 or under! 104 $use_labels = true; 105 break; 106 107 case ($version==9): 108 //IE9! 109 $use_labels = true; 110 break; 111 case ($version == 10): 112 $use_labels = false; 113 default: 114 //You get the idea 115 } 116 } 117 118 if (isset($atts['gad_cat'])) { 119 $this->export = array('gad_cat' => $atts['gad_cat']); 120 } 92 121 93 122 if(isset($_REQUEST['gad_cat'])) { … … 188 217 else { 189 218 190 $display = "<form method='get' action='#'><input type='hidden' name='gadget' value='true'/><div id='abundatrade_gadget'>";219 $display = "<form method='get' action='#'><input type='hidden' id='is_gadget' name='gadget' value='true'/><input type='hidden' name='unknown' value='false'><div id='abundatrade_gadget'>"; 191 220 $display .= "<h1 id='finalize' style='display:none'></h1>"; 192 221 $display .= "<div class='category_selector select_container'><div id='category_selection' $gad_cat class='selection sel_center'>This form requires javascript. Please use a javascript enabled browser"; … … 210 239 $display .= "<div class='description_container'><div id='description' class='box_center'>"; 211 240 $display .= "<p id='desc_desc'>Tell us more about your gadget including complete model #, make, etc...</p>"; 212 $display .= "<textarea name='description_entry' ></textarea>";241 $display .= "<textarea name='description_entry' " . ($use_labels ? "rows='10'" : "") . "></textarea>"; 213 242 $display .= $closediv . $closediv; 214 243 $display .= "<div id='master_container_contact' $show_all>"; 215 244 $display .= "<div class='contact_form_container'><div class='contact_form_thirds'>"; 245 if ($use_labels) { 246 $display .= "<label for='my_name'>Your name*</label><br>"; 247 } 216 248 $display .= "<input $name type='text' placeholder='Your name*' name='my_name' value='" . $this->get_value("my_name") . "' /><span class='required'>*</span>"; 217 249 $display .= $closediv; 218 250 $display .= "<div class='contact_form_thirds'>"; 251 if ($use_labels) { 252 $display .= "<label for='email'>Your Email*</label><br>"; 253 } 219 254 $display .= "<input $email type='text' placeholder='Your email*' name='email' value='" . $this->get_value("email") . "'/><span class='required'>*</span>"; 220 255 $display .= $closediv; 221 256 $display .= "<div class='contact_form_thirds'>"; 257 if ($use_labels) { 258 $display .= "<label for='phone'>Your phone #</label><br>"; 259 } 222 260 $display .= "<input $phone type='text' placeholder='Your phone #' name='phone' value = '" . $this->get_value("phone") . "'/>"; 223 261 $display .= $closediv . $closediv; 224 262 $display .= "<div class='contact_form_container'><div class='contact_form_thirds' style='width:49%'>"; 263 if ($use_labels) { 264 $display .= "<label for='address_street'>Address*</label><br>"; 265 } 225 266 $display .= "<input $address_street type='text' placeholder='Address*' name='address_street' value='" . $this->get_value("address_street") . "'/><span class='required'>*</span>"; 226 267 $display .= $closediv; 227 268 $display .= "<div class='contact_form_thirds' style='width:49%'>"; 269 if ($use_labels) { 270 $display .= "<label for='address_street_two'>Address Line 2</label><br>"; 271 } 228 272 $display .= "<input $address_street_two type='text' placeholder='Address Line 2' name='address_street_two' value='" . $this->get_value("address_street_two") . "'/>"; 229 273 $display .= $closediv . $closediv; 230 274 $display .= "<div class='contact_form_container'><div class='contact_form_thirds'>"; 275 if ($use_labels) { 276 $display .= "<label for='address_city'>City*</label><br>"; 277 } 231 278 $display .= "<input $address_city type='text' placeholder='City*' name='address_city' value='" . $this->get_value("address_city") . "'/><span class='required'>*</span>"; 232 279 $display .= $closediv; 233 280 $display .= "<div class='contact_form_thirds'>"; 281 if ($use_labels) { 282 $display .= "<label for='address_state'>State*</label><br>"; 283 } 234 284 $display .= "<input $address_state type='text' placeholder='State*' name='address_state' value='" . $this->get_value("address_state") . "'/><span class='required'>*</span>"; 235 285 $display .= $closediv; 236 286 $display .= "<div class='contact_form_thirds'>"; 287 if ($use_labels) { 288 $display .= "<label for='address_zip'>Zip Code*</label><br>"; 289 } 237 290 $display .= "<input $address_zip type='text' placeholder='Zip Code*' name='address_zip' value='" . $this->get_value("address_zip") . "'/><span class='required'>*</span>"; 238 291 $display .= $closediv . $closediv; … … 252 305 } 253 306 254 if ($_GET['gadget'] == true) { 307 if (!isset($this->export)) { 308 $this->export = array(); 309 } 310 311 $display .= "<script type='text/javascript'> /* <![CDATA[ */ var abundacalc_gad = " . json_encode($this->export) . ";/* ]]> */</script>"; 312 313 if (true) { 255 314 return $display; 256 315 } … … 477 536 wp_enqueue_script("abundatrade_gadgets"); 478 537 $abundacalc = array('server' => 'abundatrade.com', 479 'url' => $this->folders['PluginUrl'], 538 'url' => $this->folders['PluginUrl'], 539 'export' => $this->export, 480 540 'thanks' => $this->settings->Thank_you_page); 481 541 if (isset($_REQUEST['upload_id']) && $_REQUEST['upload_id'] != '') { -
abundatrade-plugin/trunk/js/abunda_gadgets_short.js
r670086 r681590 1 1 // JScript File 2 3 Object.keys = Object.keys || (function () { 4 var hasOwnProperty = Object.prototype.hasOwnProperty, 5 hasDontEnumBug = !{ toString: null }.propertyIsEnumerable("toString"), 6 DontEnums = [ 7 'toString', 8 'toLocaleString', 9 'valueOf', 10 'hasOwnProperty', 11 'isPrototypeOf', 12 'propertyIsEnumerable', 13 'constructor' 14 ], 15 DontEnumsLength = DontEnums.length; 16 17 return function (o) { 18 if (typeof o != "object" && typeof o != "function" || o === null) 19 throw new TypeError("Object.keys called on a non-object"); 20 21 var result = []; 22 for (var name in o) { 23 if (hasOwnProperty.call(o, name)) 24 result.push(name); 25 } 26 27 if (hasDontEnumBug) { 28 for (var i = 0; i < DontEnumsLength; i++) { 29 if (hasOwnProperty.call(o, DontEnums[i])) 30 result.push(DontEnums[i]); 31 } 32 } 33 34 return result; 35 }; 36 })(); 2 37 3 38 function drawCategoryPage(data) { … … 126 161 var setMan = null; 127 162 163 var unknown = false; 164 128 165 function changeCond() { 129 166 var catID = jQuery("#gad_cat").val(); … … 287 324 if (anyDevice == 'featured') { 288 325 jQuery("#desc_desc").get(0).innerHTML = "Please add any additional information such as detailed condition description and accessories included or not included."; 326 makeUnknown('false'); 289 327 } 290 328 else if (anyDevice == 'damaged') { 291 329 jQuery("#desc_desc").get(0).innerHTML = "Please add any additional information such as detailed condition description and accessories included or not included."; 330 makeUnknown('false'); 292 331 } 293 332 else { 294 333 jQuery("#desc_desc").get(0).innerHTML = "Please tell us about your gadget including complete model information, detailed condition description, and accessories included or not included."; 334 makeUnknown('true'); 295 335 } 296 336 if (!jQuery(".description_container").is(":visible")) { … … 341 381 } 342 382 return 4; 383 } 384 385 function makeUnknown(ival) { 386 jQuery("[name='unknown']").val(ival); 387 unknown = ival; 343 388 } 344 389 … … 355 400 phone: getParameterByName('phone'), 356 401 street: getParameterByName('address_street'), 402 street_two: getParameterByName('address_street_two'), 357 403 city: getParameterByName('address_city'), 358 404 state: getParameterByName('address_state'), 359 zip: getParameterByName('address_zip') 405 zip: getParameterByName('address_zip'), 406 cat: getParameterByName('gad_cat'), 407 dvd: getParameterByName('dvd'), 408 unknown: getParameterByName('unknown') 360 409 } 361 410 }); 362 411 363 412 request.success(function (data) { 364 window.location.href = "http://abundatrade.com/free-cd-dvd-with-gadget-trade.php"; 413 if (data.success) { 414 window.location.href = "http://abundatrade.com/free-cd-dvd-with-gadget-trade.php"; 415 } 365 416 }); 366 417 } 367 418 368 419 function determineStart() { 369 if (getParameterByName("gadget") == 'true') { 420 if (jQuery("#is_gadget").val() == 'true' || getParameterByName('gadget') == 'true') { 421 422 if (abundacalc_gad.gad_cat) { 423 setCat = abundacalc_gad.gad_cat; 424 } 370 425 371 426 if (getParameterByName("gad_cat") != "") { 372 427 setCat = getParameterByName("gad_cat"); 373 428 } 429 374 430 if (getParameterByName("gad_man") != "") { 375 431 setMan = getParameterByName("gad_man"); … … 381 437 setDev = getParameterByName("gad_dev"); 382 438 } 439 if (getParameterByName("ean") != "") { 440 setDev = getParameterByName("ean"); 441 } 383 442 if (getParameterByName("gad_cond") != "") { 384 443 setCond = getParameterByName("gad_cond"); … … 389 448 } 390 449 391 jQuery(determineStart ());450 jQuery(determineStart); -
abundatrade-plugin/trunk/js/register.js
r650598 r681590 127 127 jQuery.prompt.goToState('nomatch'); 128 128 } else if (validateEmail(val['email'], val['confirm_email'])) { 129 mystate += but;129 mystate += 4; 130 130 jQuery.prompt.goToState('state' + mystate); 131 131 } … … 133 133 jQuery.prompt.goToState('invalid'); 134 134 } 135 return false;136 }137 else {138 just_logging_in = false;139 jQuery.prompt.close();140 }141 }142 },143 state2: {144 html: passState,145 buttons: {Back: -1,Cancel:0, Next: 1},146 submit: function (ev, but, message, val) {147 mystate = 2;148 if (but > 0) {149 if (val['password'] != null) {150 pass = message.children('password');151 conf = message.children('confirmPass');152 if (val['password'] != val['confirmPass']) {153 jQuery('#password').css("border", "solid #ff0000 2px");154 jQuery('#confirmPass').css("border", "solid #ff0000 2px");155 jQuery('#badpass').show();156 return false;157 }158 if (val['password'].length < 8) {159 jQuery("#password").css("border", "solid #ff0000 2px");160 jQuery("#shortpass").show();161 return false;162 }163 }164 if (val['address_zip'] == '') {165 jQuery("#address_zip").css("border", "solid #ff0000 2px");166 return false;167 }168 if (val['address_state'] == '') {169 jQuery("#address_state").css("border", "solid #ff0000 2px");170 return false;171 }172 if (val['address_city'] == '') {173 jQuery("#address_city").css("border", "solid #ff0000 2px");174 return false;175 }176 if (val['address_street'] == '') {177 jQuery("#address_street").css("border", "solid #ff0000 2px");178 return false;179 }180 }181 182 if (but != 0) {183 mystate+= but;184 jQuery.prompt.goToState('state' + mystate);185 return false;186 }187 just_logging_in = false;188 jQuery.prompt.close();189 }190 },191 state3: {192 buttons: { Back: -1, Cancel: 0, Next: 1 },193 focus: 2,194 submit: function (ev, but, message, val) {195 mystate = 3196 if (but > 0) {197 198 lname = message.children('#referrals');199 200 if (val['hvReferral'] == '9' && val['txtOther'] == '') {201 jQuery('#other').css('border', 'solid #ff0000 2px');202 return false;203 }204 205 if (val['hvReferral'] == '3' && val['referred'] == '') {206 jQuery('#friend').css('border', 'solid #ff0000 2px');207 return false;208 }209 210 if (val['hvReferral'] == '-1') {211 jQuery('#referrals').css("border", "solid #ff0000 2px");212 return false;213 }214 else {215 jQuery('#referrals').css("border", "")216 }217 }218 if (but != 0) {219 220 if (val['phone_request'] == 'on') {221 mystate += but;222 }223 else {224 if (but == 1) {225 mystate += 2;226 }227 else {228 mystate += but;229 }230 }231 if (mystate == 5 && just_logging_in) {232 var str = '';233 jQuery.each(val, function (i, obj) {234 str += '&' + i + '=' + obj;235 });236 237 request = jQuery.ajax(238 {239 type: 'POST',240 url: 'http://' + abundacalc.server + '/trade/process/user/create/',241 data: '?action=create_user' + str,242 dataType: 'jsonp'243 });244 request.done(function(data) {245 get_login_status();246 just_logging_in = false;247 jQuery.prompt.close();248 249 });250 251 }252 else {253 jQuery.prompt.goToState('state' + mystate);254 }255 return false;256 }257 else {258 just_logging_in = false;259 jQuery.prompt.close();260 }261 },262 html: referral263 },264 state4: {265 html: phone,266 buttons: { Back: -1, Cancel: 0, Next: 1 },267 focus: 2,268 submit: function (ev, but, message, val) {269 mystate = 4;270 if (but > 0) {271 lname = message.children('#phone_type');272 273 if (val['phone_type'] == '') {274 lname.css("border", "solid #ff0000 2px");275 return false;276 }277 else {278 lname.css("border", "");279 }280 }281 if (but != 0) {282 283 var str = '';284 mystate += but;285 if (mystate == 5 && just_logging_in) {286 jQuery.each(val, function (i, obj) {287 str += '&' + i + '=' + obj;288 });289 290 request = jQuery.ajax(291 {292 type: 'POST',293 url: 'http://' + abundacalc.server + '/trade/process/user/create/',294 data: '?action=create_user' + str,295 dataType: 'jsonp'296 });297 request.done(function(data) {298 get_login_status();299 just_logging_in = false;300 jQuery.prompt.close();301 302 });303 304 }305 else {306 jQuery.prompt.goToState('state' + mystate);307 }308 309 135 return false; 310 136 } -
abundatrade-plugin/trunk/js/remote.js
r670086 r681590 620 620 return { Cancel: 0, Login: -1, Register: 1 }; 621 621 } 622 return { Cancel: 0, Login: -1, Register: 1, 'Continue as Guest': 2};622 return { Cancel: 0, Login: -1, Submit: 1, }; 623 623 } 624 624 } … … 1094 1094 } 1095 1095 1096 /** Submission of a list done the old fashioned way via jsonp */1096 /** Submission of a list done the old fashioned way via jsonp ACTUAL SUBMISSION */ 1097 1097 function submit_my_list(f) { 1098 1098 str = ""; … … 1101 1101 str += '&' + i + '=' + obj; 1102 1102 }); 1103 1104 str += "&simple=true"; 1103 1105 1104 1106 if (isguest) { … … 1286 1288 { 1287 1289 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.',1290 html: 'Add your item to your working trade list, you can signin or submit for an instant quote.', 1289 1291 buttons: { Done: 2 }, 1290 1292 focus: 1, … … 1345 1347 { 1346 1348 title: 'Submit', 1347 html: 'Once you\'re done building your list how you want it; login , sign up, or submit the list as a guest; print out your shipping information, and send it in. We will keep you up to date while it goes through the receiving process and get you your cash.',1349 html: 'Once you\'re done building your list how you want it; login or submit the list; print out your shipping information, and send it in. We will keep you up to date while it goes through the receiving process and get you your cash.', 1348 1350 buttons: { Back: -1, Next: 1 }, 1349 1351 focus: 1, -
abundatrade-plugin/trunk/readme.txt
r670086 r681590 6 6 Requires at least: 3.3 7 7 Tested up to: 3.5 8 Stable tag: 1. 7.78 Stable tag: 1.8 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.8 = 71 72 * Bug Fixes 73 * No registration required 69 74 70 75 = v1.7.7 (Feb 18, 2013) =
Note: See TracChangeset
for help on using the changeset viewer.