decide.nolog.cz/index.html

133 lines
3.8 KiB
HTML
Raw Normal View History

2013-10-22 11:16:08 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Croodle</title>
2013-10-22 11:16:08 +02:00
</head>
<body>
<!--
TEMPLATES
-->
<!-- application template -->
<script type="text/x-handlebars">
<div class="main">
<h1>Croodle</h1>
{{outlet}}
</div>
</script>
2014-02-07 20:58:21 +01:00
<!-- 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 option in options}}
{{option.title}}<br/>
{{/each}}
</p>
<p>{{input value=newOptionTitle}} <button {{action "addOption"}}> add option </button></p>
<p><button {{action "save"}}> ok </button></p>
</script>
<script type="text/x-handlebars" id="create/settings">
<p>settings</p>
<p><button {{action "save"}}> ok </button></p>
</script>
<!-- DEPEDENCIES -->
<script type="text/javascript">
// enable ember query-params-new feature
window.ENV = {FEATURES: {'query-params-new': true}};
</script>
2014-02-06 12:24:26 +01:00
<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>
2013-10-22 11:16:08 +02:00
</body>
</html>