simpleslider 1.0.4 → 1.0.5
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/simpleslider.js +24 -21
- data/app/assets/javascripts/simpleslider.min.js +3 -3
- data/lib/simpleslider/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c879df8414f188c960b317730235f3d701c2660
|
|
4
|
+
data.tar.gz: 9545702b3d64621c0937f4bbfe2e52a54793a651
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b133ce7d31f348934e6618e43f99b1ef71153eff73826e9533cd80c56c11bc73f71187c1106e391ff336a41c288eeee725db09b5ac761b1df6457e2a4e74efe6
|
|
7
|
+
data.tar.gz: 1daf65f4febe3b06db586e10c5081517dfdad08d73a4ddb327d0d0d515f073bc18498993a1c6c8e4a7605f750f706eb49bf1cb34ea5f243c26337065642a691e
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*! Simpleslider - v1.0.5 - 2015-01-27
|
|
2
|
+
* https://github.com/vlewin/jquery.simpleslider
|
|
3
|
+
* Copyright (c) 2015 Vladislav Lewin; Licensed MIT */
|
|
1
4
|
/*! Simpleslider - v1.0.4 - 2014-03-14
|
|
2
5
|
* https://github.com/vlewin/jquery.simpleslider
|
|
3
6
|
* Copyright (c) 2014 Vladislav Lewinn; Licensed MIT */
|
|
@@ -133,31 +136,31 @@ var SimpleSlider = function(element, opts) {
|
|
|
133
136
|
var plugin = this;
|
|
134
137
|
|
|
135
138
|
$(window).on('load', function(e) {
|
|
136
|
-
if
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
if($(plugin.id).length === 1) {
|
|
140
|
+
if(location.hash) {
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
plugin.forward(location.href.replace('#', ''));
|
|
143
|
+
return false;
|
|
144
|
+
} else {
|
|
145
|
+
// Browser history
|
|
146
|
+
window.history.pushState(
|
|
147
|
+
{ path: location.pathname },
|
|
148
|
+
'Index',
|
|
149
|
+
location.pathname
|
|
150
|
+
);
|
|
151
|
+
}
|
|
149
152
|
}
|
|
150
153
|
});
|
|
151
154
|
|
|
152
155
|
$(window).on('popstate', function(e) {
|
|
153
|
-
if
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
if($(plugin.id).length === 1) {
|
|
157
|
+
if(location.hash) {
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
plugin.forward(location.href.replace('#', ''));
|
|
160
|
+
return false;
|
|
161
|
+
} else {
|
|
162
|
+
plugin.back();
|
|
163
|
+
}
|
|
161
164
|
}
|
|
162
165
|
});
|
|
163
166
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Simpleslider - v1.0.
|
|
1
|
+
/*! Simpleslider - v1.0.5 - 2015-01-27
|
|
2
2
|
* https://github.com/vlewin/jquery.simpleslider
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
var SimpleSlider=function(a,b){this.init=function(){return this.id=a.selector,this.element=$(this.selector),this.link_selector=b.link_selector,this.back_link_selector=b.back_link_selector,this.spinner=b.spinner,this.breadcrumb=b.breadcrumb,this.breadcrumb_selector=b.breadcrumb.selector,this.bind(),this},this.activeLink=function(){return $(this.id).find("a[data-target='"+location.hash+"']")},this.showBreadCrumb=function(){if(this.breadcrumb.show){var a=$(this.id).find("section").data("crumb");a||(a=location.pathname.replace(/\//g,"").capitalize());var b=location.pathname+location.hash,c=sessionStorage.getItem(b),d='<i class="fa fa-lg fa-arrow-circle-left"></i> ',e='<li><a class="'+this.back_link_selector.replace(".","")+'">'+d+a+"</a>",f="<li>"+c+"</li>",g=$(this.breadcrumb_selector);this.breadcrumb.animate===!0?g.html(e).append(f).css("width","0").show().animate({width:"100%"},this.breadcrumb.speed):g.html(e).append(f).show()}return this},this.hideBreadCrumb=function(){if(this.breadcrumb.show){var a=$(this.breadcrumb_selector);this.breadcrumb.animate===!0?a.css("width","0").html(""):a.html("")}return this},this.html=function(a){return $(this.id).find("section article:last-of-type").html(a),this},this.wait=function(){return this.html(this.spinner?this.spinner:'<img src="/assets/spinner.gif" alt="Spinner"> Please wait ...'),this},this.slide=function(a){var b=$(this.id).find("section article:first-of-type"),c=$(this.id).find("section article:last-of-type");return"right"===a?(b.css("margin-left","-100%").css("visibility","hidden"),c.css("visibility","visible")):(b.css("margin-left","0%").css("visibility","visible"),c.css("visibility","hidden")),this},this.remember=function(a,b){sessionStorage.setItem(a,b)},this.forward=function(a){var b=this;return $.ajax({url:a,beforeSend:function(){setTimeout(function(){b.slide("right")},150),b.wait()}}).done(function(a){b.showBreadCrumb().html(a)}),this},this.back=function(){$(this.id).find("section article:first-of-type").css("visibility","visible"),$(this.id).find("section article:last-of-type").css("visibility","hidden"),this.slide("left").hideBreadCrumb()},this.bind=function(){var a=this;$(window).on("load",function(b){
|
|
3
|
+
* Copyright (c) 2015 Vladislav Lewin; Licensed MIT */
|
|
4
|
+
var SimpleSlider=function(a,b){this.init=function(){return this.id=a.selector,this.element=$(this.selector),this.link_selector=b.link_selector,this.back_link_selector=b.back_link_selector,this.spinner=b.spinner,this.breadcrumb=b.breadcrumb,this.breadcrumb_selector=b.breadcrumb.selector,this.bind(),this},this.activeLink=function(){return $(this.id).find("a[data-target='"+location.hash+"']")},this.showBreadCrumb=function(){if(this.breadcrumb.show){var a=$(this.id).find("section").data("crumb");a||(a=location.pathname.replace(/\//g,"").capitalize());var b=location.pathname+location.hash,c=sessionStorage.getItem(b),d='<i class="fa fa-lg fa-arrow-circle-left"></i> ',e='<li><a class="'+this.back_link_selector.replace(".","")+'">'+d+a+"</a>",f="<li>"+c+"</li>",g=$(this.breadcrumb_selector);this.breadcrumb.animate===!0?g.html(e).append(f).css("width","0").show().animate({width:"100%"},this.breadcrumb.speed):g.html(e).append(f).show()}return this},this.hideBreadCrumb=function(){if(this.breadcrumb.show){var a=$(this.breadcrumb_selector);this.breadcrumb.animate===!0?a.css("width","0").html(""):a.html("")}return this},this.html=function(a){return $(this.id).find("section article:last-of-type").html(a),this},this.wait=function(){return this.html(this.spinner?this.spinner:'<img src="/assets/spinner.gif" alt="Spinner"> Please wait ...'),this},this.slide=function(a){var b=$(this.id).find("section article:first-of-type"),c=$(this.id).find("section article:last-of-type");return"right"===a?(b.css("margin-left","-100%").css("visibility","hidden"),c.css("visibility","visible")):(b.css("margin-left","0%").css("visibility","visible"),c.css("visibility","hidden")),this},this.remember=function(a,b){sessionStorage.setItem(a,b)},this.forward=function(a){var b=this;return $.ajax({url:a,beforeSend:function(){setTimeout(function(){b.slide("right")},150),b.wait()}}).done(function(a){b.showBreadCrumb().html(a)}),this},this.back=function(){$(this.id).find("section article:first-of-type").css("visibility","visible"),$(this.id).find("section article:last-of-type").css("visibility","hidden"),this.slide("left").hideBreadCrumb()},this.bind=function(){var a=this;$(window).on("load",function(b){if(1===$(a.id).length){if(location.hash)return b.preventDefault(),a.forward(location.href.replace("#","")),!1;window.history.pushState({path:location.pathname},"Index",location.pathname)}}),$(window).on("popstate",function(b){if(1===$(a.id).length){if(location.hash)return b.preventDefault(),a.forward(location.href.replace("#","")),!1;a.back()}}),$(document).on("click",this.link_selector,function(b){b.preventDefault();var c=$(this).data("id"),d=$(this).data("target"),e=$(this).data("title"),f=this.pathname.replace(c,d);return a.remember(f,e),a.forward(this.pathname),window.history.pushState({path:f},$(this).data("title"),f),!1}),$(document).on("click",this.back_link_selector,function(b){return location.hash?(b.preventDefault(),a.back(),window.history.pushState({path:location.pathname},"Index",location.pathname),!1):void 0})}};$.fn.simpleslider=function(a){var b=$.extend({},$.fn.simpleslider.defaults,a),c=new SimpleSlider($(this),b);return c.init()},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.string=function(){return this.replace(".","")},Number.prototype.px=function(){return this+"px"},Array.prototype.last=function(){return this[this.length-1]};
|
data/lib/simpleslider/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simpleslider
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladislav Lewin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jquery-rails
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
description: Rubygem for jquery.simpleslider (https://github.com/vlewin/jquery.simpleslider)
|
|
@@ -30,7 +30,7 @@ executables: []
|
|
|
30
30
|
extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
|
32
32
|
files:
|
|
33
|
-
- .gitignore
|
|
33
|
+
- ".gitignore"
|
|
34
34
|
- Gemfile
|
|
35
35
|
- LICENSE
|
|
36
36
|
- README.md
|
|
@@ -53,17 +53,17 @@ require_paths:
|
|
|
53
53
|
- lib
|
|
54
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
|
56
|
-
- -
|
|
56
|
+
- - ">="
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
58
|
version: '0'
|
|
59
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
|
-
- -
|
|
61
|
+
- - ">="
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
63
|
version: '0'
|
|
64
64
|
requirements: []
|
|
65
65
|
rubyforge_project:
|
|
66
|
-
rubygems_version: 2.
|
|
66
|
+
rubygems_version: 2.2.2
|
|
67
67
|
signing_key:
|
|
68
68
|
specification_version: 4
|
|
69
69
|
summary: Rubygem for jquery.simpleslider
|