vendor/assets/javascripts/mootools.formalize.min.js in formalize-rails-0.0.5 vs vendor/assets/javascripts/mootools.formalize.min.js in formalize-rails-0.1.0
- old
+ new
@@ -1 +1 @@
-var FORMALIZE=function(a,b){var c="placeholder"in b.createElement("input"),d="autofocus"in b.createElement("input"),e=Browser.ie6,f=Browser.ie7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{full_input_size:function(){f&&$$("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(e&&$$("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(){d||!$$("[autofocus]").length||$$("[autofocus]")[0].focus()},placeholder:function(){!c&&!!$$("[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(){c||!$$("[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()})
+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&&$$("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){if(a.type!=="password"){var b=a.get("placeholder");a.addEvents({focus:function(){a.value===b&&a.set("value","").removeClass("placeholder_text")},blur:function(){FORMALIZE.misc.add_placeholder()}});var c=a.getParent("form");c&&c.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){if(a.type!=="password"){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()})
\ No newline at end of file