formalize-rails 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -50,7 +50,7 @@ task :update do
50
50
  File.open(path, 'w') do |t|
51
51
  open url do |f|
52
52
  f.each_line do |line|
53
- t << line.gsub(%r|url\(.+/([^/]+)\)|, "image-url('formalize/\\1)")
53
+ t << line.gsub(%r|url\(.+/([^/]+)\)|) { |m| "image-url('formalize/#{$1.split("?",2).first}')" }
54
54
  end
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  module Formalize
2
2
  module Rails
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ var FORMALIZE = (function(window, document, undefined) {
24
24
  return {
25
25
  // FORMALIZE.go
26
26
  go: function() {
27
- var i, j = FORMALIZE.init;
27
+ var i, j = this.init;
28
28
 
29
29
  for (i in j) {
30
30
  j.hasOwnProperty(i) && j[i]();
@@ -1 +1 @@
1
- var FORMALIZE=function(a,b){function c(a){var c=b.createElement("b");return c.innerHTML="<!--[if IE "+a+"]><br><![endif]-->",!!c.getElementsByTagName("br").length}var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f=c(6),g=c(7);return{go:function(){var a,b=FORMALIZE.init;for(a in b)b.hasOwnProperty(a)&&b[a]()},init:{full_input_size:function(){g&&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(f&&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){a.type!=="password"&&(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){if(a.type!=="password"){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()})
1
+ var FORMALIZE=function(a,b){function c(a){var c=b.createElement("b");return c.innerHTML="<!--[if IE "+a+"]><br><![endif]-->",!!c.getElementsByTagName("br").length}var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f=c(6),g=c(7);return{go:function(){var a,b=this.init;for(a in b)b.hasOwnProperty(a)&&b[a]()},init:{full_input_size:function(){g&&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(f&&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){a.type!=="password"&&(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){if(a.type!=="password"){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()})
@@ -35,14 +35,23 @@ input[type="search"]::-webkit-search-decoration {
35
35
  display: none;
36
36
  }
37
37
 
38
- button:focus,
38
+ input:invalid,
39
+ button:invalid,
40
+ select:invalid,
41
+ textarea:invalid {
42
+ -webkit-box-shadow: none;
43
+ -moz-box-shadow: none;
44
+ -o-box-shadow: none;
45
+ box-shadow: none;
46
+ }
39
47
  input:focus,
48
+ button:focus,
40
49
  select:focus,
41
50
  textarea:focus {
42
- -webkit-box-shadow: #0066ff 0 0 7px 0;
43
- -moz-box-shadow: #0066ff 0 0 7px 0;
44
- -o-box-shadow: #0066ff 0 0 7px 0;
45
- box-shadow: #0066ff 0 0 7px 0;
51
+ -webkit-box-shadow: #0066ff 0 0 5px 0;
52
+ -moz-box-shadow: #0066ff 0 0 5px 0;
53
+ -o-box-shadow: #0066ff 0 0 5px 0;
54
+ box-shadow: #0066ff 0 0 5px 0;
46
55
  z-index: 1;
47
56
  }
48
57
 
@@ -72,7 +81,7 @@ input[type="button"] {
72
81
  -ms-background-clip: padding-box;
73
82
  -o-background-clip: padding-box;
74
83
  background-clip: padding-box;
75
- background: #dddddd image-url('formalize/button.png?1298351022') repeat-x;
84
+ background: #dddddd image-url('formalize/button.png') repeat-x;
76
85
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dddddd));
77
86
  background-image: -webkit-linear-gradient(#ffffff, #dddddd);
78
87
  background-image: -moz-linear-gradient(#ffffff, #dddddd);
@@ -254,7 +263,7 @@ select[size="1"] {
254
263
  select,
255
264
  select[size="0"],
256
265
  select[size="1"] {
257
- background-image: image-url('formalize/select_arrow.gif?1298351050');
266
+ background-image: image-url('formalize/select_arrow.gif');
258
267
  background-repeat: no-repeat;
259
268
  background-position: right center;
260
269
  padding-right: 20px;
@@ -296,27 +305,14 @@ optgroup {
296
305
  font-weight: normal;
297
306
  font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
298
307
  }
299
-
300
- input:invalid,
301
- button:invalid,
302
- select:invalid,
303
- textarea:invalid {
304
- -webkit-box-shadow: none;
305
- -moz-box-shadow: none;
306
- -o-box-shadow: none;
307
- box-shadow: none;
308
- }
309
- input::-moz-focus-inner,
310
- button::-moz-focus-inner,
311
- select::-moz-focus-inner,
312
- textarea::-moz-focus-inner {
308
+ optgroup::-moz-focus-inner {
313
309
  border: 0;
314
310
  padding: 0;
315
311
  }
316
312
 
317
313
  .ie6_button,
318
314
  * html button {
319
- background: #dddddd image-url('formalize/button.png?1298351022') repeat-x;
315
+ background: #dddddd image-url('formalize/button.png') repeat-x;
320
316
  border: 1px solid;
321
317
  border-color: #dddddd #bbbbbb #999999;
322
318
  cursor: pointer;
@@ -357,4 +353,4 @@ textarea::-moz-focus-inner {
357
353
 
358
354
  .ie6_input_disabled {
359
355
  background: #eeeeee;
360
- }
356
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formalize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-02-01 00:00:00.000000000Z
12
+ date: 2012-03-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &2153556620 !ruby/object:Gem::Requirement
16
+ requirement: &70358523403700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153556620
24
+ version_requirements: *70358523403700
25
25
  description: This gem provides the assets for the formalize form styling, for easy
26
26
  usage with the Rails 3.1 asset pipeline.
27
27
  email: