compass_formalize 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  pkg
2
2
  .sass-cache
3
+ .DS_Store
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ### 0.0.2 - April 27, 2011
4
+
5
+ * Patch from @hoverlover for Compass includes.
6
+
7
+ ### 0.0.1 - April 19, 2011
8
+
9
+ * Initial release
data/README.md CHANGED
@@ -4,3 +4,38 @@ This is an extension for [Compass](http://beta.compass-style.org) for
4
4
  [Formalize](http://formalize.me),
5
5
  [Nathan Smith](http://sonspring.com)'s excellent HTML Form stylesheet
6
6
  project.
7
+
8
+ ## Installation
9
+
10
+ Install the extension via Ruby Gems:
11
+
12
+ gem install compass_formalize
13
+
14
+
15
+ If you're starting from scratch, create your Compass project:
16
+
17
+ compass create my-project -r compass_formalize
18
+
19
+ To apply the Formalize pattern, run one of the following, depending on
20
+ your JavaScript framework taste:
21
+
22
+ compass install formalize/dojo
23
+ compass install formalize/extjs
24
+ compass install formalize/jquery
25
+ compass install formalize/mootools
26
+ compass install formalize/prototype
27
+ compass install formalize/yui
28
+
29
+ ... and follow the provided instructions.
30
+
31
+
32
+ ## License
33
+
34
+
35
+ Licensed under MIT/GPL.
36
+
37
+ GPL license:
38
+ http://www.gnu.org/licenses/gpl.html
39
+
40
+ MIT license:
41
+ http://www.opensource.org/licenses/mit-license.php
@@ -2,14 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{compass_formalize}
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
8
  s.authors = ["Wynn Netherland", "Nathan Smith"]
9
9
  s.date = %q{2011-04-19}
10
10
  s.description = %q{Compass and Sass port of Nathan Smith's Formalize HTML form normalizer.}
11
11
  s.email = %w{wynn.netherland@gmail.com nathan@sonspring.com}
12
- s.has_rdoc = false
13
12
  s.files = `git ls-files`.split("\n")
14
13
  s.homepage = %q{http://github.com/pengwynn/compass_formalize}
15
14
  s.require_paths = ["lib"]
@@ -1,3 +1,12 @@
1
+ // Note: This file is dependent on Sass and Compass.
2
+ // Sass = http://sass-lang.com
3
+ // Compass = http://compass-style.org
4
+
5
+ @import compass/css3/box-sizing
6
+ @import compass/css3/gradient
7
+ @import compass/css3/border-radius
8
+ @import compass/css3/background-clip
9
+
1
10
  // `Widths
2
11
  //----------------------------------------------------------------------------------------------------
3
12
 
@@ -42,9 +51,6 @@ input,
42
51
  button,
43
52
  select,
44
53
  textarea
45
- -moz-background-clip: padding
46
- -webkit-background-clip: padding
47
- background-clip: padding-box
48
54
  margin: 0
49
55
  vertical-align: middle
50
56
 
@@ -54,7 +60,8 @@ input[type="submit"],
54
60
  input[type="button"]
55
61
  -webkit-appearance: none
56
62
  +border-radius(11px)
57
- background: #ddd image-url(button.png) repeat-x
63
+ +background-clip(padding-box)
64
+ background: #ddd url(../images/button.png) repeat-x
58
65
  +linear-gradient(color-stops(#fff, #ddd))
59
66
  border: 1px solid
60
67
  border-color: #ddd #bbb #999
@@ -94,6 +101,7 @@ input[type="week"]
94
101
  -webkit-appearance: none
95
102
  +border-radius(0)
96
103
  +box-sizing(border-box)
104
+ +background-clip(padding-box)
97
105
  background-color: #fff
98
106
  border: 1px solid
99
107
  border-color: #848484 #c1c1c1 #e1e1e1
@@ -182,7 +190,7 @@ textarea[disabled]
182
190
  .is_webkit select
183
191
  // Tweaks for Safari + Chrome.
184
192
  background:
185
- image: image-url(select_arrow.gif)
193
+ image: url(../images/select_arrow.gif)
186
194
  repeat: no-repeat
187
195
  position: right center
188
196
  padding-right: 20px
@@ -233,7 +241,7 @@ optgroup
233
241
 
234
242
  .ie6_button,
235
243
  * html button
236
- background: #ddd image-url(button.png) repeat-x
244
+ background: #ddd url(../images/button.png) repeat-x
237
245
  border: 1px solid
238
246
  border-color: #ddd #bbb #999
239
247
  cursor: pointer
@@ -1 +1 @@
1
- var FORMALIZE=(function(f,b,g){var e="placeholder" in b.createElement("input");var c="autofocus" in b.createElement("input");var d="webkitAppearance" in b.createElement("select").style;var a=parseInt(dojo.isIE,10)===6;var h=parseInt(dojo.isIE,10)===7;return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!d){return;}dojo.query("html").addClass("is_webkit");},full_input_size:function(){if(!h||!dojo.query("textarea, input.input_full").length){return;}dojo.query("textarea, input.input_full").forEach(function(j){var k=j.cloneNode(false);var i=b.createElement("span");i.className="input_full_wrap";i.appendChild(k);j.parentNode.replaceChild(i,j);});},ie6_skin_inputs:function(){if(!a||!dojo.query("input, select, textarea").length){return;}var i=/button|submit|reset/;var j=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;dojo.query("input").forEach(function(k){if(k.getAttribute("type").match(i)){dojo.addClass(k,"ie6_button");if(k.disabled){dojo.addClass(k,"ie6_button_disabled");}}else{if(k.getAttribute("type").match(j)){dojo.addClass(k,"ie6_input");if(k.disabled){dojo.addClass(k,"ie6_input_disabled");}}}});dojo.query("textarea, select").forEach(function(k){if(k.disabled){dojo.addClass(k,"ie6_input_disabled");}});},autofocus:function(){if(c||!dojo.query("[autofocus]").length){return;}dojo.query("[autofocus]")[0].focus();},placeholder:function(){if(e||!dojo.query("[placeholder]").length){return;}FORMALIZE.misc.add_placeholder();dojo.query("[placeholder]").forEach(function(i){dojo.connect(i,"onfocus",function(){var j=i.getAttribute("placeholder");if(i.value===j){i.value="";dojo.removeClass(i,"placeholder_text");}});dojo.connect(i,"onblur",function(){FORMALIZE.misc.add_placeholder();});});dojo.query("form").forEach(function(i){dojo.connect(i,"onsubmit",function(){dojo.query("[placeholder]",i).forEach(function(j){var k=j.getAttribute("placeholder");if(j.value===k){j.value="";dojo.removeClass(j,"placeholder_text");}});});dojo.connect(i,"onreset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(e||!dojo.query("[placeholder]").length){return;}dojo.query("[placeholder]").forEach(function(i){var j=i.getAttribute("placeholder");if(!i.value||i.value===j){i.value=j;dojo.addClass(i,"placeholder_text");}});}}};})(this,this.document);dojo.addOnLoad(function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f="webkitAppearance"in b.createElement("select").style,g=parseInt(dojo.isIE,10)===6,h=parseInt(dojo.isIE,10)===7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!f||dojo.query("html").addClass("is_webkit")},full_input_size:function(){!!h&&!!dojo.query("textarea, input.input_full").length&&dojo.query("textarea, input.input_full").forEach(function(a){var c=a.cloneNode(!1),d=b.createElement("span");d.className="input_full_wrap",d.appendChild(c),a.parentNode.replaceChild(d,a)})},ie6_skin_inputs:function(){if(!!g&&!!dojo.query("input, select, textarea").length){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;dojo.query("input").forEach(function(c){c.getAttribute("type").match(a)?(dojo.addClass(c,"ie6_button"),c.disabled&&dojo.addClass(c,"ie6_button_disabled")):c.getAttribute("type").match(b)&&(dojo.addClass(c,"ie6_input"),c.disabled&&dojo.addClass(c,"ie6_input_disabled"))}),dojo.query("textarea, select").forEach(function(a){a.disabled&&dojo.addClass(a,"ie6_input_disabled")})}},autofocus:function(){!e&&!!dojo.query("[autofocus]").length&&dojo.query("[autofocus]")[0].focus()},placeholder:function(){!d&&!!dojo.query("[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),dojo.query("[placeholder]").forEach(function(a){dojo.connect(a,"onfocus",function(){var b=a.getAttribute("placeholder");a.value===b&&(a.value="",dojo.removeClass(a,"placeholder_text"))}),dojo.connect(a,"onblur",function(){FORMALIZE.misc.add_placeholder()})}),dojo.query("form").forEach(function(a){dojo.connect(a,"onsubmit",function(){dojo.query("[placeholder]",a).forEach(function(a){var b=a.getAttribute("placeholder");a.value===b&&(a.value="",dojo.removeClass(a,"placeholder_text"))})}),dojo.connect(a,"onreset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!d&&!!dojo.query("[placeholder]").length&&dojo.query("[placeholder]").forEach(function(a){var b=a.getAttribute("placeholder");if(!a.value||a.value===b)a.value=b,dojo.addClass(a,"placeholder_text")})}}}}(this,this.document);dojo.addOnLoad(function(){FORMALIZE.go()})
@@ -27,8 +27,7 @@ welcome_message %Q{
27
27
  In your HTML markup, include the JavaScript implementation of
28
28
  your choice:
29
29
 
30
- // a jQuery example
31
- <script src="/javascripts/jquery.formalize.js"></script>
30
+ <script src="/javascripts/dojo.formalize.js"></script>
32
31
 
33
32
  Please see the Formalize website for documentation:
34
33
 
@@ -1 +1 @@
1
- var FORMALIZE=(function(f,b,g){var e="placeholder" in b.createElement("input");var c="autofocus" in b.createElement("input");var d="webkitAppearance" in b.createElement("select").style;var a=Ext.isIE6;var h=Ext.isIE7;return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!d){return;}Ext.get(Ext.query("html")).addClass("is_webkit");},full_input_size:function(){if(!h||!Ext.query("textarea, input.input_full")){return;}Ext.each(Ext.query("textarea, input.input_full"),function(i){Ext.get(i).wrap('<span class="input_full_wrap"></span>');});},ie6_skin_inputs:function(){if(!a||!Ext.query("input, select, textarea")){return;}var i=/button|submit|reset/;var j=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;Ext.each(Ext.query("input"),function(k){if(k.getAttribute("type").match(i)){Ext.get(k).addClass("ie6_button");if(k.disabled){Ext.get(k).addClass("ie6_button_disabled");}}else{if(k.getAttribute("type").match(j)){Ext.get(k).addClass("ie6_input");if(k.disabled){Ext.get(k).addClass("ie6_input_disabled");}}}});Ext.each(Ext.query("textarea, select"),function(k){if(k.disabled){Ext.get(k).addClass("ie6_input_disabled");}});},autofocus:function(){if(c||!Ext.query("[autofocus]")){return;}Ext.query("[autofocus]")[0].focus();},placeholder:function(){if(e||!Ext.query("[placeholder]")){return;}FORMALIZE.misc.add_placeholder();Ext.each(Ext.query("[placeholder]"),function(j){var l=j.getAttribute("placeholder");var k=Ext.get(j).parent("form");function i(){if(!j.value||j.value===l){j.value=l;Ext.get(j).addClass("placeholder_text");}}Ext.get(j).on("focus",function(){if(j.value===l){j.value="";Ext.get(j).removeClass("placeholder_text");}});Ext.get(j).on("blur",function(){FORMALIZE.misc.add_placeholder();});k.on("submit",function(){if(j.value===l){j.value="";Ext.get(j).removeClass("placeholder_text");}});k.on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(e||!Ext.query("[placeholder]")){return;}Ext.each(Ext.query("[placeholder]"),function(i){var j=i.getAttribute("placeholder");if(!i.value||i.value===j){i.value=j;Ext.get(i).addClass("placeholder_text");}});}}};})(this,this.document);Ext.onReady(function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f="webkitAppearance"in b.createElement("select").style,g=Ext.isIE6,h=Ext.isIE7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!f||Ext.get(Ext.query("html")).addClass("is_webkit")},full_input_size:function(){!!h&&!!Ext.query("textarea, input.input_full")&&Ext.each(Ext.query("textarea, input.input_full"),function(a){Ext.get(a).wrap('<span class="input_full_wrap"></span>')})},ie6_skin_inputs:function(){if(!!g&&!!Ext.query("input, select, textarea")){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;Ext.each(Ext.query("input"),function(c){c.getAttribute("type").match(a)?(Ext.get(c).addClass("ie6_button"),c.disabled&&Ext.get(c).addClass("ie6_button_disabled")):c.getAttribute("type").match(b)&&(Ext.get(c).addClass("ie6_input"),c.disabled&&Ext.get(c).addClass("ie6_input_disabled"))}),Ext.each(Ext.query("textarea, select"),function(a){a.disabled&&Ext.get(a).addClass("ie6_input_disabled")})}},autofocus:function(){!e&&!!Ext.query("[autofocus]")&&Ext.query("[autofocus]")[0].focus()},placeholder:function(){!d&&!!Ext.query("[placeholder]")&&(FORMALIZE.misc.add_placeholder(),Ext.each(Ext.query("[placeholder]"),function(a){function d(){if(!a.value||a.value===b)a.value=b,Ext.get(a).addClass("placeholder_text")}var b=a.getAttribute("placeholder"),c=Ext.get(a).parent("form");Ext.get(a).on("focus",function(){a.value===b&&(a.value="",Ext.get(a).removeClass("placeholder_text"))}),Ext.get(a).on("blur",function(){FORMALIZE.misc.add_placeholder()}),c.on("submit",function(){a.value===b&&(a.value="",Ext.get(a).removeClass("placeholder_text"))}),c.on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!d&&!!Ext.query("[placeholder]")&&Ext.each(Ext.query("[placeholder]"),function(a){var b=a.getAttribute("placeholder");if(!a.value||a.value===b)a.value=b,Ext.get(a).addClass("placeholder_text")})}}}}(this,this.document);Ext.onReady(function(){FORMALIZE.go()})
@@ -27,8 +27,7 @@ welcome_message %Q{
27
27
  In your HTML markup, include the JavaScript implementation of
28
28
  your choice:
29
29
 
30
- // a jQuery example
31
- <script src="/javascripts/jquery.formalize.js"></script>
30
+ <script src="/javascripts/extjs.formalize.js"></script>
32
31
 
33
32
  Please see the Formalize website for documentation:
34
33
 
@@ -1 +1 @@
1
- var FORMALIZE=(function(b,e,f,a){var h="placeholder" in f.createElement("input");var i="autofocus" in f.createElement("input");var g="webkitAppearance" in f.createElement("select").style;var d=!!(b.browser.msie&&parseInt(b.browser.version,10)===6);var c=!!(b.browser.msie&&parseInt(b.browser.version,10)===7);return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!g){return;}b("html").addClass("is_webkit");},full_input_size:function(){if(!c||!b("textarea, input.input_full").length){return;}b("textarea, input.input_full").wrap('<span class="input_full_wrap"></span>');},ie6_skin_inputs:function(){if(!d||!b("input, select, textarea").length){return;}var j=/button|submit|reset/;var k=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;b("input").each(function(){var l=b(this);if(this.getAttribute("type").match(j)){l.addClass("ie6_button");if(this.disabled){l.addClass("ie6_button_disabled");}}else{if(this.getAttribute("type").match(k)){l.addClass("ie6_input");if(this.disabled){l.addClass("ie6_input_disabled");}}}});b("textarea, select").each(function(){if(this.disabled){b(this).addClass("ie6_input_disabled");}});},autofocus:function(){if(i||!b(":input[autofocus]").length){return;}b(":input[autofocus]:visible:first").focus();},placeholder:function(){if(h||!b(":input[placeholder]").length){return;}FORMALIZE.misc.add_placeholder();b(":input[placeholder]").each(function(){var j=b(this);var k=j.attr("placeholder");j.focus(function(){if(j.val()===k){j.val("").removeClass("placeholder_text");}}).blur(function(){FORMALIZE.misc.add_placeholder();});j.closest("form").submit(function(){if(j.val()===k){j.val("").removeClass("placeholder_text");}}).bind("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(h||!b(":input[placeholder]").length){return;}b(":input[placeholder]").each(function(){var j=b(this);var k=j.attr("placeholder");if(!j.val()||j.val()===k){j.val(k).addClass("placeholder_text");}});}}};})(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c,d){var e="placeholder"in c.createElement("input"),f="autofocus"in c.createElement("input"),g="webkitAppearance"in c.createElement("select").style,h=!!a.browser.msie&&parseInt(a.browser.version,10)===6,i=!!a.browser.msie&&parseInt(a.browser.version,10)===7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!g||a("html").addClass("is_webkit")},full_input_size:function(){!!i&&!!a("textarea, input.input_full").length&&a("textarea, input.input_full").wrap('<span class="input_full_wrap"></span>')},ie6_skin_inputs:function(){if(!!h&&!!a("input, select, textarea").length){var b=/button|submit|reset/,c=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;a("input").each(function(){var d=a(this);this.getAttribute("type").match(b)?(d.addClass("ie6_button"),this.disabled&&d.addClass("ie6_button_disabled")):this.getAttribute("type").match(c)&&(d.addClass("ie6_input"),this.disabled&&d.addClass("ie6_input_disabled"))}),a("textarea, select").each(function(){this.disabled&&a(this).addClass("ie6_input_disabled")})}},autofocus:function(){!f&&!!a(":input[autofocus]").length&&a(":input[autofocus]:visible:first").focus()},placeholder:function(){!e&&!!a(":input[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),a(":input[placeholder]").each(function(){var b=a(this),c=b.attr("placeholder");b.focus(function(){b.val()===c&&b.val("").removeClass("placeholder_text")}).blur(function(){FORMALIZE.misc.add_placeholder()}),b.closest("form").submit(function(){b.val()===c&&b.val("").removeClass("placeholder_text")}).bind("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!e&&!!a(":input[placeholder]").length&&a(":input[placeholder]").each(function(){var b=a(this),c=b.attr("placeholder");(!b.val()||b.val()===c)&&b.val(c).addClass("placeholder_text")})}}}}(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go()})
@@ -27,8 +27,7 @@ welcome_message %Q{
27
27
  In your HTML markup, include the JavaScript implementation of
28
28
  your choice:
29
29
 
30
- // a jQuery example
31
- <script src="/javascripts/jquery.formalize.js"></script>
30
+ <script src="/javascripts/mootools.formalize.js"></script>
32
31
 
33
32
  Please see the Formalize website for documentation:
34
33
 
@@ -1 +1 @@
1
- var FORMALIZE=(function(f,b,g){var e="placeholder" in b.createElement("input");var c="autofocus" in b.createElement("input");var d="webkitAppearance" in b.createElement("select").style;var a=Browser.ie6;var h=Browser.ie7;return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!d){return;}$$("html")[0].addClass("is_webkit");},full_input_size:function(){if(!h||!$$("textarea, input.input_full").length){return;}$$("textarea, input.input_full").each(function(i){new Element("span.input_full_wrap").wraps(i);});},ie6_skin_inputs:function(){if(!a||!$$("input, select, textarea").length){return;}var i=/button|submit|reset/;var j=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(k){if(k.getAttribute("type").match(i)){k.addClass("ie6_button");if(k.disabled){k.addClass("ie6_button_disabled");}}else{if(k.getAttribute("type").match(j)){k.addClass("ie6_input");if(k.disabled){k.addClass("ie6_input_disabled");}}}});$$("textarea, select").each(function(k){if(k.disabled){k.addClass("ie6_input_disabled");}});},autofocus:function(){if(c||!$$("[autofocus]").length){return;}$$("[autofocus]")[0].focus();},placeholder:function(){if(e||!$$("[placeholder]").length){return;}FORMALIZE.misc.add_placeholder();$$("[placeholder]").each(function(i){var j=i.get("placeholder");i.addEvents({focus:function(){if(i.value===j){i.set("value","").removeClass("placeholder_text");}},blur:function(){FORMALIZE.misc.add_placeholder();}});i.getParent("form").addEvents({submit:function(){if(i.value===j){i.set("value","").removeClass("placeholder_text");}},reset:function(){setTimeout(FORMALIZE.misc.add_placeholder,50);}});});}},misc:{add_placeholder:function(){if(e||!$$("[placeholder]").length){return;}$$("[placeholder]").each(function(i){var j=i.get("placeholder");if(!i.value||i.value===j){i.set("value",j).addClass("placeholder_text");}});}}};})(this,this.document);$(document).addEvent("domready",function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f="webkitAppearance"in b.createElement("select").style,g=Browser.ie6,h=Browser.ie7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!f||$$("html")[0].addClass("is_webkit")},full_input_size:function(){!!h&&!!$$("textarea, input.input_full").length&&$$("textarea, input.input_full").each(function(a){(new Element("span.input_full_wrap")).wraps(a)})},ie6_skin_inputs:function(){if(!!g&&!!$$("input, select, textarea").length){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(c){c.getAttribute("type").match(a)?(c.addClass("ie6_button"),c.disabled&&c.addClass("ie6_button_disabled")):c.getAttribute("type").match(b)&&(c.addClass("ie6_input"),c.disabled&&c.addClass("ie6_input_disabled"))}),$$("textarea, select").each(function(a){a.disabled&&a.addClass("ie6_input_disabled")})}},autofocus:function(){!e&&!!$$("[autofocus]").length&&$$("[autofocus]")[0].focus()},placeholder:function(){!d&&!!$$("[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),$$("[placeholder]").each(function(a){var b=a.get("placeholder");a.addEvents({focus:function(){a.value===b&&a.set("value","").removeClass("placeholder_text")},blur:function(){FORMALIZE.misc.add_placeholder()}}),a.getParent("form").addEvents({submit:function(){a.value===b&&a.set("value","").removeClass("placeholder_text")},reset:function(){setTimeout(FORMALIZE.misc.add_placeholder,50)}})}))}},misc:{add_placeholder:function(){!d&&!!$$("[placeholder]").length&&$$("[placeholder]").each(function(a){var b=a.get("placeholder");(!a.value||a.value===b)&&a.set("value",b).addClass("placeholder_text")})}}}}(this,this.document);$(document).addEvent("domready",function(){FORMALIZE.go()})
@@ -28,7 +28,7 @@ welcome_message %Q{
28
28
  your choice:
29
29
 
30
30
  // a jQuery example
31
- <script src="/javascripts/jquery.formalize.js"></script>
31
+ <script src="/javascripts/prototype.formalize.js"></script>
32
32
 
33
33
  Please see the Formalize website for documentation:
34
34
 
@@ -1 +1 @@
1
- var FORMALIZE=(function(e,f,a){var h="placeholder" in f.createElement("input");var i="autofocus" in f.createElement("input");var g="webkitAppearance" in f.createElement("select").style;var c=d(6);var b=d(7);function d(k){var j=f.createElement("b");j.innerHTML="<!--[if IE "+k+"]><br><![endif]-->";return !!j.getElementsByTagName("br").length;}return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!g){return;}$$("html")[0].addClassName("is_webkit");},full_input_size:function(){if(!b||!$$("textarea, input.input_full").length){return;}$$("textarea, input.input_full").each(function(j){Element.wrap(j,"span",{"class":"input_full_wrap"});});},ie6_skin_inputs:function(){if(!c||!$$("input, select, textarea").length){return;}var j=/button|submit|reset/;var k=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(l){if(l.getAttribute("type").match(j)){l.addClassName("ie6_button");if(l.disabled){l.addClassName("ie6_button_disabled");}}else{if(l.getAttribute("type").match(k)){l.addClassName("ie6_input");if(l.disabled){l.addClassName("ie6_input_disabled");}}}});$$("textarea, select").each(function(l){if(l.disabled){l.addClassName("ie6_input_disabled");}});},autofocus:function(){if(i||!$$("[autofocus]").length){return;}$$("[autofocus]")[0].focus();},placeholder:function(){if(h||!$$("[placeholder]").length){return;}FORMALIZE.misc.add_placeholder();$$("[placeholder]").each(function(j){var l=j.getAttribute("placeholder");var k=j.up("form");j.observe("focus",function(){if(j.value===l){j.value="";j.removeClassName("placeholder_text");}});j.observe("blur",function(){FORMALIZE.misc.add_placeholder();});k.observe("submit",function(){if(j.value===l){j.value="";j.removeClassName("placeholder_text");}});k.observe("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(h||!$$("[placeholder]").length){return;}$$("[placeholder]").each(function(j){var k=j.getAttribute("placeholder");if(!j.value||j.value===k){j.value=k;j.addClassName("placeholder_text");}});}}};})(this,this.document);$(document).observe("dom:loaded",function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c){function i(a){var c=b.createElement("b");c.innerHTML="<!--[if IE "+a+"]><br><![endif]-->";return!!c.getElementsByTagName("br").length}var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f="webkitAppearance"in b.createElement("select").style,g=i(6),h=i(7);return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!f||$$("html")[0].addClassName("is_webkit")},full_input_size:function(){!!h&&!!$$("textarea, input.input_full").length&&$$("textarea, input.input_full").each(function(a){Element.wrap(a,"span",{"class":"input_full_wrap"})})},ie6_skin_inputs:function(){if(!!g&&!!$$("input, select, textarea").length){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(c){c.getAttribute("type").match(a)?(c.addClassName("ie6_button"),c.disabled&&c.addClassName("ie6_button_disabled")):c.getAttribute("type").match(b)&&(c.addClassName("ie6_input"),c.disabled&&c.addClassName("ie6_input_disabled"))}),$$("textarea, select").each(function(a){a.disabled&&a.addClassName("ie6_input_disabled")})}},autofocus:function(){!e&&!!$$("[autofocus]").length&&$$("[autofocus]")[0].focus()},placeholder:function(){!d&&!!$$("[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),$$("[placeholder]").each(function(a){var b=a.getAttribute("placeholder"),c=a.up("form");a.observe("focus",function(){a.value===b&&(a.value="",a.removeClassName("placeholder_text"))}),a.observe("blur",function(){FORMALIZE.misc.add_placeholder()}),c.observe("submit",function(){a.value===b&&(a.value="",a.removeClassName("placeholder_text"))}),c.observe("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!d&&!!$$("[placeholder]").length&&$$("[placeholder]").each(function(a){var b=a.getAttribute("placeholder");if(!a.value||a.value===b)a.value=b,a.addClassName("placeholder_text")})}}}}(this,this.document);$(document).observe("dom:loaded",function(){FORMALIZE.go()})
@@ -27,8 +27,7 @@ welcome_message %Q{
27
27
  In your HTML markup, include the JavaScript implementation of
28
28
  your choice:
29
29
 
30
- // a jQuery example
31
- <script src="/javascripts/jquery.formalize.js"></script>
30
+ <script src="/javascripts/yui.formalize.js"></script>
32
31
 
33
32
  Please see the Formalize website for documentation:
34
33
 
@@ -1 +1 @@
1
- var FORMALIZE=(function(f,b,g){var e="placeholder" in b.createElement("input");var c="autofocus" in b.createElement("input");var d="webkitAppearance" in b.createElement("select").style;var a=parseInt(Y.UA.ie,10)===6;var h=parseInt(Y.UA.ie,10)===7;return{go:function(){for(var j in FORMALIZE.init){FORMALIZE.init[j]();}},init:{detect_webkit:function(){if(!d){return;}Y.one("html").addClass("is_webkit");},full_input_size:function(){if(!h||!Y.all("textarea, input.input_full")){return;}Y.all("textarea, input.input_full").each(function(i){var j=Y.Node.create('<span class="input_full_wrap"></span>');j.append(i.replace(j));});},ie6_skin_inputs:function(){if(!a||!Y.all("input, select, textarea")){return;}var i=/button|submit|reset/;var j=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;Y.all("input").each(function(k){if(k.getAttribute("type").match(i)){k.addClass("ie6_button");if(k.disabled){k.addClass("ie6_button_disabled");}}else{if(k.getAttribute("type").match(j)){k.addClass("ie6_input");if(k.disabled){k.addClass("ie6_input_disabled");}}}});Y.all("textarea, select").each(function(k){if(k.disabled){k.addClass("ie6_input_disabled");}});},autofocus:function(){if(c||!Y.one("[autofocus]")){return;}Y.one("[autofocus]").focus();},placeholder:function(){if(e||!Y.one("[placeholder]")){return;}FORMALIZE.misc.add_placeholder();Y.all("[placeholder]").each(function(j){var l=j.getAttribute("placeholder");var k=j.ancestor("form");function i(){if(!j.get("value")||j.get("value")===l){j.set("value",l).addClass("placeholder_text");}}j.on("focus",function(){if(j.get("value")===l){j.set("value","").removeClass("placeholder_text");}});j.on("blur",function(){FORMALIZE.misc.add_placeholder();});k.on("submit",function(){if(j.get("value")===l){j.set("value","").removeClass("placeholder_text");}});k.on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50);});});}},misc:{add_placeholder:function(){if(e||!Y.one("[placeholder]")){return;}Y.all("[placeholder]").each(function(i){var j=i.getAttribute("placeholder");if(!i.get("value")||i.get("value")===j){i.set("value",j).addClass("placeholder_text");}});}}};})(this,this.document);Y.on("domready",function(){FORMALIZE.go();});
1
+ var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f="webkitAppearance"in b.createElement("select").style,g=parseInt(Y.UA.ie,10)===6,h=parseInt(Y.UA.ie,10)===7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{detect_webkit:function(){!f||Y.one("html").addClass("is_webkit")},full_input_size:function(){!!h&&!!Y.all("textarea, input.input_full")&&Y.all("textarea, input.input_full").each(function(a){var b=Y.Node.create('<span class="input_full_wrap"></span>');b.append(a.replace(b))})},ie6_skin_inputs:function(){if(!!g&&!!Y.all("input, select, textarea")){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;Y.all("input").each(function(c){c.getAttribute("type").match(a)?(c.addClass("ie6_button"),c.disabled&&c.addClass("ie6_button_disabled")):c.getAttribute("type").match(b)&&(c.addClass("ie6_input"),c.disabled&&c.addClass("ie6_input_disabled"))}),Y.all("textarea, select").each(function(a){a.disabled&&a.addClass("ie6_input_disabled")})}},autofocus:function(){!e&&!!Y.one("[autofocus]")&&Y.one("[autofocus]").focus()},placeholder:function(){!d&&!!Y.one("[placeholder]")&&(FORMALIZE.misc.add_placeholder(),Y.all("[placeholder]").each(function(a){function d(){(!a.get("value")||a.get("value")===b)&&a.set("value",b).addClass("placeholder_text")}var b=a.getAttribute("placeholder"),c=a.ancestor("form");a.on("focus",function(){a.get("value")===b&&a.set("value","").removeClass("placeholder_text")}),a.on("blur",function(){FORMALIZE.misc.add_placeholder()}),c.on("submit",function(){a.get("value")===b&&a.set("value","").removeClass("placeholder_text")}),c.on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!d&&!!Y.one("[placeholder]")&&Y.all("[placeholder]").each(function(a){var b=a.getAttribute("placeholder");(!a.get("value")||a.get("value")===b)&&a.set("value",b).addClass("placeholder_text")})}}}}(this,this.document);Y.on("domready",function(){FORMALIZE.go()})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass_formalize
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wynn Netherland
@@ -46,51 +46,45 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
 
48
48
  files:
49
- - .DS_Store
50
49
  - .gitignore
50
+ - CHANGELOG.md
51
51
  - README.md
52
52
  - Rakefile
53
53
  - compass_formalize.gemspec
54
54
  - lib/compass_formalize.rb
55
55
  - stylesheets/_formalize.sass
56
- - templates/.DS_Store
57
56
  - templates/dojo/button.png
58
57
  - templates/dojo/dojo.formalize.js
59
58
  - templates/dojo/dojo.formalize.min.js
60
59
  - templates/dojo/manifest.rb
61
60
  - templates/dojo/select_arrow.gif
62
- - templates/extjs/.DS_Store
63
61
  - templates/extjs/button.png
64
62
  - templates/extjs/extjs.formalize.js
65
63
  - templates/extjs/extjs.formalize.min.js
66
64
  - templates/extjs/manifest.rb
67
65
  - templates/extjs/select_arrow.gif
68
- - templates/jquery/.DS_Store
69
66
  - templates/jquery/button.png
70
67
  - templates/jquery/jquery.formalize.js
71
68
  - templates/jquery/jquery.formalize.min.js
72
69
  - templates/jquery/manifest.rb
73
70
  - templates/jquery/select_arrow.gif
74
- - templates/mootools/.DS_Store
75
71
  - templates/mootools/button.png
76
72
  - templates/mootools/manifest.rb
77
73
  - templates/mootools/mootools.formalize.js
78
74
  - templates/mootools/mootools.formalize.min.js
79
75
  - templates/mootools/select_arrow.gif
80
76
  - templates/project/manifest.rb
81
- - templates/prototype/.DS_Store
82
77
  - templates/prototype/button.png
83
78
  - templates/prototype/manifest.rb
84
79
  - templates/prototype/prototype.formalize.js
85
80
  - templates/prototype/prototype.formalize.min.js
86
81
  - templates/prototype/select_arrow.gif
87
- - templates/yui/.DS_Store
88
82
  - templates/yui/button.png
89
83
  - templates/yui/manifest.rb
90
84
  - templates/yui/select_arrow.gif
91
85
  - templates/yui/yui.formalize.js
92
86
  - templates/yui/yui.formalize.min.js
93
- has_rdoc: false
87
+ has_rdoc: true
94
88
  homepage: http://github.com/pengwynn/compass_formalize
95
89
  licenses: []
96
90
 
data/.DS_Store DELETED
Binary file
data/templates/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file