Sha256: 1af1348b1f9e927b8739b513c1bddae06115081c840f03ce64f17305e249239b

Contents?: true

Size: 1.74 KB

Versions: 7

Compression:

Stored size: 1.74 KB

Contents

var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f=Browser.ie6,g=Browser.ie7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{full_input_size:function(){!!g&&!!$$("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(!!f&&!!$$("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()})

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
formalize-rails-0.0.3 vendor/assets/javascripts/mootools.formalize.min.js
typus-3.1.0.rc18 vendor/assets/formalize/js/mootools.formalize.min.js
typus-3.1.0.rc17 vendor/assets/formalize/js/mootools.formalize.min.js
typus-3.1.0.rc16 vendor/assets/formalize/js/mootools.formalize.min.js
typus-3.1.0.rc15 vendor/assets/formalize/js/mootools.formalize.min.js
formalize-rails-0.0.2 vendor/assets/javascripts/mootools.formalize.min.js
formalize-rails-0.0.1 vendor/assets/javascripts/mootools.formalize.min.js