This document contains information regarding changes that have been made to the Spry framework from one release to another. See the Spry Readme for general information regarding this technology.
Changes for Spry PreRelease 1.4 - 2006/12/14
- Data
- Added function Spry.Utils.serializeObject() for serializing a JS Object into JSON format.
- Added Spry.XML.nodeToObject() and Spry.XML.documentToObject() utility methods which allow developers to access XML data as JS properties on an object in a manner which is similar to E4X.
- Added Spry.Utils.updateContent() for dynamically loading an HTML fragment into an element.
- Added Spry.Utils.setInnerHTML() for setting the innerHTML of an element and executing any scripts within the content string. This method is now used by Spry regions when regenerating their content.
- Added support for mapping a region state name to another state name. This can be useful for overriding the built-in states, like "ready", "loading", and "error", so that they use markup from a custom state when they fire.
- Added support for more attributes:
- spry:even - Conditionally adds the user specified CSS class name to an element based on the current row number used at the time that element was re-generated.
- spry:odd - Conditionally adds the user specified CSS class name to an element based on the current row number used at the time that element was re-generated.
- spry:setrow - Attaches a non-destructive onclick handler that sets the current row by row ID.
- spry:setrownumber - Attaches a non-destructive onclick handler that sets the current row by row number.
- spry:sort - Attaches a non-destructive onclick handler that sorts a specific data set based on columns specified by the user.
- spry:readystate - Maps the "ready" state name to the name specified in its value.
- spry:errorstate - Maps the "error" state name to the name specified in its value.
- spry:loadingstate - Maps the "loading" state name to the name specified in its value.
- Added code to report and error when nested regions and detail regions are detected.
- Added new methods to the DataSet API:
- getRowCount()
- getRowByID()
- getRowByRowNumber()
- findRowsWithColumnValues()
- Effects
- Minor updates of documentation (effects_api and effects_coding, especially of the allowed elements to which the effects can be applied to).
- Fixed bugs:
- GrowShrink effect: if border is set, width&height style doesn't get reset to the original value after you toggled the target element
- GrowShrink effect: text size inside the target element is alternated after the effect has been finished
- Slide and Blind effect: Scrollbar disappears if overflow:scroll is set and you toggle the element
- GrowShrink effect: nested image elements doesn't grow if you grow the target element
- Slide effect: Text inside sliding element doesn't appear once you toggle the effect (IE 7 only)
- Shake effect: doesn't work perperly in Opera 9.0
- AppearFade effect: not working for content of a <div> inside a <td> (IE only)
- new feature:
- GrowShrink effect: added options 'referHeight' and 'growCenter'
- GrowShrink effect: added options 'referHeight' and 'growCenter'
- IE 7 related fixes also take effect on Windows Vista (not only on XP)
- new feature:
- Slide effect: added option 'horizontal' to allow horizontal sliding
- Slightly updated documentation to reflect new slide option
- Simplified cluster construction: cluster now is an effect, too, which accepts setup and finish callbacks as option arguments of its constructor
- Base effects (like Move, Size, etc.) can be called without from argument. Instead of passing element, fromPos, toPos, options as arguments, the effects can be called with element, toPos, options. The fromPos is calculated on the fly based on the current position.
- AppearFade, Blind, GrowShrink, Slide and Squish effects now can be triggered for initially invisible elements ('display:none' or 'visibility:hidden')
- Widgets
- Added Menu Bar widget
- Added Tabbed Panels widget
- Added Collapsible Panel widget
- Added Form Validation Widgets
- Accordion:
- Added support for variable height panels.
- Added some new constructor options:
- useFixedHeightPanels - This value is true by default. If false allows for variable height panels.
- fixedPanelHeight - Number of pixels to use as the height of each panel when animating. By default this is the same as the first open panel.
- duration - Number of milliseconds it takes to open/close a panel. Default is 500 msecs.
- Fixed bug that prevented panels from animating properly when the accordion started out with a display:none style.
- Removed addNewPanel(), getNewPanelSnippet(), getNewAccordionSnippet(), and getNewAccordionConstructorSnippet() methods. They don't work cross-browser, and should've never seen the light of day.
- Docs
- Added overview for Tabbed Panels widget.
- Added overview for Collapsible Panel widget.
- Added overview docs for each Form widget.
- Demos
- Gallery
- Switch from using an interval timer to manually firing off the slide show timer after each image loads. This will allow images loading over slow connections to completely load.
- Products
- index.html to use spry:sort and spry:setrow.
- Use a spry:choose attribute to show/preserve the currently selected product on initial load and after a sort.
- RSS Reader
- Modified index.{html,cfm,php} to use spry:setrow.
- Added Form Validation demo.
- Gallery
- Samples
- Added sample for Tabbed Panels widget.
- Added sample for Collapsible Panel widget.
- Added samples for 4 Form widgets.
- Moved data set and region examples to the samples/data_region folder.
- Changed Effects sample files to use standard samples.css file.
- Added a samples/utils folder with samples of Spry utility functions.
- Released a query-to-XML sample page that shows how to convert dynamic data into XML.
- Added to EvenOddRowSample.html to include spry:even and spry:odd.
- Added SprySetRowSample.html.
- Modified the AccordionSample:
- Added sample for changing the duration of animations.
- Modified variable height accordion sample to use animation.
- Added a style for spans used as content panels so that they animate properly.
- Added SetCurrentRowByValueSample.html to show how to select a row based on some column values.
- Added StateMappingSample.html to show how to map the built-in region states to your own custom states.
Changes for Spry PreRelease 1.3.1 - 2006/08/11
- Fixed Accordion openNextPanel() and openPrevPanel() so that they work cross-browser.
- Added samples/effects/menu_sample.html.
- Removed:
- demos/products/index_test.html
- samples/data
Changes for Spry PreRelease 1.3 - 2006/08/10
- Introduced Spry Effects, the 3rd portion of the Spry Framework.
- Provided SpryEffects.js in the includes folder.
- Provided Effects sample files in Effect folder.
- Effects Overview doc posted online.
- Effects Coding doc posted online.
- Effects API
- Removed documentation from the zip. All docs will be available online on Labs site as HTML and PDF.
- Changes to SpryData.js:
- Fix the loop in Spry.Utils.createXMLHttpRequest() so that it doesn't skip the next progID in the array after removing a non-existent one.
- Make sure all initialization of the Spry.Utils.loadURL.Request headers property uses an object so that it works properly when used with Prototype 1.5 rc0.
- Fix Spry.Utils.Notifier.prototype.notifyObservers() so that it uses a normal for loop instead of a "for in" loop.
- Added support for {ds_UnfilteredRowCount}.
- Updates to SpryAccordion.js
- Added panel opening function: openNextPanel(), openPreviousPanel(), openFirstPanel, and openLastPanel()
- Added current panel accessor: getCurrentPanel() - return the panel, getCurrentPanelIndex() - returns the index of the current panel in the getPanels() array.
- Added addNewPanel(tab, content) function to dynamically add new panels in Javascript. Panels get added after the current panel.
- Gallery Demo updated to use new SpryEffects.js.
Changes for Spry PreRelease 1.2 - 2006/07/10
- Spry is now compatible with frameworks based on Prototype 1.5 rc0 or later.
- Switched all hash tables (associative arrays) to use Object instead of Array.
- Removed all Spry.Utils.propertyIsEnumerable() calls from all for/in loops.
- Small fix to xpath.js to switch a loop from for/in to a normal for loop.
- Spry:content can now be used inside a spry:region or spry:detailregion, as well as on the region element itself.
- Auto stripping of the SpryHiddenRegion class name from region containers on load to aid in the hiding of data references.
- Added support for the spry:state attribute which can be used by a designer tell Spry what markup to use when the region is in its "loading", "error" or "ready" state. Spry will automatically swap in the correct markup as the region's state changes.
- Added ordered processing of spry: attributes to allow combined use to reduce the need for using wrapper nodes to add logic. You can see an example within /samples/AttributeComboSample.html.
- Added Spry.Data.Region.debug variable. When set to true, it allows developers to see what the final template for the region looks like, as well as the markup that is being generated for each region. You can see an example /samples/AttributeComboSample.html.
- Accordion Widget
- Moved SpryAccordion.js into widgets/accordion directory, along with a reference HTML sample and CSS file.
- Added support for keyboard navigation.
- Re-wrote parts of the PanelAnimator to allow for rapid switching between panels via keyboard navigation.
- Integrated patches from the community:
- Added keepSorted constructor option to the Data Set to allow the sort order to be preserved between loads.
- Added new built-in data references:
- {ds_EvenOddRow} - Writes out "even" or "odd" based on the row index of the current row being processed.
- {ds_RowNumberPlus1} - Writes out the current row index plus one.
- Misc Bug Fixes:
- Spry.Utils.createXMLHttpRequest creates more than one request for a single call on IE 6.
- Auto setup of Master/Detail between data sets fails if only POST data contains data refs.
- Sorting should sort all data, not just the result of a non-destructive filter.
- Spry.Data.DataSet.prototype.filterData bugs:
- "unfiltredData" typo causes data loss.
- filterFunc overridden instead of filterDataFunc.
- null arg removes data filter but doesn't re-apply an existing view filter.
- IE removes quotes around attribute values that contain a single data reference.
- Gallery Demo
- Cleaned up Spry code used by the select form element.
- Modified gallery.js to use the region observer callback to set the main image and select the first thumbnail instead of using timers.
- Added CSS workaround for IE "doubled margin" bug.
- RSS Reader Demo
- Added error and loading feedback with region region states.
Changes for Spry Prerelease 1.1
- Switched to using namespaced attributes. Attributes are now of the form spry:*. The Spry namespace is defined by adding the the following attribute to the HTML tag of the document: xmlns:spry="http://ns.adobe.com/spry".
- Added support for the new spry:content attribute, which allows the replacement of static content with dynamic content when JavaScript is enabled. This allows pages to work in a non scripting environment.
- Added region state notification mechanism.
- Added Prototype's $() convenience function.
- Added support for descending and toggle sort.
- Added support for non-destructive filtering.
- Added data set load interval.
- Added built-in references:
- {ds_CurrentRowNumber}
- {ds_CurrentRowID}
- {ds_SortOrder}
- {ds_SortColumn}
- Filter callback functions now have the following args passed to them: function myFilterFunc(dataset, rowObj, rowNumber). Filter callback functions must now return the rowObj passed in, a new rowObj, or null.
- Added data set support for retrieving XML data via the POST method and specifying HTTP headers.
- Added a samples directory to the framework ZIP file. It's pretty bare right now, but over time will contain examples of things asked most frequently in the forums. One of the more useful samples is the Data Set Explorer page.
- Misc bug fixes:
- Text data not stored entity encoded.
- Data reference values need to be escaped in JS expressions.
- RegExp object forces Spry.Data.Region.processDataRefString() to bail early in IE.
- Spry attributes still exist in generated region output.
- Data set column (node text value) missing when node has an attribute.