frontend-helpers 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -106,35 +106,46 @@ Inside the `services.yml` you will find all of variables that should be set to u
106
106
 
107
107
  As far as the assets I've added a few of my favorite and most used javascript libraries, those are:
108
108
 
109
- [Backbone](http://documentcloud.github.com/backbone/)
110
- [Underscore](http://documentcloud.github.com/underscore/)
111
- [DD Belated PNG](http://www.dillerdesign.com/experiment/DD_belatedPNG/)
112
- [jQuery Asynchronous Plugin](http://mess.genezys.net/jquery/jquery.async.php)
113
- [jQuery Cookie plugin](https://github.com/carhartl/jquery-cookie)
114
- [jQuery Lifestream](https://github.com/christianv/jquery-lifestream)
115
- [jQuery Validation](http://bassistance.de/jquery-plugins/jquery-plugin-validation/)
116
- [Log Helper](http://html5boilerplate.com)
117
- [Modernizr](http://www.modernizr.com/)
118
- [Shortcut JS](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
119
- [SWF Object](http://code.google.com/p/swfobject/)
109
+ * [Backbone](http://documentcloud.github.com/backbone/)
110
+ * [Underscore](http://documentcloud.github.com/underscore/)
111
+ * [jQuery Fancybox](http://fancybox.net)
112
+ * [DD Belated PNG](http://www.dillerdesign.com/experiment/DD_belatedPNG/)
113
+ * [jQuery Asynchronous Plugin](http://mess.genezys.net/jquery/jquery.async.php)
114
+ * [jQuery Cookie plugin](https://github.com/carhartl/jquery-cookie)
115
+ * [jQuery Easing plugin](http://gsgd.co.uk/sandbox/jquery/easing/)
116
+ * [jQuery Lifestream](https://github.com/christianv/jquery-lifestream)
117
+ * [jQuery Slides plugin](http://slidesjs.com)
118
+ * [jQuery Tablesorter plugin](http://tablesorter.com)
119
+ * [jQuery Validation](http://bassistance.de/jquery-plugins/jquery-plugin-validation/)
120
+ * [Log Helper](http://html5boilerplate.com)
121
+ * [Modernizr](http://www.modernizr.com/)
122
+ * [Shortcut JS](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
123
+ * [SWF Object](http://code.google.com/p/swfobject/)
124
+ * [Tempo](http://tempojs.com/)
120
125
 
121
126
  All of these can be added to your manifest file for Sprockets like this
122
127
 
123
128
  //= require backbone
129
+ //= require fancybox
124
130
  //= require ie
125
131
  //= require jquery.async
126
132
  //= require jquery.cookie
133
+ //= require jquery.easing
127
134
  //= require jquery.lifestream
135
+ //= require jquery.slides
136
+ //= require jquery.tablesorter
128
137
  //= require jquery.validate
129
138
  //= require log
130
139
  //= require modernizr
131
140
  //= require shortcut
132
141
  //= require swfobject
142
+ //= require tempo
133
143
 
134
144
  Not only did I add a bunch of wonderfully awesome javascript libs I also added a css reset that can be used, as well as a base variables... Although with sprockets currently you cannot include files with persistent variables, so I would highly recommend using SASS's built in `@import` to include files to do so include both files like so rename `application.css` to `application.css.sass` then add:
135
145
 
136
146
  @import "variables.css.sass"
137
147
  @import "reset.css.sass"
148
+ @import "fancybox.css.scss"
138
149
 
139
150
 
140
151
  ## Thanks ##
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.description = %Q{Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook OG tags, integration for analytics services like google, woopra, olark, mixpanel and much much more...}
20
20
  gem.email = "me@christopherhein.com"
21
21
  gem.authors = ["Christopher Hein"]
22
- gem.version = "0.0.5"
22
+ gem.version = "0.0.6"
23
23
  # dependencies defined in Gemfile
24
24
  end
25
25
  Jeweler::RubygemsDotOrgTasks.new
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frontend-helpers}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Christopher Hein}]
12
- s.date = %q{2011-08-03}
12
+ s.date = %q{2011-08-10}
13
13
  s.description = %q{Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook OG tags, integration for analytics services like google, woopra, olark, mixpanel and much much more...}
14
14
  s.email = %q{me@christopherhein.com}
15
15
  s.extra_rdoc_files = [
@@ -101,6 +101,7 @@ Gem::Specification.new do |s|
101
101
  "vendor/assets/javascripts/jquery.cookie.js",
102
102
  "vendor/assets/javascripts/jquery.easing.js",
103
103
  "vendor/assets/javascripts/jquery.lifestream.js",
104
+ "vendor/assets/javascripts/jquery.slides.js",
104
105
  "vendor/assets/javascripts/jquery.tablesorter.js",
105
106
  "vendor/assets/javascripts/jquery.validate.js",
106
107
  "vendor/assets/javascripts/log.js",
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Slides, A Slideshow Plugin for jQuery
3
+ * Intructions: http://slidesjs.com
4
+ * By: Nathan Searles, http://nathansearles.com
5
+ * Version: 1.1.3
6
+ * Updated: February 21th, 2011
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ (function($){$.fn.slides=function(option){option=$.extend({},$.fn.slides.option,option);return this.each(function(){$('.'+option.container,$(this)).children().wrapAll('<div class="slides_control"/>');var elem=$(this),control=$('.slides_control',elem),total=control.children().size(),width=control.children().outerWidth(),height=control.children().outerHeight(),start=option.start-1,effect=option.effect.indexOf(',')<0?option.effect:option.effect.replace(' ','').split(',')[0],paginationEffect=option.effect.indexOf(',')<0?effect:option.effect.replace(' ','').split(',')[1],next=0,prev=0,number=0,current=0,loaded,active,clicked,position,direction,imageParent,pauseTimeout,playInterval;function animate(direction,effect,clicked){if(!active&&loaded){active=true;switch(direction){case'next':prev=current;next=current+1;next=total===next?0:next;position=width*2;direction=-width*2;current=next;break;case'prev':prev=current;next=current-1;next=next===-1?total-1:next;position=0;direction=0;current=next;break;case'pagination':next=parseInt(clicked,10);prev=$('.'+option.paginationClass+' li.current a',elem).attr('href').match('[^#/]+$');if(next>prev){position=width*2;direction=-width*2;}else{position=0;direction=0;}
21
+ current=next;break;}
22
+ if(effect==='fade'){option.animationStart();if(option.crossfade){control.children(':eq('+next+')',elem).css({zIndex:10}).fadeIn(option.fadeSpeed,option.fadeEasing,function(){if(option.autoHeight){control.animate({height:control.children(':eq('+next+')',elem).outerHeight()},option.autoHeightSpeed,function(){control.children(':eq('+prev+')',elem).css({display:'none',zIndex:0});control.children(':eq('+next+')',elem).css({zIndex:0});option.animationComplete(next+1);active=false;});}else{control.children(':eq('+prev+')',elem).css({display:'none',zIndex:0});control.children(':eq('+next+')',elem).css({zIndex:0});option.animationComplete(next+1);active=false;}});}else{option.animationStart();control.children(':eq('+prev+')',elem).fadeOut(option.fadeSpeed,option.fadeEasing,function(){if(option.autoHeight){control.animate({height:control.children(':eq('+next+')',elem).outerHeight()},option.autoHeightSpeed,function(){control.children(':eq('+next+')',elem).fadeIn(option.fadeSpeed,option.fadeEasing);});}else{control.children(':eq('+next+')',elem).fadeIn(option.fadeSpeed,option.fadeEasing,function(){if($.browser.msie){$(this).get(0).style.removeAttribute('filter');}});}
23
+ option.animationComplete(next+1);active=false;});}}else{control.children(':eq('+next+')').css({left:position,display:'block'});if(option.autoHeight){option.animationStart();control.animate({left:direction,height:control.children(':eq('+next+')').outerHeight()},option.slideSpeed,option.slideEasing,function(){control.css({left:-width});control.children(':eq('+next+')').css({left:width,zIndex:5});control.children(':eq('+prev+')').css({left:width,display:'none',zIndex:0});option.animationComplete(next+1);active=false;});}else{option.animationStart();control.animate({left:direction},option.slideSpeed,option.slideEasing,function(){control.css({left:-width});control.children(':eq('+next+')').css({left:width,zIndex:5});control.children(':eq('+prev+')').css({left:width,display:'none',zIndex:0});option.animationComplete(next+1);active=false;});}}
24
+ if(option.pagination){$('.'+option.paginationClass+' li.current',elem).removeClass('current');$('.'+option.paginationClass+' li:eq('+next+')',elem).addClass('current');}}}
25
+ function stop(){clearInterval(elem.data('interval'));}
26
+ function pause(){if(option.pause){clearTimeout(elem.data('pause'));clearInterval(elem.data('interval'));pauseTimeout=setTimeout(function(){clearTimeout(elem.data('pause'));playInterval=setInterval(function(){animate("next",effect);},option.play);elem.data('interval',playInterval);},option.pause);elem.data('pause',pauseTimeout);}else{stop();}}
27
+ if(total<2){return;}
28
+ if(start<0){start=0;}
29
+ if(start>total){start=total-1;}
30
+ if(option.start){current=start;}
31
+ if(option.randomize){control.randomize();}
32
+ $('.'+option.container,elem).css({overflow:'hidden',position:'relative'});control.children().css({position:'absolute',top:0,left:control.children().outerWidth(),zIndex:0,display:'none'});control.css({position:'relative',width:(width*3),height:height,left:-width});$('.'+option.container,elem).css({display:'block'});if(option.autoHeight){control.children().css({height:'auto'});control.animate({height:control.children(':eq('+start+')').outerHeight()},option.autoHeightSpeed);}
33
+ if(option.preload&&control.find('img').length){$('.'+option.container,elem).css({background:'url('+option.preloadImage+') no-repeat 50% 50%'});var img=control.find('img:eq('+start+')').attr('src')+'?'+(new Date()).getTime();if($('img',elem).parent().attr('class')!='slides_control'){imageParent=control.children(':eq(0)')[0].tagName.toLowerCase();}else{imageParent=control.find('img:eq('+start+')');}
34
+ control.find('img:eq('+start+')').attr('src',img).load(function(){control.find(imageParent+':eq('+start+')').fadeIn(option.fadeSpeed,option.fadeEasing,function(){$(this).css({zIndex:5});elem.css({background:''});loaded=true;});});}else{control.children(':eq('+start+')').fadeIn(option.fadeSpeed,option.fadeEasing,function(){loaded=true;});}
35
+ if(option.bigTarget){control.children().css({cursor:'pointer'});control.children().click(function(){animate('next',effect);return false;});}
36
+ if(option.hoverPause&&option.play){control.bind('mouseover',function(){stop();});control.bind('mouseleave',function(){pause();});}
37
+ if(option.generateNextPrev){$('.'+option.container,elem).after('<a href="#" class="'+option.prev+'">Prev</a>');$('.'+option.prev,elem).after('<a href="#" class="'+option.next+'">Next</a>');}
38
+ $('.'+option.next,elem).click(function(e){e.preventDefault();if(option.play){pause();}
39
+ animate('next',effect);});$('.'+option.prev,elem).click(function(e){e.preventDefault();if(option.play){pause();}
40
+ animate('prev',effect);});if(option.generatePagination){elem.append('<ul class='+option.paginationClass+'></ul>');control.children().each(function(){$('.'+option.paginationClass,elem).append('<li><a href="#'+number+'">'+(number+1)+'</a></li>');number++;});}else{$('.'+option.paginationClass+' li a',elem).each(function(){$(this).attr('href','#'+number);number++;});}
41
+ $('.'+option.paginationClass+' li:eq('+start+')',elem).addClass('current');$('.'+option.paginationClass+' li a',elem).click(function(){if(option.play){pause();}
42
+ clicked=$(this).attr('href').match('[^#/]+$');if(current!=clicked){animate('pagination',paginationEffect,clicked);}
43
+ return false;});$('a.link',elem).click(function(){if(option.play){pause();}
44
+ clicked=$(this).attr('href').match('[^#/]+$')-1;if(current!=clicked){animate('pagination',paginationEffect,clicked);}
45
+ return false;});if(option.play){playInterval=setInterval(function(){animate('next',effect);},option.play);elem.data('interval',playInterval);}});};$.fn.slides.option={preload:false,preloadImage:'/img/loading.gif',container:'slides_container',generateNextPrev:false,next:'next',prev:'prev',pagination:true,generatePagination:true,paginationClass:'pagination',fadeSpeed:350,fadeEasing:'',slideSpeed:350,slideEasing:'',start:1,effect:'slide',crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){}};$.fn.randomize=function(callback){function randomizeOrder(){return(Math.round(Math.random())-0.5);}
46
+ return($(this).each(function(){var $this=$(this);var $children=$this.children();var childCount=$children.length;if(childCount>1){$children.hide();var indices=[];for(i=0;i<childCount;i++){indices[indices.length]=i;}
47
+ indices=indices.sort(randomizeOrder);$.each(indices,function(j,k){var $child=$children.eq(k);var $clone=$child.clone(true);$clone.show().appendTo($this);if(callback!==undefined){callback($child,$clone);}
48
+ $child.remove();});}}));};})(jQuery);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontend-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-03 00:00:00.000000000Z
12
+ date: 2011-08-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2157825140 !ruby/object:Gem::Requirement
16
+ requirement: &2156128420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0.rc4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157825140
24
+ version_requirements: *2156128420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml-rails
27
- requirement: &2157824540 !ruby/object:Gem::Requirement
27
+ requirement: &2156126560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.3.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2157824540
35
+ version_requirements: *2156126560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sass-rails
38
- requirement: &2157823940 !ruby/object:Gem::Requirement
38
+ requirement: &2156125140 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.1.0.rc
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2157823940
46
+ version_requirements: *2156125140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sprockets
49
- requirement: &2157823320 !ruby/object:Gem::Requirement
49
+ requirement: &2156123920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.0.0.beta.10
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2157823320
57
+ version_requirements: *2156123920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &2157822720 !ruby/object:Gem::Requirement
60
+ requirement: &2156121880 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.6.4
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2157822720
68
+ version_requirements: *2156121880
69
69
  description: Large collection of useful Rails 3.1 helpers for SEO, Metatags, Facebook
70
70
  OG tags, integration for analytics services like google, woopra, olark, mixpanel
71
71
  and much much more...
@@ -160,6 +160,7 @@ files:
160
160
  - vendor/assets/javascripts/jquery.cookie.js
161
161
  - vendor/assets/javascripts/jquery.easing.js
162
162
  - vendor/assets/javascripts/jquery.lifestream.js
163
+ - vendor/assets/javascripts/jquery.slides.js
163
164
  - vendor/assets/javascripts/jquery.tablesorter.js
164
165
  - vendor/assets/javascripts/jquery.validate.js
165
166
  - vendor/assets/javascripts/log.js
@@ -185,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
186
  version: '0'
186
187
  segments:
187
188
  - 0
188
- hash: -2348552081074585870
189
+ hash: 2713202841625225954
189
190
  required_rubygems_version: !ruby/object:Gem::Requirement
190
191
  none: false
191
192
  requirements: