spacers_and_dividers 1.0.6 → 1.0.7

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
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- The vertical spacer is the only available feature as of v1. We're still working on the awesome dividers. :)
23
+ The vertical spacer is the only available feature as of now.
24
24
  To start using it, just create a ```<div class='vspacer-[PREFERRED HEIGHT]'></div>``` and the
25
25
  wizards will automatically do the spacing. (Without the brackets ofcourse)
26
26
 
@@ -37,9 +37,9 @@ Example
37
37
  <p> vspacer will generate a 1000px height </p>
38
38
 
39
39
 
40
- ## Includes
40
+ ## Requires
41
41
 
42
- [DomReady] - The smallest subset possible from jQuery to support dom Ready event.
42
+ - Jquery
43
43
 
44
44
  ## TODOS
45
45
 
@@ -1,154 +1,4 @@
1
- // DomReady
2
- (function(){
3
-
4
- var DomReady = window.DomReady = {};
5
-
6
- // Everything that has to do with properly supporting our document ready event. Brought over from the most awesome jQuery.
7
-
8
- var userAgent = navigator.userAgent.toLowerCase();
9
-
10
- // Figure out what browser is being used
11
- var browser = {
12
- version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
13
- safari: /webkit/.test(userAgent),
14
- opera: /opera/.test(userAgent),
15
- msie: (/msie/.test(userAgent)) && (!/opera/.test( userAgent )),
16
- mozilla: (/mozilla/.test(userAgent)) && (!/(compatible|webkit)/.test(userAgent))
17
- };
18
-
19
- var readyBound = false;
20
- var isReady = false;
21
- var readyList = [];
22
-
23
- // Handle when the DOM is ready
24
- function domReady() {
25
- // Make sure that the DOM is not already loaded
26
- if(!isReady) {
27
- // Remember that the DOM is ready
28
- isReady = true;
29
-
30
- if(readyList) {
31
- for(var fn = 0; fn < readyList.length; fn++) {
32
- readyList[fn].call(window, []);
33
- }
34
-
35
- readyList = [];
36
- }
37
- }
38
- };
39
-
40
- // From Simon Willison. A safe way to fire onload w/o screwing up everyone else.
41
- function addLoadEvent(func) {
42
- var oldonload = window.onload;
43
- if (typeof window.onload != 'function') {
44
- window.onload = func;
45
- } else {
46
- window.onload = function() {
47
- if (oldonload) {
48
- oldonload();
49
- }
50
- func();
51
- }
52
- }
53
- };
54
-
55
- // does the heavy work of working through the browsers idiosyncracies (let's call them that) to hook onload.
56
- function bindReady() {
57
- if(readyBound) {
58
- return;
59
- }
60
-
61
- readyBound = true;
62
-
63
- // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
64
- if (document.addEventListener && !browser.opera) {
65
- // Use the handy event callback
66
- document.addEventListener("DOMContentLoaded", domReady, false);
67
- }
68
-
69
- // If IE is used and is not in a frame
70
- // Continually check to see if the document is ready
71
- if (browser.msie && window == top) (function(){
72
- if (isReady) return;
73
- try {
74
- // If IE is used, use the trick by Diego Perini
75
- // http://javascript.nwbox.com/IEContentLoaded/
76
- document.documentElement.doScroll("left");
77
- } catch(error) {
78
- setTimeout(arguments.callee, 0);
79
- return;
80
- }
81
- // and execute any waiting functions
82
- domReady();
83
- })();
84
-
85
- if(browser.opera) {
86
- document.addEventListener( "DOMContentLoaded", function () {
87
- if (isReady) return;
88
- for (var i = 0; i < document.styleSheets.length; i++)
89
- if (document.styleSheets[i].disabled) {
90
- setTimeout( arguments.callee, 0 );
91
- return;
92
- }
93
- // and execute any waiting functions
94
- domReady();
95
- }, false);
96
- }
97
-
98
- if(browser.safari) {
99
- var numStyles;
100
- (function(){
101
- if (isReady) return;
102
- if (document.readyState != "loaded" && document.readyState != "complete") {
103
- setTimeout( arguments.callee, 0 );
104
- return;
105
- }
106
- if (numStyles === undefined) {
107
- var links = document.getElementsByTagName("link");
108
- for (var i=0; i < links.length; i++) {
109
- if(links[i].getAttribute('rel') == 'stylesheet') {
110
- numStyles++;
111
- }
112
- }
113
- var styles = document.getElementsByTagName("style");
114
- numStyles += styles.length;
115
- }
116
- if (document.styleSheets.length != numStyles) {
117
- setTimeout( arguments.callee, 0 );
118
- return;
119
- }
120
-
121
- // and execute any waiting functions
122
- domReady();
123
- })();
124
- }
125
-
126
- // A fallback to window.onload, that will always work
127
- addLoadEvent(domReady);
128
- };
129
-
130
- // This is the public function that people can use to hook up ready.
131
- DomReady.ready = function(fn, args) {
132
- // Attach the listeners
133
- bindReady();
134
-
135
- // If the DOM is already ready
136
- if (isReady) {
137
- // Execute the function immediately
138
- fn.call(window, []);
139
- } else {
140
- // Add the function to the wait list
141
- readyList.push( function() { return fn.call(window, []); } );
142
- }
143
- };
144
-
145
- bindReady();
146
-
147
- })();
148
-
149
-
150
- // Actual spacer code
151
- DomReady.ready(function() {
1
+ $(document).ready(function() {
152
2
  var spacers = document.querySelectorAll("[class^='vspacer']");
153
3
 
154
4
  for (var x = 0; x < spacers.length; x++ ){
@@ -1,3 +1,3 @@
1
1
  module SpacersAndDividers
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["rbmrclo@hotmail.com"]
11
11
  spec.description = %q{Spacers and Dividers}
12
12
  spec.summary = %q{No more <br/> and <hr/> !!!}
13
- spec.homepage = "http://rubygems.org/gems/spacers_and_dividers"
13
+ spec.homepage = "http://github.com/rbmrclo/spacers_and_dividers"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split("\n")
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+
24
+ spec.add_dependency "jquery-rails"
23
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spacers_and_dividers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-26 00:00:00.000000000 Z
12
+ date: 2013-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: jquery-rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  description: Spacers and Dividers
47
63
  email:
48
64
  - rbmrclo@hotmail.com
@@ -60,7 +76,7 @@ files:
60
76
  - lib/spacers_and_dividers/engine.rb
61
77
  - lib/spacers_and_dividers/version.rb
62
78
  - spacers_and_dividers.gemspec
63
- homepage: http://rubygems.org/gems/spacers_and_dividers
79
+ homepage: http://github.com/rbmrclo/spacers_and_dividers
64
80
  licenses:
65
81
  - MIT
66
82
  post_install_message: