Sam Stephenson
c0735dba77
prototype: Make Element#wrap accept a second argument for setting attributes on the wrapper. Allow wrapping elements which are not part of the document. Closes #9071 .
2007-07-24 19:08:55 +00:00
Sam Stephenson
44ef74813b
prototype: Improvements for Element#replace, Element#update and Element#insert. Closes #7429 , #9060 .
2007-07-24 18:52:17 +00:00
Sam Stephenson
7b2ce66e88
prototype: Make Element#setStyle accept a string argument of CSS rules. Deprecate uncamelized style property names when setting styles using an object (for performance reasons). Closes #9059 .
2007-07-24 18:14:36 +00:00
Sam Stephenson
c6f3daadaa
prototype: Add Element#identify, which returns the element's ID if it exists, or sets and returns a unique, auto-generated ID (of the form 'anonymous_element_' + auto-incremented digit) otherwise. Use this when you need to ensure an element has an ID. Closes #9012 .
2007-07-24 17:41:27 +00:00
Sam Stephenson
7e6481bcd7
prototype: Make Element#readAttribute work for cloned elements in IE. Closes #8481 .
2007-07-24 17:31:23 +00:00
Thomas Fuchs
cea24d6cc2
Prototype: Rename Element#getElementsBySelector to Element#select and add alias for Element#getElementsBySelector. Add Element#adjacent as a shortcut to selecting all adjacent nodes (and their children) that match a CSS selector.
2007-07-13 08:36:14 +00:00
Sam Stephenson
d6bf5e40ce
prototype: Make document.getElementsByClassName match a subset of the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 ( http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname ). It now supports multiple class names given as a whitespace-separated list in a string. Array argument is not supported. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401 .
2007-06-19 20:59:14 +00:00
Thomas Fuchs
03ae9dd3ee
* Make document.getElementsByClassName match the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 ( http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname ). It now supports multiple class names given as an array or a space-separated list in a string. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401 . [Mislav Marohnic]
2007-06-17 22:26:46 +00:00
Thomas Fuchs
afbef44cd6
Prototype: save a few lines in Element.Methods.hasClassName
2007-06-17 22:14:07 +00:00
Thomas Fuchs
1b8ef5af86
Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. Closes #7063 . References #3044 , #3813 , #6706 . [Thomas Fuchs, davidjrice]
2007-06-17 18:13:37 +00:00
Sam Stephenson
ae2ea8a2e9
prototype: Ensure HTMLElement exists before creating Element.extend.
2007-06-09 01:51:26 +00:00
Thomas Fuchs
0c7bac17f0
Prototype: Make Element#absolutize and Element#relativize properly use Element#getStyle. Closes #8580 . [Christophe Porteneuve]
2007-06-06 14:30:01 +00:00
Thomas Fuchs
5f4bab4dcb
Prototype: Fix Element.insert for null values and numeric values when defaulting to bottom
2007-06-02 16:00:47 +00:00
Thomas Fuchs
d4d4fddc7c
Prototype: Change Element.insert syntax to allow multiple positions.
2007-06-02 15:08:50 +00:00
Thomas Fuchs
f099e670f5
Element.setOpacity now calls removeAttribute on the filter style on IE if no more filters remain, which makes Cleartype work properly. Closes #8376 .
2007-05-19 00:11:46 +00:00
Sam Stephenson
a8a19eb439
prototype: Minor cleanup of the position methods
2007-05-18 01:21:41 +00:00
Sam Stephenson
7d2ae294a9
prototype: Fix Element#clonePosition to call Element#viewportOffset. Closes #8372 .
2007-05-18 01:12:35 +00:00
Sam Stephenson
83b4b337e1
Merge -r6634:HEAD from ../branches/dom.
...
* Make Element#update and Element#insert work for SELECT tags in IE and Opera. [Tobie Langel]
* Make Element#insert and Element#update better handle TABLE related elements in IE and Opera. Closes #7776 , #8040 , #7550 , #7776 , #7938 . [Tobie Langel]
* Make Element#readAttribute('title') work in Opera. [Tobie Langel]
* Make Element#replace work with form elements in Firefox and Safari. Closes #8010 , #7989 . [dsl239, Tobie Langel]
* Add Element#wrap which wraps the element inside a new one. Closes #5732 . [P. Vande, Tobie Langel]
* Make Element into a constructor: new Element(tagName, attributes). Add Element#writeAttribute which accepts a hash of attributes or a name/value pair. Closes #7476 . [Mislav Marohnić, haraldmartin, Tobie Langel]
* Insertion overhaul: Add Element.insert(content[, position = 'Bottom']). Deprecate Insertion (kept for backwards compatibility). Make Ajax.Updater option.insertion accept both Insertion.Top or the now preferred 'Top'. Closes #7907 . [Tobie Langel]
2007-05-12 05:01:56 +00:00
Sam Stephenson
67a4d00588
prototype: Refactor Element.extend and eliminate Element.extend.cache.
2007-05-12 04:32:30 +00:00
Sam Stephenson
562e61fc8c
prototype: Add Function#curry, Function#delay, Function#defer, and Function#wrap. Closes #8134 .
2007-04-29 05:37:07 +00:00
Sam Stephenson
b76d34e7bb
prototype: Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods. Closes #8206 .
2007-04-28 02:32:21 +00:00
Sam Stephenson
1886b03d60
prototype: Fix Element#readAttribute to work with the 'type' attribute in IE. Closes #8160 .
2007-04-28 02:23:26 +00:00
Sam Stephenson
47bfeb5083
prototype: Add Element#childElements as an alias for Element#immediateDescendants.
2007-04-24 06:17:59 +00:00
Sam Stephenson
5784d78f6e
prototype: Add Element#firstDescendant to retrieve the first non-text child node of an element. Optimize DOM navigation methods (Element#up, Element#down, Element#previous, Element#next) for no-argument calls. Closes #7848 .
2007-04-24 06:06:44 +00:00
Sam Stephenson
63342b9c01
prototype: Element.addMethods should add methods to Element as well as Element.Methods. Closes #7888 .
2007-04-24 05:23:41 +00:00
Thomas Fuchs
a0532bd933
Rolling back #7683 as it breaks existing effects in certain scenarios
2007-04-05 12:50:59 +00:00
Thomas Fuchs
930c8f2665
Fix an issue with Element.getDimensions with some element types on non IE-browsers. Closes #7683 . [Andrew Dupont]
2007-03-27 18:04:59 +00:00
Thomas Fuchs
e9501d63e5
Make Element.extend work on IE for Nodes with the same ID that where discarded.
2007-03-11 22:40:24 +00:00
Thomas Fuchs
881b7dc00f
Prototype: Fix Element.Methods.descendants() to properly extend elements on IE.
2007-03-11 10:59:06 +00:00
Sam Stephenson
811fb86286
prototype: 1.5.1_rc1: Fix readAttribute for IE7.
2007-03-09 19:17:50 +00:00
Sam Stephenson
fb0013a193
prototype: Give the parens some breathing room
2007-03-09 04:23:28 +00:00
Sam Stephenson
00bce412d2
prototype: Merge the selector branch into trunk, bringing vast performance improvements, bug fixes, and near-complete CSS3 compliance to $$ and Selector. Closes #7568 .
2007-03-09 04:12:13 +00:00
Thomas Fuchs
1bf16af3bc
We dont like tabs
2007-03-08 22:45:07 +00:00
Thomas Fuchs
752eebdd26
Prototype: Fix simulated attribute reading for IE for "href", "src" and boolean attributes.
2007-03-08 22:43:18 +00:00
Thomas Fuchs
fcc23f0d70
Optimize document.getElementsByClassName and finalize DOM performance optimization refactoring. Closes #6696
2007-03-04 22:55:08 +00:00
Thomas Fuchs
aa7ba0d4ff
Prototype: Add optional third parameter "camlized" to Element.setStyle, for optimized performance if style names are known to be camelCased. [Thomas Fuchs]
2007-03-02 12:36:09 +00:00
Thomas Fuchs
91dd60c5a2
Prototype: some more Element.setStyle optimizations
2007-03-02 12:16:42 +00:00
Sam Stephenson
94d8333448
prototype: Fix a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null.
2007-02-28 01:16:52 +00:00
Thomas Fuchs
60bb0686ba
Prototype: Optimize Element.getStyle and add new Element.getOpacity method. Special case IE and Opera getStyle methods. Closes #7648 . [Tobie Langel, Thomas Fuchs]
2007-02-27 11:35:21 +00:00
Thomas Fuchs
80f6f4076b
Prototype: Optimize Element.setStyle and add new Element.setOpacity method, special case IE and Gecko opacity methods. Closes #7585 . [savetheclocktower]
2007-02-23 01:19:18 +00:00
Thomas Fuchs
d1481932b9
Prototype: Add unified Browser detection by providing Prototype.Browser.(IE|Gecko|WebKit|Opera) booleans. Closes #6800 . [savetheclocktower]
2007-02-19 22:23:10 +00:00
Thomas Fuchs
5224f0fc4f
Prototype: Add String.prototype.empty and String.prototype.blank (tests if empty or whitespace-only). Closes #7016 . [Jonathan Viney, Thomas Fuchs]
2007-02-19 21:32:37 +00:00
Sam Stephenson
7044da8138
prototype: Fix $(form).serialize() in Safari and add support for extending specific tags to Element.addMethods. Closes #7358 .
2007-01-27 19:45:34 +00:00
Thomas Fuchs
8ea007df28
Prototype: Make setStyle() with opacity: 0 in Internet Explorer work correctly. [Thomas Fuchs]
2007-01-19 18:01:43 +00:00
Sam Stephenson
bb4d189b37
prototype: Reorganize the source tree.
2007-01-18 22:24:27 +00:00