decide.nolog.cz/index.html

185 lines
6.3 KiB
HTML
Raw Normal View History

2013-10-22 11:16:08 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Croodle</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/croodle.css" rel="stylesheet">
</head>
<body>
<!--
TEMPLATES
-->
<!-- application template -->
<script type="text/x-handlebars">
<div class="container">
<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 class="title">{{title}}</h2>
<p class="description">{{description}}</p>
<p class="creationDate">created on {{creationDate}}</p>
<h2>options and user</h2>
2014-05-09 13:01:33 +02:00
<table class="user-selections-table">
<thead>
<tr>
<td>user</td>
{{#each option in options}}
<td>{{option.title}}</td>
{{/each}}
<td>&nbsp;</td>
</tr>
</thead>
2014-05-09 13:01:33 +02:00
<tfoot>
<tr class='newUser'>
<td>{{input value=view.newUserName placeholder="Enter your name..."}}</td>
2014-02-21 02:47:39 +01:00
{{#each newUserSelection in view.newUserSelections}}
<td>
{{#if isFreeText}}
{{input value=newUserSelection.value}}
{{else}}
{{view Ember.Select
contentBinding="answers"
optionValuePath="content.label"
optionLabelPath="content.label"
valueBinding="newUserSelection.value"}}
{{/if}}
</td>
{{/each}}
<td><button {{action "addNewUser" target="view" class="btn btn-default"}}> ok </button></td>
</tr>
2014-05-09 13:01:33 +02:00
</tfoot>
<tbody>
{{#each user in users}}
<tr>
<td>{{user.name}}</td>
{{#each selection in user.selections}}
<td>
{{#if isFreeText}}
{{selection.value}}
{{else}}
<span {{bind-attr class="selection.value"}}>{{selection.value}}</span>
{{/if}}
</td>
{{/each}}
<td>&nbsp;</td>
</tr>
{{/each}}
</tbody>
</table>
</script>
<!-- create templates -->
<script type="text/x-handlebars" id="create">
{{outlet}}
</script>
<script type="text/x-handlebars" id="create/index">
<h2>poll type</h2>
{{#em-form model=model submit_button=false}}
{{em-select
property="pollType"
label="poll type"
prompt="-select-"
contentBinding="App.PollTypes"
optionValuePath="content.id"
optionLabelPath="content.label"
prompt="Please select a poll type"}}
{{em-form-submit text="next"}}
{{/em-form}}
</script>
<script type="text/x-handlebars" id="create/meta">
<h2>meta data</h2>
{{#em-form model=model submit_button=false}}
{{em-input
property="title"
label="Title"
placeholder="Enter a title..."}}
{{em-text
property="description"
label="Description"
placeholder="Enter a description if you like..."
rows=4}}
{{em-form-submit text="next"}}
{{/em-form}}
</script>
<script type="text/x-handlebars" id="create/options">
<h2>options</h2>
<form role="form">
<div class="form-group">
<label class="control-label">options</label>
<fieldset>
{{#each option in options}}
{{view Ember.TextField valueBinding="option.title" class="form-control"}}<br/>
{{/each}}
</fieldset>
</div>
<button {{action "moreOptions" target="view"}} class="btn btn-default"> add another option </button>
<button {{action "submit"}} class="btn btn-default"> next </button>
</form>
</script>
<script type="text/x-handlebars" id="create/settings">
<h2>settings</h2>
{{#em-form model=model submit_button=false}}
{{em-select
property="answerType"
label="answer type"
prompt="-select-"
contentBinding="App.AnswerTypes"
optionValuePath="content.id"
optionLabelPath="content.label"
prompt="Please define available answers"}}
{{em-form-submit text="save"}}
{{/em-form}}
</script>
<!-- configuration -->
<script type="text/javascript">
// enable ember query-params-new feature
window.ENV = {
FEATURES: {
'query-params-new': true
}
};
</script>
<!-- loading libaries -->
2014-02-06 12:24:26 +01:00
<script src="js/lib/sjcl.js"></script>
<script src="js/lib/jquery.js"></script>
<script src="js/lib/handlebars.js"></script>
2014-02-06 12:24:26 +01:00
<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/lib/ember_forms.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
2014-02-06 12:24:26 +01:00
<script src="js/croodle.js"></script>
</body>
2013-10-22 11:16:08 +02:00
</html>