Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
7immer committed Mar 13, 2016
1 parent 44b2054 commit 6e0e090
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 111 deletions.
1 change: 1 addition & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ notices-for-facebook-graph-api-2
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
3 changes: 2 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library

standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code

autopublish # Publish all data to the clients (for prototyping)
insecure # Allow all DB writes from clients (for prototyping)
manuel:viewmodel
aldeed:simple-schema
standard-minifier-css
standard-minifier-js
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.2.1
METEOR@1.3-beta.16
143 changes: 75 additions & 68 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,74 +1,81 @@
aldeed:[email protected]
[email protected]
[email protected]
[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
manuel:[email protected]
manuel:[email protected]
manuel:[email protected]
manuel:[email protected]
mdg:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
59 changes: 47 additions & 12 deletions viewmodel-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,69 @@
</head>

<body>
{{> demoVM}}
{{> demoVM field="test" shared="pages"}}
</body>

<template name="demoVM">
<input {{b "value: title"}} type="text">
<label {{b "text: title"}}></label>
<br />
{{>dynamicForm }}
<input {{b "value: testing123"}} type="text" style="width: 100%;box-sizing: border-box;">
{{#basicForm shared="pages"}}
{{>textInput field="title" shared="pages" style="width:50%;background:red;float:left"}}
{{>textInput field="test.test2" shared="pages" style="width:50%;background:red;float:left"}}
{{>textareaInput field="body" shared="pages" style="width:100%;background:red;display:inline-block"}}

{{#dynamicForm field="layout" shared="pages"}}
<!-- <button {{b "click: add('hero','layout.$.hero')"}}>Add Hero</button> -->
<!-- <button {{b "click: add('billboard','layout.$.billboard')"}}>Add Billboard</button> -->
{{/dynamicForm}}
{{/basicForm}}
</template>

<template name="basicForm">
<form id="hellojames">
<div id="name">
{{> UI.contentBlock data=this context=this}}
</div>
<button {{b "click: submit"}}>submit</button>
</form>
</template>


<template name="textInput">
<div class="{{class}}" style="{{style}}">
<div style="padding:5px">
<label>{{ssLabel}}</label>
<!-- <input {{b "value: ssDefaultValue(val(field))"}} type="text" style="width: 100%;box-sizing: border-box;"> -->
<input {{b "value: ssDefaultValue(val(field))"}} type="text" style="width: 100%;box-sizing: border-box;">
</div>
</div>
</template>
<template name="textareaInput">
<div class="{{class}}" style="{{style}}">
<div style="padding:5px">
<label>{{ssLabel}}</label>
<textarea {{b "value: ssDefaultValue(val(field))"}} style="width: 100%;box-sizing: border-box;" cols="40"></textarea>
</div>
</div>
</template>

<template name="dynamicForm">
<button {{b "click: add('hero','layout.$.hero')"}}>Add Hero</button>
<button {{b "click: add('billboard','layout.$.billboard')"}}>Add Billboard</button>
<!-- {{> UI.contentBlock data=child context=child}} -->
<ul>
{{#each collection}}
{{> arrayItem}}
{{/each}}
{{#each collection}}
{{> arrayItem}}
{{/each}}
</ul>
<button {{b "click: submit"}}>submit</button>
</template>

<template name="arrayItem">
<li>
<hr />
{{_id}}
<button {{b "click: delete"}}>Del</button>
{{>Template.dynamic template=item data=(getData(_id)) }}
<button {{b "click: save(item)"}}>Save</button>
{{>Template.dynamic template=item data=(getData(this)) }}
<hr />
</li>
</template>
Expand All @@ -38,7 +75,6 @@
<div>hero Item:</div>
<input {{b "value: title"}} type="text">
<input {{b "value: alignment"}} type="text">
<button {{b "click: save('hero')"}}>Save</button>
</div>
</template>

Expand All @@ -47,6 +83,5 @@
<div>billboard Item:</div>
<input {{b "value: title"}} type="text">
<input {{b "value: background"}} type="text">
<button {{b "click: save('billboard')"}}>Save</button>
</div>
</template>
Loading

0 comments on commit 6e0e090

Please sign in to comment.