Commit 3f2ae07
committed
Commit 91 (v0.9.91 - Beta)
Major update
Breaking change
- Templates declared in <div> or other non script element are not
supported. (Throws with error message)
Minor breaking changes
- The {{range}} tag has been removed - replaced by {{for}} tag using
built-in range features. See https://www.jsviews.com#jsvfortag@jsvsortfilterrange
- Changed behavior of .setValue() API on custom tags. The .setValue()
method is called even for undefined values. The .getValue() method
is not called. Return false from setValue to not data-link a linked
element. (e.g. jQuery UI slider). See https://www.jsviews.com#tagoptions@setvalue
- {{tabs}} API changes: The selectedIndex property is renamed to the
pane property. The tabCaption property is renamed to the caption
property
- Some changes to behavior/effect of the bindTo tag option - which is
now associated with the new bindFrom tag option.
See https://www.jsviews.com#tagoptions@bindto and https://www.jsviews.com#tagoptions@bindfrom
Major feature improvements
- The {{for}} tag now has built-in support for sort, filter, start and
end. See https://www.jsviews.com#fortag@sortfilterrange
- The {{props}} tag now has built-in support for sort, filter, start
and end. See https://www.jsviews.com#propstag@sortfilterrange
- New converters encode/unencode. See https://www.jsviews.com#convertersapi@encode
- New tag options: bindFrom - together with tag option bindTo - provide
improved features for custom tags.
See https://www.jsviews.com#tagoptions@bindto and https://www.jsviews.com#tagoptions@bindfrom
- New support for observing/unobserving contextual parameters.
$.observe(tagOrView, "~foo", callback) - documentation to follow
- New support for observing properties of any item in an array, using
"array.[].*" or "array.[].foo" (or "array.[]^*", etc.) - documentation to follow
- Late paths support: "@a.b.c" - documentation to follow
- New support for getting a reference to a tag instance using
{^{mytag this=~myTag}} - documentation to follow
Minor feature improvements
- Custom tag linkedElem can now target non-editable and contentEditable.
See https://www.jsviews.com#bindingpatterns@linkedelem
- New APIs added for tagCtx.ctxPrm(), tagCtx.cvtArgs() and
tagCtx.bndArgs() even for non-data-linked tags - documentation to follow
- The contentCtx option now works also for custom tag using render(),
rather than a template. See https://www.jsviews.com#tagsapi@contentctx
- In a template, ~tag.tagCtx.xxx can now be written ~tagCtx.xxx,
and works correctly e.g. for data-linking using
{{mytag}}{{else}}{{~tagCtx...}}{{/mytag}} - documentation to follow
- ~tagCtx is now a reserved name like ~tag ~root ~parentTags...
- On a custom tag, the bindTo option is not needed with 2-way linking
to first argument
- updateValue() now supports an async option: pass true for the fourth
parameter, defer - updateValue(val, index, tagElse, tag, defer).
- Documentation to follow
- New debug:true option on a compiled template.
See https://www.jsviews.com#d.templates@debug
- New depends option on custom tags (see https://www.jsviews.com#tagoptions@depends)
or an instance property {{someTag depends='a.b'}} or
{{someTag depends=~someTagDependsArray}}
- An error will be thrown if different versions of jsrender.js,
jquery.observable.js and jquery.views.js are loaded together
- DataMap, {{props}} and {{jsonview}} now include support for function
properties too, unless opt out using {{props foo noFunctions=true}}.
See https://www.jsviews.com#propstag@nofunctions
- Support for nested {{for}} tags without iteration, and for then
applying operations such as sorting to arrays in nexted context, as in
{{for filter=... noIteration=true}}{{for sort=... noIteration=true}}{{for start=... end=...}}.
See https://www.jsviews.com#fortag@itemvar
Documentation
- Extensive new documentation, especially on custom tag controls:
See https://www.jsviews.com#jsvtagcontrols. For an example of a JsViews
custom tag control see https://www.jsviews.com#samples/tag-controls/colorpicker
Minor bug fixes, including:
- a contentEditable bug for IE
- a bug for data-linking to 'length' property.
- a bug when a computed property 'depends' mixes data and contextual paths
- a bug in jquery-1.x cleanData
- a bug in move() arrayChange on {{for}}
- Issue #408
$.observe('ns', model.list, '[]^qty', handler);??
- Issue #406
Weird data-linked `for` loop behaviour with deep observing after model update
- Issue #404
Props Convert else statement not working
- Issue #403
~ operator support
- Issue #400
Move the tag property in views to before rendering, to enable "get current path" path scenario
- Issue #398
After DOM modifications to the child options of a data-linked select, the first option shows as selected
- Issue #397
{^{radiogroup value disabled=notEnabled}} is now supported
- Issue #198
Provide full documentation of custom tags using 2-way binding, binding to args or props etc.
- Issue #374
Wrong initial value shown (timespinner control)
- Issue BorisMoore/jsrender#335
encode and unencode converters1 parent df35f6e commit 3f2ae07
File tree
18 files changed
+6003
-2145
lines changed- test/unit-tests
18 files changed
+6003
-2145
lines changedLarge diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
0 commit comments