From d56d076f4d5ccf5fd56aba972a8c2b635ea1f249 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 30 Dec 2016 23:51:06 +0100 Subject: [PATCH] add more controls --- .../daily-planner/daily-planner-d.html | 37 +++++++++++++++---- app/scripts/daily-planner/daily-planner-d.js | 10 ++--- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/app/scripts/daily-planner/daily-planner-d.html b/app/scripts/daily-planner/daily-planner-d.html index 24018d5a2..7fb3d28d3 100644 --- a/app/scripts/daily-planner/daily-planner-d.html +++ b/app/scripts/daily-planner/daily-planner-d.html @@ -1,30 +1,46 @@
-
What do you want to do today?
+
+

What do you want to do today?

+

If you're done, you should spend some time prioritizing your tasks, by ordering them via drag and drop.

+ +
+
+ +
+

Tasks for today

    + dnd-list="vm.tasks">
  • - {{ task.title }} + ng-repeat="task in vm.tasks"> +
    :::: +
    +
    + +
    +
- If you're done, you should spend some time prioritizing your tasks, by ordering them via drag and drop. +

Tasks Backlog (for some other time)

@@ -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 }} +
:::: +
+
+ +
+ diff --git a/app/scripts/daily-planner/daily-planner-d.js b/app/scripts/daily-planner/daily-planner-d.js index 0bc401c57..6b0e44a88 100644 --- a/app/scripts/daily-planner/daily-planner-d.js +++ b/app/scripts/daily-planner/daily-planner-d.js @@ -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)