pcs_vegas 0.0.1.beta → 0.0.1

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/.rvmrc CHANGED
@@ -1,2 +1,2 @@
1
1
  # Use this gemset. If it does not exist, create it.
2
- rvm use ruby-1.9.3-p0@pcs_vegas-gem --create
2
+ rvm use ruby-1.9.3-p327@pcs_vegas-gem --create
@@ -0,0 +1,45 @@
1
+ Git/Update Sequence
2
+ ===================
3
+
4
+ - Merge "master" with "work"
5
+ - Switch to "work"
6
+ - Asset updates on "work"
7
+
8
+
9
+ - Switch to "build
10
+ - Merge "work with "build"
11
+ - Update version to a.b.<VERSION NUMBER + 1>.beta<NUMBER (starting from 1)> in version.rb
12
+ - rm -rf pkg/
13
+ - rake build
14
+ - Test using the Vegaspolish Rails app
15
+
16
+
17
+ - Switch to "update" branch
18
+ - Merge "update" with "build"
19
+ - Finalise the version update
20
+ i.e. Update version to <VERSION NUMBER + 1> in version.rb
21
+
22
+
23
+ - Switch to "release" branch
24
+ - Merge "release" with "update"
25
+ - rm -rf pkg/
26
+ - Release the gem to rubygems
27
+ rake release
28
+
29
+
30
+ - Switch to "master" branch
31
+ - Merge "master" with "release"
32
+ - Push to GitHub
33
+ git push origin --tags
34
+
35
+
36
+
37
+
38
+ CSS
39
+ ===
40
+
41
+
42
+
43
+
44
+ Javascript
45
+ ==========
@@ -1,3 +1,3 @@
1
1
  module Vegas
2
- VERSION = "0.0.1.beta"
2
+ VERSION = "0.0.1"
3
3
  end
@@ -1,11 +1,11 @@
1
1
  // ----------------------------------------------------------------------------
2
2
  // Vegas - jQuery plugin
3
3
  // Add awesome fullscreen backgrounds to your webpages.
4
- // v 1.x
4
+ // v 1.3.1
5
5
  // Dual licensed under the MIT and GPL licenses.
6
6
  // http://vegas.jaysalvat.com/
7
7
  // ----------------------------------------------------------------------------
8
- // Copyright (C) 2011 Jay Salvat
8
+ // Copyright (C) 2012 Jay Salvat
9
9
  // http://jaysalvat.com/
10
10
  // ----------------------------------------------------------------------------
11
11
  // Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -34,8 +34,8 @@
34
34
  paused = null,
35
35
  backgrounds = [],
36
36
  step = 0,
37
- delay = 5000,
38
- walk = function() {},
37
+ delay = 5000,
38
+ walk = function() {},
39
39
  timer,
40
40
  methods = {
41
41
 
@@ -62,12 +62,12 @@
62
62
  'left': '0px',
63
63
  'top': '0px'
64
64
  })
