decide.nolog.cz/index.html

134 lines
No EOL
3.9 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>&nbsp;</td>
</tr>
</thead>
<tbody>
{{#each user in users}}
<tr>
<td>{{user.name}}</td>
{{#each selection in user.selections}}
<td>{{selection.value}}</td>
{{/each}}
<td>&nbsp;</td>
</tr>
{{/each}}
<tr class='newUser'>
<td>{{input value=newUserName}}</td>
{{#each option in options}}
<td>{{input class="newUserSelection" data-option=option.id}}</td>
{{/each}}
<td><button {{action "save"}}> 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/>{{input 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-2.0.3.js"></script>
<script src="js/lib/handlebars-v1.2.0.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>