diff --git a/.gitignore b/.gitignore index 9fc7a0aa..f5155931 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ desktop.ini Scripts -* bin -built \ No newline at end of file +built +/.vscode/launch.json +/test/unit-tests/.vscode/launch.json diff --git a/_src/jquery.observable.js b/_src/jquery.observable.js index 4fd99bfe..7aa3b3a2 100644 --- a/_src/jquery.observable.js +++ b/_src/jquery.observable.js @@ -302,7 +302,7 @@ if (!$.observe) { data = events[el] && events[el].data; if (data && (off && data.ns !== initialNs // When observing, don't unbind dups unless they have the same namespace - || !off && data.ns === initialNs && data.cb && data.cb._cId === cb._cId && (!cb._wrp || data.cb._wrp))) + || !off && data.ns === initialNs && data.cb && data.cb._cId === cb._cId && data.cb._inId === cb._inId && (!cb._wrp || data.cb._wrp))) // When observing and doing array binding, don't bind dups if they have the same namespace (Dups can happen e.g. with {^{for people ^~foo=people}}) { return; @@ -428,6 +428,7 @@ if (!$.observe) { if (callback) { obArrAddRemove._cId = getCbKey(callback); // Identify wrapped callback with unwrapped callback, so unobserveAll will // remove previous observeAll wrapped callback, if inner callback was the same; + obArrAddRemove._inId = ".arIn" + observeInnerCbKey++; // Specific _inId for each distinct obArrAddRemove, so not skipped as dups } var arrIndex, skip, dep, obArr, prt, fnProp, isGet, @@ -468,7 +469,8 @@ if (!$.observe) { } if (skip) { // Duplicate binding(s) found, so move on - obj = obj[prop]; + fnProp = obj[prop]; + obj = $isFunction(fnProp) ? fnProp.call(obj) : obj[prop]; continue; } } diff --git a/_src/jsrender-node-starter/package.json b/_src/jsrender-node-starter/package.json index 3af7fac2..ea3bdecb 100644 --- a/_src/jsrender-node-starter/package.json +++ b/_src/jsrender-node-starter/package.json @@ -1,6 +1,6 @@ { "name": "jsrender-node-starter", - "version": "1.0.14", + "version": "1.0.15", "description": "Starter app for JsRender server-rendered templates on Node.js using Express 4 or Hapi, and optionally Browserify and JsRenderify", "main": "index-express.js", "scripts": { @@ -15,14 +15,14 @@ }, "dependencies": { "body-parser": "^1.13.2", - "browserify": "^16.3.0", + "browserify": "^17.0.0", "express": "^4.17.1", "@hapi/hapi": "^18.1.0", "@hapi/inert": "^5.2.1", "@hapi/vision": "^5.5.2", "jquery": "^3.4.1", - "jsrender": "^1.0.14", - "jsviews": "^1.0.14", + "jsrender": "^1.0.15", + "jsviews": "^1.0.15", "serve-favicon": "^2.5.0", "through2": "^3.0.1" }, diff --git a/_src/jsrender/package.json b/_src/jsrender/package.json index 8747f62a..021c21c1 100644 --- a/_src/jsrender/package.json +++ b/_src/jsrender/package.json @@ -1,6 +1,6 @@ { "name": "jsrender", - "version": "v1.0.14", + "version": "v1.0.15", "description": "Best-of-breed templating in browser or on Node.js (with Express 4, Hapi and Browserify integration)", "main": "./jsrender-node.js", "browser": "./jsrender.js", @@ -34,11 +34,11 @@ ], "devDependencies": { "@types/jquery": "^3.3.31", - "browserify": "^11.0.1", - "gulp": "^3.9.0", - "glob-stream": "^5.0.0", + "browserify": "^17.0.0", + "gulp": "^5.0.0", + "glob-stream": "^8.0.2", "jquery": "^3.4.1", - "qunit": "^0.7.6" + "qunit": "^2.21.0" }, "dependencies": { "through2": "^3.0.1" diff --git a/_src/jsviews/package.json b/_src/jsviews/package.json index dcc02c38..bb7fe0fb 100644 --- a/_src/jsviews/package.json +++ b/_src/jsviews/package.json @@ -1,6 +1,6 @@ { "name": "jsviews", - "version": "v1.0.14", + "version": "v1.0.15", "description": "Next-generation MVVM and MVP framework - built on top of JsRender templates. Bringing templates to life...", "main": "./jsviews.js", "author": { @@ -32,11 +32,11 @@ ], "devDependencies": { "@types/jquery": "^3.3.31", - "browserify": "^11.0.1", - "glob-stream": "^5.0.0", - "gulp": "^3.9.0", - "jsrender": "^1.0.14", - "qunit": "^0.7.6" + "browserify": "^17.0.0", + "glob-stream": "^8.0.2", + "gulp": "^5.0.0", + "jsrender": "^1.0.15", + "qunit": "^2.21.0" }, "dependencies": { "jquery": "^3.4.1" diff --git a/_src/templates/jsrender-node-starter/package.json b/_src/templates/jsrender-node-starter/package.json index 75ffda32..4080fdab 100644 --- a/_src/templates/jsrender-node-starter/package.json +++ b/_src/templates/jsrender-node-starter/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "body-parser": "^1.13.2", - "browserify": "^16.3.0", + "browserify": "^17.0.0", "express": "^4.17.1", "@hapi/hapi": "^18.1.0", "@hapi/inert": "^5.2.1", diff --git a/_src/templates/jsrender/package.json b/_src/templates/jsrender/package.json index a0a3cdcb..06442f1e 100644 --- a/_src/templates/jsrender/package.json +++ b/_src/templates/jsrender/package.json @@ -34,11 +34,11 @@ ], "devDependencies": { "@types/jquery": "^3.3.31", - "browserify": "^11.0.1", - "gulp": "^3.9.0", - "glob-stream": "^5.0.0", + "browserify": "^17.0.0", + "gulp": "^5.0.0", + "glob-stream": "^8.0.2", "jquery": "^3.4.1", - "qunit": "^0.7.6" + "qunit": "^2.21.0" }, "dependencies": { "through2": "^3.0.1" diff --git a/_src/templates/jsviews.com/package.json b/_src/templates/jsviews.com/package.json index f03db89b..2e6202e5 100644 --- a/_src/templates/jsviews.com/package.json +++ b/_src/templates/jsviews.com/package.json @@ -21,23 +21,23 @@ }, "devDependencies": { "@types/jquery": "^3.3.31", - "browserify": "^11.0.1", - "glob-stream": "^5.0.0", - "gulp": "^3.9.0", - "gulp-debug": "^2.0.1", - "gulp-file-include": "^0.13.5", - "gulp-jscs": "^1.6.0", + "browserify": "^17.0.0", + "glob-stream": "^8.0.2", + "gulp": "^5.0.0", + "gulp-debug": "<=4.0.0", + "gulp-file-include": "^2.3.0", + "gulp-jscs": "^4.1.0", "gulp-jscs-stylish": "^1.1.0", - "gulp-jshint": "^1.11.2", - "gulp-load-plugins": "^1.0.0-rc", + "gulp-jshint": "^2.1.0", + "gulp-load-plugins": "^2.0.8", "gulp-rename": "^1.2.2", "gulp-sourcemaps": "^1.5.2", "gulp-uglify": "^1.2.0", "jshint-stylish": "^2.0.1", "jshint-summary": "^0.4.0", "jsrender": "^@@include("templates/-version.txt")", - "node-qunit-phantomjs": "^1.2.1", - "qunit": "^0.7.6", + "node-qunit": "^2.0.0", + "qunit": "^2.21.0", "qunitjs": "^1.18.0", "through2": "^2.0.0" }, @@ -51,7 +51,7 @@ "elision": true, "debug": true, "loopfunc": true, - "multistr": true + "multistr": true }, "jscsConfig": { "disallowTrailingWhitespace": true, diff --git a/_src/templates/jsviews/package.json b/_src/templates/jsviews/package.json index 17bedf8b..cff42714 100644 --- a/_src/templates/jsviews/package.json +++ b/_src/templates/jsviews/package.json @@ -32,11 +32,11 @@ ], "devDependencies": { "@types/jquery": "^3.3.31", - "browserify": "^11.0.1", - "glob-stream": "^5.0.0", - "gulp": "^3.9.0", + "browserify": "^17.0.0", + "glob-stream": "^8.0.2", + "gulp": "^5.0.0", "jsrender": "^@@include("templates/-version.txt")", - "qunit": "^0.7.6" + "qunit": "^2.21.0" }, "dependencies": { "jquery": "^3.4.1" diff --git a/documentation/contents-download.js b/documentation/contents-download.js index e0200e0b..06d0e607 100644 --- a/documentation/contents-download.js +++ b/documentation/contents-download.js @@ -9,7 +9,7 @@ content.download = content.useStorage && $.parseJSON(localStorage.getItem("JsVie { "_type": "para", "title": "", - "text": "The latest version of both *JsRender* and *JsViews* is ***v1.0.14***" + "text": "The latest version of both *JsRender* and *JsViews* is ***v1.0.15***" }, { "_type": "para", @@ -98,7 +98,7 @@ content.download = content.useStorage && $.parseJSON(localStorage.getItem("JsVie { "_type": "para", "title": "Alternatives: replace the JsRender <script> tag above by one of the following:", - "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```" + "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```" } ] }, @@ -116,7 +116,7 @@ content.download = content.useStorage && $.parseJSON(localStorage.getItem("JsVie { "_type": "para", "title": "Alternatives: replace the JsRender <script> tag above by one of the following:", - "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```" + "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```" } ] }, @@ -134,7 +134,7 @@ content.download = content.useStorage && $.parseJSON(localStorage.getItem("JsVie { "_type": "para", "title": "Alternatives: replace the JsViews <script> tag above by one of the following:", - "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n```" + "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n```" }, { "_type": "para", @@ -150,7 +150,7 @@ content.download = content.useStorage && $.parseJSON(localStorage.getItem("JsVie { "_type": "para", "title": "Alternatives: replace the three JsViews <script> tags above by one of the following:", - "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n\n\n```" + "text": "*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n\n\n```" } ] }, diff --git a/documentation/contents-download.min.js b/documentation/contents-download.min.js index b1914640..062989ba 100644 --- a/documentation/contents-download.min.js +++ b/documentation/contents-download.min.js @@ -1,3 +1,3 @@ -var content=$.views.documentation.content;content.download=content.useStorage&&$.parseJSON(localStorage.getItem("JsViewsDocTopics/download"))||{download:{title:"JsRender and JsViews Downloads",path:"",sections:[{_type:"para",title:"",text:"The latest version of both *JsRender* and *JsViews* is ***v1.0.14***"},{_type:"para",title:"JsRender (jsviews.js) – rendering templates in the browser",text:'***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jsrender.js\n- *Compressed (for production):* jsrender.min.js. (Source map available here)\n\n\n*JsRender is also available:*\n- on CDN at [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\n- using [Bower](http://bower.io/search/?q=jsrender) to install on the file system: `$ bower install jsrender`\n\n*Example HTML pages:*\n- [Page loading JsRender with jQuery](#download/pages-jsr-jq)\n- [Page loading JsRender without jQuery](#download/pages-jsr)\n\n*See:*\n[JsRender Quickstart](#jsr-quickstart)\n\n',anchor:"jsrender"},{_type:"para",title:"JsViews (jsviews.js) – templates with data-binding",text:'***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jsviews.js\n- *Compressed (for production):* jsviews.min.js. (Source map available here)\n\n*JsViews is also available:*\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\n\n*Example HTML page:*\n- [Page loading JsViews](#download/pages-jsv)\n\n*See:* [JsViews Quickstart](#jsv-quickstart)\n\n(Note that *jsviews.js* includes all of *jsrender.js* code -- so *jsrender.js* does not need to be loaded first.)',anchor:"jsviews"},{_type:"para",title:"",text:'
Additional scenarios:
\n'},{_type:"para",title:"JsRender for Node.js – rendering templates on the server",text:"A specific Node.js version of JsRender can be installed from npm, using:\n\n```js\n$ npm install jsrender\n```\n\nand then loaded in script using:\n\n```js\nvar jsrender = require('jsrender');\n```\n\nNow call regular JsRender APIs, such as:\n\n```js\nvar tmpl = jsrender.templates('Name: {{:name}}
'); // Compile template from string\n\nvar html = tmpl.render({name: \"Jim\"}); // Render\n```\n\nThis Node.js version of JsRender provides the complete set of JsRender APIs and features, together with integration with view-engines such as Express and Hapi, APIs for loading templates from the file system, and integration with Browserify for bundling server-side templates into client scripts for the browser.\n\n*See:* [JsRender Node.js Quickstart](#jsr-node-quickstart).",anchor:"nodejs"},{_type:"para",title:"Loading JsViews as separate files",text:'Instead of loading JsViews as a single file (*jsviews.js*), it can be loaded as three separate files: *jsrender.js* (providing templated rendering), *jquery.observable.js* (for observable data) and *jquery.views.js* (data-binding).\n\nThis can be useful in some scenarios. For example, if JsRender has already been loaded (by other components, for example) then full JsViews functionality may be added by loading only the additional *jquery.observable.js* and *jquery.views.js* files (rather than the complete composite file, *jsviews.js*).\n\n***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jquery.observable.js and jquery.views.js\n- *Compressed (for production):* jquery.observable.min.js and jquery.views.min.js. (Source maps available here and here)\n\n*jquery.observable.js and jquery.views.js are also available:*\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\n\n*Example HTML page:*\n- [Page loading JsViews as separate files](#download/pages-jsv@separate)\n\n*See:* [JsViews Quickstart](#jsv-quickstart)',anchor:"separate"},{_type:"para",title:"CDN delivery",text:"JsRender and JsViews are available on the ***[cdnjs](https://cdnjs.com)*** CDN at:\n\n- [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\n- [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)",anchor:"cdn"}]},"download/sample-tagcontrols":{title:"Sample tag controls – plugin libraries",path:"",sections:[{_type:"para",title:"",text:'The following tag controls, used in some of the samples, can be a starting point for your own custom tag controls. Some are very rudimentary, others are more advanced and complete. \n\n**Note:** If you use these controls in your own applications, it is recommended to download the files, or copy the code, rather than loading directly from this location, since the implementations (and associated APIs) may change over time as new versions of the samples are introduced.\n\n*(To download, right-click and select “Save as…” from the menu.)*\n\n- **{^{tabs/}}**\n - *Download:* [tabs.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.js)\n(*Compressed:* [tabs.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js.map)*)\n
Used in the [tabs](#samples/tag-controls/tabs) sample. (See also discussion [here](#bindingpatterns@tabsctxprm))\n
Alternative versions:
[tabs2.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.js)\n(*Compressed:* [tabs2.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js.map)*)\n
Used in the [`setValue()/updateValue()` tabs sample](#bindingpatterns@tabs-setvalue-updatevalue).\n
And:
[tabs3.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.js)\n(*Compressed:* [tabs3.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js.map)*)\n
Used in the [two-way binding tabs sample](#bindingpatterns@tabs2way).\n - (*CSS:* [tabs.css](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.css))\n- **{^{multisel/}}**\n - *Download:* [multiselect.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.js)\n(*Compressed:* [multiselect.min.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js.map)*)\n
Used in the [multiselect](#samples/tag-controls/multiselect) sample\n- **{^{tree/}}**\n - *Download:* [tree-if.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.js)\n(*Compressed:* [tree-if.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js.map)*)\n
Used in the [tree (if-binding)](#samples/tag-controls/tree/if-binding) sample\n - *Download:* [tree-visible.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.js)\n(*Compressed:* [tree-visible.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js.map)*)\n
Used in the [tree (visible-binding)](#samples/tag-controls/tree/visible-binding) sample\n - (*CSS:* [tree.css](https://www.jsviews.com/download/sample-tag-controls/treeview/tree.css))\n- **{^{textbox/}}**\n - *Download:* [simple-textbox.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.js)\n(*Compressed:* [simple-textbox.min.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js.map)*)\n
Used in the [simple textbox](#samples/tag-controls/simple-textbox) sample\n- **{^{validate/}}** and **{^{validation/}}** \n - *Download:* [validate.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.js)\n(*Compressed:* [validate.min.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js.map)*)\n
Used in the\n [datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation),\n [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard),\n [slider with validation](#samples/tag-controls/jqui/slider/with-validation),
\n [validate simple](#samples/tag-controls/validate/simple)\n and the [validate tag control](#samples/tag-controls/validate) samples\n - (*CSS:* [validate.css](https://www.jsviews.com/download/sample-tag-controls/validate/validate.css))\n- **{^{slider/}}**\n - *Download:* [slider.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.js)\n(*Compressed:* [slider.min.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js.map)*)\n
Used in the [slider](#samples/tag-controls/slider) JsViews sample\n- **{^{areaslider/}}**\n - *Download:* [areaslider.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.js)\n(*Compressed:* [areaslider.min.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js.map)*)\n
Used in the [areaslider](#samples/tag-controls/areaslider) JsViews sample\n- **{^{spinblock/}}**\n - *Download:* [spinblock.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.js)\n(*Compressed:* [spinblock.min.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js.map)*)\n
Used in the [spinblock](#samples/tag-controls/spinblock) JsViews sample\n- **{^{colorpicker/}}**\n - *Download:* [colorpicker.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.js)\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\n - *Download:* [colorpicker-multiformat.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.js)\n(*Compressed:* [colorpicker-multiformat.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker@multiformat) JsViews sample\n - *Download:* [colorpicker-multiformat2.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.js)\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\n - (*CSS:* [colorpicker.css](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.css) *TinyColor:* [tinycolor.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/tinycolor.js))\n- **{^{jsonview/}}**\n - *Download:* [jsonview.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.js)\n(*Compressed:* [jsonview.min.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js.map)*)\n
Used in the [jsonview](#samples/tag-controls/jsonview) JsViews sample\n - (*CSS:* [jsonview.css](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.css))\n\nTo use the above tag controls simply include the corresponding libraries for your chosen tags, after loading *JsViews*:\n\n```jsr\n...\n\n...\n\n\n\n...\n```'}]},"download/pages":{title:"Example HTML pages – loading JsRender or JsViews ",path:"",sections:[{_type:"links",title:"",links:[],topics:[{hash:"download/pages-jsr-jq",label:"JsRender with jQuery"},{hash:"download/pages-jsr",label:"JsRender without jQuery"},{hash:"download/pages-jsv",label:"JsViews"}]}]},"download/pages-jsr-jq":{filter:"jsr",title:"Loading JsRender with jQuery",path:"",sections:[{_type:"para",title:"Example HTML page, using latest version of JsRender from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsRender <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```'}]},"download/pages-jsr":{filter:"jsr",title:"Loading JsRender without jQuery",path:"",sections:[{_type:"para",title:"Example HTML page, using latest version of JsRender from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsRender <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```'}]},"download/pages-jsv":{filter:"jsv",title:"Loading JsViews",path:"",sections:[{_type:"para",title:"Example HTML page, loading latest version of JsViews from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsViews <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n```'},{_type:"para",title:"",text:'
JsViews – separate files
\n\nUsually JsViews as a single file (*jsviews.js*), as in the example HTML page above.\n\nHowever it can be loaded as three separate files: *jsrender.js* (templated rendering), *jquery.observable.js* (observable data) and *jquery.views.js* (data-binding) -- as follows:\n'},{_type:"para",title:"Example HTML page, loading JsViews as separate files",text:'```jsr\n\n\n\n \n \n\n \n \n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:"separate"},{_type:"para",title:"Alternatives: replace the three JsViews <script> tags above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n\n\n```'}]},"download/jqueryui-tagcontrols":{filter:"jsv",title:"jQuery UI tag controls library",path:"",sections:[{_type:"para",title:"",text:"The *jQuery UI tag controls library: __jsviews-jqueryui-widgets.js__* is a set of tag controls based on jQuery UI widgets."},{_type:"para",title:"Download:",text:'*Uncompressed (for development):* jsviews-jqueryui-widgets.js
\n*Compressed (for production):* jsviews-jqueryui-widgets.min.js. (Source map available here)\n\n*(To download, right-click and select “Save as…” from the menu.)*'},{_type:"para",title:"Tag controls:",text:"The library provides the following tag controls (each integrating the corresponding jQuery UI widget):
\n\n- *__{{autocomplete/}}__* -- based on [jQuery UI autocomplete](https://jqueryui.com/autocomplete/)\n([api](https://api.jqueryui.com/autocomplete/))\n - used in the [autocomplete](#samples/tag-controls/jqui/autocomplete) sample\n- *__{{accordion/}}__* -- based on [jQuery UI accordion](https://jqueryui.com/accordion/)\n([api](https://api.jqueryui.com/accordion/))\n - used in the [accordion](#samples/tag-controls/jqui/accordion) samples\n- *__{{button/}}__* -- based on [jQuery UI button](https://jqueryui.com/button/)\n([api](https://api.jqueryui.com/button/))\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{checkbox/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\n([api](https://api.jqueryui.com/checkboxradio/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [Accessing widget APIs](#samples/tag-controls/jqui/api@widgetapi) samples\n- *__{{radio/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\n([api](https://api.jqueryui.com/checkboxradio/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\n- *__{{controlgroup/}}__* -- based on [jQuery UI controlgroup](https://jqueryui.com/controlgroup/)\n([api](https://api.jqueryui.com/controlgroup/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\n- *__{{buttonset}}__* -- *deprecated and available only if using jQuery UI 1.11.4*\n- *__{{datepicker/}}__* -- based on [jQuery UI datepicker](https://jqueryui.com/datepicker/)\n([api](https://api.jqueryui.com/datepicker/))\n - used in the [simple datepicker](#samples/tag-controls/jqui/datepicker/simple),\n[datepicker variants](#samples/tag-controls/jqui/datepicker/variants),\n[datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation)\nand [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard) samples\n- *__{{draggable/}}__* -- based on [jQuery UI draggable](https://jqueryui.com/draggable/)\n([api](https://api.jqueryui.com/draggable/))\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\n- *__{{droppable/}}__* -- based on [jQuery UI droppable](https://jqueryui.com/droppable/)\n([api](https://api.jqueryui.com/droppable/))\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\n- *__{{menu/}}__* -- based on [jQuery UI menu](https://jqueryui.com/menu/)\n([api](https://api.jqueryui.com/menu/))\n - used in the [menu](#samples/tag-controls/jqui/menu) samples\n- *__{{progressbar/}}__* -- based on [jQuery UI progressbar](https://jqueryui.com/progressbar/)\n([api](https://api.jqueryui.com/progressbar/))\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{resizable/}}__* -- based on [jQuery UI resizable](https://jqueryui.com/resizable/)\n([api](https://api.jqueryui.com/resizable/))\n - used in the [resizable](#samples/tag-controls/jqui/resizable) samples\n- *__{{selectable/}}__* -- based on [jQuery UI selectable](https://jqueryui.com/selectable/)\n([api](https://api.jqueryui.com/selectable/))\n - used in the [selectable](#samples/tag-controls/jqui/selectable) samples\n- *__{{selectmenu/}}__* -- based on [jQuery UI selectmenu](https://jqueryui.com/selectmenu/)\n([api](https://api.jqueryui.com/selectmenu/))\n - used in the [selectmenu](#samples/tag-controls/jqui/selectmenu) samples\n- *__{{slider/}}__* -- based on [jQueryUI slider](https://jqueryui.com/slider/)\n([api](https://api.jqueryui.com/slider/))\n - used in the [simple slider](#samples/tag-controls/jqui/slider/simple),\n[slider variants](#samples/tag-controls/jqui/slider/variants),\n[slider with validation](#samples/tag-controls/jqui/slider/with-validation),\n[sliders as color picker](#samples/tag-controls/jqui/slider/color-picker),\n[Toolbar](#samples/tag-controls/jqui/toolbar),\n[resizable](#samples/tag-controls/jqui/resizable),\n[draggable - droppable](#samples/tag-controls/jqui/draggable-droppable),\n[spinner](#samples/tag-controls/jqui/spinner) and\n[progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{sortable/}}__* -- based on [jQuery UI sortable](https://jqueryui.com/sortable/)\n([api](https://api.jqueryui.com/sortable/))\n - used in the [sortable](#samples/tag-controls/jqui/sortable) samples\n- *__{{spinner/}}__* -- based on [jQuery UI spinner](https://jqueryui.com/spinner/)\n([api](https://api.jqueryui.com/spinner/))\n - used in the [spinner](#samples/tag-controls/jqui/spinner)\nand [resizable](#samples/tag-controls/jqui/resizable) samples\n- *__{{timespinner/}}__* -- also based on [jQuery UI spinner](https://jqueryui.com/spinner/)\n([api](https://api.jqueryui.com/spinner/))\n - used in the [timespinner](#samples/tag-controls/jqui/timespinner) samples\n- *__{{tabs/}}__* -- based on [jQuery UI tabs](https://jqueryui.com/tabs/)\n([api](https://api.jqueryui.com/tabs/))\n - used in the [tabs](#samples/tag-controls/jqui/tabs) samples"},{_type:"para",title:"",text:'To use the above tag controls simply include the library after loading *jQuery UI* (recommended version *1.12.1* or later) and *JsViews*:\n\n```jsr\n...\n\n\n...\n\n\n...\n```\n\nIn addition, include an appropriate jQuery UI css class library, such as the default theme:\n\n```jsr\n\n```\n\nSee [jQuery UI widget controls samples](#samples/tag-controls/jqui).\n'}]},"download/jsrplugins":{filter:"jsr",title:"JsRender plugins",path:"",sections:[{_type:"para",title:"",text:"*JsRender* can be extended by including external libraries of custom tags, converters, helpers etc. -- such as the *jsonview.js* library, or the *jsrender-unicode.js* plugin."},{_type:"para",title:"",text:'```jsr\n...\n\n\n\n...\n```'},{_type:"links",title:"",links:[],topics:[{hash:"unicode-plugin",label:"Unicode support"}]}]},"download/jsvplugins":{filter:"jsv",title:"JsViews plugins and tag controls",path:"",sections:[{_type:"para",title:"",text:"*JsViews* can be extended by including external libraries of custom tag controls, converters, helpers, etc. -- such as the *[jQuery UI tag controls](#download/jqueryui-tagcontrols)* library (*jsviews-jqueryui-widgets.js*):"},{_type:"para",title:"",text:'```jsr\n...\n\n\n...\n```' +var content=$.views.documentation.content;content.download=content.useStorage&&$.parseJSON(localStorage.getItem("JsViewsDocTopics/download"))||{download:{title:"JsRender and JsViews Downloads",path:"",sections:[{_type:"para",title:"",text:"The latest version of both *JsRender* and *JsViews* is ***v1.0.15***"},{_type:"para",title:"JsRender (jsviews.js) – rendering templates in the browser",text:'***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jsrender.js\n- *Compressed (for production):* jsrender.min.js. (Source map available here)\n\n\n*JsRender is also available:*\n- on CDN at [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\n- using [Bower](http://bower.io/search/?q=jsrender) to install on the file system: `$ bower install jsrender`\n\n*Example HTML pages:*\n- [Page loading JsRender with jQuery](#download/pages-jsr-jq)\n- [Page loading JsRender without jQuery](#download/pages-jsr)\n\n*See:*\n[JsRender Quickstart](#jsr-quickstart)\n\n',anchor:"jsrender"},{_type:"para",title:"JsViews (jsviews.js) – templates with data-binding",text:'***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jsviews.js\n- *Compressed (for production):* jsviews.min.js. (Source map available here)\n\n*JsViews is also available:*\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\n\n*Example HTML page:*\n- [Page loading JsViews](#download/pages-jsv)\n\n*See:* [JsViews Quickstart](#jsv-quickstart)\n\n(Note that *jsviews.js* includes all of *jsrender.js* code -- so *jsrender.js* does not need to be loaded first.)',anchor:"jsviews"},{_type:"para",title:"",text:'
Additional scenarios:
\n'},{_type:"para",title:"JsRender for Node.js – rendering templates on the server",text:"A specific Node.js version of JsRender can be installed from npm, using:\n\n```js\n$ npm install jsrender\n```\n\nand then loaded in script using:\n\n```js\nvar jsrender = require('jsrender');\n```\n\nNow call regular JsRender APIs, such as:\n\n```js\nvar tmpl = jsrender.templates('Name: {{:name}}
'); // Compile template from string\n\nvar html = tmpl.render({name: \"Jim\"}); // Render\n```\n\nThis Node.js version of JsRender provides the complete set of JsRender APIs and features, together with integration with view-engines such as Express and Hapi, APIs for loading templates from the file system, and integration with Browserify for bundling server-side templates into client scripts for the browser.\n\n*See:* [JsRender Node.js Quickstart](#jsr-node-quickstart).",anchor:"nodejs"},{_type:"para",title:"Loading JsViews as separate files",text:'Instead of loading JsViews as a single file (*jsviews.js*), it can be loaded as three separate files: *jsrender.js* (providing templated rendering), *jquery.observable.js* (for observable data) and *jquery.views.js* (data-binding).\n\nThis can be useful in some scenarios. For example, if JsRender has already been loaded (by other components, for example) then full JsViews functionality may be added by loading only the additional *jquery.observable.js* and *jquery.views.js* files (rather than the complete composite file, *jsviews.js*).\n\n***Latest version*** *(To download, right-click and select "Save as..." from the menu):*\n- *Uncompressed (for development):* jquery.observable.js and jquery.views.js\n- *Compressed (for production):* jquery.observable.min.js and jquery.views.min.js. (Source maps available here and here)\n\n*jquery.observable.js and jquery.views.js are also available:*\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\n\n*Example HTML page:*\n- [Page loading JsViews as separate files](#download/pages-jsv@separate)\n\n*See:* [JsViews Quickstart](#jsv-quickstart)',anchor:"separate"},{_type:"para",title:"CDN delivery",text:"JsRender and JsViews are available on the ***[cdnjs](https://cdnjs.com)*** CDN at:\n\n- [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\n- [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)",anchor:"cdn"}]},"download/sample-tagcontrols":{title:"Sample tag controls – plugin libraries",path:"",sections:[{_type:"para",title:"",text:'The following tag controls, used in some of the samples, can be a starting point for your own custom tag controls. Some are very rudimentary, others are more advanced and complete. \n\n**Note:** If you use these controls in your own applications, it is recommended to download the files, or copy the code, rather than loading directly from this location, since the implementations (and associated APIs) may change over time as new versions of the samples are introduced.\n\n*(To download, right-click and select “Save as…” from the menu.)*\n\n- **{^{tabs/}}**\n - *Download:* [tabs.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.js)\n(*Compressed:* [tabs.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js.map)*)\n
Used in the [tabs](#samples/tag-controls/tabs) sample. (See also discussion [here](#bindingpatterns@tabsctxprm))\n
Alternative versions:
[tabs2.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.js)\n(*Compressed:* [tabs2.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js.map)*)\n
Used in the [`setValue()/updateValue()` tabs sample](#bindingpatterns@tabs-setvalue-updatevalue).\n
And:
[tabs3.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.js)\n(*Compressed:* [tabs3.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js.map)*)\n
Used in the [two-way binding tabs sample](#bindingpatterns@tabs2way).\n - (*CSS:* [tabs.css](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.css))\n- **{^{multisel/}}**\n - *Download:* [multiselect.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.js)\n(*Compressed:* [multiselect.min.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js.map)*)\n
Used in the [multiselect](#samples/tag-controls/multiselect) sample\n- **{^{tree/}}**\n - *Download:* [tree-if.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.js)\n(*Compressed:* [tree-if.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js.map)*)\n
Used in the [tree (if-binding)](#samples/tag-controls/tree/if-binding) sample\n - *Download:* [tree-visible.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.js)\n(*Compressed:* [tree-visible.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js.map)*)\n
Used in the [tree (visible-binding)](#samples/tag-controls/tree/visible-binding) sample\n - (*CSS:* [tree.css](https://www.jsviews.com/download/sample-tag-controls/treeview/tree.css))\n- **{^{textbox/}}**\n - *Download:* [simple-textbox.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.js)\n(*Compressed:* [simple-textbox.min.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js.map)*)\n
Used in the [simple textbox](#samples/tag-controls/simple-textbox) sample\n- **{^{validate/}}** and **{^{validation/}}** \n - *Download:* [validate.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.js)\n(*Compressed:* [validate.min.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js.map)*)\n
Used in the\n [datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation),\n [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard),\n [slider with validation](#samples/tag-controls/jqui/slider/with-validation),
\n [validate simple](#samples/tag-controls/validate/simple)\n and the [validate tag control](#samples/tag-controls/validate) samples\n - (*CSS:* [validate.css](https://www.jsviews.com/download/sample-tag-controls/validate/validate.css))\n- **{^{slider/}}**\n - *Download:* [slider.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.js)\n(*Compressed:* [slider.min.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js.map)*)\n
Used in the [slider](#samples/tag-controls/slider) JsViews sample\n- **{^{areaslider/}}**\n - *Download:* [areaslider.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.js)\n(*Compressed:* [areaslider.min.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js.map)*)\n
Used in the [areaslider](#samples/tag-controls/areaslider) JsViews sample\n- **{^{spinblock/}}**\n - *Download:* [spinblock.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.js)\n(*Compressed:* [spinblock.min.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js.map)*)\n
Used in the [spinblock](#samples/tag-controls/spinblock) JsViews sample\n- **{^{colorpicker/}}**\n - *Download:* [colorpicker.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.js)\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\n - *Download:* [colorpicker-multiformat.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.js)\n(*Compressed:* [colorpicker-multiformat.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker@multiformat) JsViews sample\n - *Download:* [colorpicker-multiformat2.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.js)\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js.map)*)\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\n - (*CSS:* [colorpicker.css](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.css) *TinyColor:* [tinycolor.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/tinycolor.js))\n- **{^{jsonview/}}**\n - *Download:* [jsonview.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.js)\n(*Compressed:* [jsonview.min.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js.map)*)\n
Used in the [jsonview](#samples/tag-controls/jsonview) JsViews sample\n - (*CSS:* [jsonview.css](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.css))\n\nTo use the above tag controls simply include the corresponding libraries for your chosen tags, after loading *JsViews*:\n\n```jsr\n...\n\n...\n\n\n\n...\n```'}]},"download/pages":{title:"Example HTML pages – loading JsRender or JsViews ",path:"",sections:[{_type:"links",title:"",links:[],topics:[{hash:"download/pages-jsr-jq",label:"JsRender with jQuery"},{hash:"download/pages-jsr",label:"JsRender without jQuery"},{hash:"download/pages-jsv",label:"JsViews"}]}]},"download/pages-jsr-jq":{filter:"jsr",title:"Loading JsRender with jQuery",path:"",sections:[{_type:"para",title:"Example HTML page, using latest version of JsRender from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsRender <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```'}]},"download/pages-jsr":{filter:"jsr",title:"Loading JsRender without jQuery",path:"",sections:[{_type:"para",title:"Example HTML page, using latest version of JsRender from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsRender <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\n\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\n\n```jsr\n\n```'}]},"download/pages-jsv":{filter:"jsv",title:"Loading JsViews",path:"",sections:[{_type:"para",title:"Example HTML page, loading latest version of JsViews from www.jsviews.com",text:'```jsr\n\n\n\n \n \n\n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:""},{_type:"para",title:"Alternatives: replace the JsViews <script> tag above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n```'},{_type:"para",title:"",text:'
JsViews – separate files
\n\nUsually JsViews as a single file (*jsviews.js*), as in the example HTML page above.\n\nHowever it can be loaded as three separate files: *jsrender.js* (templated rendering), *jquery.observable.js* (observable data) and *jquery.views.js* (data-binding) -- as follows:\n'},{_type:"para",title:"Example HTML page, loading JsViews as separate files",text:'```jsr\n\n\n\n \n \n\n \n \n \n \n\n\n \n
\n\n \n \n\n \n\n\n```',anchor:"separate"},{_type:"para",title:"Alternatives: replace the three JsViews <script> tags above by one of the following:",text:'*Using latest version, minified, from www.jsviews.com:*\n\n```jsr\n\n\n\n```\n\n*Using specific version from CDN:*\n\n```jsr\n\n\n\n```\n\n*Using specific version, minified, from CDN:*\n\n```jsr\n\n\n\n```\n\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\n\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\n\n```jsr\n\n\n\n```'}]},"download/jqueryui-tagcontrols":{filter:"jsv",title:"jQuery UI tag controls library",path:"",sections:[{_type:"para",title:"",text:"The *jQuery UI tag controls library: __jsviews-jqueryui-widgets.js__* is a set of tag controls based on jQuery UI widgets."},{_type:"para",title:"Download:",text:'*Uncompressed (for development):* jsviews-jqueryui-widgets.js
\n*Compressed (for production):* jsviews-jqueryui-widgets.min.js. (Source map available here)\n\n*(To download, right-click and select “Save as…” from the menu.)*'},{_type:"para",title:"Tag controls:",text:"The library provides the following tag controls (each integrating the corresponding jQuery UI widget):
\n\n- *__{{autocomplete/}}__* -- based on [jQuery UI autocomplete](https://jqueryui.com/autocomplete/)\n([api](https://api.jqueryui.com/autocomplete/))\n - used in the [autocomplete](#samples/tag-controls/jqui/autocomplete) sample\n- *__{{accordion/}}__* -- based on [jQuery UI accordion](https://jqueryui.com/accordion/)\n([api](https://api.jqueryui.com/accordion/))\n - used in the [accordion](#samples/tag-controls/jqui/accordion) samples\n- *__{{button/}}__* -- based on [jQuery UI button](https://jqueryui.com/button/)\n([api](https://api.jqueryui.com/button/))\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{checkbox/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\n([api](https://api.jqueryui.com/checkboxradio/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [Accessing widget APIs](#samples/tag-controls/jqui/api@widgetapi) samples\n- *__{{radio/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\n([api](https://api.jqueryui.com/checkboxradio/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\n- *__{{controlgroup/}}__* -- based on [jQuery UI controlgroup](https://jqueryui.com/controlgroup/)\n([api](https://api.jqueryui.com/controlgroup/))\n(requires jQuery UI version 1.12.1 or later)\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\n- *__{{buttonset}}__* -- *deprecated and available only if using jQuery UI 1.11.4*\n- *__{{datepicker/}}__* -- based on [jQuery UI datepicker](https://jqueryui.com/datepicker/)\n([api](https://api.jqueryui.com/datepicker/))\n - used in the [simple datepicker](#samples/tag-controls/jqui/datepicker/simple),\n[datepicker variants](#samples/tag-controls/jqui/datepicker/variants),\n[datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation)\nand [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard) samples\n- *__{{draggable/}}__* -- based on [jQuery UI draggable](https://jqueryui.com/draggable/)\n([api](https://api.jqueryui.com/draggable/))\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\n- *__{{droppable/}}__* -- based on [jQuery UI droppable](https://jqueryui.com/droppable/)\n([api](https://api.jqueryui.com/droppable/))\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\n- *__{{menu/}}__* -- based on [jQuery UI menu](https://jqueryui.com/menu/)\n([api](https://api.jqueryui.com/menu/))\n - used in the [menu](#samples/tag-controls/jqui/menu) samples\n- *__{{progressbar/}}__* -- based on [jQuery UI progressbar](https://jqueryui.com/progressbar/)\n([api](https://api.jqueryui.com/progressbar/))\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{resizable/}}__* -- based on [jQuery UI resizable](https://jqueryui.com/resizable/)\n([api](https://api.jqueryui.com/resizable/))\n - used in the [resizable](#samples/tag-controls/jqui/resizable) samples\n- *__{{selectable/}}__* -- based on [jQuery UI selectable](https://jqueryui.com/selectable/)\n([api](https://api.jqueryui.com/selectable/))\n - used in the [selectable](#samples/tag-controls/jqui/selectable) samples\n- *__{{selectmenu/}}__* -- based on [jQuery UI selectmenu](https://jqueryui.com/selectmenu/)\n([api](https://api.jqueryui.com/selectmenu/))\n - used in the [selectmenu](#samples/tag-controls/jqui/selectmenu) samples\n- *__{{slider/}}__* -- based on [jQueryUI slider](https://jqueryui.com/slider/)\n([api](https://api.jqueryui.com/slider/))\n - used in the [simple slider](#samples/tag-controls/jqui/slider/simple),\n[slider variants](#samples/tag-controls/jqui/slider/variants),\n[slider with validation](#samples/tag-controls/jqui/slider/with-validation),\n[sliders as color picker](#samples/tag-controls/jqui/slider/color-picker),\n[Toolbar](#samples/tag-controls/jqui/toolbar),\n[resizable](#samples/tag-controls/jqui/resizable),\n[draggable - droppable](#samples/tag-controls/jqui/draggable-droppable),\n[spinner](#samples/tag-controls/jqui/spinner) and\n[progressbar](#samples/tag-controls/jqui/progressbar) samples\n- *__{{sortable/}}__* -- based on [jQuery UI sortable](https://jqueryui.com/sortable/)\n([api](https://api.jqueryui.com/sortable/))\n - used in the [sortable](#samples/tag-controls/jqui/sortable) samples\n- *__{{spinner/}}__* -- based on [jQuery UI spinner](https://jqueryui.com/spinner/)\n([api](https://api.jqueryui.com/spinner/))\n - used in the [spinner](#samples/tag-controls/jqui/spinner)\nand [resizable](#samples/tag-controls/jqui/resizable) samples\n- *__{{timespinner/}}__* -- also based on [jQuery UI spinner](https://jqueryui.com/spinner/)\n([api](https://api.jqueryui.com/spinner/))\n - used in the [timespinner](#samples/tag-controls/jqui/timespinner) samples\n- *__{{tabs/}}__* -- based on [jQuery UI tabs](https://jqueryui.com/tabs/)\n([api](https://api.jqueryui.com/tabs/))\n - used in the [tabs](#samples/tag-controls/jqui/tabs) samples"},{_type:"para",title:"",text:'To use the above tag controls simply include the library after loading *jQuery UI* (recommended version *1.12.1* or later) and *JsViews*:\n\n```jsr\n...\n\n\n...\n\n\n...\n```\n\nIn addition, include an appropriate jQuery UI css class library, such as the default theme:\n\n```jsr\n\n```\n\nSee [jQuery UI widget controls samples](#samples/tag-controls/jqui).\n'}]},"download/jsrplugins":{filter:"jsr",title:"JsRender plugins",path:"",sections:[{_type:"para",title:"",text:"*JsRender* can be extended by including external libraries of custom tags, converters, helpers etc. -- such as the *jsonview.js* library, or the *jsrender-unicode.js* plugin."},{_type:"para",title:"",text:'```jsr\n...\n\n\n\n...\n```'},{_type:"links",title:"",links:[],topics:[{hash:"unicode-plugin",label:"Unicode support"}]}]},"download/jsvplugins":{filter:"jsv",title:"JsViews plugins and tag controls",path:"",sections:[{_type:"para",title:"",text:"*JsViews* can be extended by including external libraries of custom tag controls, converters, helpers, etc. -- such as the *[jQuery UI tag controls](#download/jqueryui-tagcontrols)* library (*jsviews-jqueryui-widgets.js*):"},{_type:"para",title:"",text:'```jsr\n...\n\n\n...\n```' },{_type:"links",title:"",links:[],topics:[{hash:"download/sample-tagcontrols",label:"Sample tag controls"},{hash:"download/jqueryui-tagcontrols",label:"jQuery UI tag controls"}]}]},typescript:{title:"Typescript declaration files",path:"",sections:[{_type:"para",title:"",text:"Both *JsRender* and *JsViews* have TypeScript declaration files included in the npm package.\n\nFor *JsRender* the declaration file is at `typescript/jsrender/index.d.ts` in the [`jsrender` package](https://www.npmjs.com/package/jsrender).\n\nFor *JsViews* the declaration file is at `typescript/jsviews/index.d.ts` in the [`jsviews` package](https://www.npmjs.com/package/jsviews).\n\nThe TypeScript declaration files are also available at:\n\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsrender/index.d.ts) for *JsRender*\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsviews/index.d.ts) for *JsViews*\n"}]},"unicode-plugin":{title:"Unicode support: jsrender-unicode.js",path:"",sections:[{_type:"para",title:"",text:"The *JsRender unicode library: __jsrender-unicode.js__* is a plugin which extends JsRender and JsViews template parsing so that unicode characters in data property names are supported. See the [*Unicode character support*](#unicode) topic."},{_type:"para",title:"Download",text:"*Uncompressed (for development):* [jsrender-unicode.js](https://www.jsviews.com/download/plugins/jsrender-unicode.js)\n\n*Compressed (for production):* [jsrender-unicode.min.js](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js). (Source map available [here](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js.map))\n\n*(To download, right-click and select “Save as…” from the menu.)*"}]}}; //# sourceMappingURL=contents-download.min.js.map diff --git a/documentation/contents-download.min.js.map b/documentation/contents-download.min.js.map index 1efe39ab..227961ea 100644 --- a/documentation/contents-download.min.js.map +++ b/documentation/contents-download.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["contents-download.js"],"names":["content","$","views","documentation","download","useStorage","parseJSON","localStorage","getItem","title","path","sections","_type","text","anchor","download/sample-tagcontrols","download/pages","links","topics","hash","label","download/pages-jsr-jq","filter","download/pages-jsr","download/pages-jsv","download/jqueryui-tagcontrols","download/jsrplugins","download/jsvplugins","typescript","unicode-plugin"],"mappings":"AAAA,GAAIA,SAAUC,EAAEC,MAAMC,cAAcH,OAEpCA,SAAQI,SAAWJ,QAAQK,YAAcJ,EAAEK,UAAUC,aAAaC,QAAQ,gCAExEJ,UACEK,MAAS,iCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,yEAGRD,MAAS,OACTH,MAAS,mFACTI,KAAQ,y0BACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,2EACTI,KAAQ,41BACRC,OAAU,YAGVF,MAAS,OACTH,MAAS,GACTI,KAAQ,qDAGRD,MAAS,OACTH,MAAS,iEACTI,KAAQ,61BACRC,OAAU,WAGVF,MAAS,OACTH,MAAS,oCACTI,KAAQ,qnDACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,eACTI,KAAQ,qOACRC,OAAU,SAIhBC,+BACEN,MAAS,+CACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,20QAIdG,kBACEP,MAAS,0DACTC,KAAQ,GACRC,WAEIC,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,wBACRC,MAAS,yBAGTD,KAAQ,qBACRC,MAAS,4BAGTD,KAAQ,qBACRC,MAAS,eAMnBC,yBACEC,OAAU,MACVb,MAAS,+BACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,2EACTI,KAAQ,y2BACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,uFACTI,KAAQ,2yBAIdU,sBACED,OAAU,MACVb,MAAS,kCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,2EACTI,KAAQ,oyCACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,uFACTI,KAAQ,2yBAIdW,sBACEF,OAAU,MACVb,MAAS,kBACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,4EACTI,KAAQ,yzBACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,sFACTI,KAAQ,6xBAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,4UAGRD,MAAS,OACTH,MAAS,uDACTI,KAAQ,o/BACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,6FACTI,KAAQ,o+CAIdY,iCACEH,OAAU,MACVb,MAAS,iCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,+HAGRD,MAAS,OACTH,MAAS,YACTI,KAAQ,khBAGRD,MAAS,OACTH,MAAS,gBACTI,KAAQ,4wKAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,yvBAIda,uBACEJ,OAAU,MACVb,MAAS,mBACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,mLAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,gRAGRD,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,iBACRC,MAAS,uBAMnBO,uBACEL,OAAU,MACVb,MAAS,mCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,mOAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ;GAGRD,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,8BACRC,MAAS,wBAGTD,KAAQ,gCACRC,MAAS,8BAMnBQ,YACEnB,MAAS,+BACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,qoBAIdgB,kBACEpB,MAAS,uCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,oPAGRD,MAAS,OACTH,MAAS,WACTI,KAAQ","file":"contents-download.min.js","sourcesContent":["var content = $.views.documentation.content;\n\ncontent.download = content.useStorage && $.parseJSON(localStorage.getItem(\"JsViewsDocTopics/download\")) ||\n{\n \"download\": {\n \"title\": \"JsRender and JsViews Downloads\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The latest version of both *JsRender* and *JsViews* is ***v1.0.14***\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsRender (jsviews.js) – rendering templates in the browser\",\n \"text\": \"***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jsrender.js\\n- *Compressed (for production):* jsrender.min.js. (Source map available here)\\n\\n\\n*JsRender is also available:*\\n- on CDN at [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\\n- using [Bower](http://bower.io/search/?q=jsrender) to install on the file system: `$ bower install jsrender`\\n\\n*Example HTML pages:*\\n- [Page loading JsRender with jQuery](#download/pages-jsr-jq)\\n- [Page loading JsRender without jQuery](#download/pages-jsr)\\n\\n*See:*\\n[JsRender Quickstart](#jsr-quickstart)\\n\\n\",\n \"anchor\": \"jsrender\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsViews (jsviews.js) – templates with data-binding\",\n \"text\": \"***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jsviews.js\\n- *Compressed (for production):* jsviews.min.js. (Source map available here)\\n\\n*JsViews is also available:*\\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\\n\\n*Example HTML page:*\\n- [Page loading JsViews](#download/pages-jsv)\\n\\n*See:* [JsViews Quickstart](#jsv-quickstart)\\n\\n(Note that *jsviews.js* includes all of *jsrender.js* code -- so *jsrender.js* does not need to be loaded first.)\",\n \"anchor\": \"jsviews\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"
Additional scenarios:
\\n\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsRender for Node.js – rendering templates on the server\",\n \"text\": \"A specific Node.js version of JsRender can be installed from npm, using:\\n\\n```js\\n$ npm install jsrender\\n```\\n\\nand then loaded in script using:\\n\\n```js\\nvar jsrender = require('jsrender');\\n```\\n\\nNow call regular JsRender APIs, such as:\\n\\n```js\\nvar tmpl = jsrender.templates('Name: {{:name}}
'); // Compile template from string\\n\\nvar html = tmpl.render({name: \\\"Jim\\\"}); // Render\\n```\\n\\nThis Node.js version of JsRender provides the complete set of JsRender APIs and features, together with integration with view-engines such as Express and Hapi, APIs for loading templates from the file system, and integration with Browserify for bundling server-side templates into client scripts for the browser.\\n\\n*See:* [JsRender Node.js Quickstart](#jsr-node-quickstart).\",\n \"anchor\": \"nodejs\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Loading JsViews as separate files\",\n \"text\": \"Instead of loading JsViews as a single file (*jsviews.js*), it can be loaded as three separate files: *jsrender.js* (providing templated rendering), *jquery.observable.js* (for observable data) and *jquery.views.js* (data-binding).\\n\\nThis can be useful in some scenarios. For example, if JsRender has already been loaded (by other components, for example) then full JsViews functionality may be added by loading only the additional *jquery.observable.js* and *jquery.views.js* files (rather than the complete composite file, *jsviews.js*).\\n\\n***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jquery.observable.js and jquery.views.js\\n- *Compressed (for production):* jquery.observable.min.js and jquery.views.min.js. (Source maps available here and here)\\n\\n*jquery.observable.js and jquery.views.js are also available:*\\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\\n\\n*Example HTML page:*\\n- [Page loading JsViews as separate files](#download/pages-jsv@separate)\\n\\n*See:* [JsViews Quickstart](#jsv-quickstart)\",\n \"anchor\": \"separate\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"CDN delivery\",\n \"text\": \"JsRender and JsViews are available on the ***[cdnjs](https://cdnjs.com)*** CDN at:\\n\\n- [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\\n- [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\",\n \"anchor\": \"cdn\"\n }\n ]\n },\n \"download/sample-tagcontrols\": {\n \"title\": \"Sample tag controls – plugin libraries\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The following tag controls, used in some of the samples, can be a starting point for your own custom tag controls. Some are very rudimentary, others are more advanced and complete. \\n\\n**Note:** If you use these controls in your own applications, it is recommended to download the files, or copy the code, rather than loading directly from this location, since the implementations (and associated APIs) may change over time as new versions of the samples are introduced.\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\\n\\n- **{^{tabs/}}**\\n - *Download:* [tabs.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.js)\\n(*Compressed:* [tabs.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js.map)*)\\n
Used in the [tabs](#samples/tag-controls/tabs) sample. (See also discussion [here](#bindingpatterns@tabsctxprm))\\n
Alternative versions:
[tabs2.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.js)\\n(*Compressed:* [tabs2.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js.map)*)\\n
Used in the [`setValue()/updateValue()` tabs sample](#bindingpatterns@tabs-setvalue-updatevalue).\\n
And:
[tabs3.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.js)\\n(*Compressed:* [tabs3.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js.map)*)\\n
Used in the [two-way binding tabs sample](#bindingpatterns@tabs2way).\\n - (*CSS:* [tabs.css](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.css))\\n- **{^{multisel/}}**\\n - *Download:* [multiselect.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.js)\\n(*Compressed:* [multiselect.min.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js.map)*)\\n
Used in the [multiselect](#samples/tag-controls/multiselect) sample\\n- **{^{tree/}}**\\n - *Download:* [tree-if.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.js)\\n(*Compressed:* [tree-if.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js.map)*)\\n
Used in the [tree (if-binding)](#samples/tag-controls/tree/if-binding) sample\\n - *Download:* [tree-visible.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.js)\\n(*Compressed:* [tree-visible.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js.map)*)\\n
Used in the [tree (visible-binding)](#samples/tag-controls/tree/visible-binding) sample\\n - (*CSS:* [tree.css](https://www.jsviews.com/download/sample-tag-controls/treeview/tree.css))\\n- **{^{textbox/}}**\\n - *Download:* [simple-textbox.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.js)\\n(*Compressed:* [simple-textbox.min.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js.map)*)\\n
Used in the [simple textbox](#samples/tag-controls/simple-textbox) sample\\n- **{^{validate/}}** and **{^{validation/}}** \\n - *Download:* [validate.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.js)\\n(*Compressed:* [validate.min.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js.map)*)\\n
Used in the\\n [datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation),\\n [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard),\\n [slider with validation](#samples/tag-controls/jqui/slider/with-validation),
\\n [validate simple](#samples/tag-controls/validate/simple)\\n and the [validate tag control](#samples/tag-controls/validate) samples\\n - (*CSS:* [validate.css](https://www.jsviews.com/download/sample-tag-controls/validate/validate.css))\\n- **{^{slider/}}**\\n - *Download:* [slider.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.js)\\n(*Compressed:* [slider.min.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js.map)*)\\n
Used in the [slider](#samples/tag-controls/slider) JsViews sample\\n- **{^{areaslider/}}**\\n - *Download:* [areaslider.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.js)\\n(*Compressed:* [areaslider.min.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js.map)*)\\n
Used in the [areaslider](#samples/tag-controls/areaslider) JsViews sample\\n- **{^{spinblock/}}**\\n - *Download:* [spinblock.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.js)\\n(*Compressed:* [spinblock.min.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js.map)*)\\n
Used in the [spinblock](#samples/tag-controls/spinblock) JsViews sample\\n- **{^{colorpicker/}}**\\n - *Download:* [colorpicker.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.js)\\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\\n - *Download:* [colorpicker-multiformat.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.js)\\n(*Compressed:* [colorpicker-multiformat.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker@multiformat) JsViews sample\\n - *Download:* [colorpicker-multiformat2.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.js)\\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\\n - (*CSS:* [colorpicker.css](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.css) *TinyColor:* [tinycolor.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/tinycolor.js))\\n- **{^{jsonview/}}**\\n - *Download:* [jsonview.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.js)\\n(*Compressed:* [jsonview.min.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js.map)*)\\n
Used in the [jsonview](#samples/tag-controls/jsonview) JsViews sample\\n - (*CSS:* [jsonview.css](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.css))\\n\\nTo use the above tag controls simply include the corresponding libraries for your chosen tags, after loading *JsViews*:\\n\\n```jsr\\n...\\n\\n...\\n\\n\\n\\n...\\n```\"\n }\n ]\n },\n \"download/pages\": {\n \"title\": \"Example HTML pages – loading JsRender or JsViews \",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"download/pages-jsr-jq\",\n \"label\": \"JsRender with jQuery\"\n },\n {\n \"hash\": \"download/pages-jsr\",\n \"label\": \"JsRender without jQuery\"\n },\n {\n \"hash\": \"download/pages-jsv\",\n \"label\": \"JsViews\"\n }\n ]\n }\n ]\n },\n \"download/pages-jsr-jq\": {\n \"filter\": \"jsr\",\n \"title\": \"Loading JsRender with jQuery\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, using latest version of JsRender from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsRender <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\\n\\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\\n\\n```jsr\\n\\n```\"\n }\n ]\n },\n \"download/pages-jsr\": {\n \"filter\": \"jsr\",\n \"title\": \"Loading JsRender without jQuery\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, using latest version of JsRender from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsRender <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\\n\\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\\n\\n```jsr\\n\\n```\"\n }\n ]\n },\n \"download/pages-jsv\": {\n \"filter\": \"jsv\",\n \"title\": \"Loading JsViews\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, loading latest version of JsViews from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsViews <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\\n\\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\\n\\n```jsr\\n\\n```\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"
JsViews – separate files
\\n\\nUsually JsViews as a single file (*jsviews.js*), as in the example HTML page above.\\n\\nHowever it can be loaded as three separate files: *jsrender.js* (templated rendering), *jquery.observable.js* (observable data) and *jquery.views.js* (data-binding) -- as follows:\\n\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, loading JsViews as separate files\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"separate\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the three JsViews <script> tags above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\\n\\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\\n\\n```jsr\\n\\n\\n\\n```\"\n }\n ]\n },\n \"download/jqueryui-tagcontrols\": {\n \"filter\": \"jsv\",\n \"title\": \"jQuery UI tag controls library\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The *jQuery UI tag controls library: __jsviews-jqueryui-widgets.js__* is a set of tag controls based on jQuery UI widgets.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Download:\",\n \"text\": \"*Uncompressed (for development):* jsviews-jqueryui-widgets.js
\\n*Compressed (for production):* jsviews-jqueryui-widgets.min.js. (Source map available here)\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Tag controls:\",\n \"text\": \"The library provides the following tag controls (each integrating the corresponding jQuery UI widget):
\\n\\n- *__{{autocomplete/}}__* -- based on [jQuery UI autocomplete](https://jqueryui.com/autocomplete/)\\n([api](https://api.jqueryui.com/autocomplete/))\\n - used in the [autocomplete](#samples/tag-controls/jqui/autocomplete) sample\\n- *__{{accordion/}}__* -- based on [jQuery UI accordion](https://jqueryui.com/accordion/)\\n([api](https://api.jqueryui.com/accordion/))\\n - used in the [accordion](#samples/tag-controls/jqui/accordion) samples\\n- *__{{button/}}__* -- based on [jQuery UI button](https://jqueryui.com/button/)\\n([api](https://api.jqueryui.com/button/))\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{checkbox/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\\n([api](https://api.jqueryui.com/checkboxradio/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [Accessing widget APIs](#samples/tag-controls/jqui/api@widgetapi) samples\\n- *__{{radio/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\\n([api](https://api.jqueryui.com/checkboxradio/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\\n- *__{{controlgroup/}}__* -- based on [jQuery UI controlgroup](https://jqueryui.com/controlgroup/)\\n([api](https://api.jqueryui.com/controlgroup/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\\n- *__{{buttonset}}__* -- *deprecated and available only if using jQuery UI 1.11.4*\\n- *__{{datepicker/}}__* -- based on [jQuery UI datepicker](https://jqueryui.com/datepicker/)\\n([api](https://api.jqueryui.com/datepicker/))\\n - used in the [simple datepicker](#samples/tag-controls/jqui/datepicker/simple),\\n[datepicker variants](#samples/tag-controls/jqui/datepicker/variants),\\n[datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation)\\nand [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard) samples\\n- *__{{draggable/}}__* -- based on [jQuery UI draggable](https://jqueryui.com/draggable/)\\n([api](https://api.jqueryui.com/draggable/))\\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\\n- *__{{droppable/}}__* -- based on [jQuery UI droppable](https://jqueryui.com/droppable/)\\n([api](https://api.jqueryui.com/droppable/))\\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\\n- *__{{menu/}}__* -- based on [jQuery UI menu](https://jqueryui.com/menu/)\\n([api](https://api.jqueryui.com/menu/))\\n - used in the [menu](#samples/tag-controls/jqui/menu) samples\\n- *__{{progressbar/}}__* -- based on [jQuery UI progressbar](https://jqueryui.com/progressbar/)\\n([api](https://api.jqueryui.com/progressbar/))\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{resizable/}}__* -- based on [jQuery UI resizable](https://jqueryui.com/resizable/)\\n([api](https://api.jqueryui.com/resizable/))\\n - used in the [resizable](#samples/tag-controls/jqui/resizable) samples\\n- *__{{selectable/}}__* -- based on [jQuery UI selectable](https://jqueryui.com/selectable/)\\n([api](https://api.jqueryui.com/selectable/))\\n - used in the [selectable](#samples/tag-controls/jqui/selectable) samples\\n- *__{{selectmenu/}}__* -- based on [jQuery UI selectmenu](https://jqueryui.com/selectmenu/)\\n([api](https://api.jqueryui.com/selectmenu/))\\n - used in the [selectmenu](#samples/tag-controls/jqui/selectmenu) samples\\n- *__{{slider/}}__* -- based on [jQueryUI slider](https://jqueryui.com/slider/)\\n([api](https://api.jqueryui.com/slider/))\\n - used in the [simple slider](#samples/tag-controls/jqui/slider/simple),\\n[slider variants](#samples/tag-controls/jqui/slider/variants),\\n[slider with validation](#samples/tag-controls/jqui/slider/with-validation),\\n[sliders as color picker](#samples/tag-controls/jqui/slider/color-picker),\\n[Toolbar](#samples/tag-controls/jqui/toolbar),\\n[resizable](#samples/tag-controls/jqui/resizable),\\n[draggable - droppable](#samples/tag-controls/jqui/draggable-droppable),\\n[spinner](#samples/tag-controls/jqui/spinner) and\\n[progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{sortable/}}__* -- based on [jQuery UI sortable](https://jqueryui.com/sortable/)\\n([api](https://api.jqueryui.com/sortable/))\\n - used in the [sortable](#samples/tag-controls/jqui/sortable) samples\\n- *__{{spinner/}}__* -- based on [jQuery UI spinner](https://jqueryui.com/spinner/)\\n([api](https://api.jqueryui.com/spinner/))\\n - used in the [spinner](#samples/tag-controls/jqui/spinner)\\nand [resizable](#samples/tag-controls/jqui/resizable) samples\\n- *__{{timespinner/}}__* -- also based on [jQuery UI spinner](https://jqueryui.com/spinner/)\\n([api](https://api.jqueryui.com/spinner/))\\n - used in the [timespinner](#samples/tag-controls/jqui/timespinner) samples\\n- *__{{tabs/}}__* -- based on [jQuery UI tabs](https://jqueryui.com/tabs/)\\n([api](https://api.jqueryui.com/tabs/))\\n - used in the [tabs](#samples/tag-controls/jqui/tabs) samples\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"To use the above tag controls simply include the library after loading *jQuery UI* (recommended version *1.12.1* or later) and *JsViews*:\\n\\n```jsr\\n...\\n\\n\\n...\\n\\n\\n...\\n```\\n\\nIn addition, include an appropriate jQuery UI css class library, such as the default theme:\\n\\n```jsr\\n\\n```\\n\\nSee [jQuery UI widget controls samples](#samples/tag-controls/jqui).\\n\"\n }\n ]\n },\n \"download/jsrplugins\": {\n \"filter\": \"jsr\",\n \"title\": \"JsRender plugins\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"*JsRender* can be extended by including external libraries of custom tags, converters, helpers etc. -- such as the *jsonview.js* library, or the *jsrender-unicode.js* plugin.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"```jsr\\n...\\n\\n\\n\\n...\\n```\"\n },\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"unicode-plugin\",\n \"label\": \"Unicode support\"\n }\n ]\n }\n ]\n },\n \"download/jsvplugins\": {\n \"filter\": \"jsv\",\n \"title\": \"JsViews plugins and tag controls\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"*JsViews* can be extended by including external libraries of custom tag controls, converters, helpers, etc. -- such as the *[jQuery UI tag controls](#download/jqueryui-tagcontrols)* library (*jsviews-jqueryui-widgets.js*):\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"```jsr\\n...\\n\\n\\n...\\n```\"\n },\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"download/sample-tagcontrols\",\n \"label\": \"Sample tag controls\"\n },\n {\n \"hash\": \"download/jqueryui-tagcontrols\",\n \"label\": \"jQuery UI tag controls\"\n }\n ]\n }\n ]\n },\n \"typescript\": {\n \"title\": \"Typescript declaration files\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"Both *JsRender* and *JsViews* have TypeScript declaration files included in the npm package.\\n\\nFor *JsRender* the declaration file is at `typescript/jsrender/index.d.ts` in the [`jsrender` package](https://www.npmjs.com/package/jsrender).\\n\\nFor *JsViews* the declaration file is at `typescript/jsviews/index.d.ts` in the [`jsviews` package](https://www.npmjs.com/package/jsviews).\\n\\nThe TypeScript declaration files are also available at:\\n\\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsrender/index.d.ts) for *JsRender*\\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsviews/index.d.ts) for *JsViews*\\n\"\n }\n ]\n },\n \"unicode-plugin\": {\n \"title\": \"Unicode support: jsrender-unicode.js\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The *JsRender unicode library: __jsrender-unicode.js__* is a plugin which extends JsRender and JsViews template parsing so that unicode characters in data property names are supported. See the [*Unicode character support*](#unicode) topic.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Download\",\n \"text\": \"*Uncompressed (for development):* [jsrender-unicode.js](https://www.jsviews.com/download/plugins/jsrender-unicode.js)\\n\\n*Compressed (for production):* [jsrender-unicode.min.js](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js). (Source map available [here](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js.map))\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\"\n }\n ]\n }\n};"]} \ No newline at end of file +{"version":3,"sources":["contents-download.js"],"names":["content","$","views","documentation","download","useStorage","parseJSON","localStorage","getItem","title","path","sections","_type","text","anchor","download/sample-tagcontrols","download/pages","links","topics","hash","label","download/pages-jsr-jq","filter","download/pages-jsr","download/pages-jsv","download/jqueryui-tagcontrols","download/jsrplugins","download/jsvplugins","typescript","unicode-plugin"],"mappings":"AAAA,GAAIA,SAAUC,EAAEC,MAAMC,cAAcH,OAEpCA,SAAQI,SAAWJ,QAAQK,YAAcJ,EAAEK,UAAUC,aAAaC,QAAQ,gCAExEJ,UACEK,MAAS,iCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,yEAGRD,MAAS,OACTH,MAAS,mFACTI,KAAQ,y0BACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,2EACTI,KAAQ,41BACRC,OAAU,YAGVF,MAAS,OACTH,MAAS,GACTI,KAAQ,qDAGRD,MAAS,OACTH,MAAS,iEACTI,KAAQ,61BACRC,OAAU,WAGVF,MAAS,OACTH,MAAS,oCACTI,KAAQ,qnDACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,eACTI,KAAQ,qOACRC,OAAU,SAIhBC,+BACEN,MAAS,+CACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,20QAIdG,kBACEP,MAAS,0DACTC,KAAQ,GACRC,WAEIC,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,wBACRC,MAAS,yBAGTD,KAAQ,qBACRC,MAAS,4BAGTD,KAAQ,qBACRC,MAAS,eAMnBC,yBACEC,OAAU,MACVb,MAAS,+BACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,2EACTI,KAAQ,y2BACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,uFACTI,KAAQ,2yBAIdU,sBACED,OAAU,MACVb,MAAS,kCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,2EACTI,KAAQ,oyCACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,uFACTI,KAAQ,2yBAIdW,sBACEF,OAAU,MACVb,MAAS,kBACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,4EACTI,KAAQ,yzBACRC,OAAU,KAGVF,MAAS,OACTH,MAAS,sFACTI,KAAQ,6xBAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,4UAGRD,MAAS,OACTH,MAAS,uDACTI,KAAQ,o/BACRC,OAAU,aAGVF,MAAS,OACTH,MAAS,6FACTI,KAAQ,o+CAIdY,iCACEH,OAAU,MACVb,MAAS,iCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,+HAGRD,MAAS,OACTH,MAAS,YACTI,KAAQ,khBAGRD,MAAS,OACTH,MAAS,gBACTI,KAAQ,4wKAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,yvBAIda,uBACEJ,OAAU,MACVb,MAAS,mBACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,mLAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ,gRAGRD,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,iBACRC,MAAS,uBAMnBO,uBACEL,OAAU,MACVb,MAAS,mCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,mOAGRD,MAAS,OACTH,MAAS,GACTI,KAAQ;GAGRD,MAAS,QACTH,MAAS,GACTQ,SACAC,SAEIC,KAAQ,8BACRC,MAAS,wBAGTD,KAAQ,gCACRC,MAAS,8BAMnBQ,YACEnB,MAAS,+BACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,qoBAIdgB,kBACEpB,MAAS,uCACTC,KAAQ,GACRC,WAEIC,MAAS,OACTH,MAAS,GACTI,KAAQ,oPAGRD,MAAS,OACTH,MAAS,WACTI,KAAQ","file":"contents-download.min.js","sourcesContent":["var content = $.views.documentation.content;\n\ncontent.download = content.useStorage && $.parseJSON(localStorage.getItem(\"JsViewsDocTopics/download\")) ||\n{\n \"download\": {\n \"title\": \"JsRender and JsViews Downloads\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The latest version of both *JsRender* and *JsViews* is ***v1.0.15***\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsRender (jsviews.js) – rendering templates in the browser\",\n \"text\": \"***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jsrender.js\\n- *Compressed (for production):* jsrender.min.js. (Source map available here)\\n\\n\\n*JsRender is also available:*\\n- on CDN at [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\\n- using [Bower](http://bower.io/search/?q=jsrender) to install on the file system: `$ bower install jsrender`\\n\\n*Example HTML pages:*\\n- [Page loading JsRender with jQuery](#download/pages-jsr-jq)\\n- [Page loading JsRender without jQuery](#download/pages-jsr)\\n\\n*See:*\\n[JsRender Quickstart](#jsr-quickstart)\\n\\n\",\n \"anchor\": \"jsrender\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsViews (jsviews.js) – templates with data-binding\",\n \"text\": \"***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jsviews.js\\n- *Compressed (for production):* jsviews.min.js. (Source map available here)\\n\\n*JsViews is also available:*\\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\\n\\n*Example HTML page:*\\n- [Page loading JsViews](#download/pages-jsv)\\n\\n*See:* [JsViews Quickstart](#jsv-quickstart)\\n\\n(Note that *jsviews.js* includes all of *jsrender.js* code -- so *jsrender.js* does not need to be loaded first.)\",\n \"anchor\": \"jsviews\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"
Additional scenarios:
\\n\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"JsRender for Node.js – rendering templates on the server\",\n \"text\": \"A specific Node.js version of JsRender can be installed from npm, using:\\n\\n```js\\n$ npm install jsrender\\n```\\n\\nand then loaded in script using:\\n\\n```js\\nvar jsrender = require('jsrender');\\n```\\n\\nNow call regular JsRender APIs, such as:\\n\\n```js\\nvar tmpl = jsrender.templates('Name: {{:name}}
'); // Compile template from string\\n\\nvar html = tmpl.render({name: \\\"Jim\\\"}); // Render\\n```\\n\\nThis Node.js version of JsRender provides the complete set of JsRender APIs and features, together with integration with view-engines such as Express and Hapi, APIs for loading templates from the file system, and integration with Browserify for bundling server-side templates into client scripts for the browser.\\n\\n*See:* [JsRender Node.js Quickstart](#jsr-node-quickstart).\",\n \"anchor\": \"nodejs\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Loading JsViews as separate files\",\n \"text\": \"Instead of loading JsViews as a single file (*jsviews.js*), it can be loaded as three separate files: *jsrender.js* (providing templated rendering), *jquery.observable.js* (for observable data) and *jquery.views.js* (data-binding).\\n\\nThis can be useful in some scenarios. For example, if JsRender has already been loaded (by other components, for example) then full JsViews functionality may be added by loading only the additional *jquery.observable.js* and *jquery.views.js* files (rather than the complete composite file, *jsviews.js*).\\n\\n***Latest version*** *(To download, right-click and select \\\"Save as...\\\" from the menu):*\\n- *Uncompressed (for development):* jquery.observable.js and jquery.views.js\\n- *Compressed (for production):* jquery.observable.min.js and jquery.views.min.js. (Source maps available here and here)\\n\\n*jquery.observable.js and jquery.views.js are also available:*\\n- on CDN at [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\\n- using [Bower](http://bower.io/search/?q=jsviews) to install on the file system: `$ bower install jsviews`\\n\\n*Example HTML page:*\\n- [Page loading JsViews as separate files](#download/pages-jsv@separate)\\n\\n*See:* [JsViews Quickstart](#jsv-quickstart)\",\n \"anchor\": \"separate\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"CDN delivery\",\n \"text\": \"JsRender and JsViews are available on the ***[cdnjs](https://cdnjs.com)*** CDN at:\\n\\n- [cdnjs.com/libraries/jsrender](https://cdnjs.com/libraries/jsrender)\\n- [cdnjs.com/libraries/jsviews](https://cdnjs.com/libraries/jsviews)\",\n \"anchor\": \"cdn\"\n }\n ]\n },\n \"download/sample-tagcontrols\": {\n \"title\": \"Sample tag controls – plugin libraries\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The following tag controls, used in some of the samples, can be a starting point for your own custom tag controls. Some are very rudimentary, others are more advanced and complete. \\n\\n**Note:** If you use these controls in your own applications, it is recommended to download the files, or copy the code, rather than loading directly from this location, since the implementations (and associated APIs) may change over time as new versions of the samples are introduced.\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\\n\\n- **{^{tabs/}}**\\n - *Download:* [tabs.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.js)\\n(*Compressed:* [tabs.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.min.js.map)*)\\n
Used in the [tabs](#samples/tag-controls/tabs) sample. (See also discussion [here](#bindingpatterns@tabsctxprm))\\n
Alternative versions:
[tabs2.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.js)\\n(*Compressed:* [tabs2.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs2.min.js.map)*)\\n
Used in the [`setValue()/updateValue()` tabs sample](#bindingpatterns@tabs-setvalue-updatevalue).\\n
And:
[tabs3.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.js)\\n(*Compressed:* [tabs3.min.js](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs3.min.js.map)*)\\n
Used in the [two-way binding tabs sample](#bindingpatterns@tabs2way).\\n - (*CSS:* [tabs.css](https://www.jsviews.com/download/sample-tag-controls/tabs/tabs.css))\\n- **{^{multisel/}}**\\n - *Download:* [multiselect.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.js)\\n(*Compressed:* [multiselect.min.js](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/multiselect/multiselect.min.js.map)*)\\n
Used in the [multiselect](#samples/tag-controls/multiselect) sample\\n- **{^{tree/}}**\\n - *Download:* [tree-if.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.js)\\n(*Compressed:* [tree-if.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-if.min.js.map)*)\\n
Used in the [tree (if-binding)](#samples/tag-controls/tree/if-binding) sample\\n - *Download:* [tree-visible.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.js)\\n(*Compressed:* [tree-visible.min.js](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/treeview/tree-visible.min.js.map)*)\\n
Used in the [tree (visible-binding)](#samples/tag-controls/tree/visible-binding) sample\\n - (*CSS:* [tree.css](https://www.jsviews.com/download/sample-tag-controls/treeview/tree.css))\\n- **{^{textbox/}}**\\n - *Download:* [simple-textbox.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.js)\\n(*Compressed:* [simple-textbox.min.js](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/textbox/simple-textbox.min.js.map)*)\\n
Used in the [simple textbox](#samples/tag-controls/simple-textbox) sample\\n- **{^{validate/}}** and **{^{validation/}}** \\n - *Download:* [validate.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.js)\\n(*Compressed:* [validate.min.js](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/validate/validate.min.js.map)*)\\n
Used in the\\n [datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation),\\n [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard),\\n [slider with validation](#samples/tag-controls/jqui/slider/with-validation),
\\n [validate simple](#samples/tag-controls/validate/simple)\\n and the [validate tag control](#samples/tag-controls/validate) samples\\n - (*CSS:* [validate.css](https://www.jsviews.com/download/sample-tag-controls/validate/validate.css))\\n- **{^{slider/}}**\\n - *Download:* [slider.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.js)\\n(*Compressed:* [slider.min.js](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/slider/slider.min.js.map)*)\\n
Used in the [slider](#samples/tag-controls/slider) JsViews sample\\n- **{^{areaslider/}}**\\n - *Download:* [areaslider.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.js)\\n(*Compressed:* [areaslider.min.js](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/areaslider/areaslider.min.js.map)*)\\n
Used in the [areaslider](#samples/tag-controls/areaslider) JsViews sample\\n- **{^{spinblock/}}**\\n - *Download:* [spinblock.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.js)\\n(*Compressed:* [spinblock.min.js](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/spinblock/spinblock.min.js.map)*)\\n
Used in the [spinblock](#samples/tag-controls/spinblock) JsViews sample\\n- **{^{colorpicker/}}**\\n - *Download:* [colorpicker.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.js)\\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\\n - *Download:* [colorpicker-multiformat.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.js)\\n(*Compressed:* [colorpicker-multiformat.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker@multiformat) JsViews sample\\n - *Download:* [colorpicker-multiformat2.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.js)\\n(*Compressed:* [colorpicker.min.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker-multiformat2.min.js.map)*)\\n
Used in the [colorpicker](#samples/tag-controls/colorpicker) JsViews sample\\n - (*CSS:* [colorpicker.css](https://www.jsviews.com/download/sample-tag-controls/colorpicker/colorpicker.css) *TinyColor:* [tinycolor.js](https://www.jsviews.com/download/sample-tag-controls/colorpicker/tinycolor.js))\\n- **{^{jsonview/}}**\\n - *Download:* [jsonview.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.js)\\n(*Compressed:* [jsonview.min.js](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js). *Source map [here](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.min.js.map)*)\\n
Used in the [jsonview](#samples/tag-controls/jsonview) JsViews sample\\n - (*CSS:* [jsonview.css](https://www.jsviews.com/download/sample-tag-controls/jsonview/jsonview.css))\\n\\nTo use the above tag controls simply include the corresponding libraries for your chosen tags, after loading *JsViews*:\\n\\n```jsr\\n...\\n\\n...\\n\\n\\n\\n...\\n```\"\n }\n ]\n },\n \"download/pages\": {\n \"title\": \"Example HTML pages – loading JsRender or JsViews \",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"download/pages-jsr-jq\",\n \"label\": \"JsRender with jQuery\"\n },\n {\n \"hash\": \"download/pages-jsr\",\n \"label\": \"JsRender without jQuery\"\n },\n {\n \"hash\": \"download/pages-jsv\",\n \"label\": \"JsViews\"\n }\n ]\n }\n ]\n },\n \"download/pages-jsr-jq\": {\n \"filter\": \"jsr\",\n \"title\": \"Loading JsRender with jQuery\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, using latest version of JsRender from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsRender <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\\n\\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\\n\\n```jsr\\n\\n```\"\n }\n ]\n },\n \"download/pages-jsr\": {\n \"filter\": \"jsr\",\n \"title\": \"Loading JsRender without jQuery\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, using latest version of JsRender from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsRender <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsrender) *install:*\\n\\n-- Install JsRender on local file system, using `$ bower install jsrender`
-- then load `jsrender.js` or `jsrender.min.js` from the `bower_components/jsrender/` folder, as in:\\n\\n```jsr\\n\\n```\"\n }\n ]\n },\n \"download/pages-jsv\": {\n \"filter\": \"jsv\",\n \"title\": \"Loading JsViews\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, loading latest version of JsViews from www.jsviews.com\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the JsViews <script> tag above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\\n\\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load `jsviews.js` or `jsviews.min.js` from the `bower_components/jsviews/` folder, as in:\\n\\n```jsr\\n\\n```\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"
JsViews – separate files
\\n\\nUsually JsViews as a single file (*jsviews.js*), as in the example HTML page above.\\n\\nHowever it can be loaded as three separate files: *jsrender.js* (templated rendering), *jquery.observable.js* (observable data) and *jquery.views.js* (data-binding) -- as follows:\\n\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Example HTML page, loading JsViews as separate files\",\n \"text\": \"```jsr\\n\\n\\n\\n \\n \\n\\n \\n \\n \\n \\n\\n\\n \\n
\\n\\n \\n \\n\\n \\n\\n\\n```\",\n \"anchor\": \"separate\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Alternatives: replace the three JsViews <script> tags above by one of the following:\",\n \"text\": \"*Using latest version, minified, from www.jsviews.com:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Using specific version from CDN:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Using specific version, minified, from CDN:*\\n\\n```jsr\\n\\n\\n\\n```\\n\\n*Loading from the file system after* [Bower](http://bower.io/search/?q=jsviews) *install:*\\n\\n-- Install JsViews on local file system, using `$ bower install jsviews`
-- then load the correspondins `.js` or `.min.js` files from the `bower_components/jsviews/` folder, as in:\\n\\n```jsr\\n\\n\\n\\n```\"\n }\n ]\n },\n \"download/jqueryui-tagcontrols\": {\n \"filter\": \"jsv\",\n \"title\": \"jQuery UI tag controls library\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The *jQuery UI tag controls library: __jsviews-jqueryui-widgets.js__* is a set of tag controls based on jQuery UI widgets.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Download:\",\n \"text\": \"*Uncompressed (for development):* jsviews-jqueryui-widgets.js
\\n*Compressed (for production):* jsviews-jqueryui-widgets.min.js. (Source map available here)\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Tag controls:\",\n \"text\": \"The library provides the following tag controls (each integrating the corresponding jQuery UI widget):
\\n\\n- *__{{autocomplete/}}__* -- based on [jQuery UI autocomplete](https://jqueryui.com/autocomplete/)\\n([api](https://api.jqueryui.com/autocomplete/))\\n - used in the [autocomplete](#samples/tag-controls/jqui/autocomplete) sample\\n- *__{{accordion/}}__* -- based on [jQuery UI accordion](https://jqueryui.com/accordion/)\\n([api](https://api.jqueryui.com/accordion/))\\n - used in the [accordion](#samples/tag-controls/jqui/accordion) samples\\n- *__{{button/}}__* -- based on [jQuery UI button](https://jqueryui.com/button/)\\n([api](https://api.jqueryui.com/button/))\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{checkbox/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\\n([api](https://api.jqueryui.com/checkboxradio/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [Accessing widget APIs](#samples/tag-controls/jqui/api@widgetapi) samples\\n- *__{{radio/}}__* -- based on [jQuery UI checkboxradio](https://jqueryui.com/checkboxradio/)\\n([api](https://api.jqueryui.com/checkboxradio/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\\n- *__{{controlgroup/}}__* -- based on [jQuery UI controlgroup](https://jqueryui.com/controlgroup/)\\n([api](https://api.jqueryui.com/controlgroup/))\\n(requires jQuery UI version 1.12.1 or later)\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar) sample\\n- *__{{buttonset}}__* -- *deprecated and available only if using jQuery UI 1.11.4*\\n- *__{{datepicker/}}__* -- based on [jQuery UI datepicker](https://jqueryui.com/datepicker/)\\n([api](https://api.jqueryui.com/datepicker/))\\n - used in the [simple datepicker](#samples/tag-controls/jqui/datepicker/simple),\\n[datepicker variants](#samples/tag-controls/jqui/datepicker/variants),\\n[datepicker with validation](#samples/tag-controls/jqui/datepicker/with-validation)\\nand [datepicker with validation wizard](#samples/tag-controls/jqui/datepicker/with-validation-wizard) samples\\n- *__{{draggable/}}__* -- based on [jQuery UI draggable](https://jqueryui.com/draggable/)\\n([api](https://api.jqueryui.com/draggable/))\\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\\n- *__{{droppable/}}__* -- based on [jQuery UI droppable](https://jqueryui.com/droppable/)\\n([api](https://api.jqueryui.com/droppable/))\\n - used in the [draggable - droppable](#samples/tag-controls/jqui/draggable-droppable) samples\\n- *__{{menu/}}__* -- based on [jQuery UI menu](https://jqueryui.com/menu/)\\n([api](https://api.jqueryui.com/menu/))\\n - used in the [menu](#samples/tag-controls/jqui/menu) samples\\n- *__{{progressbar/}}__* -- based on [jQuery UI progressbar](https://jqueryui.com/progressbar/)\\n([api](https://api.jqueryui.com/progressbar/))\\n - used in the [Toolbar](#samples/tag-controls/jqui/toolbar)\\nand [progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{resizable/}}__* -- based on [jQuery UI resizable](https://jqueryui.com/resizable/)\\n([api](https://api.jqueryui.com/resizable/))\\n - used in the [resizable](#samples/tag-controls/jqui/resizable) samples\\n- *__{{selectable/}}__* -- based on [jQuery UI selectable](https://jqueryui.com/selectable/)\\n([api](https://api.jqueryui.com/selectable/))\\n - used in the [selectable](#samples/tag-controls/jqui/selectable) samples\\n- *__{{selectmenu/}}__* -- based on [jQuery UI selectmenu](https://jqueryui.com/selectmenu/)\\n([api](https://api.jqueryui.com/selectmenu/))\\n - used in the [selectmenu](#samples/tag-controls/jqui/selectmenu) samples\\n- *__{{slider/}}__* -- based on [jQueryUI slider](https://jqueryui.com/slider/)\\n([api](https://api.jqueryui.com/slider/))\\n - used in the [simple slider](#samples/tag-controls/jqui/slider/simple),\\n[slider variants](#samples/tag-controls/jqui/slider/variants),\\n[slider with validation](#samples/tag-controls/jqui/slider/with-validation),\\n[sliders as color picker](#samples/tag-controls/jqui/slider/color-picker),\\n[Toolbar](#samples/tag-controls/jqui/toolbar),\\n[resizable](#samples/tag-controls/jqui/resizable),\\n[draggable - droppable](#samples/tag-controls/jqui/draggable-droppable),\\n[spinner](#samples/tag-controls/jqui/spinner) and\\n[progressbar](#samples/tag-controls/jqui/progressbar) samples\\n- *__{{sortable/}}__* -- based on [jQuery UI sortable](https://jqueryui.com/sortable/)\\n([api](https://api.jqueryui.com/sortable/))\\n - used in the [sortable](#samples/tag-controls/jqui/sortable) samples\\n- *__{{spinner/}}__* -- based on [jQuery UI spinner](https://jqueryui.com/spinner/)\\n([api](https://api.jqueryui.com/spinner/))\\n - used in the [spinner](#samples/tag-controls/jqui/spinner)\\nand [resizable](#samples/tag-controls/jqui/resizable) samples\\n- *__{{timespinner/}}__* -- also based on [jQuery UI spinner](https://jqueryui.com/spinner/)\\n([api](https://api.jqueryui.com/spinner/))\\n - used in the [timespinner](#samples/tag-controls/jqui/timespinner) samples\\n- *__{{tabs/}}__* -- based on [jQuery UI tabs](https://jqueryui.com/tabs/)\\n([api](https://api.jqueryui.com/tabs/))\\n - used in the [tabs](#samples/tag-controls/jqui/tabs) samples\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"To use the above tag controls simply include the library after loading *jQuery UI* (recommended version *1.12.1* or later) and *JsViews*:\\n\\n```jsr\\n...\\n\\n\\n...\\n\\n\\n...\\n```\\n\\nIn addition, include an appropriate jQuery UI css class library, such as the default theme:\\n\\n```jsr\\n\\n```\\n\\nSee [jQuery UI widget controls samples](#samples/tag-controls/jqui).\\n\"\n }\n ]\n },\n \"download/jsrplugins\": {\n \"filter\": \"jsr\",\n \"title\": \"JsRender plugins\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"*JsRender* can be extended by including external libraries of custom tags, converters, helpers etc. -- such as the *jsonview.js* library, or the *jsrender-unicode.js* plugin.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"```jsr\\n...\\n\\n\\n\\n...\\n```\"\n },\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"unicode-plugin\",\n \"label\": \"Unicode support\"\n }\n ]\n }\n ]\n },\n \"download/jsvplugins\": {\n \"filter\": \"jsv\",\n \"title\": \"JsViews plugins and tag controls\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"*JsViews* can be extended by including external libraries of custom tag controls, converters, helpers, etc. -- such as the *[jQuery UI tag controls](#download/jqueryui-tagcontrols)* library (*jsviews-jqueryui-widgets.js*):\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"```jsr\\n...\\n\\n\\n...\\n```\"\n },\n {\n \"_type\": \"links\",\n \"title\": \"\",\n \"links\": [],\n \"topics\": [\n {\n \"hash\": \"download/sample-tagcontrols\",\n \"label\": \"Sample tag controls\"\n },\n {\n \"hash\": \"download/jqueryui-tagcontrols\",\n \"label\": \"jQuery UI tag controls\"\n }\n ]\n }\n ]\n },\n \"typescript\": {\n \"title\": \"Typescript declaration files\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"Both *JsRender* and *JsViews* have TypeScript declaration files included in the npm package.\\n\\nFor *JsRender* the declaration file is at `typescript/jsrender/index.d.ts` in the [`jsrender` package](https://www.npmjs.com/package/jsrender).\\n\\nFor *JsViews* the declaration file is at `typescript/jsviews/index.d.ts` in the [`jsviews` package](https://www.npmjs.com/package/jsviews).\\n\\nThe TypeScript declaration files are also available at:\\n\\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsrender/index.d.ts) for *JsRender*\\n- [*index.d.ts*](https://www.jsviews.com/download/typescript/jsviews/index.d.ts) for *JsViews*\\n\"\n }\n ]\n },\n \"unicode-plugin\": {\n \"title\": \"Unicode support: jsrender-unicode.js\",\n \"path\": \"\",\n \"sections\": [\n {\n \"_type\": \"para\",\n \"title\": \"\",\n \"text\": \"The *JsRender unicode library: __jsrender-unicode.js__* is a plugin which extends JsRender and JsViews template parsing so that unicode characters in data property names are supported. See the [*Unicode character support*](#unicode) topic.\"\n },\n {\n \"_type\": \"para\",\n \"title\": \"Download\",\n \"text\": \"*Uncompressed (for development):* [jsrender-unicode.js](https://www.jsviews.com/download/plugins/jsrender-unicode.js)\\n\\n*Compressed (for production):* [jsrender-unicode.min.js](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js). (Source map available [here](https://www.jsviews.com/download/plugins/jsrender-unicode.min.js.map))\\n\\n*(To download, right-click and select “Save as…” from the menu.)*\"\n }\n ]\n }\n};"]} \ No newline at end of file diff --git a/documentation/contents-getstarted.min.js b/documentation/contents-getstarted.min.js index 9855b8ca..befdc821 100644 --- a/documentation/contents-getstarted.min.js +++ b/documentation/contents-getstarted.min.js @@ -1,3 +1,3 @@ -var content=$.views.documentation.content;content.getstarted=content.useStorage&&$.parseJSON(localStorage.getItem("JsViewsDocTopics/getstarted"))||{getstarted:{title:"Getting started",path:"",sections:[{_type:"links",title:"",links:[],topics:[{hash:"jsrplaying",label:"Playing with JsRender"},{hash:"jsr-quickstart",label:"JsRender Quickstart"},{hash:"jsr-node-quickstart",label:"JsRender Node.js Quickstart"},{hash:"jsvplaying",label:"Playing with JsViews"},{hash:"jsv-quickstart",label:"JsViews Quickstart"}]},{_type:"links",title:"Other links:",links:[],topics:[{_type:"topic",hash:"jsrapi",label:"JsRender API - Templated UI"},{_type:"topic",hash:"jsvapi",label:"JsViews API - Data-driven UI"},{_type:"topic",hash:"jsoapi",label:"JsObservable API - Observing data"},{_type:"topic",hash:"samples",label:"Samples"}]}]},jsrplaying:{filter:"jsr",path:"",title:"Playing with JsRender",sections:[{_type:"para",title:"",text:"(***See also:*** [JsRender Quickstart](#jsr-quickstart))"},{_type:"para",title:"JsRender templates",text:"JsRender templates are probably the most powerful and at the same time the most intuitive of template engines out there.\n\nTo get started, let's just create a template, and run it against some data. The way you do that in code is like this:"},{_type:"template",title:"Here's a template:",markup:" {{:name}}"},{_type:"code",title:"Here's some code:",code:'var person = {\n name: "Adriana"\n};\n\nvar html = myTemplate.render(person);'},{_type:"para",title:"And here it is as a working sample:",text:"Let's go straight to a sample showing how that template renders against the data. Like all the samples in this documentation, it is a working sample that you can experiment with. \n",anchor:""},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'You can hit Try it, modify the template or the data, then hit Run Code to see the effect immediately in the running sample above.\n\nFor example, replace the data with the following:\n\n```json\n[\n {\n "name": "Adriana"\n },\n {\n "name": "Robert"\n }\n]\n```\n\nOr try replacing the template with the following:\n\n```jsr\n\n \n \n
Name{{:name}}
\n```'}],title:"A first template:",markup:" {{:name}}",data:{name:"Adriana"},height:"60",onlyJsRender:!0,anchor:""},{_type:"para",title:"",text:"OK -- a few interesting things there. For example, if you tried changing the data, and provided an array instead of an object, you will have seen that the template rendered once for each item in the array.\n\nBut before we look at more details on the template rendering, let's look at how you get a compiled template object for your markup (the `myTemplate` object in the code example above) so you can call the render method.\n\nThe next working example shows you that."},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'Take a look at the Code, Full Code or Try It tabs.\n\nIn the html you see that we put our markup in a script block with `type="text/x-jsrender"`...\n\n```jsr\n\n```\n\n... and then in the code we call the `$.templates()` method with a jQuery selector for that script block, to get the compiled template.\n\n```js\nvar myTemplate = $.templates("#personTmpl");\n```\n\nAfter that we run the code we have already seen to render the template against our data, and get the HTML output as a string. (We pass the data -- this time we used an array -- to the `render()` method of our compiled template.)\n\n\n```js\nvar html = myTemplate.render(people);\n```\n\nFinally we simply insert that output into the HTML DOM using the jQuery `html()` method.\n\nAgain, you can play with the sample in the Try it tab, by changing the data, or the markup, or the code.\n\nFor example if you change the template to produce a ``, you will want to insert the output into the `tbody` of a `table`, by adding a `` target container -- as in the following:\n\n```jsr\n
\n\n\n```'}],html:'
\n\n',code:'var myTemplate = $.templates("#personTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n];\n\nvar html = myTemplate.render(people);\n\n$("#peopleList").html(html);',title:"Complete code for template rendering:",onlyJsRender:!0,height:"80"},{_type:"para",title:"What else is in templates?",text:"JsRender template have a very rich feature-set, yet a small number of predefined tags. The links at the bottom of this topic give details on some of the features.\n\n But let's try one more sample, where this time, instead of passing our `people` array to the `template.render()` method, we will pass an object (our `app` object) which will have a `people` property. Now in the template we will use a `{{for}}` tag to iterate over the `people`. \n\nAlso we'll use an `{{if}}` tag to test whether the `person` has a `nickname` field, and if so we will render out the nickname too..."},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:"The `{{for people}}...{{/for}}` block tag, in the template, looks at the current data item (the `app` that we passed in) and navigates a data-path that you provide as parameter -- in this case `people`.\n\nJsRender supports different kinds of paths, as well as expressions of various kinds. The data-path can be something like `address.street`, with 'dot' separators, but in this case it is simply the `people` property of the `app` object.\n\nNow, because `people` is an array, JsRender will render the content of the `{{for}}...{{/for}}` block once for each item in the array.\n\nWithin the block the current item is now the `person`(item in the `people` array), and there we have an `{{if nickname}}...{{/if}}` block tag, which takes an expression as parameter.\n\nIn this case the expression is another data-path, `nickname`. So it renders the content of the `{{if}}...{{/if}}` block if the `nickname` is not `undefined` (or is not `null`, or the empty string).\n\nYou can experiment by replacing the `{{if nickname}}` expression. For example, try giving Adriana the nickname Adriana! Then try replacing `{{if nickname}}` with:\n\n```jsr\n{{if nickname && nickname !== name}} \n```"}],html:'
\n\n',code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert",\n nickname: "Bob"\n }\n ];\n\n app = {\n people: people\n };\n\nvar html = myTemplate.render(app);\n\n$("#peopleList").html(html);\n',onlyJsRender:!0,title:"Some template tags...",height:"110"},{_type:"para",title:"Next:",text:"[JsRender Quickstart](#jsr-quickstart)"},{_type:"links",title:"Links:",links:[],topics:[{_type:"topic",hash:"jsrtags",label:"Built-in template tags"},{_type:"topic",hash:"jsrapi",label:"JsRender API"},{_type:"topic",hash:"samples/jsr",label:"JsRender samples"}]}]},jsvplaying:{filter:"jsv",title:"Playing with JsViews",path:"",sections:[{_type:"para",title:"",text:"(***See also:*** *[JsViews Quickstart](#jsv-quickstart)*)"},{_type:"para",title:"JsViews: A platform for data-bound single-page apps",text:'JsViews provides dynamic data-bound views, built on top of JsRender templates. It "brings JsRender templates to life". So let\'s start with the JsRender template we ended up with in the *[Playing with JsRender](#jsrplaying)* topic:',anchor:"spa"},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'If you look at the code you will see it is almost identical to the previous JsRender sample. One difference though: the two lines for rendering the template as a string and then inserting it into the DOM:\n\n```js\nvar html = myTemplate.render(app);\n\n$("#peopleList").html(html);\n```\n\n...have been replaced by a single line:\n\n```js\nmyTemplate.link("#peopleList", app);\n```\n\nThat line of code actually does three things:\n\n- First it renders the template against the data (second parameter)\n- Next, it inserts the resulting HTML under the container element (first parameter)\n- Finally, it *data-binds the HTML* against the data'}],url:"",html:'
\n\n\n',code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n ];\n\nvar app = {\n people: people\n };\n\nmyTemplate.link("#peopleList", app);',height:"110",title:"Using the template.link() method",anchor:"link"},{_type:"para",title:"Data-linking",text:'In JsViews we refer to *data-linking*. It means data-binding, but refers to the particular approach used in JsViews, which is based on *observable objects and arrays*.\n\nIf you take an object and assign a new value to one of its properties (fields), there is no corresponding event that can allow other code to know you modified the object. Similarly, mutating an array will not provide any events or notifications to other code.\n\nThat\'s where *JsObservable* comes in. It provides ways of changing objects and arrays, *observably*.\n\nThe next sample shows what happens when the template renders against an array, and then that array is modified \'observably\' (*observable collection change*).\n\n```js\n$("#addBtn").on("click", function() {\n $.observable(people).insert({name: "name"});\n});\n```',anchor:"datalink"},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:"Click on the Add button, and a new row gets added to the array. The template rendering automatically updates to show the new row.\n\nIt uses the code:\n\n```js\n$.observable(people).insert({name: \"name\"});\n```\n\nBut notice that the template is different from previously. It has that extra carat sign: `{^{for ...}}`. Try removing the `^` and then clicking the Add button. -- Nothing happens.\n\nAny regular JsRender tag `{{sometag ...}}` -- whether built-in or custom -- can be data-linked by adding the `^`: `{^{sometag ...}}`. That tag has become 'dynamic' and will re-render itself whenever it needs to, if the underlying data changes ('observably').\n\nRemove the `^`, and the tag is 'dead'..."}],html:'
\n\n',code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n ];\n\nvar app = {\n people: people\n };\n\nmyTemplate.link("#peopleList", app);\n\n$("#addBtn").on("click", function() {\n $.observable(people).insert({name: "name"});\n});',height:"206",title:"Data-linked tags and observable arrays and objects "},{_type:"para",title:"",text:"What about changing an object? Let's modify the `name` on a `person` object (*observable property change*):"},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:"Here is the code when you click Change:\n\n```js\nfunction() {\n var dataItem = $.view(this).data;\n\n $.observable(dataItem).setProperty(\"name\", dataItem.name + counter++);\n}\n```\n\nThe code for `setProperty` should make sense, given what we have already seen. You call `$.observable(myObject)` to get an 'observable form of your object' which will provide you with appropriate methods you can call: `setProperty(...)` if it was an object, and `insert`, `remove`, `refresh` and `move`, if it was an array. \n\nBut in our case, the first problem is to know which `person` object should be modified by this particular button. The `this` pointer in the click-handler is the element, and our code:\n\n```js\nvar dataItem = $.view(this).data;\n```\n\n-- let's us get the `view` (an 'instance' of a rendered template, or template tag block) and hence to the data item (in this case the `person`) we want to modify.\n\nAs in the previous sample, we have 'brought a tag to life' by writing:\n\n```jsr\n{^{:name}}\n```\n\nChange it back to:\n\n```jsr\n{{:name}}\n```\n\nand you will see that the name no longer updates when you click on the Change button."}],html:'
\n\n',height:"206",code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n ];\n\nvar app = {\n people: people\n };\n\nvar counter = 1;\n\nmyTemplate.link("#peopleList", app);\n\n$("#addBtn").on("click", function() {\n $.observable(people).insert({name: "name"});\n});\n\n$("#peopleList").on("click", ".changeBtn", function() {\n var dataItem = $.view(this).data;\n $.observable(dataItem).setProperty("name", dataItem.name + counter++);\n});\n',title:"Observable change: setProperty",anchor:"setprop"},{_type:"para",title:"Data-linked tags...",text:"So far we have used data-linked template tags for data-linking, as in:\n\n```jsr\n{^{:name}}\n```\n\nBut the fact that the data-linked tag is wrapped by an HTML element means that if we want we can replace it by an 'element-based' syntax:",anchor:"tagorelem"},{_type:"template",title:"...or element-based data-linking",markup:'',anchor:""},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'So this version of the sample uses:\n\n```jsr\n\n```\n\nTry changing it back to the data-linked tag syntax, with `{^{`. You will see that the sample works just the same...'}],html:'
\n\n',code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n ];\n\nvar app = {\n people: people\n };\n\nvar counter = 1;\n\nmyTemplate.link("#peopleList", app);\n\n$("#addBtn").on("click", function() {\n $.observable(people).insert({name: "name"});\n});\n\n$("#peopleList").on("click", ".changeBtn", function() {\n var dataItem = $.view(this).data;\n $.observable(dataItem).setProperty("name", dataItem.name + counter++);\n});\n',height:"206",title:'Element-based linking: "data-link"',anchor:"elem"},{_type:"para",title:"",text:"But what about *two-way* data-binding?"},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'This is where the element-based data-linking comes into its own. The textbox uses declarative binding:\n\n```jsr\n\n\n \n\n```\n\nThe `` and the `` are both data-linked. The underlying data gets modified when you change the name in the textbox -- and updates the ``, without you needing to write any propertyChange code at all.'}],title:"Two-way data-binding",html:'
\n\n',code:'var myTemplate = $.templates("#peopleTmpl");\n\nvar people = [\n {\n name: "Adriana"\n },\n {\n name: "Robert"\n }\n ];\n\nvar app = {\n people: people\n };\n\nvar counter = 1;\n\nmyTemplate.link("#peopleList", app);\n\n$("#addBtn").on("click", function() {\n $.observable(people).insert({name: "name"});\n});\n',height:"206",anchor:"twoway"},{_type:"para",title:"A more complete sample:",text:"This was just a glimpse of some of the richness of JsViews data-linking. The next sample lets you see a more fully-fledged example, which you can experiment with.\n\nFor more details on JsViews features and APIs see the *Links* section below.",anchor:"selectsample"},{_type:"sample",typeLabel:"Sample:",sectionTypes:{para:"para",data:"data",template:"template",code:"code",sample:"sample"},sections:[{_type:"para",title:"",text:'This sample includes binding to `\n```\n\nAnd also to each `