From b32a2c33f063f024809b9da770e0c260be9dc173 Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Fri, 15 Mar 2013 22:49:29 -0700 Subject: [PATCH 01/50] Create gh-pages branch via GitHub --- index.html | 294 +++++++++++++++++++++++++++++++++++ javascripts/scale.fix.js | 17 ++ params.json | 1 + stylesheets/pygment_trac.css | 69 ++++++++ stylesheets/styles.css | 255 ++++++++++++++++++++++++++++++ 5 files changed, 636 insertions(+) create mode 100644 index.html create mode 100644 javascripts/scale.fix.js create mode 100644 params.json create mode 100644 stylesheets/pygment_trac.css create mode 100644 stylesheets/styles.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..9760e8c --- /dev/null +++ b/index.html @@ -0,0 +1,294 @@ + + + + + + Minicart by jeffharrell + + + + + + + +
+
+

Minicart

+

Improve your PayPal integration with an overlay that appears once a user adds a product

+ +

View the Project on GitHub jeffharrell/MiniCart

+ + + +
+
+

The Mini Cart

+ +

The Mini Cart is a great way to improve your PayPal integration by creating an overlay which appears as a user adds products to their cart. It’s a simple change that creates a wonderful new experience for your website!

+ +
    +
  1. Setup
  2. +
  3. Customization
  4. +
  5. Event callback examples
  6. +
  7. Localization
  8. +
  9. JavaScript API
  10. +
  11. FAQ
  12. +
  13. Questions or comments
  14. +

Interested? Let’s get you setup

+ +
    +
  1. Start with a PayPal Add to Cart Button +
  2. +
  3. Download the latest minicart.js – You can also browse the tagged versions +
  4. +
  5. Next, include the following snippet of JavaScript code into your HTML file before the closing </body> tag
  6. +

Make sure to update the path to point to your downloaded copy of minicart.js!

+ +
<script src="/path/to/minicart.js"></script>
+<script>
+    PAYPAL.apps.MiniCart.render();
+</script>
+
+ +

It’s as simple as that! Now the Mini Cart will appear when a user adds a product to, views, or has an item in their cart.

+ +

Customization

+ +

You can customize the script to make it work for your site by passing a JavaScript object as an argument, setting any of the following optional properties:

+ +

parent
+The HTMLElement the Mini Cart should render as a child of. Default document.body.

+ +

formTarget
+The HTML target property for the checkout form.

+ +

displayEdge
+The edge of the page the cart should pin to. Set to left or right. Default right.

+ +

edgeDistance
+Distance from the edge the cart should appear. Default 50px.

+ +

cookiePath
+The base path of your website to set the cookie to (useful for shared website hosting)

+ +

peekEnabled
+Boolean to determine if the cart should "peek" when it's hidden with items. Default true.

+ +

paypalURL
+The PayPal URL to use if you are accessing sandbox or another version of the PayPal website. Defaults to https://www.paypal.com/cgi-bin/webscr.

+ +

strings
+An object of localizable text strings used:

+ +
    +
  • +button - The checkout button text
  • +
  • +subtotal - The subtotal text
    +
  • +
  • +discount - The discount text
    +
  • +
  • +shipping - The shipping text
    +
  • +

events
+An object of customizable callbacks (see Event callback examples):

+ +
    +
  • +onRender - Event before the cart is rendered
    +
  • +
  • +afterRender - Event after the cart is rendered
    +
  • +
  • +onHide - Event before the cart is hidden
    +
  • +
  • +afterHide - Event after the cart is hidden
    +
  • +
  • +onShow - Event before the cart is shown
    +
  • +
  • +afterShow - Event after the cart is shown
    +
  • +
  • +onAddToCart - Event before a product is added to the cart
    +
  • +
  • +afterAddToCart - Event after a product is added to the cart
    +
  • +
  • +onRemoveFromCart - Event before a product is removed from the cart
    +
  • +
  • +afterRemoveFromCart - Event after a product is removed from the cart
  • +
  • +onCheckout - Event before the checkout action takes place
    +
  • +
  • +onReset - Event before the cart is emptied (typically when a transaction is completed)
    +
  • +
  • +afterReset - Event after the cart is emptied (typically when a transaction is completed)
    +
  • +

The scope of all events is adjusted to the Mini Cart to allow access to the products, UI, and certain functions. See below for an example of a custom configuration:

+ +
<script>
+    PAYPAL.apps.MiniCart.render({
+        displayEdge: "right",
+        edgeDistance: "50px",
+        events: {
+            afterAddToCart: function () {
+                var msg = "There's now " + this.products.length + " unique product(s).";
+                msg += " That's a total of " + this.calculateSubtotal() + "!";
+
+                alert(msg);
+            }
+        }
+    });
+</script> 
+
+ +

Event callback examples

+ +

Examples of how you can use the event callbacks:

+ +

Localization

+ +

Localization and adaption are supported in the Mini Cart using the configuration strings object. For example, if we wanted the cart to appear in French we would need to pass our configuration like this:

+ +
<script> 
+    PAYPAL.apps.MiniCart.render({
+        strings: {
+            button: "Caisse",  
+            subtotal: "Total ",
+            shipping: "ne comprend pas les frais de port et d'impôt"   
+        }
+    });
+</script>
+
+ +

The currency symbol will be automatically adjusted based on the currency_code setting of your button.

+ +

JavaScript API

+ +

The Mini Cart has a rich JavaScript API which allows you to control it using the following methods:

+ +

PAYPAL.apps.MiniCart.render()
+Renders the cart element to the page. This method is required to see the Mini Cart.

+ +

PAYPAL.apps.MiniCart.bindForm(form)
+Binds a form DOM element's submit event to the Mini Cart. This is useful for forms which may have been added to the page after the initial load.

+ +

PAYPAL.apps.MiniCart.addToCart(data)
+Allows you to manually add a product to your cart, e.g. directly using JavaScript and not through a PayPal form. The parameter data is a key / value pair object of parameters and their value. For example:

+ +
{"business":"user@example.com","item_name":"Product","amount":"5.00","currency_code":"USD"}
+
+ +

PAYPAL.apps.MiniCart.reset()
+Resets the cart, emptying and hiding it.

+ +

PAYPAL.apps.MiniCart.hide(null, fully)
+Hides the cart. If the cart contains products then it will "peek" from the top of the window. Set the parameter fully to true to override this and have it fully hidden.

+ +

PAYPAL.apps.MiniCart.show()
+Shows the cart.

+ +

PAYPAL.apps.MiniCart.toggle()
+Toggles the visibility of the cart.

+ +

FAQ

+ +

Is the Mini Cart free? How is it licensed?

+ +

Yes, it’s free and licensed using an eBay Open Source License Agreement.

+ +

What browsers does the Mini Cart support?

+ +

The Mini Cart is functionally supported by Chrome, Safari, Firefox, Opera, and Internet Explorer 6+. Older versions of IE use cookies for their data store while all other browsers use localStorage.

+ +

I have special integration / translation needs. Are there advanced settings?

+ +

Yes, there’s a rich API which can be used to customize the Mini Cart. See the project page README for more details.

+ +

I found a bug / I have an issue!

+ +

Please log the issue on the Mini Cart’s issue tracker, including a link or sample code that reproduces it if possible.

+ +

I made a change and want to integrate it back into the Mini Cart!

+ +

Awesome! Thanks for helping out. Please fork the Mini Cart code on Github. Once you're done with the change you can submit a pull request back to me. If everything looks good and the change is beneficial all I will integrate it.

+ +

I installed the Mini Cart, but my website still redirects to PayPal when clicking on a button. Why?

+ +

There's two causes for this. The first is quite easy and it's that you have inserted the Mini Cart JavaScript in the document head or at the top of your page. It needs to be inserted before the closing body element so that it can "see" the PayPal forms.

+ +

The other cause is that the Mini Cart doesn’t yet work with what PayPal’s call their “hosted” or “encrypted” buttons which is why this is most likely happening. To fix your buttons, you’ll need to log into paypal.com and do the following steps:

+ +
    +
  1. Create a button on PayPal’s website and uncheck the Save button at PayPal checkbox under Step 2: Track inventory, profit & loss.
  2. +
  3. Once you’ve created the button click Remove code protection before copying your button’s code.
  4. +

The Mini Cart isn’t emptying after a transaction is completed. Why?

+ +

The Mini Cart appends a fragment to your button’s return URL which sends a command to it when the user successfully returns from a transaction. If this is not working properly you should make sure that your are setting the value correctly and that it does not already contain a fragment.

+ +

Is non-JavaScript supported?

+ +

If your users do not have a JavaScript-capable browser, they will still be able to see your cart buttons and make purchases, but the user interface will gracefully degrade to the standard PayPal Cart.

+ +

My website uses frames / iframes for it’s products. How can I make the Mini Cart work?

+ +

Depending upon how your site is setup the Mini Cart isn’t always compatible with websites containing frames. To ensure that it works you need to have the product buttons on the same frame as the main window.

+ +

The Mini Cart isn’t appearing the same as on this page. Why?

+ +

This can occur if your page is being rendered in the browser’s Quirks mode. Example issues include appearing in the bottom left of the browser, not scrolling properly, or having rendering issues. To check for this issue, validate and correct your HTML markup using the W3C Markup Validator.

+ +

The Mini Cart is appearing behind objects on my page!

+ +

This happens when you have the position and z-index CSS properties set on an element. If you need to use z-index then you will need to add the following code to your CSS styles:

+ +
#PPMiniCart { position: relative; z-index: 100; }
+
+ +

and set the value to correspond with your code.

+ +

I don't like the way the Mini Cart looks / How can I customize the Mini Cart more?

+ +

The Mini Cart CSS is delivered as part of the code and shouldn't be changed. There are some values which can be changed via the config, e.g. the offset or position, but otherwise you'll need to override the Mini Cart's CSS in your own CSS using a higher CSS specificity.

+ +

Here's an example of changing the Mini Cart height so that it grows as products are added:

+ +
#myPage #PPMiniCart ul { height: auto; min-height: 130px; max-height: 500px; }
+
+ +

Note that using an additional id of #myPage in your CSS causes the rule to be more specific than the Mini Cart's and the bowser renders that instead.

+ +

Questions or comments

+ +

If you have questions or suggestions, please use the issue tracker at Github.

