/* Formalize - version 1.2 Note: This file depends on the YUI library. */ YUI.add('formalize', function(Y) { // Internet Explorer detection. function IE(version) { var b = document.createElement('b'); b.innerHTML = ''; return !!b.getElementsByTagName('br').length; } // Private constants. var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input'); var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input'); var IE6 = IE(6); var IE7 = IE(7); // Expose innards of Formalize. Y.formalize = { // Y.formalize.go go: function() { var i, j = this.init; for (i in j) { j.hasOwnProperty(i) && j[i](); } }, // Y.formalize.init init: { // Y.formalize.init.disable_link_button disable_link_button: function() { Y.one(document.documentElement).delegate('click', function(ev) { ev.preventDefault(); }, 'a.button_disabled'); }, // Y.formalize.init.full_input_size full_input_size: function() { if (!IE7 || !Y.all('textarea, input.input_full')) { return; } // This fixes width: 100% on