65
- .imagesLoadedForVegas( function() {
65
+ .bind('load', function() {
66
66
  if ( $new == $current ) {
67
67
  return;
68
68
  }
69
69
 
70
- $( window ).bind( 'resize.vegas', function( e ) {
70
+ $( window ).bind( 'load resize.vegas', function( e ) {
71
71
  resize( $new, options );
72
72
  });
73
73
 
@@ -119,7 +119,7 @@
119
119
  if ( !what || what == 'background') {
120
120
  $( '.vegas-background, .vegas-loading' ).remove();
121
121
  $( window ).unbind( 'resize.vegas' );
122
- $current = null;
122
+ $current = $();
123
123
  }
124
124
 
125
125
  if ( what == 'overlay') {
@@ -190,9 +190,9 @@
190
190
  }
191
191
 
192
192
  backgrounds = options.backgrounds;
193
- delay = options.delay;
193
+ delay = options.delay;
194
194
  step = options.step;
195
- walk = options.walk;
195
+ walk = options.walk;
196
196
 
197
197
  clearInterval( timer );
198
198
 
@@ -212,10 +212,14 @@
212
212
  var settings = backgrounds[ step++ ];
213
213
  settings.walk = options.walk;
214
214
 
215
+ if ( typeof( settings.fade ) == 'undefined' ) {
216
+ settings.fade = options.fade;
217
+ }
218
+
215
219
  if ( settings.fade > options.delay ) {
216
220
  settings.fade = options.delay;
217
221
  }
218
-
222
+
219
223
  $.vegas( settings );
220
224
  }
221
225
  doSlideshow();
@@ -315,9 +319,12 @@
315
319
 
316
320
  // Preload an array of backgrounds
317
321
  preload: function( backgrounds ) {
322
+ var cache = [];
318
323
  for( var i in backgrounds ) {
319
324
  if ( backgrounds[ i ].src ) {
320
- $('<img src="' + backgrounds[ i ].src + '">');
325
+ var cacheImage = document.createElement('img');
326
+ cacheImage.src = backgrounds[ i ].src;
327
+ cache.push(cacheImage);
321
328
  }
322
329
  }
323
330
 
@@ -333,6 +340,14 @@
333
340
  }
334
341
  $.extend( options, settings );
335
342
 
343
+ if( $img.height() == 0 ) {
344
+ console.log('pecouille');
345
+ $img.load( function(){
346
+ resize( $(this), settings );
347
+ } );
348
+ return;
349
+ }
350
+
336
351
  var ww = $( window ).width(),
337
352
  wh = $( window ).height(),
338
353
  iw = $img.width(),
@@ -354,10 +369,10 @@
354
369
  properties = {
355
370
  'width': newWidth + 'px',
356
371
  'height': newHeight + 'px',
357
- 'top': 'auto',
358
- 'bottom': 'auto',
359
- 'left': 'auto',
360
- 'right': 'auto'
372
+ 'top': 'auto',
373
+ 'bottom': 'auto',
374
+ 'left': 'auto',
375
+ 'right': 'auto'
361
376
  }
362
377
 
363
378
  if ( !isNaN( parseInt( options.valign ) ) ) {
@@ -425,6 +440,7 @@
425
440
  // complete: function
426
441
  },
427
442
  slideshow: {
443
+ // fade: null
428
444
  // step: int
429
445
  // delay: int
430
446
  // backgrounds: array
@@ -436,45 +452,4 @@
436
452
  // opacity: float
437
453
  }
438
454
  }
439
-
440
- /*!
441
- * jQuery imagesLoaded plugin v1.0.3
442
- * http://github.com/desandro/imagesloaded
443
- *
444
- * MIT License. by Paul Irish et al.
445
- */
446
- $.fn.imagesLoadedForVegas = function( callback ) {
447
- var $this = this,
448
- $images = $this.find('img').add( $this.filter('img') ),
449
- len = $images.length,
450
- blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
451
-
452
- function triggerCallback() {
453
- callback.call( $this, $images );
454
- }
455
-
456
- function imgLoaded() {
457
- if ( --len <= 0 && this.src !== blank ){
458
- setTimeout( triggerCallback );
459
- $images.unbind( 'load error', imgLoaded );
460
- }
461
- }
462
-
463
- if ( !len ) {
464
- triggerCallback();
465
- }
466
-
467
- $images.bind( 'load error', imgLoaded ).each( function() {
468
- // cached images don't fire load sometimes, so we reset src.
469
- if (this.complete || this.complete === undefined){
470
- var src = this.src;
471
- // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
472
- // data uri bypasses webkit log warning (thx doug jones)
473
- this.src = blank;
474
- this.src = src;
475
- }
476
- });
477
-
478
- return $this;
479
- };
480
455
  })( jQuery );
@@ -1,24 +1,34 @@
1
1
  .vegas-loading {
2
- /* Loading Gif by http://preloaders.net/ */
3
- -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px;
4
- background:#000 url(<%= image_path("loading.gif") %>) no-repeat center center;
5
- background:rgba(0, 0, 0, 0.7) url(<%= image_path("loading.gif") %>) no-repeat center center;
6
- height:32px;
7
- left:20px;
8
- position:fixed;
9
- top:20px;
10
- width:32px;
11
- z-index:0;
2
+ border-radius: 10px;
3
+ background: #000;
4
+ background: rgba(0,0,0,0.7);
5
+ background: url(<%= image_path("loading.gif") %>) no-repeat center center; /* Loading Gif by http://preloaders.net/ */
6
+ height: 32px;
7
+ left: 20px;
8
+ position: fixed;
9
+ top: 20px;
10
+ width: 32px;
11
+ z-index: 0;
12
12
  }
13
13
 
14
14
  .vegas-overlay {
15
- background:transparent url(<%= image_path("overlays/01.png") %>);
16
- opacity:0.5;
17
- z-index:-1;
15
+ background: transparent url(<%= image_path("overlays/01.png") %>);
16
+ opacity: 0.5;
17
+ z-index: -1;
18
18
  }
19
19
 
20
20
  .vegas-background {
21
- image-rendering: optimizeQuality;
22
21
  -ms-interpolation-mode: bicubic;
23
- z-index:-2;
22
+ image-rendering: optimizeQuality;
23
+ max-width: none !important; /* counteracts global img modification by twitter bootstrap library */
24
+ z-index: -2;
25
+ }
26
+
27
+ .vegas-overlay,
28
+ .vegas-background {
29
+ -webkit-user-select: none;
30
+ -khtml-user-select: none;
31
+ -moz-user-select: none;
32
+ -ms-user-select: none;
33
+ user-select: none;
24
34
  }
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pcs_vegas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta
5
- prerelease: 6
4
+ version: 0.0.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Silumesii Maboshe
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-11 00:00:00.000000000 Z
12
+ date: 2012-12-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Package the assets for the Vegas Background jQuery plugin by Jay Salvat
15
15
  as a gem.
@@ -24,6 +24,7 @@ files:
24
24
  - Gemfile
25
25
  - README.md
26
26
  - Rakefile
27
+ - _meta/README
27
28
  - lib/pcs_vegas.rb
28
29
  - lib/pcs_vegas/generators/install_generator.rb
29
30
  - lib/pcs_vegas/version.rb
@@ -63,12 +64,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
64
  required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  none: false
65
66
  requirements:
66
- - - ! '>'
67
+ - - ! '>='
67
68
  - !ruby/object:Gem::Version
68
- version: 1.3.1
69
+ version: '0'
69
70
  requirements: []
70
71
  rubyforge_project:
71
- rubygems_version: 1.8.11
72
+ rubygems_version: 1.8.24
72
73
  signing_key:
73
74
  specification_version: 3
74
75
  summary: This gem allows you to use the Vegas Background jQuery plugin by Jay Salvat