diff options
author | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:10 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:18 +0400 |
commit | 1354d17270961fff662d40f90521223f8fd0d73b (patch) | |
tree | e9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/form/_FormValueWidget.js.uncompressed.js | |
parent | d04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff) |
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/form/_FormValueWidget.js.uncompressed.js')
-rw-r--r-- | lib/dijit/form/_FormValueWidget.js.uncompressed.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/dijit/form/_FormValueWidget.js.uncompressed.js b/lib/dijit/form/_FormValueWidget.js.uncompressed.js new file mode 100644 index 000000000..01b5bbd7c --- /dev/null +++ b/lib/dijit/form/_FormValueWidget.js.uncompressed.js @@ -0,0 +1,58 @@ +define("dijit/form/_FormValueWidget", [ + "dojo/_base/declare", // declare + "dojo/_base/sniff", // has("ie") + "./_FormWidget", + "./_FormValueMixin" +], function(declare, has, _FormWidget, _FormValueMixin){ + +/*===== +var _FormWidget = dijit.form._FormWidget; +var _FormValueMixin = dijit.form._FormValueMixin; +=====*/ + +// module: +// dijit/form/_FormValueWidget +// summary: +// FormValueWidget + + +return declare("dijit.form._FormValueWidget", [_FormWidget, _FormValueMixin], +{ + // summary: + // Base class for widgets corresponding to native HTML elements such as <input> or <select> that have user changeable values. + // description: + // Each _FormValueWidget represents a single input value, and has a (possibly hidden) <input> element, + // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?) + // works as expected. + + // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared + // directly in the template as read by the parser in order to function. IE is known to specifically + // require the 'name' attribute at element creation time. See #8484, #8660. + + _layoutHackIE7: function(){ + // summary: + // Work around table sizing bugs on IE7 by forcing redraw + + if(has("ie") == 7){ // fix IE7 layout bug when the widget is scrolled out of sight + var domNode = this.domNode; + var parent = domNode.parentNode; + var pingNode = domNode.firstChild || domNode; // target node most unlikely to have a custom filter + var origFilter = pingNode.style.filter; // save custom filter, most likely nothing + var _this = this; + while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet + (function ping(){ + var disconnectHandle = _this.connect(parent, "onscroll", + function(){ + _this.disconnect(disconnectHandle); // only call once + pingNode.style.filter = (new Date()).getMilliseconds(); // set to anything that's unique + setTimeout(function(){ pingNode.style.filter = origFilter }, 0); // restore custom filter, if any + } + ); + })(); + parent = parent.parentNode; + } + } + } +}); + +}); |