/* global jQuery:false */ /* global FLOWERS_BOUTIQUE_STORAGE:false */ // Theme-specific post-formats init //===================================================== function flowers_boutique_theme_init_post_formats() { "use strict"; // Put here your theme-specific code to init post-formats // It will be called before core init post_formats when page is loaded or after 'Load more' or 'Infinite scroll' actions // Tribe Events buttons decoration (add 'sc_button' class) jQuery('a.tribe-events-read-more,.tribe-events-button,.tribe-events-nav-previous a,.tribe-events-nav-next a,.tribe-events-widget-link a,.tribe-events-viewmore a') .addClass('sc_button sc_button_style_filled'); // All other buttons decoration (add 'hover' class) if (FLOWERS_BOUTIQUE_STORAGE['button_hover'] && FLOWERS_BOUTIQUE_STORAGE['button_hover']!='default') { jQuery('button:not(.search_submit):not([class*="sc_button_hover_"]):not(.search_button),\ .sc_button:not(.sc_button_style_border):not([class*="sc_button_hover_"]):not(.call_to),\ .woocommerce .button:not([class*="sc_button_hover_"]),.woocommerce-page .button:not([class*="sc_button_hover_"]),\ #buddypress a.button:not([class*="sc_button_hover_"])' ).addClass('sc_button_hover_'+FLOWERS_BOUTIQUE_STORAGE['button_hover']); if (FLOWERS_BOUTIQUE_STORAGE['button_hover']!='arrow') jQuery('input[type="submit"]:not([class*="sc_button_hover_"]),\ input[type="button"]:not([class*="sc_button_hover_"]),\ .isotope_filters_button,\ .scroll_to_top:not([class*="sc_button_hover_"])' ).addClass('sc_button_hover_'+FLOWERS_BOUTIQUE_STORAGE['button_hover']); } // Mark field as 'filled' on keypress jQuery('[class*="sc_input_hover_"] input, [class*="sc_input_hover_"] textarea').each(function() { if (jQuery(this).val()!='') jQuery(this).addClass('filled'); else jQuery(this).removeClass('filled'); }); jQuery('[class*="sc_input_hover_"] input, [class*="sc_input_hover_"] textarea').on('blur', function() { if (jQuery(this).val()!='') jQuery(this).addClass('filled'); else jQuery(this).removeClass('filled'); }); } // Theme-specific GoogleMap styles //===================================================== function flowers_boutique_theme_googlemap_styles($styles) { "use strict"; // Put here your theme-specific code to add GoogleMap styles // It will be called before GoogleMap init when page is loaded $styles['greyscale'] = [ { "stylers": [ { "saturation": -100 } ] } ]; $styles['inverse'] = [ { "stylers": [ { "invert_lightness": true }, { "visibility": "on" } ] } ]; $styles['simple'] = [ { "featureType": "administrative", "elementType": "labels.text.fill", "stylers": [ { "color": "#444444" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#e1e5e4" } ] }, { "featureType": "landscape.man_made", "elementType": "geometry.fill", "stylers": [ { "hue": "#0200ff" }, { "saturation": "17" }, { "invert_lightness": true }, { "visibility": "simplified" } ] }, { "featureType": "landscape.man_made", "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" }, { "saturation": "-83" }, { "lightness": "-100" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": -100 }, { "lightness": 45 } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#aece89" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#f9fcfd" }, { "visibility": "on" } ] } ]; $styles['apple'] = [ { "featureType": "landscape.man_made", "elementType": "geometry", "stylers": [ {"color":"#f7f1df"} ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ {"color":"#d0e3b4"} ] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry", "stylers": [ {"visibility":"off"} ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ {"visibility":"off"} ] }, { "featureType": "poi.business", "elementType": "all", "stylers": [ {"visibility":"off"} ] }, { "featureType": "poi.medical", "elementType": "geometry", "stylers": [ {"color":"#fbd3da"} ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ {"color":"#bde6ab"} ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ {"visibility":"off"} ] }, { "featureType": "road", "elementType": "labels", "stylers": [ {"visibility":"off"} ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ {"color":"#ffe15f"} ] }, { "featureType": "road.highway", "elementType":"geometry.stroke", "stylers": [ {"color":"#efd151"} ] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [ {"color":"#ffffff"} ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ {"color":"black"} ] }, { "featureType": "transit.station.airport", "elementType": "geometry.fill", "stylers": [ {"color":"#cfb2db"} ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ {"color":"#a2daf2"} ] } ]; return $styles; }