spree_showcase 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/models/spree/slide.rb +36 -10
- data/app/overrides/{add_showcase_to_admin_configuration_menu.rb → showcase/add_showcase_to_admin_configuration_menu.rb} +0 -0
- data/app/overrides/{add_showcase_to_admin_configurations_side_menu.rb → showcase/add_showcase_to_admin_configurations_side_menu.rb} +0 -0
- data/app/overrides/showcase/add_showcase_to_home_layout.rb +12 -0
- data/app/views/spree/admin/shared/_showcase_submenu.html.erb +1 -1
- data/app/views/spree/admin/showcase_settings/edit.html.erb +4 -1
- data/app/views/spree/admin/showcase_settings/show.html.erb +17 -6
- data/app/views/spree/admin/slides/edit.html.erb +4 -1
- data/app/views/spree/admin/slides/index.html.erb +13 -9
- data/app/views/spree/admin/slides/new.html.erb +3 -1
- data/app/views/spree/slides/_showcase.html.erb +63 -28
- data/config/locales/en.yml +16 -1
- data/lib/generators/spree_showcase/install/assets/overrides/showcase/add_showcase_to_home_layout.rb +12 -0
- data/lib/generators/spree_showcase/install/assets/partials/_showcase.html.erb +32 -0
- data/lib/generators/spree_showcase/install/assets/stylesheets/store/showcase.css.scss +1 -1
- data/lib/generators/spree_showcase/install/assets/vendor/javascripts/jquery.flexslider.js +903 -0
- data/lib/generators/spree_showcase/install/assets/vendor/stylesheets/jquery.flexslider.css +76 -0
- data/lib/generators/spree_showcase/install/install_generator.rb +47 -22
- data/lib/spree/showcase_configuration.rb +1 -0
- data/spree_showcase-0.5.3.gem +0 -0
- data/spree_showcase.gemspec +3 -3
- data/vendor/assets/javascripts/jquery.flexslider.js +903 -0
- data/vendor/assets/stylesheets/jquery.flexslider.css +76 -0
- metadata +16 -14
- data/app/overrides/add_showcase_to_home_layout.rb +0 -8
- data/app/overrides/insert_slider_into_spree_application.rb +0 -10
- data/lib/generators/spree_showcase/install/assets/javascripts/store/jquery.flexslider.js +0 -563
- data/lib/generators/spree_showcase/install/assets/javascripts/store/showcase.js.erb +0 -32
- data/lib/generators/spree_showcase/install/assets/stylesheets/store/flexslider.css +0 -64
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//= require store/jquery.flexslider
|
|
2
|
-
// Put your own showcase trigger here if you wish to use another JS Library. Remember to require it in all.js or this file.
|
|
3
|
-
|
|
4
|
-
$(window).load(function() {
|
|
5
|
-
$('.flexslider').flexslider({
|
|
6
|
-
animation: "<%= SpreeShowcase::Config[:animation_type] %>", //String: Select your animation type, "fade" or "slide"
|
|
7
|
-
slideDirection: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
|
|
8
|
-
slideshow: "<%= SpreeShowcase::Config[:slideshow] %>", //Boolean: Animate slider automatically
|
|
9
|
-
slideshowSpeed: "<%= SpreeShowcase::Config[:slideshow_speed] %>", //Integer: Set the speed of the slideshow cycling, in milliseconds
|
|
10
|
-
animationDuration: "<%= SpreeShowcase::Config[:animation_duration] %>", //Integer: Set the speed of animations, in milliseconds
|
|
11
|
-
directionNav: false, //Boolean: Create navigation for previous/next navigation? (true/false)
|
|
12
|
-
controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
|
|
13
|
-
keyboardNav: true, //Boolean: Allow slider navigating via keyboard left/right keys
|
|
14
|
-
mousewheel: false, //Boolean: Allow slider navigating via mousewheel
|
|
15
|
-
prevText: "Previous", //String: Set the text for the "previous" directionNav item
|
|
16
|
-
nextText: "Next", //String: Set the text for the "next" directionNav item
|
|
17
|
-
pausePlay: false, //Boolean: Create pause/play dynamic element
|
|
18
|
-
pauseText: 'Pause', //String: Set the text for the "pause" pausePlay item
|
|
19
|
-
playText: 'Play', //String: Set the text for the "play" pausePlay item
|
|
20
|
-
randomize: "<%= SpreeShowcase::Config[:randomize] %>", //Boolean: Randomize slide order
|
|
21
|
-
slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
|
|
22
|
-
animationLoop: "<%= SpreeShowcase::Config[:animation_loop] %>", //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
|
|
23
|
-
pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
|
|
24
|
-
pauseOnHover: "<%= SpreeShowcase::Config[:pause_on_hover] %>", //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
|
|
25
|
-
controlsContainer: ".flex-container", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. Example use would be ".flexslider-container", "#container", etc. If the given element is not found, the default action will be taken.
|
|
26
|
-
manualControls: ".custom-controls li a", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
|
|
27
|
-
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
|
|
28
|
-
before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
|
|
29
|
-
after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
|
|
30
|
-
end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* jQuery FlexSlider v1.8
|
|
3
|
-
* http://www.woothemes.com/flexslider/
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2012 WooThemes
|
|
6
|
-
* Free to use under the MIT license.
|
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/* Browser Resets */
|
|
11
|
-
.flex-container a:active,
|
|
12
|
-
.flexslider a:active,
|
|
13
|
-
.flex-container a:focus,
|
|
14
|
-
.flexslider a:focus {outline: none;}
|
|
15
|
-
.slides,
|
|
16
|
-
.flex-control-nav,
|
|
17
|
-
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
|
|
18
|
-
|
|
19
|
-
/* FlexSlider Necessary Styles
|
|
20
|
-
*********************************/
|
|
21
|
-
.flexslider {margin: 0; padding: 0;}
|
|
22
|
-
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
|
|
23
|
-
.flexslider .slides img {max-width: 100%; display: block;}
|
|
24
|
-
.flex-pauseplay span {text-transform: capitalize;}
|
|
25
|
-
|
|
26
|
-
/* Clearfix for the .slides element */
|
|
27
|
-
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
|
|
28
|
-
html[xmlns] .slides {display: block;}
|
|
29
|
-
* html .slides {height: 1%;}
|
|
30
|
-
|
|
31
|
-
/* No JavaScript Fallback */
|
|
32
|
-
/* If you are not using another script, such as Modernizr, make sure you
|
|
33
|
-
* include js that eliminates this class on page load */
|
|
34
|
-
.no-js .slides > li:first-child {display: block;}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/* FlexSlider Default Theme
|
|
38
|
-
*********************************/
|
|
39
|
-
/*.flexslider {background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; zoom: 1;}*/
|
|
40
|
-
.flexslider .slides {zoom: 1;}
|
|
41
|
-
.flexslider .slides > li {position: relative;}
|
|
42
|
-
/* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */
|
|
43
|
-
.flex-container {zoom: 1; position: relative;}
|
|
44
|
-
|
|
45
|
-
/* Caption style */
|
|
46
|
-
/* IE rgba() hack */
|
|
47
|
-
.flex-caption {background:none; -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
|
|
48
|
-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000); zoom: 1;}
|
|
49
|
-
.flex-caption {width: 96%; padding: 2%; margin: 0; position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.3); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.3); font-size: 14px; line-height: 18px;}
|
|
50
|
-
|
|
51
|
-
/* Direction Nav */
|
|
52
|
-
.flex-direction-nav { height: 0; }
|
|
53
|
-
.flex-direction-nav li a {width: 52px; height: 52px; margin: -13px 0 0; display: block; background: url(theme/bg_direction_nav.png) no-repeat; position: absolute; top: 50%; cursor: pointer; text-indent: -999em;}
|
|
54
|
-
.flex-direction-nav li .next {background-position: -52px 0; right: -21px;}
|
|
55
|
-
.flex-direction-nav li .prev {left: -20px;}
|
|
56
|
-
.flex-direction-nav li .disabled {opacity: .3; filter:alpha(opacity=30); cursor: default;}
|
|
57
|
-
|
|
58
|
-
/* Control Nav */
|
|
59
|
-
.flex-control-nav {width: 100%; position: absolute; bottom: -30px; text-align: center;}
|
|
60
|
-
.flex-control-nav li {margin: 0 0 0 5px; display: inline-block; zoom: 1; *display: inline;}
|
|
61
|
-
.flex-control-nav li:first-child {margin: 0;}
|
|
62
|
-
.flex-control-nav li a {width: 13px; height: 13px; display: block; background: url(theme/bg_control_nav.png) no-repeat; cursor: pointer; text-indent: -999em;}
|
|
63
|
-
.flex-control-nav li a:hover {background-position: 0 -13px;}
|
|
64
|
-
.flex-control-nav li a.active {background-position: 0 -26px; cursor: default;}
|