Permalink
Commits on Nov 12, 2011
  1. First take on set/get-tags

    committed Nov 12, 2011
Commits on Nov 7, 2011
  1. @BorisMoore

    Breaking API change: $.render( data, template, ... ) is now consisten…

    …t with
    
    $.link( data, template ... ). (Previously: $.render( template, data, ... ).
    Added MIT copyright information.
    BorisMoore committed Nov 7, 2011
  2. @BorisMoore
Commits on Nov 4, 2011
  1. @BorisMoore

    Major update, which changes the concept of chained tags - {{foo a {{b…

    …ar b}} }}
    
    and replaces it with the syntax {{foo a bar(b)}}. You can register helper
    functions (example step-by-step/10) and call them from the template markup.
    
    Added support for {{#if a===b}} and similar comparisons.
    
    Added support for numbers, true, false, null, so you can do {{#if a===2}} -
    which does number comparison and does not convert to strings. Note that all
    these changes confer many of the features and scenario support availabe in
    jquery.tmpl.js - but whereas there, this was achieved by eval'ing inline
    expressions in the template, the JsRender does not do an eval and does not
    allow inline expressions, other than with the {{* code}} tag.
    
    Added initial support for presenters.
    
    Fixes the following Issues
    Issue 5 - in that whitespace is preserved by default
    Issue 10 (comparisons)
    Issue 12 (numbers)
    Issue 14
    BorisMoore committed Nov 4, 2011
Commits on Oct 24, 2011
  1. @BorisMoore

    Added debugMode switch.

    Reverted feature in {{#if}} for testing lt, gt, eq etc. Since this will be
    replaced by a different approach.
    Removed sample on chained tags, since this design is likely to change.
    Simplified regular expression for tags - restricting custom tags to \w+
    BorisMoore committed Oct 24, 2011
Commits on Oct 23, 2011
  1. @BorisMoore
  2. @BorisMoore
  3. @BorisMoore
  4. @BorisMoore

    Bug fix on setDelimiters

    BorisMoore committed Oct 23, 2011
Commits on Oct 22, 2011
  1. @BorisMoore

    Added $views.setDelimiters function for customizing tags: Simply call

    $views.setDelimiters( startTag, endTag ); before rendering or compiling
    temlates. e.g. $views.setDelimiters( "\\[\\[", "\\]\\]" ); to use tags such
    as [[=foo]] instead of {{=foo}}
    BorisMoore committed Oct 22, 2011
  2. @BorisMoore

    {{=foo}} now renders an empty string when foo is undefined.

    This replaces previous implementation for {{=foo undef=""}}, and is a better
    alternative since it has been able to be achieved without significant
    impact on perf - and so is acceptable, rather than requiring setting an
    'undef' named parameter.
    See BorisMoore#7
    BorisMoore committed Oct 22, 2011
Commits on Oct 20, 2011
  1. @BorisMoore

    Simplified parameters passed to custom tag functions.

    Added support for named parameters on {{if}} for testing equality or sorting
    Named parameters supported are:
    eq: ===
    ne: !==
    lt: <
    gt: >
    le: <=
    ge: >=
    Examples:
    {{if firstName lastName gt="a" lt="b"}} will test for either first or
    last name starting with "a".
    {{if firstName lt=lastName}} will test for first name being before the last
    name in alphabetical sort order
    BorisMoore committed Oct 20, 2011
Commits on Oct 18, 2011
  1. @BorisMoore
Commits on Oct 9, 2011
  1. @BorisMoore
Commits on Oct 3, 2011
  1. @BorisMoore

    Added links to JsViews project including new demo sequence from jQuer…

    …y Conference, Boston, October 2011.
    BorisMoore committed Oct 3, 2011
Commits on Sep 27, 2011
  1. @BorisMoore
  2. @BorisMoore
  3. @BorisMoore

    Major update - moving to 'codeless' markup syntax, inspired by 'logic…

    …less'
    
    approach of Mustache and Handlebars. Nevertheless, a special 'allowCode' mode
    allows use of a {{* code... }} tag in templates - actually more powerful than
    previous embedded expressions approach. Many new features associated with the
    new templating implementation. Performances is almost identical to the fasted
    templating engines such as doT, for simple templates. Custom tags are easy
    to register. Compiled template functions are easy to understand and debug...
    
    For convenience, a folder "previous-version-of-jsrender" is provided with the
    demos and source code for the previous template syntax. This will be removed
    in the future...
    BorisMoore committed Sep 27, 2011
Commits on Sep 22, 2011
  1. @BorisMoore

    Improved named parameter support. Provided 'content="#myTemplate"...' as

    standard way to point to external templates e.g. on
    {{each data content="#myTemplate"}}
    BorisMoore committed Sep 22, 2011
  2. @BorisMoore

    Added support for passing named parameters to tags.

    Organized methods under tmpl namespace.
    Added new demo pages for named parameters
    BorisMoore committed Sep 22, 2011
Commits on Sep 21, 2011
  1. @BorisMoore
Commits on Sep 20, 2011
  1. @BorisMoore
Commits on Sep 17, 2011
  1. @BorisMoore

    In-progress implementation of codeless approach to jsrender, using a new

    syntax similar to Mustache and Handlebars.
    New folder - step-by-step-codeless - contains demos and samples using
    "jsrender-codeless".
    BorisMoore committed Sep 17, 2011
Commits on Sep 9, 2011
  1. @BorisMoore
Commits on Aug 17, 2011
  1. @BorisMoore
  2. @BorisMoore
  3. @BorisMoore

    Added a new non-jQuery-dependent version: jsrender.js, plus a set of …

    …samples
    
    using it: /demos/step-by-step-nojquery/*
    BorisMoore committed Aug 17, 2011
Commits on Jul 30, 2011
  1. @BorisMoore
Commits on Jul 28, 2011
  1. @BorisMoore
Commits on Jul 27, 2011
  1. @BorisMoore

    Improved/simplified approach to passing context to templates, as $ctx…

    …, rather than
    
    merging on to $view. Integrated with JsViews context support, for passing
    through from $.view, or $.link to the templates (including nested templates)
    BorisMoore committed Jul 27, 2011
Commits on Jul 7, 2011
  1. @BorisMoore

    Support for $.template( name, templateString) where templateString ca…

    …n be
    
    ANY string that is not a valid jQuery selector.
    Samples cleanup.
    BorisMoore committed Jul 7, 2011
Commits on Jun 16, 2011
  1. @BorisMoore
Commits on Jun 8, 2011
  1. @BorisMoore
  2. @BorisMoore