mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
add more controls
This commit is contained in:
parent
905d07c417
commit
d56d076f4d
2 changed files with 35 additions and 12 deletions
|
|
@ -1,30 +1,46 @@
|
|||
<div class="daily-planner">
|
||||
<div ng-if="!vm.step || vm.step ===0">
|
||||
<div class="input">
|
||||
<div class="info">What do you want to do today?</div>
|
||||
<div class="info">
|
||||
<p>What do you want to do today?</p>
|
||||
<p>If you're done, you should spend some time prioritizing your tasks, by ordering them via drag and drop.</p>
|
||||
|
||||
</div>
|
||||
<form ng-submit="vm.addTask()">
|
||||
<input class="text-input"
|
||||
autofocus
|
||||
ng-model="vm.newTask">
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
<div class="done">
|
||||
<button ng-click="done()">All done!</button>
|
||||
</div>
|
||||
|
||||
<h2>Tasks for today</h2>
|
||||
|
||||
<ul class="task-list"
|
||||
dnd-list="vm.listModel.lists.today">
|
||||
dnd-list="vm.tasks">
|
||||
<li class="task"
|
||||
dnd-draggable="task"
|
||||
dnd-effect-allowed="move"
|
||||
dnd-moved="vm.listModel.lists.today.splice($index, 1);"
|
||||
dnd-moved="vm.tasks.splice($index, 1);"
|
||||
ng-class="{'is-selected': vm.listModel.selected === task}"
|
||||
ng-repeat="task in vm.listModel.lists.today">
|
||||
{{ task.title }}
|
||||
ng-repeat="task in vm.tasks">
|
||||
<div dnd-handle
|
||||
class="handle">::::
|
||||
</div>
|
||||
<div class="title">
|
||||
<input type="text"
|
||||
ng-model="task.title">
|
||||
</div>
|
||||
<button ng-click="vm.tasks.splice($index, 1)">X</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="info">
|
||||
If you're done, you should spend some time prioritizing your tasks, by ordering them via drag and drop.
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Tasks Backlog (for some other time)</h2>
|
||||
|
|
@ -36,7 +52,14 @@
|
|||
dnd-moved="vm.listModel.lists.backlog.splice($index, 1);"
|
||||
ng-class="{'is-selected': vm.listModel.selected === task}"
|
||||
ng-repeat="task in vm.listModel.lists.backlog | limitTo:vm.limitBacklogTo">
|
||||
{{ task.title }}
|
||||
<div dnd-handle
|
||||
class="handle">::::
|
||||
</div>
|
||||
<div class="title">
|
||||
<input type="text"
|
||||
ng-model="task.title">
|
||||
</div>
|
||||
<button ng-click="vm.tasks.splice($index, 1)">X</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* # dailyPlanner
|
||||
*/
|
||||
|
||||
(function () {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
|
|
@ -52,16 +52,16 @@
|
|||
|
||||
$scope.models = {
|
||||
selected: null,
|
||||
lists: { "A": [], "B": [] }
|
||||
lists: {'A': [], 'B': []}
|
||||
};
|
||||
|
||||
// Generate initial model
|
||||
for (var i = 1; i <= 3; ++i) {
|
||||
$scope.models.lists.A.push({ label: "Item A" + i });
|
||||
$scope.models.lists.B.push({ label: "Item B" + i });
|
||||
$scope.models.lists.A.push({label: 'Item A' + i});
|
||||
$scope.models.lists.B.push({label: 'Item B' + i});
|
||||
}
|
||||
|
||||
vm.addTask = function () {
|
||||
vm.addTask = function() {
|
||||
vm.tasks.push({
|
||||
title: vm.newTask,
|
||||
id: Math.random().toString(36).substr(2, 10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue