Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: gh-pages
Commits on Mar 5, 2015
  1. Commit 63 (Post Beta)

    authored
    MINOR BREAKING CHANGES
    - Removed minor undocumented feature where custom tags
      could return false from init.
    
    NEW FEATURE
    - A new itemVar feature allows you to set a context variable
      on any tag, to provide access to the block context, even
      within nest tag blocks below.
      e.g. {{for people itemVar="~person"}}
      See #256
      and http://jsfiddle.net/BorisMoore/zgr90L3s/
    
    - Many new unit tests added for the above new feature.
    
    - Some small additional bug fixes.
Commits on Feb 9, 2015
  1. Commit 62 (Post Beta)

    authored
    - Tag inheritance now supports multi-level inheritance with
      easy invocation of the base class implementation using
      this.base(...) or this.baseApply(arguments):
      e.g.
      {
        baseTag: "for",
        onAfterLink: function() {
          ...
          this.baseApply(arguments);
        }
        ...
      }
    
      Similarly for callbacks declared declaratively on tags:
      e.g.
      {{for items onAfterLink=~myHelper onUpdate=~dbg}}...
    
      function myHelper() {
        ...
        this.baseApply(arguments);
      }
    
    - Many new unit tests added for the above feature.
    
    - Some small additional bug fixes.
Commits on Dec 25, 2014
  1. Commit 61 (Post Beta)

    authored
    - Improvements and bug fixes for complex templates using
      computed properties, with or without parameters,
      including computed values which return objects, and
      using paths which chain computed values - for example:
      {{:a.b().c.d.e(p, q).f}}
    
    - Full support for deep paths with computed values and
      optionally involving complex expressions - for example:
      {{:a.b().c.d.e(p + (r - 1), q + 't').f + 'x' + g}}
    
    - Improved support for custom tag inheritance from
      base tag - e.g.: {baseTag: "for", ...}
    
    Bug Fixes
    BorisMoore/jsviews#285
    BorisMoore/jsviews#287
    BorisMoore/jsviews#289
    
    - Several small additional bug fixes.
Commits on Oct 15, 2014
  1. Commit 60 (Post Beta)

    authored
    - Sync with updated version 60 of JsViews.
Commits on Sep 30, 2014
  1. Commit 59 (Post Beta)

    authored
    - sync with updated version 59 of JsViews.
Commits on Sep 20, 2014
  1. Commit 58 (Post Beta)

    authored
    - sync with updated version 58 of JsViews
Commits on Sep 19, 2014
  1. Commit 57 (Post Beta)

    authored
    Some small bug fixes and improvements, as well as the following specific
    fix and improvement:
    
    Bug fixes:
      #241
    
    Improvements:
      - ~tag.parents or ~parentTags now includes the current tag
