Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
updates Ajax cart terminology and some more terms
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgrenz committed Nov 19, 2015
1 parent ebf4346 commit cc8a07f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion assets/timber.js.liquid
Expand Up @@ -184,7 +184,7 @@ timber.accessibleNav = function () {
timber.drawersInit = function () {
timber.LeftDrawer = new timber.Drawers('NavDrawer', 'left');
timber.RightDrawer = new timber.Drawers('CartDrawer', 'right', {
{% if settings.ajax_cart_enable %}'onDrawerOpen': ajaxCart.load{% endif %}
{% if settings.ajax_cart_method == "drawer" %}'onDrawerOpen': ajaxCart.load{% endif %}
});
};

Expand Down
4 changes: 2 additions & 2 deletions assets/timber.scss.liquid
Expand Up @@ -2405,7 +2405,7 @@ label.error {
/*============================================================================
#Ajax Cart Styles (conditionally loaded)
==============================================================================*/
{% if settings.ajax_cart_enable %}
{% if settings.ajax_cart_method == "drawer" %}

.ajaxcart__inner {
margin-bottom: $gutter;
Expand Down Expand Up @@ -2539,4 +2539,4 @@ label.error {
border-color: $colorDrawerBorder;
}

{% endif %} // settings.ajax_cart_enable
{% endif %} // settings.ajax_cart_method
6 changes: 3 additions & 3 deletions config/settings_data.json
Expand Up @@ -2,7 +2,7 @@
"current": "Default",
"presets": {
"Default": {
"ajax_cart_enable": true,
"ajax_cart_method": "drawer",
"cart_notes_enable": true,
"color_body_bg": "#fff",
"color_body_text": "#333333",
Expand All @@ -16,8 +16,8 @@
"footer_newsletter_enable": true,
"footer_social_enable": true,
"logo_use_image": false,
"social_facebook_link": "https://www.facebook.com/shopify",
"social_twitter_link": "https://twitter.com/shopify"
"social_facebook_link": "",
"social_twitter_link": ""
}
}
}
45 changes: 27 additions & 18 deletions config/settings_schema.json
Expand Up @@ -46,12 +46,6 @@
"default": "#dcdcdc",
"info": "Used for secondary buttons"
},
{
"type": "color",
"id": "color_body_bg",
"label": "Body background",
"default": "#ffffff"
},
{
"type": "color",
"id": "color_borders",
Expand All @@ -60,12 +54,18 @@
},
{
"type": "header",
"content": "Body text"
"content": "Body"
},
{
"type": "color",
"id": "color_body_bg",
"label": "Background",
"default": "#ffffff"
},
{
"type": "color",
"id": "color_body_text",
"label": "Body text",
"label": "Text",
"default": "#333333"
},
{
Expand All @@ -75,19 +75,19 @@
{
"type": "color",
"id": "color_footer_bg",
"label": "Footer background",
"label": "Background",
"default": "#f2f2f2"
},
{
"type": "color",
"id": "color_footer_text",
"label": "Footer text",
"label": "Text",
"default": "#636363"
},
{
"type": "color",
"id": "color_footer_social_link",
"label": "Social icons",
"label": "Social media icons",
"default": "#bbbbbb"
}
]
Expand Down Expand Up @@ -149,13 +149,13 @@
"type": "text",
"id": "social_twitter_link",
"label": "Twitter URL",
"info": "https://twitter.com/shopify"
"info": "Example: https://twitter.com/shopify"
},
{
"type": "text",
"id": "social_facebook_link",
"label": "Facebook URL",
"info": "https://www.facebook.com/shopify"
"info": "Example: https://www.facebook.com/shopify"
},
{
"type": "checkbox",
Expand Down Expand Up @@ -184,10 +184,19 @@
"label": "Show product vendor"
},
{
"type": "checkbox",
"id": "ajax_cart_enable",
"label": "Enable Ajax cart drawer",
"info": "[View Documentation](http:\/\/shopify.com\/timber#ajax-cart)"
"type": "select",
"id": "ajax_cart_method",
"label": "Cart type",
"options": [
{
"value": "drawer",
"label": "Drawer"
},
{
"value": "page",
"label": "Page"
}
]
}
]
},
Expand All @@ -198,7 +207,7 @@
"type": "text",
"id": "twittercard_handle",
"label": "Twitter handle",
"info": "@shopify"
"info": "Example: @shopify"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion layout/theme.liquid
Expand Up @@ -394,7 +394,7 @@
Documentation:
- http://shopify.com/timber#ajax-cart
{% endcomment %}
{% if settings.ajax_cart_enable %}
{% if settings.ajax_cart_method == "drawer" %}
{{ 'handlebars.min.js' | asset_url | script_tag }}
{% include 'ajax-cart-template' %}
{{ 'ajax-cart.js' | asset_url | script_tag }}
Expand Down

0 comments on commit cc8a07f

Please sign in to comment.