From cc8a07f522916c4c4b7fabcde5d0b96b902a56f2 Mon Sep 17 00:00:00 2001 From: jon grenning Date: Thu, 19 Nov 2015 17:38:37 -0500 Subject: [PATCH] updates Ajax cart terminology and some more terms --- assets/timber.js.liquid | 2 +- assets/timber.scss.liquid | 4 ++-- config/settings_data.json | 6 ++--- config/settings_schema.json | 45 ++++++++++++++++++++++--------------- layout/theme.liquid | 2 +- 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/assets/timber.js.liquid b/assets/timber.js.liquid index 4af3e3211..fe05bbc7b 100755 --- a/assets/timber.js.liquid +++ b/assets/timber.js.liquid @@ -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 %} }); }; diff --git a/assets/timber.scss.liquid b/assets/timber.scss.liquid index eaee65216..7d8cd3420 100755 --- a/assets/timber.scss.liquid +++ b/assets/timber.scss.liquid @@ -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; @@ -2539,4 +2539,4 @@ label.error { border-color: $colorDrawerBorder; } -{% endif %} // settings.ajax_cart_enable +{% endif %} // settings.ajax_cart_method diff --git a/config/settings_data.json b/config/settings_data.json index 7de457e56..b54f81479 100755 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -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", @@ -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": "" } } } diff --git a/config/settings_schema.json b/config/settings_schema.json index adda9e2eb..d34a4e56e 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -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", @@ -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" }, { @@ -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" } ] @@ -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", @@ -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" + } + ] } ] }, @@ -198,7 +207,7 @@ "type": "text", "id": "twittercard_handle", "label": "Twitter handle", - "info": "@shopify" + "info": "Example: @shopify" } ] } diff --git a/layout/theme.liquid b/layout/theme.liquid index 3a979b441..b9b2be1bf 100755 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -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 }}