+
+ +
+ + + + \ No newline at end of file diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js new file mode 100644 index 0000000..87a40ca --- /dev/null +++ b/javascripts/scale.fix.js @@ -0,0 +1,17 @@ +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i=0; i\r\n \r\n\r\nIt’s as simple as that! Now the Mini Cart will appear when a user adds a product to, views, or has an item in their cart.\r\n\r\n\r\n\r\nCustomization\r\n-------------\r\n\r\nYou can customize the script to make it work for your site by passing a JavaScript object as an argument, setting any of the following optional properties:\r\n\r\n`parent` \r\nThe HTMLElement the Mini Cart should render as a child of. Default document.body.\r\n\r\n`formTarget` \r\nThe HTML target property for the checkout form.\r\n\r\n`displayEdge` \r\nThe edge of the page the cart should pin to. Set to left or right. Default right.\r\n\r\n`edgeDistance` \r\nDistance from the edge the cart should appear. Default 50px.\r\n\r\n`cookiePath` \r\nThe base path of your website to set the cookie to (useful for shared website hosting)\r\n\r\n`peekEnabled` \r\nBoolean to determine if the cart should \"peek\" when it's hidden with items. Default true.\r\n\r\n`paypalURL` \r\nThe PayPal URL to use if you are accessing sandbox or another version of the PayPal website. Defaults to https://www.paypal.com/cgi-bin/webscr.\r\n\r\n`strings` \r\nAn object of localizable text strings used: \r\n\r\n* `button` - The checkout button text\r\n* `subtotal` - The subtotal text \r\n* `discount` - The discount text \r\n* `shipping` - The shipping text \r\n\r\n`events` \r\nAn object of customizable callbacks (see [Event callback examples](#event-callback-examples)): \r\n\r\n* `onRender` - Event before the cart is rendered \r\n* `afterRender` - Event after the cart is rendered \r\n* `onHide` - Event before the cart is hidden \r\n* `afterHide` - Event after the cart is hidden \r\n* `onShow` - Event before the cart is shown \r\n* `afterShow` - Event after the cart is shown \r\n* `onAddToCart` - Event before a product is added to the cart \r\n* `afterAddToCart` - Event after a product is added to the cart \r\n* `onRemoveFromCart` - Event before a product is removed from the cart \r\n* `afterRemoveFromCart` - Event after a product is removed from the cart\r\n* `onCheckout` - Event before the checkout action takes place \r\n* `onReset` - Event before the cart is emptied (typically when a transaction is completed) \r\n* `afterReset` - Event after the cart is emptied (typically when a transaction is completed) \r\n\r\nThe scope of all events is adjusted to the Mini Cart to allow access to the products, UI, and certain functions. See below for an example of a custom configuration:\r\n\r\n \r\n\r\n\r\n\r\nEvent callback examples\r\n-----------------------\r\n\r\nExamples of how you can use the event callbacks:\r\n\r\n* [Preventing checkout until terms are accepted](http://www.minicartjs.com/examples/terms.html)\r\n* [Requiring a minimum quantity to checkout](http://www.minicartjs.com/examples/minquantity.html)\r\n* [Only allowing a fixed quantity per item](http://www.minicartjs.com/examples/fixedquantity.html)\r\n* [Supporting multiple options per item](http://www.minicartjs.com/examples/options.html)\r\n\r\n\r\n\r\nLocalization\r\n------------\r\n\r\nLocalization and adaption are supported in the Mini Cart using the configuration strings object. For example, if we wanted the cart to appear in French we would need to pass our configuration like this:\r\n\r\n \r\n\r\nThe currency symbol will be automatically adjusted based on the currency_code setting of your button.\r\n\r\n\r\n\r\nJavaScript API\r\n--------------\r\n\r\nThe Mini Cart has a rich JavaScript API which allows you to control it using the following methods:\r\n\r\n`PAYPAL.apps.MiniCart.render()` \r\nRenders the cart element to the page. This method is required to see the Mini Cart.\r\n\r\n`PAYPAL.apps.MiniCart.bindForm(form)` \r\nBinds a form DOM element's submit event to the Mini Cart. This is useful for forms which may have been added to the page after the initial load. \r\n\r\n`PAYPAL.apps.MiniCart.addToCart(data)` \r\nAllows you to manually add a product to your cart, e.g. directly using JavaScript and not through a PayPal form. The parameter `data` is a key / value pair object of parameters and their value. For example: \r\n\r\n {\"business\":\"user@example.com\",\"item_name\":\"Product\",\"amount\":\"5.00\",\"currency_code\":\"USD\"}\r\n\r\n`PAYPAL.apps.MiniCart.reset()` \r\nResets the cart, emptying and hiding it.\r\n\r\n`PAYPAL.apps.MiniCart.hide(null, fully)` \r\nHides the cart. If the cart contains products then it will \"peek\" from the top of the window. Set the parameter `fully` to true to override this and have it fully hidden.\r\n\r\n`PAYPAL.apps.MiniCart.show()` \r\nShows the cart.\r\n\r\n`PAYPAL.apps.MiniCart.toggle()` \r\nToggles the visibility of the cart.\r\n\r\n\r\n\r\nFAQ\r\n---\r\n\r\n### Is the Mini Cart free? How is it licensed?\r\nYes, it’s free and licensed using an [eBay Open Source License Agreement](https://github.com/jeffharrell/MiniCart/raw/master/LICENSE).\r\n\r\n### What browsers does the Mini Cart support?\r\nThe Mini Cart is functionally supported by Chrome, Safari, Firefox, Opera, and Internet Explorer 6+. Older versions of IE use cookies for their data store while all other browsers use localStorage.\r\n\r\n### I have special integration / translation needs. Are there advanced settings?\r\nYes, there’s a rich API which can be used to customize the Mini Cart. See the [project page README](https://github.com/jeffharrell/MiniCart#readme) for more details.\r\n\r\n### I found a bug / I have an issue!\r\nPlease log the issue on the [Mini Cart’s issue tracker](https://github.com/jeffharrell/MiniCart/issues), including a link or sample code that reproduces it if possible.\r\n\r\n### I made a change and want to integrate it back into the Mini Cart!\r\nAwesome! Thanks for helping out. Please fork the Mini Cart code on Github. Once you're done with the change you can submit a pull request back to me. If everything looks good and the change is beneficial all I will integrate it.\r\n\r\n### I installed the Mini Cart, but my website still redirects to PayPal when clicking on a button. Why?\r\nThere's two causes for this. The first is quite easy and it's that you have inserted the Mini Cart JavaScript in the document head or at the top of your page. It needs to be inserted before the closing body element so that it can \"see\" the PayPal forms.\r\n\r\nThe other cause is that the Mini Cart doesn’t yet work with what PayPal’s call their “hosted” or “encrypted” buttons which is why this is most likely happening. To fix your buttons, you’ll need to log into paypal.com and do the following steps:\r\n\r\n1. Create a button on PayPal’s website and uncheck the Save button at PayPal checkbox under Step 2: Track inventory, profit & loss.\r\n2. Once you’ve created the button click Remove code protection before copying your button’s code.\r\n\r\n### The Mini Cart isn’t emptying after a transaction is completed. Why?\r\nThe Mini Cart appends a fragment to your button’s return URL which sends a command to it when the user successfully returns from a transaction. If this is not working properly you should make sure that your are setting the value correctly and that it does not already contain a fragment.\r\n\r\n### Is non-JavaScript supported?\r\nIf your users do not have a JavaScript-capable browser, they will still be able to see your cart buttons and make purchases, but the user interface will gracefully degrade to the standard PayPal Cart.\r\n\r\n### My website uses frames / iframes for it’s products. How can I make the Mini Cart work?\r\nDepending upon how your site is setup the Mini Cart isn’t always compatible with websites containing frames. To ensure that it works you need to have the product buttons on the same frame as the main window.\r\n\r\n### The Mini Cart isn’t appearing the same as on this page. Why?\r\nThis can occur if your page is being rendered in the browser’s [Quirks mode](http://en.wikipedia.org/wiki/Quirks_mode). Example issues include appearing in the bottom left of the browser, not scrolling properly, or having rendering issues. To check for this issue, validate and correct your HTML markup using the [W3C Markup Validator](http://validator.w3.org/).\r\n\r\n### The Mini Cart is appearing behind objects on my page!\r\nThis happens when you have the position and z-index CSS properties set on an element. If you need to use z-index then you will need to add the following code to your CSS styles:\r\n\r\n #PPMiniCart { position: relative; z-index: 100; }\r\n\r\nand set the value to correspond with your code.\r\n\r\n### I don't like the way the Mini Cart looks / How can I customize the Mini Cart more?\r\nThe Mini Cart CSS is delivered as part of the code and shouldn't be changed. There are some values which can be changed via the config, e.g. the offset or position, but otherwise you'll need to override the Mini Cart's CSS in your own CSS using a higher CSS specificity. \r\n\r\nHere's an example of changing the Mini Cart height so that it grows as products are added:\r\n\r\n\t#myPage #PPMiniCart ul { height: auto; min-height: 130px; max-height: 500px; }\r\n\r\nNote that using an additional id of #myPage in your CSS causes the rule to be more specific than the Mini Cart's and the bowser renders that instead.\r\n\r\n\r\n\r\nQuestions or comments\r\n---------------------\r\n\r\nIf you have questions or suggestions, please use the [issue tracker](https://github.com/jeffharrell/MiniCart/issues) at Github.\r\n\r\n\r\n\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file diff --git a/stylesheets/pygment_trac.css b/stylesheets/pygment_trac.css new file mode 100644 index 0000000..c6a6452 --- /dev/null +++ b/stylesheets/pygment_trac.css @@ -0,0 +1,69 @@ +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ + +.type-csharp .highlight .k { color: #0000FF } +.type-csharp .highlight .kt { color: #0000FF } +.type-csharp .highlight .nf { color: #000000; font-weight: normal } +.type-csharp .highlight .nc { color: #2B91AF } +.type-csharp .highlight .nn { color: #000000 } +.type-csharp .highlight .s { color: #A31515 } +.type-csharp .highlight .sc { color: #A31515 } diff --git a/stylesheets/styles.css b/stylesheets/styles.css new file mode 100644 index 0000000..dacf2e1 --- /dev/null +++ b/stylesheets/styles.css @@ -0,0 +1,255 @@ +@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700); + +body { + padding:50px; + font:14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; + color:#777; + font-weight:300; +} + +h1, h2, h3, h4, h5, h6 { + color:#222; + margin:0 0 20px; +} + +p, ul, ol, table, pre, dl { + margin:0 0 20px; +} + +h1, h2, h3 { + line-height:1.1; +} + +h1 { + font-size:28px; +} + +h2 { + color:#393939; +} + +h3, h4, h5, h6 { + color:#494949; +} + +a { + color:#39c; + font-weight:400; + text-decoration:none; +} + +a small { + font-size:11px; + color:#777; + margin-top:-0.6em; + display:block; +} + +.wrapper { + width:860px; + margin:0 auto; +} + +blockquote { + border-left:1px solid #e5e5e5; + margin:0; + padding:0 0 0 20px; + font-style:italic; +} + +code, pre { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + color:#333; + font-size:12px; +} + +pre { + padding:8px 15px; + background: #f8f8f8; + border-radius:5px; + border:1px solid #e5e5e5; + overflow-x: auto; +} + +table { + width:100%; + border-collapse:collapse; +} + +th, td { + text-align:left; + padding:5px 10px; + border-bottom:1px solid #e5e5e5; +} + +dt { + color:#444; + font-weight:700; +} + +th { + color:#444; +} + +img { + max-width:100%; +} + +header { + width:270px; + float:left; + position:fixed; +} + +header ul { + list-style:none; + height:40px; + + padding:0; + + background: #eee; + background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); + background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + + border-radius:5px; + border:1px solid #d2d2d2; + box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0; + width:270px; +} + +header li { + width:89px; + float:left; + border-right:1px solid #d2d2d2; + height:40px; +} + +header ul a { + line-height:1; + font-size:11px; + color:#999; + display:block; + text-align:center; + padding-top:6px; + height:40px; +} + +strong { + color:#222; + font-weight:700; +} + +header ul li + li { + width:88px; + border-left:1px solid #fff; +} + +header ul li + li + li { + border-right:none; + width:89px; +} + +header ul a strong { + font-size:14px; + display:block; + color:#222; +} + +section { + width:500px; + float:right; + padding-bottom:50px; +} + +small { + font-size:11px; +} + +hr { + border:0; + background:#e5e5e5; + height:1px; + margin:0 0 20px; +} + +footer { + width:270px; + float:left; + position:fixed; + bottom:50px; +} + +@media print, screen and (max-width: 960px) { + + div.wrapper { + width:auto; + margin:0; + } + + header, section, footer { + float:none; + position:static; + width:auto; + } + + header { + padding-right:320px; + } + + section { + border:1px solid #e5e5e5; + border-width:1px 0; + padding:20px 0; + margin:0 0 20px; + } + + header a small { + display:inline; + } + + header ul { + position:absolute; + right:50px; + top:52px; + } +} + +@media print, screen and (max-width: 720px) { + body { + word-wrap:break-word; + } + + header { + padding:0; + } + + header ul, header p.view { + position:static; + } + + pre, code { + word-wrap:normal; + } +} + +@media print, screen and (max-width: 480px) { + body { + padding:15px; + } + + header ul { + display:none; + } +} + +@media print { + body { + padding:0.4in; + font-size:12pt; + color:#444; + } +} From 0c55c29a35dcadb53508798eafac2bfb3f54c1c6 Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Fri, 15 Mar 2013 22:51:43 -0700 Subject: [PATCH 02/50] Create gh-pages branch via GitHub From 39f5f360091a38045f550fc4c6d5fb8400b3a667 Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Mon, 1 Apr 2013 07:06:39 -0700 Subject: [PATCH 03/50] Adding CNAME file --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e7c19bd --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +minicart.com From bda1af84ed27f5635c4295a193e48d1b6577b85c Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Mon, 30 Sep 2013 20:31:33 -0700 Subject: [PATCH 04/50] Removing old files --- .gitignore | 3 +- .jshintrc | 68 -- LICENSE | 7 - README.md | 228 ---- dist/minicart.js | 2224 ---------------------------------- dist/minicart.min.js | 11 - grunt.js | 42 - images/arrow_down.gif | Bin 169 -> 0 bytes images/arrow_up.gif | Bin 169 -> 0 bytes images/button_submit.gif | Bin 53 -> 0 bytes images/minicart_sprite.png | Bin 1798 -> 0 bytes images/paypal_logo.gif | Bin 1850 -> 0 bytes images/x.gif | Bin 204 -> 0 bytes javascripts/scale.fix.js | 17 - lib/json2.js | 486 -------- package.json | 26 - params.json | 1 - src/minicart.js | 1737 -------------------------- stylesheets/pygment_trac.css | 69 -- stylesheets/styles.css | 255 ---- test/index.html | 59 - test/qunit/qunit.css | 153 --- test/qunit/qunit.js | 1261 ------------------- test/tests.js | 207 ---- 24 files changed, 1 insertion(+), 6853 deletions(-) delete mode 100644 .jshintrc delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 dist/minicart.js delete mode 100644 dist/minicart.min.js delete mode 100644 grunt.js delete mode 100644 images/arrow_down.gif delete mode 100644 images/arrow_up.gif delete mode 100644 images/button_submit.gif delete mode 100644 images/minicart_sprite.png delete mode 100644 images/paypal_logo.gif delete mode 100644 images/x.gif delete mode 100644 javascripts/scale.fix.js delete mode 100644 lib/json2.js delete mode 100644 package.json delete mode 100644 params.json delete mode 100644 src/minicart.js delete mode 100644 stylesheets/pygment_trac.css delete mode 100644 stylesheets/styles.css delete mode 100755 test/index.html delete mode 100755 test/qunit/qunit.css delete mode 100755 test/qunit/qunit.js delete mode 100755 test/tests.js diff --git a/.gitignore b/.gitignore index 1c3e58b..3d72576 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -node_modules .DS_Store -*.log \ No newline at end of file +.idea \ No newline at end of file diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 0013810..0000000 --- a/.jshintrc +++ /dev/null @@ -1,68 +0,0 @@ -{ - "passfail": false, - "maxerr": 100, - - - "browser": true, - "node": false, - "rhino": false, - "couch": false, - "wsh": false, - - "jquery": false, - "prototypejs": false, - "mootools": false, - "dojo": false, - - "predef": [], - - "debug": false, - "devel": false, - - "es5": true, - "strict": true, - "globalstrict": false, - - "asi": false, - "laxbreak": false, - "bitwise": false, - "boss": true, - "curly": true, - "eqeqeq": true, - "eqnull": false, - "evil": false, - "expr": true, - "forin": false, - "immed": true, - "latedef": false, - "loopfunc": false, - "noarg": false, - "regexp": false, - "regexdash": false, - "scripturl": false, - "shadow": false, - "supernew": false, - "undef": true, - "validthis": false, - "smarttabs": true, - "proto": false, - "onecase": false, - "nonstandard": false, - "multistr": false, - "laxcomma": false, - "lastsemic": false, - "iterator": false, - "funcscope": false, - "esnext": false, - - "newcap": false, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "sub": false, - "trailing": true, - "white": true, - "indent": 4 -} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ee4dd86..0000000 --- a/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2013 Jeff Harrell - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 7a4c6b9..0000000 --- a/README.md +++ /dev/null @@ -1,228 +0,0 @@ -The Mini Cart -============= - -The Mini Cart is a great way to improve your PayPal integration by creating an overlay which appears as a user adds products to their cart. It’s a simple change that creates a wonderful new experience for your website! - - -1. [Setup](#interested-let%E2%80%99s-get-you-setup) -2. [Customization](#customization) -3. [Event callback examples](#event-callback-examples) -4. [Localization](#localization) -5. [JavaScript API](#javascript-api) -6. [FAQ](#faq) -7. [Questions or comments](#questions-or-comments) - - - -Interested? Let’s get you setup -------------------------------- - -1. Start with a PayPal [Add to Cart Button](https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/web-accept-to-sc-button-outside) -2. Download the latest [minicart.js](https://raw.github.com/jeffharrell/MiniCart/master/dist/minicart.min.js) – You can also browse the [tagged versions](https://github.com/jeffharrell/MiniCart/tags) -3. Next, include the following snippet of JavaScript code into your HTML file before the closing </body> tag - -Make sure to update the path to point to your downloaded copy of minicart.js! - - - - -It’s as simple as that! Now the Mini Cart will appear when a user adds a product to, views, or has an item in their cart. - - - -Customization -------------- - -You can customize the script to make it work for your site by passing a JavaScript object as an argument, setting any of the following optional properties: - -`parent` -The HTMLElement the Mini Cart should render as a child of. Default document.body. - -`formTarget` -The HTML target property for the checkout form. - -`displayEdge` -The edge of the page the cart should pin to. Set to left or right. Default right. - -`edgeDistance` -Distance from the edge the cart should appear. Default 50px. - -`cookiePath` -The base path of your website to set the cookie to (useful for shared website hosting) - -`peekEnabled` -Boolean to determine if the cart should "peek" when it's hidden with items. Default true. - -`paypalURL` -The PayPal URL to use if you are accessing sandbox or another version of the PayPal website. Defaults to https://www.paypal.com/cgi-bin/webscr. - -`strings` -An object of localizable text strings used: - -* `button` - The checkout button text -* `subtotal` - The subtotal text -* `discount` - The discount text -* `shipping` - The shipping text - -`events` -An object of customizable callbacks (see [Event callback examples](#event-callback-examples)): - -* `onRender` - Event before the cart is rendered -* `afterRender` - Event after the cart is rendered -* `onHide` - Event before the cart is hidden -* `afterHide` - Event after the cart is hidden -* `onShow` - Event before the cart is shown -* `afterShow` - Event after the cart is shown -* `onAddToCart` - Event before a product is added to the cart -* `afterAddToCart` - Event after a product is added to the cart -* `onRemoveFromCart` - Event before a product is removed from the cart -* `afterRemoveFromCart` - Event after a product is removed from the cart -* `onCheckout` - Event before the checkout action takes place -* `onReset` - Event before the cart is emptied (typically when a transaction is completed) -* `afterReset` - Event after the cart is emptied (typically when a transaction is completed) - -The scope of all events is adjusted to the Mini Cart to allow access to the products, UI, and certain functions. See below for an example of a custom configuration: - - - - - -Event callback examples ------------------------ - -Examples of how you can use the event callbacks: - -* [Preventing checkout until terms are accepted](http://www.minicartjs.com/examples/terms.html) -* [Requiring a minimum quantity to checkout](http://www.minicartjs.com/examples/minquantity.html) -* [Only allowing a fixed quantity per item](http://www.minicartjs.com/examples/fixedquantity.html) -* [Supporting multiple options per item](http://www.minicartjs.com/examples/options.html) - - - -Localization ------------- - -Localization and adaption are supported in the Mini Cart using the configuration strings object. For example, if we wanted the cart to appear in French we would need to pass our configuration like this: - - - -The currency symbol will be automatically adjusted based on the currency_code setting of your button. - - - -JavaScript API --------------- - -The Mini Cart has a rich JavaScript API which allows you to control it using the following methods: - -`PAYPAL.apps.MiniCart.render()` -Renders the cart element to the page. This method is required to see the Mini Cart. - -`PAYPAL.apps.MiniCart.bindForm(form)` -Binds a form DOM element's submit event to the Mini Cart. This is useful for forms which may have been added to the page after the initial load. - -`PAYPAL.apps.MiniCart.addToCart(data)` -Allows you to manually add a product to your cart, e.g. directly using JavaScript and not through a PayPal form. The parameter `data` is a key / value pair object of parameters and their value. For example: - - {"business":"user@example.com","item_name":"Product","amount":"5.00","currency_code":"USD"} - -`PAYPAL.apps.MiniCart.reset()` -Resets the cart, emptying and hiding it. - -`PAYPAL.apps.MiniCart.hide(null, fully)` -Hides the cart. If the cart contains products then it will "peek" from the top of the window. Set the parameter `fully` to true to override this and have it fully hidden. - -`PAYPAL.apps.MiniCart.show()` -Shows the cart. - -`PAYPAL.apps.MiniCart.toggle()` -Toggles the visibility of the cart. - - - -FAQ ---- - -### Is the Mini Cart free? How is it licensed? -Yes, it’s free and licensed under the [MIT License](https://github.com/jeffharrell/MiniCart/raw/master/LICENSE). - -### What browsers does the Mini Cart support? -The Mini Cart is functionally supported by Chrome, Safari, Firefox, Opera, and Internet Explorer 6+. Older versions of IE use cookies for their data store while all other browsers use localStorage. - -### I have special integration / translation needs. Are there advanced settings? -Yes, there’s a rich API which can be used to customize the Mini Cart. See the [project page README](https://github.com/jeffharrell/MiniCart#readme) for more details. - -### I found a bug / I have an issue! -Please log the issue on the [Mini Cart’s issue tracker](https://github.com/jeffharrell/MiniCart/issues), including a link or sample code that reproduces it if possible. - -### I made a change and want to integrate it back into the Mini Cart! -Awesome! Thanks for helping out. Please fork the Mini Cart code on Github. Once you're done with the change you can submit a pull request back to me. If everything looks good and the change is beneficial all I will integrate it. - -### I installed the Mini Cart, but my website still redirects to PayPal when clicking on a button. Why? -There's two causes for this. The first is quite easy and it's that you have inserted the Mini Cart JavaScript in the document head or at the top of your page. It needs to be inserted before the closing body element so that it can "see" the PayPal forms. - -The other cause is that the Mini Cart doesn’t yet work with what PayPal’s call their “hosted” or “encrypted” buttons which is why this is most likely happening. To fix your buttons, you’ll need to log into paypal.com and do the following steps: - -1. Create a button on PayPal’s website and uncheck the Save button at PayPal checkbox under Step 2: Track inventory, profit & loss. -2. Once you’ve created the button click Remove code protection before copying your button’s code. - -### The Mini Cart isn’t emptying after a transaction is completed. Why? -The Mini Cart appends a fragment to your button’s return URL which sends a command to it when the user successfully returns from a transaction. If this is not working properly you should make sure that your are setting the value correctly and that it does not already contain a fragment. - -### Is non-JavaScript supported? -If your users do not have a JavaScript-capable browser, they will still be able to see your cart buttons and make purchases, but the user interface will gracefully degrade to the standard PayPal Cart. - -### My website uses frames / iframes for it’s products. How can I make the Mini Cart work? -Depending upon how your site is setup the Mini Cart isn’t always compatible with websites containing frames. To ensure that it works you need to have the product buttons on the same frame as the main window. - -### The Mini Cart isn’t appearing the same as on this page. Why? -This can occur if your page is being rendered in the browser’s [Quirks mode](http://en.wikipedia.org/wiki/Quirks_mode). Example issues include appearing in the bottom left of the browser, not scrolling properly, or having rendering issues. To check for this issue, validate and correct your HTML markup using the [W3C Markup Validator](http://validator.w3.org/). - -### The Mini Cart is appearing behind objects on my page! -This happens when you have the position and z-index CSS properties set on an element. If you need to use z-index then you will need to add the following code to your CSS styles: - - #PPMiniCart { position: relative; z-index: 100; } - -and set the value to correspond with your code. - -### I don't like the way the Mini Cart looks / How can I customize the Mini Cart more? -The Mini Cart CSS is delivered as part of the code and shouldn't be changed. There are some values which can be changed via the config, e.g. the offset or position, but otherwise you'll need to override the Mini Cart's CSS in your own CSS using a higher CSS specificity. - -Here's an example of changing the Mini Cart height so that it grows as products are added: - - #myPage #PPMiniCart ul { height: auto; min-height: 130px; max-height: 500px; } - -Note that using an additional id of #myPage in your CSS causes the rule to be more specific than the Mini Cart's and the bowser renders that instead. - - - -Questions or comments ---------------------- - -If you have questions or suggestions, please use the [issue tracker](https://github.com/jeffharrell/MiniCart/issues) at Github. - - - diff --git a/dist/minicart.js b/dist/minicart.js deleted file mode 100644 index 56b2a89..0000000 --- a/dist/minicart.js +++ /dev/null @@ -1,2224 +0,0 @@ -/*! - * MiniCart - * - * @author Jeff Harrell - * @license MIT - */ -if (typeof PAYPAL === 'undefined' || !PAYPAL) { - var PAYPAL = {}; -} - -PAYPAL.apps = PAYPAL.apps || {}; - - -(function () { - 'use strict'; - - /** - * Default configuration - */ - var config = { - /** - * The parent element the cart should "pin" to - */ - parent: document.body, - - /** - * Edge of the window to pin the cart to - */ - displayEdge: 'right', - - /** - * Distance from the edge of the window - */ - edgeDistance: '50px', - - /** - * HTML target property for the checkout form - */ - formTarget: null, - - /** - * The base path of your website to set the cookie to - */ - cookiePath: '/', - - /** - * The number of days to keep the cart data - */ - cartDuration: 30, - - /** - * Strings used for display text - */ - strings: { - button: 'Checkout', - subtotal: 'Subtotal: ', - discount: 'Discount: ', - shipping: 'does not include shipping & tax', - processing: 'Processing...' - }, - - /** - * Unique ID used on the wrapper element - */ - name: 'PPMiniCart', - - /** - * Boolean to determine if the cart should "peek" when it's hidden with items - */ - peekEnabled: true, - - /** - * The URL of the PayPal website - */ - paypalURL: 'https://www.paypal.com/cgi-bin/webscr', - - /** - * The base URL to the visual assets - */ - assetURL: 'http://www.minicartjs.com/build/', - - events: { - /** - * Custom event fired before the cart is rendered - */ - onRender: null, - - /** - * Custom event fired after the cart is rendered - */ - afterRender: null, - - /** - * Custom event fired before the cart is hidden - * - * @param e {event} The triggering event - */ - onHide: null, - - /** - * Custom event fired after the cart is hidden - * - * @param e {event} The triggering event - */ - afterHide: null, - - /** - * Custom event fired before the cart is shown - * - * @param e {event} The triggering event - */ - onShow: null, - - /** - * Custom event fired after the cart is shown - * - * @param e {event} The triggering event - */ - afterShow: null, - - /** - * Custom event fired before a product is added to the cart - * - * @param data {object} Product object - */ - onAddToCart: null, - - /** - * Custom event fired after a product is added to the cart - * - * @param data {object} Product object - */ - afterAddToCart: null, - - /** - * Custom event fired before a product is removed from the cart - * - * @param data {object} Product object - */ - onRemoveFromCart: null, - - /** - * Custom event fired after a product is removed from the cart - * - * @param data {object} Product object - */ - afterRemoveFromCart: null, - - /** - * Custom event fired before the checkout action takes place - * - * @param e {event} The triggering event - */ - onCheckout: null, - - /** - * Custom event fired before the cart is reset - */ - onReset: null, - - /** - * Custom event fired after the cart is reset - */ - afterReset: null - } - }; - - - if (!PAYPAL.apps.MiniCart) { - - /** - * Mini Cart application - */ - PAYPAL.apps.MiniCart = (function () { - - var minicart = {}, - isShowing = false, - isRendered = false; - - - /** PRIVATE **/ - - /** - * PayPal form cmd values which are supported - */ - var SUPPORTED_CMDS = { _cart: true, _xclick: true }; - - - /** - * The form origin that is passed to PayPal - */ - var BN_VALUE = 'MiniCart_AddToCart_WPS_US'; - - - /** - * Regex filter for cart settings, which appear only once in a cart - */ - var SETTING_FILTER = /^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/; - - - /** - * Adds the cart's CSS to the page in a + + +
+
+ + + + + + + + Test Product + +
+
+ + + + + + diff --git a/examples/minquantity.html b/examples/minquantity.html new file mode 100644 index 0000000..d8a0f87 --- /dev/null +++ b/examples/minquantity.html @@ -0,0 +1,62 @@ + + + + + + + +
+
+ + + + + + + + Test Product + +
+
+ +
+
+ + + + + + + + Test Product 2 + +
+
+ + + + + + diff --git a/examples/notempty.html b/examples/notempty.html new file mode 100644 index 0000000..78dc346 --- /dev/null +++ b/examples/notempty.html @@ -0,0 +1,60 @@ + + + + + + + + +
+
+ + + + + + + + +