Commits on Aug 11, 2014
  1. Commit 56(Post Beta)

    authored
    IMPORTANT: This commit corrects an important IE8 bug that was
    in the previous commit (55)
    
    This commit also includes some significant updates and improvements:
    
    - New API for creating derived tags - simply specify "baseTag" on
      the custom tag declaration:
    
      $.views.tags({
        range: {
          // Inherit from {{for}} tag
          baseTag: $.views.tags["for"],
          ...
    
      See samples: http://www.jsviews.com/#samples/jsr/tags/extend-for
      and http://www.jsviews.com/#samples/tag-controls/range
    
    - Bug fixes:
      #238
      BorisMoore/jsviews#267
Commits on Jul 23, 2014
  1. Commit 55 (Post Beta)

    authored
    - Sync with JsViews update 55 (with new 'trigger' feature)
    - Several minor bug fixes
Commits on Jul 11, 2014
  1. Commit 54 (Post Beta)

    authored
    Note that this update brings important perf optimizations and many
    significant feature improvements, with corresponding changes to the
    implementation.
    For normal usage patterns these do not correspond to breaking changes.
    However there could possibly be breaking changes on a few advanced
    scenarios.
    If appropriate, please file issues if breaking changes are
    observed. See also the samples and unit tests for changes that take
    advantage of new features below.
    
    New features and improvements
    
    - Many major performance improvements, including much improved
      performance for {{>...}} - and optimizations allowing extremely
      fast rendering for render() in the case of simple templates.
      (See http://borismoore.github.io/jsrender/test/perf-compare.html)
    
    - Support for overriding error messages.
      $.views.settings({onError: function(...) {...}});
      (See unit tests. Examples to follow.)
    
    - BREAKING: {{:expression noError=true}} is no longer supported.
      Replaced by more powerful and extensible 'onError' feature below.
      (onError=null or onError='' replaces previous noError=true)
    
    - New 'onError' feature: fallback strings or onError handlers for
      any tag instance: e.g. {{:missing.object onError='fallbackString'}}
      or {{myTag onError=myErrorHandler/}}.
      (See unit tests. Examples to follow.)
    
    - tagCtx.params now provides stuctured information about props and
      args - parameter string for each
    
    - $.views.sub.parse(parameterExpression) converts any parameter
      expression to corresponding code.
      Include bindingsArray:
      $.views.sub.parse(parameterExpression, bindingArray) to obtain
      list of path expressions for dependencies
    
    - Custom tags: Having an empty template: "" in tag definition is
      now supported.
    
    Associated bug fixes for JsViews:
      BorisMoore/jsviews#251
      BorisMoore/jsviews#258
      BorisMoore/jsviews#259
      BorisMoore/jsviews#262
      BorisMoore/jsviews#263
      - Fix for collision with tags which add props() jQuery method:
      see: http://stackoverflow.com/questions/23860085/jsrender-js-fails-when-i-add-bootstrap-tag-js/23926792#23926792
Commits on May 3, 2014
  1. Commit 53 (Post Beta)

    authored
    Bug fixes:
      #236
    
    Small optimization changes - sync with update 53 of JsViews
Commits on Mar 25, 2014
  1. Commit 52 (Post Beta)

    authored
    Note that this update brings significant feature improvements
    with corresponding changes to the implementation. For normal
    usage patterns these do not correspond to breaking changes. However
    there could possibly be breaking changes on a few advanced scenarios.
    If appropriate, please file issues if breaking changes are
    observed. See also the samples and unit tests for changes that take
    advantage of new features below.
    
    New features and improvements
    - {{: xxx}} can now be used without arguments, so {{:}} is equivalent
      to {{:#data}}. This is a similar pattern to {{for}} {{include}} etc.
    
    - autoBind feature for custom tags allows a custom tag without
      argument to bind to current data context, so {{mytag/}} is
      equivalent to {{mytag #data/}}. This is achieved by setting
      autoBind: true on the tag definition.
    
    - Can now define a converter for the first arg on any tag - custom
      or built-in. e.g. {{for myarray convert=~reverseArray}}
      or {{mycustomtag name convert='someRegisteredConverter'/}}
      or <div data-link="name convert=formatName" /}} (in this example
      the person object has a name property and a formatName method)
    
    - Similarly any tag with two-way binding can have a convertBack
      converter:
      e.g. <input data-link="name convert=~SomeHelper convertBack=SomeMethodOnDataObject" />
      or {^{slider speed convert=~fromMphToKmH convertBack=fromKmHtoMph/}}
      or: {^{myTextBoxTag convert=~myCnvtHelper convertBack='myregisteredConverter'/}}
    
    - Improved support for rendering arrays without iteration:
      render(array, helpers) will iterate over the array, but you can
      now pass a 'noIteration' boolean. So render(array, true) renders
      anv array without iteration, and similarly, render(array, helpers, true)
      now renders an array without iteration while passing in helpers.
    
      Within methods and events of custom tags:
      tagCtx.render() renders against the current data object,
      tagCtx.render(someArray) iterates over the array
      tagCtx.render(someArray, true) or tagCtx.render(someArray, helpers, true)
      renders without iteration.
    
    - In a custom tag, a template can now be assigned (determined
      dynamically) in the init method simply by setting:
      this.template = templateObjectOrMarkupString;
      It is no longer necessary to write:
      this.template = tagCtx.tmpl = templateObjectOrMarkupString;
    
    - Support for declaring event handlers directly on tags or
      data-link expressions: {{anyTag onXxx=myXxxHandler /}}
      This can be used for standard event handlers such as onUpdate,
      onBeforeChange etc.
      e.g. <textarea data-link="text onUpdate=updateMethodOnViewModelObject"></textarea>
    
    - There is a new helper utility function for validation of
      HTML markup in JsViews: $.views.utility.validate(markupString)
      This could be used in the following example:
      $.views.helpers("validateMarkup", $.views.utility.validate);
      <textarea data-link="text onBeforeChange=~validateMarkup"></textarea>
    
    - Improved error message if JsViews or JsObservable is loaded without jQuery
    
    Bug fixes:
    - Fix for #231
    
    - Fix for a memory leak issue
    
    - Fixes for some issues with radio buttons and with multiselect
    
    - Fixes for bugs in some samples
Commits on Jan 24, 2014
  1. Commit 51 (Post Beta)

    authored
Commits on Jan 22, 2014
  1. Commit 50 (Post Beta)

    authored
    - Fix for #228
Commits on Jan 17, 2014
  1. Commit 49 (post beta)

    authored
    Changing commit number to 49 to align with commit 49 of jsviews - (fix for BorisMoore/jsviews#237)
Commits on Jan 15, 2014
  1. Commit 48 (post beta)

    authored
    New features and improvements:
    - {{for}} {{include}} {{props}} now support omitting the data path
      parameter. When omitted, renders current data, - equivalent to
      {{for #data}} etc. {{for}} iterates if current data is an array
      {{include tmpl=…/}} renders template for current data, and does not
      iterate if current data is an array.
    - Improved API for settings, plus bug fixes. Switch debugMode using
      $.views.settings.debugMode(boolean);. Switch other settings such as
      tryCatch using $.views.settings({tryCatch: false}).
    - New support for rendering arrays, without iteration (previously
      "layout = true" mode). Pass in value true for optional 'noIteration'
      parameter as in:
      template.render(data, context[, noiteration])
      tagCtx.render(someArray, context[, noIteration])
    - New support for custom tags with just a template - they no longer need
      a render method. They will iterate over arrays. To render arrays
      without iteration provide a render method which calls
      tagCtx.render(data, options, true);
      Samples to follow.
    - New support for a DataMap feature used by {{props}} implementation.
      More information/samples/documentation and updates to follow.
    - New built-in tag, converter and helper provided for debugging:
      {{dbg/}}, {{dbg:somePath}}  {{myconverter:somePath:dbg}} ~dbg()
      When debugMode is true, the debugger will break at that point during
      template rendering.
    - New {{jsonview/}} sample tag control. Insert anywhere in a template
      and it will render the current data item as JSON syntax.
      Use {{jsonview path.to.object.or.array/}} to show JSON
      for nested objects.
    
    BREAKING CHANGES:
    - Whenever the value null is returned from tag, the result is now
      consistently to render nothing (empty string). Previously {{:nullValue}}
      returned the empty string, but {^{:nullValue}}, {{attr:nullValue}} and
      {converterReturningNull:foo}} did not. This is a fix for
      #224.
    
    Bug fixes:
    - Fix for #221
    - Fix for #226
    - Fix for #227
Commits on Nov 30, 2013
  1. Commit 47 (post beta)

    authored
    Small bug fix (encoding quotes) and unit tests
Commits on Nov 25, 2013
  1. Commit 46 (post beta)

    authored
    New features and improvements:
    
    - New {{props}} tag to iterate through fields/properties of an object:
      {{props}} {{:key}}:  {{:prop}} {{/props}}
      See http://borismoore.github.io/jsrender/demos/scenarios/03_iterating-through-fields-scenario.html
    
    - Use of #index in a nested context (e.g. in an {{if}} block) now produces
     (in debugMode === true) a warning error indicating getIndex() syntax.
    
    - (BREAKING CHANGE)
      Overriding of global helpers, templates, tags or converters:
      > resources specific to a template (e.g. a helper in the template’s
      helpers collection) now override resources of the same name defined
      globally (e.g. using $.views.helpers("myHelper", ...); ).
      > Helpers passed in as options override both template-specific and global
      helpers of the same name
    
    - Several bug fixes
    
    - Many new unit tests
Commits on Oct 29, 2013
  1. Commit 45 (post beta)

    authored
    - Fix for bug {{if !true}} evaluates to true. See:
      BorisMoore/jsviews#222
    - Some changes and improvements related to JsViews integration.
Commits on Oct 20, 2013
  1. Commit 44 (post beta)

    authored
    - Fix for bug {{else someUndefinedValue}}. See:
      BorisMoore/jsviews#221
    - Fix needed for JsViews issue:
      BorisMoore/jsviews#220
Commits on Oct 8, 2013
  1. Commit 43 (post beta)

    authored
    - Added support for rendering (and for binding, when used with JsViews
      to expressions that start with '!' such as:
     {{if !isFoo}}...{{else}} ...{{/if}}
Commits on Sep 23, 2013
  1. Commit 42 (post beta)

    authored
    - Several small bug fixes
    - Support for features used by upcoming JsViews Beta (also commit 42),
      including support for editable controls, validation, custom tags
      wrapping widgets or plugins such as the jQuery UI datepicker.
    
    See details on the JsViews commit 42, and on JsViews,com
Commits on Jul 5, 2013
  1. Commit 40 (post beta)

    authored
    - Fix for #206
    - Support for using just CR as newline within templates (as well as
      CRLF or just LF, previously supported)
    - Support for features used by upcoming JsViews Beta, including
      tag controls with onBeforeChange
      support (editable controls, with validation support)
Commits on Jun 19, 2013
Commits on Jun 11, 2013
  1. Final commit for official JsRender Beta release. (Simultaneous with the

    authored
    release of the new documentation site at http://jsviews.com).
Commits on May 24, 2013
  1. Commit 38. (Beta Candidate)

    authored
    - minor bug fix for encoding of "\" characters.
    - small changes on HTML encoding code...
Commits on Apr 25, 2013
  1. Commit 37. (Beta Candidate)

    authored
    - Minor bug fixes.
    - The tag init method is now called just after the constructor, rather than
     being used as constructor, so the this pointer in the init() is a full
     instance with tag.parent and all the other properties already set...
Commits on Apr 13, 2013
  1. Commit 35. (Beta Candidate)

    authored
    Removed some TODO comments.
Commits on Apr 10, 2013
  1. Commit 35. (Beta Candidate)

    authored
    Some bug fixes, plus some important implementation for supporting richer
    path binding expressions used in JsViews.
    Added additional unit tests for the built-in converters.
Commits on Mar 28, 2013
  1. Commit 34. (Beta Candidate)

    authored
    1) Attribute encoder now encodes '>', for compatibility with JsViews parsing.
    2) Fix for sample 07_paths.html (issue #192)
Commits on Mar 14, 2013
  1. Commit 33. (Beta Candidate)

    authored
    Small bug fix required for JsViews Issue 153
Commits on Mar 13, 2013
  1. Commit 32. (Beta Candidate)

    authored
    1) Fix for white-space-stripping bug
Commits on Mar 10, 2013
  1. Commit 31. (Beta Candidate)

    authored
    1) Important fix for 'minor' bug (typo) which prevented data-linking when
     window.name !== "" - e.g. in jsfiddle samples.
    2) BREAKING change - but only if NOT using jQuery. See #191:
     With this change the JsRender API for with and without jQuery is now
     identical except that with jQuery, window.jQuery is the global namespace
     object, typically mapped to var $, and without jQuery, window.jsviews
     is the global namespace object. If in the second case window.jsviews is
     also mapped to var $, then the API for both scenarios now beccomes
     identical and allows a single documentation and samples set to be provided
     for both scenarios:
     $.views provides access to the full JsRender (and JsViews) APIs
     e.g. $.converters. But in addition, some important APIs ($.templates and
     $.render) are also made available directly from $...
    3) The attr and url converters no longer convert null to "". This allows
     JsViews data-link="someTarget{attr:expression}" to remove the target
     attribute if the expression returns null, just as is the case already for
     data-link="someTarget{:expression}"
    4) Modified sample "20_without-jquery.html" to show proposed pattern for
     mapping window.jsviews to var $, with API change above.
     "11_accessing-parent-data.html
    5) Added example of accessing root data as ~root - within existing sample
     "11-accessing-parent-data.html
Commits on Mar 5, 2013
  1. Commit 30. (Beta Candidate)

    authored
    This includes changes required to fix for issues 89, 116, 148 and 149 of
    JsViews.
    It is also a candidate for Beta. If no significant new bugs are
    encountered then it will be used to provide an official beta version.
Commits on Feb 28, 2013
  1. Commit 29. Small change in jsrender.js needed for JsViews:

    authored
     When data-linking data-link="foo{:expr}", for some target attribute, foo,
     then if the expr returns null the attribute foo will be removed.
Something went wrong with that request. Please try again.