0952d08925
allows to inject into model but breaks compatiblity with current version of ember data
138 lines
No EOL
4 KiB
HTML
138 lines
No EOL
4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Croodle</title>
|
|
</head>
|
|
<body>
|
|
<!--
|
|
TEMPLATES
|
|
-->
|
|
|
|
<!-- application template -->
|
|
<script type="text/x-handlebars">
|
|
<div class="main">
|
|
<h1>Croodle</h1>
|
|
{{outlet}}
|
|
</div>
|
|
</script>
|
|
|
|
<!-- loading template -->
|
|
<script type="text/x-handlebars" id="loading">
|
|
<div id="loading">loading...</div>
|
|
</script>
|
|
|
|
<!-- error template -->
|
|
<script type="text/x-handlebars" id="error">
|
|
<div id="loading">
|
|
<h2>error</h2>
|
|
<p>{{status}}<br/>{{statusText}}</p>
|
|
</div>
|
|
</script>
|
|
|
|
<!-- poll template -->
|
|
<script type="text/x-handlebars" id="poll">
|
|
<h2>title</h2>
|
|
<p>{{title}}</p>
|
|
|
|
<h2>description</h2>
|
|
<p>{{description}}</p>
|
|
|
|
<h2>type</h2>
|
|
<p>{{type}}</p>
|
|
|
|
<h2>options and user</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>user</td>
|
|
{{#each option in options}}
|
|
<td>{{option.title}}</td>
|
|
{{/each}}
|
|
<td> </td>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{{#each user in users}}
|
|
<tr>
|
|
<td>{{user.name}}</td>
|
|
{{#each selection in user.selections}}
|
|
<td>{{selection.value}}</td>
|
|
{{/each}}
|
|
<td> </td>
|
|
</tr>
|
|
{{/each}}
|
|
|
|
<tr class='newUser'>
|
|
<td>{{input value=view.newUserName}}</td>
|
|
{{#each newUserSelection in view.newUserSelections}}
|
|
<td>{{input value=newUserSelection.value}}</td>
|
|
{{/each}}
|
|
<td><button {{action "addNewUser" target="view"}}> ok </button></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h2>creationDate</h2>
|
|
<p>{{creationDate}}</p>
|
|
</script>
|
|
|
|
<!-- create templates -->
|
|
<script type="text/x-handlebars" id="create">
|
|
{{outlet}}
|
|
</script>
|
|
|
|
<script type="text/x-handlebars" id="create/index">
|
|
<p>
|
|
type:<br/>
|
|
{{view Ember.Select
|
|
contentBinding="App.Types"
|
|
optionValuePath="content.id"
|
|
optionLabelPath="content.label"
|
|
valueBinding="type"}}
|
|
</p>
|
|
<p><button {{action "save"}}> ok </button></p>
|
|
</script>
|
|
|
|
<script type="text/x-handlebars" id="create/meta">
|
|
<p>title:<br/>{{input value=title}}</p>
|
|
<p>description:<br/>{{textarea value=description}}</p>
|
|
<p><button {{action "save"}}> ok </button></p>
|
|
</script>
|
|
|
|
<script type="text/x-handlebars" id="create/options">
|
|
<p>options<br/>
|
|
{{#each newOption in view.newOptions}}
|
|
{{view Ember.TextField valueBinding="newOption.title"}}<br/>
|
|
{{/each}}
|
|
</p>
|
|
<p><button {{action "moreOptions" target="view"}}> add option </button></p>
|
|
<p><button {{action "saveOptions" target="view"}}> save </button></p>
|
|
</script>
|
|
|
|
<script type="text/x-handlebars" id="create/settings">
|
|
<p>settings</p>
|
|
<p><button {{action "save"}}> ok </button></p>
|
|
</script>
|
|
|
|
<!-- configuration -->
|
|
<script type="text/javascript">
|
|
// enable ember query-params-new feature
|
|
window.ENV = {
|
|
FEATURES: {
|
|
'query-params-new': true
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<!-- loading libaries -->
|
|
<script src="js/lib/sjcl.js"></script>
|
|
<script src="js/lib/jquery.js"></script>
|
|
<script src="js/lib/handlebars.js"></script>
|
|
<script src="js/lib/ember.js"></script>
|
|
<script src="js/lib/ember-data.js"></script>
|
|
<script src="js/lib/embedded-adapter.js"></script>
|
|
<script src="js/croodle.js"></script>
|
|
</body>
|
|
</html> |