Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature improvements: - Major update for custom tags - including support for two-way binding to multiple args and props See samples: http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable@jsv-draggable and tests: http://www.jsviews.com/test/unit-tests-jsviews.html?testId=f46a512b and also jQuery UI tag control samples such as http://www.jsviews.com/#samples/tag-controls/jqui/resizable and http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable. Also many code examples in https://www.jsviews.com/download/sample-tag-controls/jsviews-jqueryui-widgets.js A tag definition can include: tag.bindTo - which specifies two-way bound parameters (one or more args and/or props) tag.linkedElement - which specifies selectors for linkedElems for any of the two-way bound parameters tag.linkedCtxParam - which specifies/names tag contextual parameters for any of the two-way bound parameters mainElement - which specifies selector for an element used for setting id, width or height (otherwise, linkedElem is used) A tag onBind event can set: tag.linkedElem tag.linkedElems tag.mainElem - which is the element used for setting id, width or height (otherwise, linkedElem is used) tag.displayElem - which is the element used for setting class (otherwise, mainElem/linkedElem is used) The following tag methods are available: tag.bndArgs() - which returns array of 'external' bound parameters (after convert, if convert=... is specified) tag.update(...) - which observably updates any ('external') bound parameters (using convertBack, if specified) tag.setValue(...) - which sets tag itself to new ('internal') values of bound parameters tag.getValue(...) - which returns array of current ('internal') values of bound parameters New 'tag contextual parameters' feature - see samples and explanation: http://www.jsviews.com/#samples/tag-controls/jqui/resizable and http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable@tag-ctxl-params - Other custom tag improvements: New 'tag boundProps' feature: Tag definition can include: tag.boundProps - which specifies any additional props that are bound, without needing ^myprop=... notation. See sample: http://www.jsviews.com/#samples/tag-controls/range New 'tag contentCtx' feature: Tag definition can include: tag.contentCtx - which specifies the data context within the tag block content. Set contentCtx = true for inheriting parentView context, or to a function, for specifying other context New 'tag argDefault' feature: Tag definition can include: tag.argDefault: false - which prevents the first arg defaulting to current data New 'tag onUpdate: false' feature: Tag definition can include: tag.onUpdate: false - which is equivalent to an onUpdate handler which does nothing but returns false, so tag does not rerender when bound args or props update - Major update for jQuery UI widget-based tag controls library: Extensive new jQueryUI widget controls support and accompanying samples/documentation: http://www.jsviews.com/#download/jqueryui-tagcontrols http://www.jsviews.com/#samples/tag-controls/jqui - New lateRender=true feature: set lateRender=true on any tag, to make the tag render only after completing the data-linking pass. Useful for using expressions such as #childTags('myTag') in data-link expressions. See tests: http://www.jsviews.com/test/unit-tests-jsviews.html?testId=6be4ff95 and sample: http://www.jsviews.com/#samples/tag-controls/jqui/selectable@late-render - {^{on ...}} with no content allows setting width, height, id and class Perf improvements for sorting, moving, refreshing: - Much improved perf for {^{for myArray}}...{{/for}} when making observable changes to underlying array. When using $.observable(myArray).refresh(...) or $.observable(myArray).move(...), the resulting changes to the rendered items no longer result in deleting and re-rendering the moved items. Instead the rendered HTML elements are simply moved to their new positions under the parent element. Bug fixes: - #361: Breaking change (radiobuttons) - both radiogroup and directly data-linked radio buttons now behave identically. Neither of them coerce value to string - Bug with setting tag.depends=... (Breaking change: Note that setting fn.depends="myArray" updates for array changes as well as prop change. See: http://www.jsviews.com/test/unit-tests-jsviews.html?testId=303f5bfd - #354: Minor 'onError' bug - #360: Datepicker bug fix for correct behavior when data-linking to a value of type Date - Several minor bug fixes Unit tests: - Several additional unit tests Other minor breaking changes: - The undocumented lazyLink feature has been removed - The undocumented init: false feature for custom tags has been removed.
- Loading branch information