woople-theme 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
3
  //= require modernizr
4
+ //= require spin.min
4
5
  //= require twitter/bootstrap/dropdown
5
6
  //= require twitter/bootstrap/modal
6
7
  //= require twitter/bootstrap/button
@@ -20,6 +21,20 @@ function resizeFix() {
20
21
  }
21
22
  }
22
23
 
24
+ function setLoading(element) {
25
+ var div = $('<div></div>').addClass('loadingAction');
26
+ $(element).find('td:first-child').html(div);
27
+ new Spinner({
28
+ lines: 9,
29
+ radius: 3,
30
+ length: 4,
31
+ width: 2
32
+ }).spin(div[0]);
33
+ }
34
+
35
+ function visitLocation(element) {
36
+ window.location = $(element).find('a').attr('href');
37
+ }
23
38
 
24
39
  $(document).ready(function() {
25
40
  resizeFix();
@@ -28,12 +43,13 @@ $(document).ready(function() {
28
43
  new FastClick(document.body);
29
44
  }
30
45
 
31
- $('.touch .content-item').on('click', function() {
32
- window.location = $(this).find('a').attr('href');
46
+ $('.outline tr').on('click', function() {
47
+ setLoading(this);
48
+ visitLocation(this);
33
49
  });
34
50
 
35
- $('.touch .outline tr').on('click', function(e) {
36
- window.location = $(this).find('a').attr('href');
51
+ $('.touch .content-item').on('click', function() {
52
+ visitLocation(this);
37
53
  });
38
54
 
39
55
  });
@@ -1,6 +1,14 @@
1
1
  @import "woople-theme/variables.css.less";
2
2
  @import "woople-theme/colours.css.less";
3
3
 
4
+ .loadingAction {
5
+ width:16px;
6
+ height:13px;
7
+ padding-top:3px;
8
+ margin-left:-3px;
9
+ }
10
+
11
+
4
12
  .action {
5
13
  display:inline-block;
6
14
  position:absolute;
@@ -36,3 +44,12 @@
36
44
  text-shadow:none;
37
45
  }
38
46
  }
47
+
48
+ @media (max-width: 767px) {
49
+ .loadingAction {
50
+ margin:0;
51
+ position:relative;
52
+ left:3px;
53
+ }
54
+ }
55
+
@@ -1,3 +1,3 @@
1
1
  module WoopleTheme
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
@@ -0,0 +1,2 @@
1
+ //fgnass.github.com/spin.js#v1.2.5
2
+ (function(a,b,c){function g(a,c){var d=b.createElement(a||"div"),e;for(e in c)d[e]=c[e];return d}function h(a){for(var b=1,c=arguments.length;b<c;b++)a.appendChild(arguments[b]);return a}function j(a,b,c,d){var g=["opacity",b,~~(a*100),c,d].join("-"),h=.01+c/d*100,j=Math.max(1-(1-a)/b*(100-h),a),k=f.substring(0,f.indexOf("Animation")).toLowerCase(),l=k&&"-"+k+"-"||"";return e[g]||(i.insertRule("@"+l+"keyframes "+g+"{"+"0%{opacity:"+j+"}"+h+"%{opacity:"+a+"}"+(h+.01)+"%{opacity:1}"+(h+b)%100+"%{opacity:"+a+"}"+"100%{opacity:"+j+"}"+"}",0),e[g]=1),g}function k(a,b){var e=a.style,f,g;if(e[b]!==c)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(g=0;g<d.length;g++){f=d[g]+b;if(e[f]!==c)return f}}function l(a,b){for(var c in b)a.style[k(a,c)||c]=b[c];return a}function m(a){for(var b=1;b<arguments.length;b++){var d=arguments[b];for(var e in d)a[e]===c&&(a[e]=d[e])}return a}function n(a){var b={x:a.offsetLeft,y:a.offsetTop};while(a=a.offsetParent)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}var d=["webkit","Moz","ms","O"],e={},f,i=function(){var a=g("style");return h(b.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,color:"#000",speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto"},p=function q(a){if(!this.spin)return new q(a);this.opts=m(a||{},q.defaults,o)};p.defaults={},m(p.prototype,{spin:function(a){this.stop();var b=this,c=b.opts,d=b.el=l(g(0,{className:c.className}),{position:"relative",zIndex:c.zIndex}),e=c.radius+c.length+c.width,h,i;a&&(a.insertBefore(d,a.firstChild||null),i=n(a),h=n(d),l(d,{left:(c.left=="auto"?i.x-h.x+(a.offsetWidth>>1):c.left+e)+"px",top:(c.top=="auto"?i.y-h.y+(a.offsetHeight>>1):c.top+e)+"px"})),d.setAttribute("aria-role","progressbar"),b.lines(d,b.opts);if(!f){var j=0,k=c.fps,m=k/c.speed,o=(1-c.opacity)/(m*c.trail/100),p=m/c.lines;!function q(){j++;for(var a=c.lines;a;a--){var e=Math.max(1-(j+a*p)%m*o,c.opacity);b.opacity(d,c.lines-a,e,c)}b.timeout=b.el&&setTimeout(q,~~(1e3/k))}()}return b},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c),this},lines:function(a,b){function e(a,d){return l(g(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:d,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*c+b.rotate)+"deg) translate("+b.radius+"px"+",0)",borderRadius:(b.width>>1)+"px"})}var c=0,d;for(;c<b.lines;c++)d=l(g(),{position:"absolute",top:1+~(b.width/2)+"px",transform:b.hwaccel?"translate3d(0,0,0)":"",opacity:b.opacity,animation:f&&j(b.opacity,b.trail,c,b.lines)+" "+1/b.speed+"s linear infinite"}),b.shadow&&h(d,l(e("#000","0 0 4px #000"),{top:"2px"})),h(a,h(d,e(b.color,"0 0 1px rgba(0,0,0,.1)")));return a},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),!function(){function a(a,b){return g("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',b)}var b=l(g("group"),{behavior:"url(#default#VML)"});!k(b,"transform")&&b.adj?(i.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function f(){return l(a("group",{coordsize:e+" "+e,coordorigin:-d+" "+ -d}),{width:e,height:e})}function k(b,e,g){h(i,h(l(f(),{rotation:360/c.lines*b+"deg",left:~~e}),h(l(a("roundrect",{arcsize:1}),{width:d,height:c.width,left:c.radius,top:-c.width>>1,filter:g}),a("fill",{color:c.color,opacity:c.opacity}),a("stroke",{opacity:0}))))}var d=c.length+c.width,e=2*d,g=-(c.width+c.length)*2+"px",i=l(f(),{position:"absolute",top:g,left:g}),j;if(c.shadow)for(j=1;j<=c.lines;j++)k(j,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(j=1;j<=c.lines;j++)k(j);return h(b,i)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}):f=k(b,"animation")}(),a.Spinner=p})(window,document);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woople-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
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: 2012-05-04 00:00:00.000000000 Z
12
+ date: 2012-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70334147139920 !ruby/object:Gem::Requirement
16
+ requirement: &70111598901940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70334147139920
24
+ version_requirements: *70111598901940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: less-rails-bootstrap
27
- requirement: &70334147139220 !ruby/object:Gem::Requirement
27
+ requirement: &70111598901380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.8
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70334147139220
35
+ version_requirements: *70111598901380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70334147138620 !ruby/object:Gem::Requirement
38
+ requirement: &70111598900980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70334147138620
46
+ version_requirements: *70111598900980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sqlite3
49
- requirement: &70334147137680 !ruby/object:Gem::Requirement
49
+ requirement: &70111598900440 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70334147137680
57
+ version_requirements: *70111598900440
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec-rails
60
- requirement: &70334147136880 !ruby/object:Gem::Requirement
60
+ requirement: &70111598899920 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.9.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70334147136880
68
+ version_requirements: *70111598899920
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &70334147135840 !ruby/object:Gem::Requirement
71
+ requirement: &70111598899480 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70334147135840
79
+ version_requirements: *70111598899480
80
80
  description: All Front-End all the Time
81
81
  email:
82
82
  - developers@bigbangtechnology.com
@@ -168,6 +168,7 @@ files:
168
168
  - lib/woople-theme.rb
169
169
  - vendor/assets/javascripts/fastclick.min_.js
170
170
  - vendor/assets/javascripts/modernizr.js
171
+ - vendor/assets/javascripts/spin.min.js
171
172
  - vendor/assets/javascripts/video.min.js
172
173
  - vendor/assets/stylesheets/woople-theme/google-code-prettify/prettify.css
173
174
  - vendor/assets/stylesheets/woople-theme/video-js.min.css
@@ -199,3 +200,4 @@ signing_key:
199
200
  specification_version: 3
200
201
  summary: Our Front-End CSS Framework/Theme
201
202
  test_files: []
203
+ has_rdoc: