0.4.2 • Published 10 years ago

toggle-edit-view v0.4.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

#JS-Templator

Generates matched view-only and editable templates for JavaScript objects.

##ROADMAP

  • Using Polymer and handlebars
  • Type-based dispatch
  • Auto-wiring changes
  • Using normal HTML elements and es6 template strings

##Example

let templ = Templator.wrap({
  foo: true,
  bar: 3,
  baz: new Date()
});

templ.getTemplate(); // returns null, we haven't told it to watch any properties yet
templ.watch('foo', 'My Property');

Now calling .getTemplate() will return a document fragment containing the following:

<table class="editable-view">
  <tr class="edit-toggle">
    <td>My Property</td>
    <td>{{foo}}</td>
  </tr>
  <tr class="edit-toggle is-hidden">
    <td>
      <paper-dropdown-menu label="My Property" class="edit-changes" prop-name="foo">
        <paper-menu class="dropdown-content">
          <paper-item>False</paper-item>
          <paper-item>True</paper-item>
        </paper-menu>
      </paper-dropdown-menu>
    </td>
  </tr>
</table>
0.4.2

10 years ago

0.4.0

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago