forked from BorisMoore/jsviews
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGES - debugMode is now false by default - which means that on error, an exception is thrown, rather than outputting an error message in the rendered output. To obtain previous behavior, set debugMode to true: $.views.settings.debugMode(true); - jQuery UI widgets: There is now a specific syntax for setting widget properties. A tag property with an initial underscore will correspond to the corresponding property of the widget, and it can be set, and optionally data-linked {^{datepicker myDate _changeMonth=true ^_maxDate=myEndDate/}} - The $.views.sub.cvt() no longer exists. Use tag.cvtArgs(). NEW FEATURES - AMD and CommonJs support for both JsRender and JsViews, providing both for NodeJS scenarios, and scenarios in which requireJS or similar AMD script loaders are used to load JsRender, JsObservable or JsViews. - Support for JsRender in NodeJS: Support for Express and Hapi view engines using JsRender Support for loading templates from file, on Node, using the syntax: tmpl="@file.path" See: https://github.com/BorisMoore/jsrender-node-starter - $.templates() now has an equivalent alternate name (alias): $.views.compile() which allows for immediate integration in some frameworks, such as Hapi templated views. See https://github.com/BorisMoore/jsrender-node-starter#hapi-templates-support - Similarly, a compiled template now has an alternative shortcut API for the render method. The compiled template is it's own render function, so for a compiled template: var tmpl = $.templates(...); the following are equivalent: tmpl.render(data, helpers); tmpl(data, helpers); - Support for allowCode has been simplified and improved. Docs to follow. You can now enable allowCode globally using $.views.settings.allowCode. A new tag: {{*: expression}} will return the evaluated expression - like {{: expression}} - but here the expression can allow any code. - JsRender now has noConflict support, for loading a new instance of JsRender, without conflict with an already loaded instance. - A new data-link binding: data-link="data-foo{: ...}" permits data-linking directly to data-foo properties of HTML elements. - Tag property names can now include '.' and '_' characters: {{myTag _a=3 b.c=4 /}} - Support for {^{on someMethod ... /}} as a button. For example, {^{on someMethod ...}}Go{{/on}} is equivalent to <button data-link="{on someMethod ...}">Go</button> - {^{foo class=...}} lets you set (and optionally bind to) the class of the linked HTML element. - {^{foo id=...}} lets you set (and optionally bind to) the id of the linked the HTML element. - {^{foo name=...}} lets you set (and optionally bind to) the name property of the linked HTML element. - If a custom tag has setSize specified as true: {..., setSize: true, ...} then you can set and optionally bind to the with and height properties to control the width and height of the linked HTML element: {^{foo ... width=55 ^height=expression ...}} - Support simplified syntax when defining custom tags with just a markup string (template), or jsut a render method: $.views.tags("myTag", "this is the template"); $.views.tags("a", function(...){ //this is the render function }); - The debug helpers: {{dbg:}} {{dbg ...}} {{~dbg()}} now throw and catch, rather than including a debugger; statement. To use this feature set your browser/debugger to stop on caught exceptions. (See also BorisMoore/jsrender#239) - A lot of changes have been made to considerably optimize performance when using JsRender to render simple templatesPerf. Optimized template will not need to instantiate view objects, and hence will be faster. A compiled template has a tmpl.useViews property which shows whether it allowed that optimization. (tmpl.useViews false) - Many improvements on jQuery UI widget integration. Docs and samples to come. See also download/sample-tag-controls/jsviews-jqueryui-widgets.js - The jsviews.com git project now has build support, with Gulp. - Improved support for data-linking without initial rendering, data-link="...^{...}" - which is particularly useful when using server-rendered content linked subsequently in browser. See https://github.com/BorisMoore/jsrender-node-starter#using-the-same-templates-on-the-server-and-in-the-browser Bug Fixes: - BorisMoore/jsrender#239: - BorisMoore/jsrender#252 (Improved syntax error message e.g.: '{{include}} block has {{/for}} with no open {{for}}' - BorisMoore#300 - BorisMoore#301 - BorisMoore#302 - BorisMoore#303 - BorisMoore#213 (Detection and error message)
- Loading branch information
1 parent
8700d57
commit b1a33ac
Showing
52 changed files
with
2,252 additions
and
1,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.