+ +

+ + +
+
+ + + + + + + diff --git a/examples/options.html b/examples/options.html new file mode 100644 index 0000000..62cbb79 --- /dev/null +++ b/examples/options.html @@ -0,0 +1,54 @@ + + + + + + + + +
+
+ + + + + + + + + + Test Product +

+ +

+

+ +

+

+ +

+ + +
+
+ + + + + + + diff --git a/examples/positioning.html b/examples/positioning.html new file mode 100644 index 0000000..6fa02a2 --- /dev/null +++ b/examples/positioning.html @@ -0,0 +1,40 @@ + + + + + + + + +
+ +
+
+ + + + + + + + + + Test Product + +
+
+ + + + + + diff --git a/examples/shipping.html b/examples/shipping.html new file mode 100644 index 0000000..1644cad --- /dev/null +++ b/examples/shipping.html @@ -0,0 +1,33 @@ + + + + + + + +
+
+ + + + + + + + + + + + Test Product + +
+
+ + + + + + + diff --git a/examples/terms.html b/examples/terms.html new file mode 100644 index 0000000..322abc1 --- /dev/null +++ b/examples/terms.html @@ -0,0 +1,50 @@ + + + + + + + +
+ + + + + + + + + + + + Test Product + +

+ +

+ + +
+ + + + + + From 82c7119e1d7a453c37fbfef80e2be581e15652aa Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Sat, 5 Oct 2013 21:55:00 -0700 Subject: [PATCH 12/50] Adding legacy build images --- build/images/arrow_down.gif | Bin 0 -> 169 bytes build/images/arrow_up.gif | Bin 0 -> 169 bytes build/images/button_submit.gif | Bin 0 -> 53 bytes build/images/minicart_sprite.png | Bin 0 -> 1798 bytes build/images/paypal_logo.gif | Bin 0 -> 1850 bytes build/images/x.gif | Bin 0 -> 204 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 build/images/arrow_down.gif create mode 100644 build/images/arrow_up.gif create mode 100644 build/images/button_submit.gif create mode 100644 build/images/minicart_sprite.png create mode 100644 build/images/paypal_logo.gif create mode 100644 build/images/x.gif diff --git a/build/images/arrow_down.gif b/build/images/arrow_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..5032864f884a19297dc3d18fa43b121f0b2a4136 GIT binary patch literal 169 zcmZ?wbhEHbfW<=xs$hFd+=)Ksaso*-@NtsO~b>xNv{_iCftdx25-O&YHOG|Ns9CL<7a2EQ|~cf($w!9UwaySk)FhVoC876PRq{ k@Oqb%2=BqyW}AGj=udjy!u005u?~abqx^z^HUfW<=xs$hFd+=)Ksaso*-@NtsO~b>xNv{_iCftdx25-O&YHOG|Ns9CL<7a2EQ|~cf($w!9UwaySk)3#`i>jSTg;%t kHjAmiaR)~Z`{x@sY7*SEK zv1S}*g~%w)EH>W@8S^pCLL0C5$M=2zfcLqs`?;U{m;1V}=ee#Y*WK0rfZ7Q)003~n z(ZLR~$J{*xss3ZH>#Jr4?9p*F7>@QtA<^*xw}SyTL8!oB9mlAEkYGq~Ku}^#U+`}L zfC9$d84BLr-K}8^nIcPA?6G0KfY8V?ca0k#A72q~a5x-GNTL=n=p|#|dgfme>E_nf z_PlUKAP{tScTdi*KtuE1@#kHVp7)K+nunDxiq^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scLUk1=~jw5|&DF74Fi1WuzN!a#K3mC|h zoJ$cnp#uRRm~urWs?6X=BmfBi0YU-90bm53RRO?5O&_$?7I*>taYQ5k071?Xmki^= zIPHLE&Og2K6plo9_~B9{bC3YRGBs#&$3I*=Fau08$O1+LE}a0$Ke4z(hc+3!Gy^mL ztTT#vyJ(;R2PLF22@3yEU7>NCl3wrWdP{`@lPnx1n@&2 z=#2635j;l(C;)|EF;PBkr0dW>Z&30Q9tXbhMREf~fP_Fekiydv9!!+P4*?kS!9$Ah z6bKngcz6H|f=Co90Pd{+Fi{T}z(mO>a)6KkOhUXMP!~0fTE|0%(6G}KI!puu!Kf&r zg+0xju~RVr^kNhZYD{E?OFYyv5g#VML_#Gm36_XJtj9D!4XFsUM+Lx!@{tr@Z|2V;0N5evY$ zVALXMpi#mZ4Y=U}8XOGMN)8htu>%s_vxyvHVF7)}!2?7P!w!NZ5CrVUC9sIWLkvKL zRp4L1hBxz o0FVOd-SCG%yx|TPU`T)1%P(4nJ8k22r@ia%MvGCCj< zWTykGr-DFFie{G+GefUH$NLL0T}7tMJRyynts1-d5;`0d1P^Cz$+Bucul8AS!5WPw ib`wVhl_mNtM}ssXG&t@y8A|e~^&DO4Qs2tJU=08~UtU%K literal 0 HcmV?d00001 From 771654cb8549ec0f0ea10e9d9880c1645a574f4d Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Sun, 6 Oct 2013 22:43:08 -0700 Subject: [PATCH 13/50] Updating dist --- dist/minicart.js | 10 +++++++++- dist/minicart.min.js | 9 ++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dist/minicart.js b/dist/minicart.js index 912726d..6d66704 100644 --- a/dist/minicart.js +++ b/dist/minicart.js @@ -79,6 +79,14 @@ PAYPAL.apps = PAYPAL.apps || {}; */ assetURL: 'http://www.minicartjs.com/build/', + /** + * Boolean to determine if the cart should be reset on payment completion + */ + resetCartOnSuccess: true, + + /** + * Life-cycle events + */ events: { /** * Custom event fired before the cart is rendered @@ -487,7 +495,7 @@ PAYPAL.apps = PAYPAL.apps || {}; product.amount = product.amount || 0; // Add Mini Cart specific settings - if (settings['return'] && settings['return'].indexOf('#') === -1) { + if (config.resetCartOnSuccess && settings['return'] && settings['return'].indexOf('#') === -1) { settings['return'] += '#' + config.name + '=reset'; } diff --git a/dist/minicart.min.js b/dist/minicart.min.js index f38c799..691dfac 100644 --- a/dist/minicart.min.js +++ b/dist/minicart.min.js @@ -1,11 +1,10 @@ /*! - * MiniCart + * minicart * * Improve your PayPal integration by creating an overlay which appears as a user adds products to their cart. * - * @version 2.5.0 - 2013-09-26 + * @version 2.5.0 - 2013-10-06 * @author Jeff Harrell - * @url http://www.minicartjs.com/ + * @url * @license MIT - */ -if(typeof PAYPAL=="undefined"||!PAYPAL)var PAYPAL={};PAYPAL.apps=PAYPAL.apps||{},function(){"use strict";var e={parent:document.body,displayEdge:"right",edgeDistance:"50px",formTarget:null,cookiePath:"/",cartDuration:30,strings:{button:"Checkout",subtotal:"Subtotal: ",discount:"Discount: ",shipping:"does not include shipping & tax",processing:"Processing..."},name:"PPMiniCart",peekEnabled:!0,paypalURL:"https://www.paypal.com/cgi-bin/webscr",assetURL:"http://www.minicartjs.com/build/",events:{onRender:null,afterRender:null,onHide:null,afterHide:null,onShow:null,afterShow:null,onAddToCart:null,afterAddToCart:null,onRemoveFromCart:null,afterRemoveFromCart:null,onCheckout:null,onReset:null,afterReset:null}};if(!PAYPAL.apps.MiniCart){PAYPAL.apps.MiniCart=function(){var r={},i=!1,s=!1,o={_cart:!0,_xclick:!0},u="MiniCart_AddToCart_WPS_US",a=/^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/,f=function(){var t=e.name,n=[],r,i;n.push("#"+t+" form { position:fixed; float:none; top:-250px; "+e.displayEdge+":"+e.edgeDistance+"; width:265px; margin:0; padding:50px 10px 0; min-height:170px; background:#fff url("+e.assetURL+"images/minicart_sprite.png) no-repeat -125px -60px; border:1px solid #999; border-top:0; font:13px/normal arial, helvetica; color:#333; text-align:left; -moz-border-radius:0 0 8px 8px; -webkit-border-radius:0 0 8px 8px; border-radius:0 0 8px 8px; -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); } "),n.push("#"+t+" ul { position:relative; overflow-x:hidden; overflow-y:auto; height:130px; margin:0 0 7px; padding:0; list-style-type:none; border-top:1px solid #ccc; border-bottom:1px solid #ccc; } "),n.push("#"+t+" li { position:relative; margin:-1px 0 0; padding:6px 5px 6px 0; border-top:1px solid #f2f2f2; } "),n.push("#"+t+" li a { display: block; width: 155px; color:#333; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } "),n.push("#"+t+" li a span { display:block; color:#999; font-size:10px; } "),n.push("#"+t+" li .quantity { position:absolute; top:.5em; right:78px; width:22px; padding:1px; border:1px solid #83a8cc; text-align:right; } "),n.push("#"+t+" li .price { position:absolute; top:.5em; right:4px; } "),n.push("#"+t+" li .remove { position:absolute; top:9px; right:60px; width:14px; height:14px; background:url("+e.assetURL+"images/minicart_sprite.png) no-repeat -134px -4px; border:0; cursor:pointer; } "),n.push("#"+t+" p { margin:0; padding:0 0 0 20px; background:url("+e.assetURL+"images/minicart_sprite.png) no-repeat; font-size:13px; font-weight:bold; } "),n.push("#"+t+" p:hover { cursor:pointer; } "),n.push("#"+t+" p input { float:right; margin:4px 0 0; padding:1px 4px; text-decoration:none; font-weight:normal; color:#333; background:#ffa822 url("+e.assetURL+"images/minicart_sprite.png) repeat-x left center; border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } "),n.push("#"+t+" p .shipping { display:block; font-size:10px; font-weight:normal; color:#999; } "),r=document.createElement("style"),r.type="text/css",r.styleSheet?r.styleSheet.cssText=n.join(""):r.appendChild(document.createTextNode(n.join(""))),i=document.getElementsByTagName("head")[0],i.appendChild(r)},l=function(){var t=r.UI,i,s,o,a,f;t.wrapper=document.createElement("div"),t.wrapper.id=e.name,i=document.createElement("input"),i.type="hidden",i.name="cmd",i.value="_cart",s=i.cloneNode(!1),s.name="upload",s.value="1",o=i.cloneNode(!1),o.name="bn",o.value=u,t.cart=document.createElement("form"),t.cart.method="post",t.cart.action=e.paypalURL,e.formTarget&&(t.cart.target=e.formTarget),t.cart.appendChild(i),t.cart.appendChild(s),t.cart.appendChild(o),t.wrapper.appendChild(t.cart),t.itemList=document.createElement("ul"),t.cart.appendChild(t.itemList),t.summary=document.createElement("p"),t.cart.appendChild(t.summary),t.button=document.createElement("input"),t.button.type="submit",t.button.value=e.strings.button,t.summary.appendChild(t.button),t.subtotal=document.createElement("span"),n.util.setText(t.subtotal,e.strings.subtotal),t.subtotalAmount=document.createElement("span"),n.util.setText(t.subtotalAmount,"0.00"),t.subtotal.appendChild(t.subtotalAmount),t.summary.appendChild(t.subtotal),t.shipping=document.createElement("span"),t.shipping.className="shipping",n.util.setText(t.shipping,e.strings.shipping),t.summary.appendChild(t.shipping);if(window.attachEvent&&!window.opera){f=navigator.userAgent.match(/MSIE\s([^;]*)/);if(f){f=parseFloat(f[1]);if(f<7||f>=7&&document.compatMode==="BackCompat")t.cart.style.position="absolute",t.wrapper.style[e.displayEdge]="0",t.wrapper.style.setExpression("top","x = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop")}}a=typeof e.parent=="string"?document.getElementById(e.parent):e.parent,a.appendChild(t.wrapper)},c=function(){var e=r.UI,t,s,u;t=document.getElementsByTagName("form");for(u=0;u=15){s.style.backgroundColor="transparent",o==="0.00"&&r.reset();return}setTimeout(p,30)}()},r.show=function(t){var s=parseInt(r.UI.cart.offsetTop,10),o=0,u=e.events,a=u.onShow,f=u.afterShow;t&&t.preventDefault&&t.preventDefault();if(typeof a=="function"&&a.call(r,t)===!1)return;n.util.animate(r.UI.cart,"top",{from:s,to:o},function(){typeof f=="function"&&f.call(r,t)}),r.UI.summary.style.backgroundPosition="-195px 2px",i=!0},r.hide=function(t,s){var o=r.UI,u=o.cart,a=o.summary,f=u.offsetHeight?u.offsetHeight:document.defaultView.getComputedStyle(u,"").getPropertyValue("height"),l=a.offsetHeight?a.offsetHeight:document.defaultView.getComputedStyle(a,"").getPropertyValue("height"),c=parseInt(u.offsetTop,10),h=e.events,p=h.onHide,d=h.afterHide,v;s||r.products.length===0||!e.peekEnabled?v=f*-1:v=(f-l-8)*-1,t&&t.preventDefault&&t.preventDefault();if(typeof p=="function"&&p.call(r,t)===!1)return;n.util.animate(u,"top",{from:c,to:v},function(){typeof d=="function"&&d.call(r,t)}),a.style.backgroundPosition="-195px -32px",i=!1},r.toggle=function(e){i?r.hide(e):r.show(e)},r.reset=function(){var t=r.UI,s=e.events,o=s.onReset,u=s.afterReset;if(typeof o=="function"&&o.call(r)===!1)return;r.products=[],i&&(n.util.setText(t.itemList,""),n.util.setText(t.subtotalAmount,""),r.hide(null,!0)),n.storage.remove(),typeof u=="function"&&u.call(r)},r}();var t=function(e,t){this._view(e,t)};t.prototype={_view:function(e,t){var r,i,s,o,u,a,f;this.product=e.product,this.settings=e.settings,this.liNode=document.createElement("li"),this.nameNode=document.createElement("a"),this.metaNode=document.createElement("span"),this.discountNode=document.createElement("span"),this.discountInput=document.createElement("input"),this.priceNode=document.createElement("span"),this.quantityInput=document.createElement("input"),this.removeInput=document.createElement("input");if(!this.product||!this.product.item_name&&!this.product.item_number){this.isPlaceholder=!0;return}this.product.item_name&&(r=this.product.item_name),n.util.setText(this.nameNode,r),this.nameNode.href=this.product.href,this.nameNode.appendChild(this.metaNode),this.product.item_number&&n.util.setText(this.metaNode,this.product.item_number,null,"
"),u=this.getOptions();for(f in u)n.util.setText(this.metaNode,f+": "+u[f],this.metaNode.innerHTML,"
");o=this.getDiscount(),o>=0&&(this.discountInput.type="hidden",this.discountInput.name="discount_amount_"+t,this.discountInput.value=o,this.metaNode.appendChild(this.discountInput)),i=this.getPrice(),this.priceNode.className="price",s=this.getQuantity(),this.quantityInput.name="quantity_"+t,this.quantityInput.className="quantity",this.quantityInput.setAttribute("autocomplete","off"),this.setQuantity(s),this.removeInput.type="button",this.removeInput.className="remove",this.liNode.appendChild(this.nameNode),this.liNode.appendChild(this.quantityInput),o&&this.liNode.appendChild(this.discountInput),this.liNode.appendChild(this.removeInput),this.liNode.appendChild(this.priceNode);for(f in this.product)f!=="quantity"&&f.indexOf("discount_")===-1&&(a=document.createElement("input"),a.type="hidden",a.name=f+"_"+t,a.value=this.product[f],this.liNode.appendChild(a))},getDiscount:function(){var e=0,t=this.product.discount_num||-1,n;return this.product.discount_amount>=0?(e=parseFloat(this.product.discount_amount),this.product.discount_amount2&&(n=this.getQuantity(),n>1&&(e+=Math.min(n-1,t)*parseFloat(this.product.discount_amount2)))):this.product.discount_rate>=0&&(e=this.product.amount*parseFloat(this.product.discount_rate)/100,this.product.discount_rate2&&(n=this.getQuantity(),n>1&&(e+=Math.min(n-1,t)*this.product.amount*parseFloat(this.product.discount_amount2)/100))),e&&e.toFixed(2)},getOptions:function(){var e={},t=0;while(typeof this.product["on"+t]!="undefined")e[this.product["on"+t]]=this.product["os"+t],t++;return e},setQuantity:function(t){var r;t=parseInt(t,10),this.product.quantity=t;if(this.quantityInput.value!==t){this.quantityInput.value=t;if(r=this.getDiscount())this.discountInput.value=r,this.discountNode.innerHTML||this.metaNode.appendChild(this.discountNode),n.util.setText(this.discountNode,this.discountNode.innerHTML+e.strings.discount+n.util.formatCurrency(r,this.settings.currency_code))}this.setPrice(this.product.amount*t)},getQuantity:function(){return typeof this.product.quantity!==undefined?this.product.quantity:1},setPrice:function(e){e=parseFloat(e,10),n.util.setText(this.priceNode,n.util.formatCurrency(e.toFixed(2),this.settings.currency_code))},getPrice:function(){return(this.product.amount*this.getQuantity()).toFixed(2)}};var n={};n.storage=function(){var t=e.name;return window.localStorage?{load:function(){var e=localStorage.getItem(t),r,i;e&&(e=JSON.parse(decodeURIComponent(e)));if(e&&e.expires){r=new Date,i=new Date(e.expires);if(r>i){n.storage.remove();return}}return e&&e.value?e.value:e},save:function(e,n){var r=new Date,i=[],s,o,u,a;if(e){for(a=0,u=e.length;a0&&s>n.to||i<0&&s",">"),i+=r||"",e.innerHTML=i},formatCurrency:function(e,t){var n={AED:{before:"ج"},ANG:{before:"ƒ"},ARS:{before:"$"},AUD:{before:"$"},AWG:{before:"ƒ"},BBD:{before:"$"},BGN:{before:"лв"},BMD:{before:"$"},BND:{before:"$"},BRL:{before:"R$"},BSD:{before:"$"},CAD:{before:"$"},CHF:{before:""},CLP:{before:"$"},CNY:{before:"¥"},COP:{before:"$"},CRC:{before:"₡"},CZK:{before:"Kc"},DKK:{before:"kr"},DOP:{before:"$"},EEK:{before:"kr"},EUR:{before:"€"},GBP:{before:"£"},GTQ:{before:"Q"},HKD:{before:"$"},HRK:{before:"kn"},HUF:{before:"Ft"},IDR:{before:"Rp"},ILS:{before:"₪"},INR:{before:"Rs."},ISK:{before:"kr"},JMD:{before:"J$"},JPY:{before:"¥"},KRW:{before:"₩"},KYD:{before:"$"},LTL:{before:"Lt"},LVL:{before:"Ls"},MXN:{before:"$"},MYR:{before:"RM"},NOK:{before:"kr"},NZD:{before:"$"},PEN:{before:"S/"},PHP:{before:"Php"},PLN:{before:"z"},QAR:{before:"﷼"},RON:{before:"lei"},RUB:{before:"руб"},SAR:{before:"﷼"},SEK:{before:"kr"},SGD:{before:"$"},THB:{before:"฿"},TRY:{before:"TL"},TTD:{before:"TT$"},TWD:{before:"NT$"},UAH:{before:"₴"},USD:{before:"$"},UYU:{before:"$U"},VEF:{before:"Bs"},VND:{before:"₫"},XCD:{before:"$"},ZAR:{before:"R"}},r=n[t]||{},i=r.before||"",s=r.after||"";return i+e+s}}}}(),typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;ni||i>=7&&"BackCompat"===document.compatMode)&&(j.cart.style.position="absolute",j.wrapper.style[a.displayEdge]="0",j.wrapper.style.setExpression("top","x = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop")))),g="string"==typeof a.parent?document.getElementById(a.parent):a.parent,g.appendChild(j.wrapper)},l=function(){var a,b,f,h=d.UI;for(a=document.getElementsByTagName("form"),f=0;fd;d++)r(a[d])&&(e=!0)},o=function(a){var b,d,e,f,g=a.elements,h={};for(e=0,f=g.length;f>e;e++)b=g[e],(d=c.util.getInputValue(b))&&(h[b.name]=d);return h},p=function(b){var c,e,f,g,h,j,k,l={},m={};for(f in b)i.test(f)?m[f]=b[f]:l[f]=b[f];for(j=0,g=d.products.length;g>j;j++)if(c=d.products[j].product,l.item_name===c.item_name&&l.item_number===c.item_number){for(h=!0,k=0;c["os"+k];){if(l["os"+k]!==c["os"+k]){h=!1;break}k++}if(h){l.offset=c.offset;break}}for(l.href=l.href||window.location.href,l.quantity=l.quantity||1,l.amount=l.amount||0,a.resetCartOnSuccess&&m["return"]&&-1===m["return"].indexOf("#")&&(m["return"]+="#"+a.name+"=reset"),e=l.option_index?l.option_index:0;l["os"+e];){for(j=0;"undefined"!=typeof l["option_select"+j];){if(l["option_select"+j]===l["os"+e]){l.amount=l.amount+parseFloat(l["option_amount"+j]);break}j++}e++}return{product:l,settings:m}},q=function(b){d.products=[],c.util.setText(d.UI.itemList,""),c.util.setText(d.UI.subtotalAmount,""),d.UI.button.value=a.strings.button,n(),d.updateSubtotal(b)},r=function(a){var e,f,g,h=d.UI,i=h.cart,j=new b(a,d.UI.itemList.children.length+1),k=a.product.offset;d.products[k]=j;for(g in a.settings)i.elements[g]?i.elements[g].value?i.elements[g].value=a.settings[g]:i.elements[g]=a.settings[g]:(f=document.createElement("input"),f.type="hidden",f.name=g,f.value=a.settings[g],i.appendChild(f));if(j.isPlaceholder)return!1;c.event.add(j.removeInput,"click",function(){s(j,k)});var l=j.quantityInput.value;return c.event.add(j.quantityInput,"keyup",function(){var a=this;e=setTimeout(function(){var b=parseInt(a.value,10);isNaN(b)||b===l||(l=b,j.setQuantity(b),j.getQuantity()||s(j,k),d.updateSubtotal(),c.storage.save(d.products))},250)}),h.itemList.insertBefore(j.liNode,h.itemList.firstChild),c.util.animate(j.liNode,"opacity",{from:0,to:1}),!0},s=function(b,e){var f=a.events,g=f.onRemoveFromCart,h=f.afterRemoveFromCart;("function"!=typeof g||g.call(d,b)!==!1)&&(b.setQuantity(0),b.quantityInput.style.display="none",c.util.animate(b.liNode,"opacity",{from:1,to:0},function(){c.util.animate(b.liNode,"height",{from:18,to:0},function(){try{b.liNode.parentNode.removeChild(b.liNode)}catch(a){}var c,e,f,g,i,j,k=d.UI.cart.getElementsByTagName("li"),l=k.length,m=1;for(i=0;l>i;i++){for(c=k[i].getElementsByTagName("input"),e=c.length,j=0;e>j;j++)f=c[j],g=/(.+)_[0-9]+$/.exec(f.name),g&&g[1]&&(f.name=g[1]+"_"+m);m++}"function"==typeof h&&h.call(d,b)})}),d.products[e].product.item_name="",d.products[e].product.item_number="",d.updateSubtotal(),c.storage.save(d.products,a.cartDuration))},t=function(b){var c=a.events.onCheckout;return"function"==typeof c&&c.call(d,b)===!1?(b.preventDefault(),void 0):(d.UI.button.value=a.strings.processing,void 0)};return d.products=[],d.UI={},d.render=function(b){var g,h,i,n,o;m(b),g=a.events,h=g.onRender,i=g.afterRender,("function"!=typeof h||h.call(d)!==!1)&&(f||(j(),k(),l(),n=location.hash.substring(1),0===n.indexOf(a.name+"=")&&(o=n.split("=")[1],"reset"===o&&(d.reset(),location.hash=""))),q(!0),f||(e?setTimeout(function(){d.hide(null)},500):c.storage.remove()),f=!0,"function"==typeof i&&i.call(d))},d.bindForm=function(a){if(a.add)c.event.add(a,"submit",function(a){a.preventDefault(a);var b=o(a.target);d.addToCart(b)});else{if(!a.display)return!1;c.event.add(a,"submit",function(a){a.preventDefault(),d.show(a)})}return!0},d.addToCart=function(b){var e,f,g=a.events,h=g.onAddToCart,i=g.afterAddToCart,j=!1;return b=p(b),f=b.product.offset,"function"!=typeof h||h.call(d,b.product)!==!1?((e=this.getProductAtOffset(f))?(e.product.quantity+=parseInt(b.product.quantity||1,10),e.setPrice(b.product.amount*e.product.quantity),e.setQuantity(e.product.quantity),j=!0):(b.product.offset=d.products.length,j=r(b)),d.updateSubtotal(),d.show(null),c.storage.save(d.products,a.cartDuration),"function"==typeof i&&i.call(d,b),j):void 0},d.getProductAtOffset=function(a){return"undefined"!=typeof a&&this.products[a]},d.calculateSubtotal=function(){var a,b,c,e,f,g,h=0,i=d.products;for(g=0,f=i.length;f>g;g++)b=i[g],(a=b.product)&&a.quantity&&a.amount&&(c=a.amount,e=b.getDiscount(),h+=parseFloat(c*a.quantity-e));return h.toFixed(2)},d.updateSubtotal=function(a){var b,e,f,g,h,i=d.UI,j=i.cart.elements,k=i.subtotalAmount,l=d.calculateSubtotal(),m=1;if(b="",e="",j.currency_code)b=j.currency_code.value||j.currency_code;else for(h=0,g=j.length;g>h;h++)if("currency_code"===j[h].name){b=j[h].value||j[h];break}c.util.setText(k,c.util.formatCurrency(l,b)),a||!function n(){return f=m.toString(16),m++,k.style.backgroundColor="#ff"+f,m>=15?(k.style.backgroundColor="transparent","0.00"===l&&d.reset(),void 0):(setTimeout(n,30),void 0)}()},d.show=function(b){var f=parseInt(d.UI.cart.offsetTop,10),g=0,h=a.events,i=h.onShow,j=h.afterShow;b&&b.preventDefault&&b.preventDefault(),("function"!=typeof i||i.call(d,b)!==!1)&&(c.util.animate(d.UI.cart,"top",{from:f,to:g},function(){"function"==typeof j&&j.call(d,b)}),d.UI.summary.style.backgroundPosition="-195px 2px",e=!0)},d.hide=function(b,f){var g,h=d.UI,i=h.cart,j=h.summary,k=i.offsetHeight?i.offsetHeight:document.defaultView.getComputedStyle(i,"").getPropertyValue("height"),l=j.offsetHeight?j.offsetHeight:document.defaultView.getComputedStyle(j,"").getPropertyValue("height"),m=parseInt(i.offsetTop,10),n=a.events,o=n.onHide,p=n.afterHide;g=f||0===d.products.length||!a.peekEnabled?-1*k:-1*(k-l-8),b&&b.preventDefault&&b.preventDefault(),("function"!=typeof o||o.call(d,b)!==!1)&&(c.util.animate(i,"top",{from:m,to:g},function(){"function"==typeof p&&p.call(d,b)}),j.style.backgroundPosition="-195px -32px",e=!1)},d.toggle=function(a){e?d.hide(a):d.show(a)},d.reset=function(){var b=d.UI,f=a.events,g=f.onReset,h=f.afterReset;("function"!=typeof g||g.call(d)!==!1)&&(d.products=[],e&&(c.util.setText(b.itemList,""),c.util.setText(b.subtotalAmount,""),d.hide(null,!0)),c.storage.remove(),"function"==typeof h&&h.call(d))},d}();var b=function(a,b){this._view(a,b)};b.prototype={_view:function(a,b){var d,e,f,g,h,i,j;if(this.product=a.product,this.settings=a.settings,this.liNode=document.createElement("li"),this.nameNode=document.createElement("a"),this.metaNode=document.createElement("span"),this.discountNode=document.createElement("span"),this.discountInput=document.createElement("input"),this.priceNode=document.createElement("span"),this.quantityInput=document.createElement("input"),this.removeInput=document.createElement("input"),!this.product||!this.product.item_name&&!this.product.item_number)return this.isPlaceholder=!0,void 0;this.product.item_name&&(d=this.product.item_name),c.util.setText(this.nameNode,d),this.nameNode.href=this.product.href,this.nameNode.appendChild(this.metaNode),this.product.item_number&&c.util.setText(this.metaNode,this.product.item_number,null,"
"),h=this.getOptions();for(j in h)c.util.setText(this.metaNode,j+": "+h[j],this.metaNode.innerHTML,"
");g=this.getDiscount(),g>=0&&(this.discountInput.type="hidden",this.discountInput.name="discount_amount_"+b,this.discountInput.value=g,this.metaNode.appendChild(this.discountInput)),e=this.getPrice(),this.priceNode.className="price",f=this.getQuantity(),this.quantityInput.name="quantity_"+b,this.quantityInput.className="quantity",this.quantityInput.setAttribute("autocomplete","off"),this.setQuantity(f),this.removeInput.type="button",this.removeInput.className="remove",this.liNode.appendChild(this.nameNode),this.liNode.appendChild(this.quantityInput),g&&this.liNode.appendChild(this.discountInput),this.liNode.appendChild(this.removeInput),this.liNode.appendChild(this.priceNode);for(j in this.product)"quantity"!==j&&-1===j.indexOf("discount_")&&(i=document.createElement("input"),i.type="hidden",i.name=j+"_"+b,i.value=this.product[j],this.liNode.appendChild(i))},getDiscount:function(){var a,b=0,c=this.product.discount_num||-1;return this.product.discount_amount>=0?(b=parseFloat(this.product.discount_amount),this.product.discount_amount2&&(a=this.getQuantity(),a>1&&(b+=Math.min(a-1,c)*parseFloat(this.product.discount_amount2)))):this.product.discount_rate>=0&&(b=this.product.amount*parseFloat(this.product.discount_rate)/100,this.product.discount_rate2&&(a=this.getQuantity(),a>1&&(b+=Math.min(a-1,c)*this.product.amount*parseFloat(this.product.discount_amount2)/100))),b&&b.toFixed(2)},getOptions:function(){for(var a={},b=0;"undefined"!=typeof this.product["on"+b];)a[this.product["on"+b]]=this.product["os"+b],b++;return a},setQuantity:function(b){var d;b=parseInt(b,10),this.product.quantity=b,this.quantityInput.value!==b&&(this.quantityInput.value=b,(d=this.getDiscount())&&(this.discountInput.value=d,this.discountNode.innerHTML||this.metaNode.appendChild(this.discountNode),c.util.setText(this.discountNode,this.discountNode.innerHTML+a.strings.discount+c.util.formatCurrency(d,this.settings.currency_code)))),this.setPrice(this.product.amount*b)},getQuantity:function(){return void 0!==typeof this.product.quantity?this.product.quantity:1},setPrice:function(a){a=parseFloat(a,10),c.util.setText(this.priceNode,c.util.formatCurrency(a.toFixed(2),this.settings.currency_code))},getPrice:function(){return(this.product.amount*this.getQuantity()).toFixed(2)}};var c={};c.storage=function(){var b=a.name;return window.localStorage?{load:function(){var a,d,e=localStorage.getItem(b);return e&&(e=JSON.parse(decodeURIComponent(e))),e&&e.expires&&(a=new Date,d=new Date(e.expires),a>d)?(c.storage.remove(),void 0):e&&e.value?e.value:e},save:function(a,c){var d,e,f,g,h=new Date,i=[];if(a){for(g=0,f=a.length;f>g;g++)e=a[g],i.push({product:e.product,settings:e.settings});h.setTime(h.getTime()+1e3*60*60*24*c),d={value:i,expires:h.toGMTString()},localStorage.setItem(b,encodeURIComponent(JSON.stringify(d)))}},remove:function(){localStorage.removeItem(b)}}:{load:function(){var a,c,d,e,f,g=b+"=";try{for(c=document.cookie.split(";"),f=0;ff;f++)d=b[f],h.push({product:d.product,settings:d.settings});g.setTime(g.getTime()+1e3*60*60*24*c),document.cookie=a.name+"="+encodeURIComponent(JSON.stringify(h))+"; expires="+g.toGMTString()+"; path="+a.cookiePath}},remove:function(){this.save(null,-1)}}}(),c.event=function(){var a=[];return document.addEventListener?{add:function(b,c,d,e){e=e||b;var f=function(a){d.call(e,a)};b.addEventListener(c,f,!1),a.push([b,c,d,f])},remove:function(b,c,d){var e,f,g,h=a.length;for(g=0;h>g;g++)f=a[g],f[0]===b&&f[1]===c&&f[2]===d&&(e=f[3],e&&(b.removeEventListener(c,e,!1),delete a[g]))}}:document.attachEvent?{add:function(b,c,d,e){e=e||b;var f=function(){var a=window.event;a.target=a.target||a.srcElement,a.preventDefault=function(){a.returnValue=!1},d.call(e,a)};b.attachEvent("on"+c,f),a.push([b,c,d,f])},remove:function(b,c,d){var e,f,g,h=a.length;for(g=0;h>g;g++)f=a[g],f[0]===b&&f[1]===c&&f[2]===d&&(e=f[3],e&&(b.detachEvent("on"+c,e),delete a[g]))}}:void 0}(),c.util={animate:function(a,b,c,d){c=c||{},c.from=c.from||0,c.to=c.to||0,c.duration=c.duration||10,c.unit=/top|bottom|left|right|width|height/.test(b)?"px":"";var e=(c.to-c.from)/20,f=c.from;!function g(){return a.style[b]=f+c.unit,f+=e,e>0&&f>c.to||0>e&&f",">"),e+=d||"",a.innerHTML=e},formatCurrency:function(a,b){var c={AED:{before:"ج"},ANG:{before:"ƒ"},ARS:{before:"$"},AUD:{before:"$"},AWG:{before:"ƒ"},BBD:{before:"$"},BGN:{before:"лв"},BMD:{before:"$"},BND:{before:"$"},BRL:{before:"R$"},BSD:{before:"$"},CAD:{before:"$"},CHF:{before:""},CLP:{before:"$"},CNY:{before:"¥"},COP:{before:"$"},CRC:{before:"₡"},CZK:{before:"Kc"},DKK:{before:"kr"},DOP:{before:"$"},EEK:{before:"kr"},EUR:{before:"€"},GBP:{before:"£"},GTQ:{before:"Q"},HKD:{before:"$"},HRK:{before:"kn"},HUF:{before:"Ft"},IDR:{before:"Rp"},ILS:{before:"₪"},INR:{before:"Rs."},ISK:{before:"kr"},JMD:{before:"J$"},JPY:{before:"¥"},KRW:{before:"₩"},KYD:{before:"$"},LTL:{before:"Lt"},LVL:{before:"Ls"},MXN:{before:"$"},MYR:{before:"RM"},NOK:{before:"kr"},NZD:{before:"$"},PEN:{before:"S/"},PHP:{before:"Php"},PLN:{before:"z"},QAR:{before:"﷼"},RON:{before:"lei"},RUB:{before:"руб"},SAR:{before:"﷼"},SEK:{before:"kr"},SGD:{before:"$"},THB:{before:"฿"},TRY:{before:"TL"},TTD:{before:"TT$"},TWD:{before:"NT$"},UAH:{before:"₴"},USD:{before:"$"},UYU:{before:"$U"},VEF:{before:"Bs"},VND:{before:"₫"},XCD:{before:"$"},ZAR:{before:"R"}},d=c[b]||{},e=d.before||"",f=d.after||"";return e+a+f}}}}(),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(); \ No newline at end of file From a242e1949e7fcaa65746a2adada5e292b458baf3 Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Sat, 9 Nov 2013 11:46:00 -0800 Subject: [PATCH 14/50] Adding images from alpha branch --- images/arrow_down.gif | Bin 0 -> 169 bytes images/arrow_up.gif | Bin 0 -> 169 bytes images/button_submit.gif | Bin 0 -> 53 bytes images/checkout.png | Bin 0 -> 4789 bytes images/minicart_sprite.png | Bin 0 -> 1798 bytes images/paypal_65x18.png | Bin 0 -> 2218 bytes images/paypal_logo.gif | Bin 0 -> 1850 bytes images/x.gif | Bin 0 -> 204 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/arrow_down.gif create mode 100644 images/arrow_up.gif create mode 100644 images/button_submit.gif create mode 100755 images/checkout.png create mode 100644 images/minicart_sprite.png create mode 100644 images/paypal_65x18.png create mode 100644 images/paypal_logo.gif create mode 100644 images/x.gif diff --git a/images/arrow_down.gif b/images/arrow_down.gif new file mode 100644 index 0000000000000000000000000000000000000000..5032864f884a19297dc3d18fa43b121f0b2a4136 GIT binary patch literal 169 zcmZ?wbhEHbfW<=xs$hFd+=)Ksaso*-@NtsO~b>xNv{_iCftdx25-O&YHOG|Ns9CL<7a2EQ|~cf($w!9UwaySk)FhVoC876PRq{ k@Oqb%2=BqyW}AGj=udjy!u005u?~abqx^z^HUfW<=xs$hFd+=)Ksaso*-@NtsO~b>xNv{_iCftdx25-O&YHOG|Ns9CL<7a2EQ|~cf($w!9UwaySk)3#`i>jSTg;%t kHjAmiaR)~Z`{x@sY7*SEU$A_fQvN$4F^q)0DPq>2S8iZm4w zrGp?{Aasx-AYD3~=-%%CT z1ViC*a>!pca$YzB6%7EWYk3inC}#{A=zwv=x@v%y-+cf9v1kpDjgm3Mn4p8XjWzHg zVk~@2EKxqrC^a-lOB1N>1)~z+Fk~dq3+LiWf_Z6xe)Gbp^IzLw5b(DN*;xbhms7UJ zra&D$5d&0`Q;FfiED(^JkIsV8kcwq^+cU`saCg_}}&y%gVql1N~X5D~j0c8qqIk2C(}F)S2llP}xFQ3 za^=@wG<}cu#*Pku9v%5EbMk$SyTpiQks2uU=pSo(L(#c1+HnCC-Ut`EH?>sy?0O_< z;<*3l4Pnk!zOM|a5I0hE82ve7>O*Zv+I*1Ah3;hCDbY&q>gUXU6p;+^o`16^5Mno&FZ=02^S=~lsr>7n#JDs1J^I8 z=O^8s#NNnf(Hd;uNji%Tl8e%30o^HGyaKT=Mw1GHxPo&T6Z5LJ#UVLJXqadt3tSUkMtx2lKi zTx|p2TFFtzh~Z2{`{(haj>tiq@U^mDg$i?Vi8zRhXh#ODUSZ1X2^OnFvc#_G1Ro6mDSKv;71e!bXGj)(UK>Ab z=d`(+?JVy4r^lZXe$HQMUc(dLj~Dw*oaha`T{-0@9g~^9Jmsf4spDwdd}(HtNm2e%K`hj3P67OMHwTd zi76PH`v{RwwvdszXee~i_WVq}Y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QAJtV93 zP8235@%8q?Be8+y!>NjSf01 ze#;1=F4U4{s2FS=HEvj&6a=0zcT+DENo^{xK)vC27ajyrY9ZB+#lss<&ndiwS%PY# z3ij9LrN>%PPFYV=UeOKhTs|k`zIAR9hm6|b{l@Wt7cIje$vZM-diiY2_D-?>-O?l8 an}8RWk12J)-Nb(VNHWwj(Jj`#8S)=!@u*k; literal 0 HcmV?d00001 diff --git a/images/minicart_sprite.png b/images/minicart_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..db7671963944e7b71e0f5158cb458a668d6ebb08 GIT binary patch literal 1798 zcmc&!{W}v18y+uloRZT?UsUpnj&tM+$D&gh%SS$EW27U-d|PV1<1F8jvDl)7<%G>K zv1S}*g~%w)EH>W@8S^pCLL0C5$M=2zfcLqs`?;U{m;1V}=ee#Y*WK0rfZ7Q)003~n z(ZLR~$J{*xss3ZH>#Jr4?9p*F7>@QtA<^*xw}SyTL8!oB9mlAEkYGq~Ku}^#U+`}L zfC9$d84BLr-K}8^nIcPA?6G0KfY8V?ca0k#A72q~a5x-GNTL=n=p|#|dgfme>E_nf z_PlUKAP{tScTdi*KtuE1@#kHVp7)K+nunDxiq^1YP2`tvIFk!tG*K`w(!Cru^+}jf z^;#yAJ*EzvvyJjdsp%g6B$jL<;_%^jORu2HQ}SyfakPN@FI*8>(#`FpGKT$)w5@Gf zS#5iL=f~UW6(6S;(V3MeEs!${Yb|~JInjDHzMdx#F&KYoj-d)|%GneRs@W{;WtPU{)TD}51=(_nSG(m#h1m;J2r zFJ@p~V^CgWOfh|DFlDz^cW?O*&-0r04u(NPTs`;X|FZxWm9K>W07`|9b~exizKAFE zJmGj4a4Qtpt?f&hb{Chy`X{-u54ipyCwV{c0i#gipOTEk#c$%>a|{m4?A`Hq0q)Ql8bQkoYx2H~>W!|B{` z_rIZxTHshT))>#bnIh+h7ybvhb{?xLUS$=Lr!gmQEduzBJ}X+OLHWN=CD6 zVBheD@d2@3&Twj#+P_ng-7^iL#Qz+(DX_5$#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=eV&7A5b&> zAd)^>s(+;y17r`k^!cF)vlrb$EQNyEV=OM*WN)f``aJsOT+UCAvuK2t#0+wWZ!fzf zM=qx9ycje+|Ltdt;y+mgpSK8!($ufSZxo_Kz9x+w*s+{qL<`m($2Y^c^7Q36?h@Zl z_OqXPCTD$j`ih)sk+FMI9)oVe>#%iMTKn4UL?W$RAdN^E0STjcedTiYT`0(m_wkOi!T$N&HU07*qoM6N<$g2Av)bpQYW literal 0 HcmV?d00001 diff --git a/images/paypal_logo.gif b/images/paypal_logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..e46180c8b5a19d231995021e1d554436b0d86901 GIT binary patch literal 1850 zcmV-A2gUeDNk%w1VN3uN0Qdg@8#iP#W|%W)m>V`^{r&#@{r&y^{xfEm`~3Y`ZH^y0 zXNHxnnWnl)ccWc~t$d88C_-&3MQ>ttls8Xzz0Tf+q`{7yvenw-MO%Syft@^Vou0PN zKyjY+_W1Ys`k=VayTj2wZ=Uh<_8K%|BtL3Qd8Lu9$U0Ja_4oRLkg0!1K_xRDY>?o4k~vw!+EP z$=BpPReLvSnu(^vS`P*(9X^*ql+~m{Q z;UYb0DMW6InXp@LkkQxRevPMTdzfl`nfUtq?(p-w%-tb8XfG-#Mbb)owE{ab~s z_4xW7IAyKE*5c{#FiLaG(%gWczcpu=jG3|A`r^8bA+F*x5s{tr=+jJ@A35R^7m1GsJ6e&-Qnn{zSFb3%X*!@Ms%V;SABMe zqBdxnHffsY>hC5%Yt7l_x4_PGm$~NY?$O=oWOtUFsJt*qa)_6&>+bU8=j~*Rv9!L< zQf7(r_W8HJ&NphBGiRBv!`Jrr`QPK}e4V{thptI@qd#w+ZhxIMYMVA_nHVx&AUkOM z{Qc0{+qqizvbxdpR2wy zNpXpktpET2A^8LW00930EC2ui089WB000R80RR01Wyi>bgA=Oo(DR6kz=secN}TvX zSc4K6vs|)eV#~yd1U~ri(aPJ41u57G!~zWffB`OD!h9g&qs@=Gt_cXRvnS6IP;Ndv zG$=p-Y`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c444d9d10dd9402ea69e3ecfb029ac3f Mon Sep 17 00:00:00 2001 From: Jeff Harrell Date: Sat, 9 Nov 2013 15:00:08 -0800 Subject: [PATCH 15/50] Removing old dist --- dist/minicart.js | 2230 ------------------------------------------ dist/minicart.min.js | 10 - 2 files changed, 2240 deletions(-) delete mode 100644 dist/minicart.js delete mode 100644 dist/minicart.min.js diff --git a/dist/minicart.js b/dist/minicart.js deleted file mode 100644 index 6d66704..0000000 --- a/dist/minicart.js +++ /dev/null @@ -1,2230 +0,0 @@ -/*! - * MiniCart - * - * @author Jeff Harrell - * @license MIT - */ -if (typeof PAYPAL === 'undefined' || !PAYPAL) { - var PAYPAL = {}; -} - -PAYPAL.apps = PAYPAL.apps || {}; - - -(function () { - 'use strict'; - - /** - * Default configuration - */ - var config = { - /** - * The parent element the cart should "pin" to - */ - parent: document.body, - - /** - * Edge of the window to pin the cart to - */ - displayEdge: 'right', - - /** - * Distance from the edge of the window - */ - edgeDistance: '50px', - - /** - * HTML target property for the checkout form - */ - formTarget: null, - - /** - * The base path of your website to set the cookie to - */ - cookiePath: '/', - - /** - * The number of days to keep the cart data - */ - cartDuration: 30, - - /** - * Strings used for display text - */ - strings: { - button: 'Checkout', - subtotal: 'Subtotal: ', - discount: 'Discount: ', - shipping: 'does not include shipping & tax', - processing: 'Processing...' - }, - - /** - * Unique ID used on the wrapper element - */ - name: 'PPMiniCart', - - /** - * Boolean to determine if the cart should "peek" when it's hidden with items - */ - peekEnabled: true, - - /** - * The URL of the PayPal website - */ - paypalURL: 'https://www.paypal.com/cgi-bin/webscr', - - /** - * The base URL to the visual assets - */ - assetURL: 'http://www.minicartjs.com/build/', - - /** - * Boolean to determine if the cart should be reset on payment completion - */ - resetCartOnSuccess: true, - - /** - * Life-cycle events - */ - events: { - /** - * Custom event fired before the cart is rendered - */ - onRender: null, - - /** - * Custom event fired after the cart is rendered - */ - afterRender: null, - - /** - * Custom event fired before the cart is hidden - * - * @param e {event} The triggering event - */ - onHide: null, - - /** - * Custom event fired after the cart is hidden - * - * @param e {event} The triggering event - */ - afterHide: null, - - /** - * Custom event fired before the cart is shown - * - * @param e {event} The triggering event - */ - onShow: null, - - /** - * Custom event fired after the cart is shown - * - * @param e {event} The triggering event - */ - afterShow: null, - - /** - * Custom event fired before a product is added to the cart - * - * @param data {object} Product object - */ - onAddToCart: null, - - /** - * Custom event fired after a product is added to the cart - * - * @param data {object} Product object - */ - afterAddToCart: null, - - /** - * Custom event fired before a product is removed from the cart - * - * @param data {object} Product object - */ - onRemoveFromCart: null, - - /** - * Custom event fired after a product is removed from the cart - * - * @param data {object} Product object - */ - afterRemoveFromCart: null, - - /** - * Custom event fired before the checkout action takes place - * - * @param e {event} The triggering event - */ - onCheckout: null, - - /** - * Custom event fired before the cart is reset - */ - onReset: null, - - /** - * Custom event fired after the cart is reset - */ - afterReset: null - } - }; - - - if (!PAYPAL.apps.MiniCart) { - - /** - * Mini Cart application - */ - PAYPAL.apps.MiniCart = (function () { - - var minicart = {}, - isShowing = false, - isRendered = false; - - - /** PRIVATE **/ - - /** - * PayPal form cmd values which are supported - */ - var SUPPORTED_CMDS = { _cart: true, _xclick: true }; - - - /** - * The form origin that is passed to PayPal - */ - var BN_VALUE = 'MiniCart_AddToCart_WPS_US'; - - - /** - * Regex filter for cart settings, which appear only once in a cart - */ - var SETTING_FILTER = /^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/; - - - /** - * Adds the cart's CSS to the page in a