Permalink
Browse files

Backlog: Add a temp UI to remove stories

Add a remove button, for removing stories.
Design is obviously not final, or even a
suggestion, it is simply for helping build
out the functionality at this point.
  • Loading branch information...
1 parent f898c3f commit 41249e5a38ef7adbdd39be267e69b9a27638ee6f @philip-morning committed Mar 1, 2014
Showing with 30 additions and 7 deletions.
  1. +14 −2 app/public/css/app.css
  2. +8 −0 app/public/js/controllers/home.js
  3. +8 −5 app/public/partials/home.html
View
@@ -69,8 +69,17 @@ h2, h3 {
min-width: 200px;
}
-#backlog .selected {
+.story-id {
+ margin: 0;
+}
+#backlog .selected .story-id, #new-story .story-id {
+ /* TODO: Why do we need this hack? */
+ margin-top: 0.6ex;
+}
+
+#backlog .selected form {
+ margin: 0;
}
#backlog .selected input, #new-story input {
@@ -85,7 +94,10 @@ h2, h3 {
#new-story form {
margin: 0;
}
-
+#new-story {
+ padding: 0.5ex;
+ padding-left: 1.5ex;
+}
/* admin */
#userList {
@@ -64,6 +64,14 @@ function HomeCtrl($scope, $timeout, $document) {
$timeout(makeStoriesDraggable, 0);
};
+ $scope.save = function (story) {
+ console.log('save');
+ };
+
+ $scope.remove = function (story) {
+ console.log('remove');
+ };
+
var attachToDragEvents = function (Y) {
// Show a semi-transparent version of the story selected.
Y.DD.DDM.on('drag:start', function(e) {
@@ -2,7 +2,7 @@
<div id="new-story" class="story">
<form>
- <span>+</span>
+ <span class="span1 story-id">+</span>
<input type="text"
ng-model="newStory.summary"/>
<button class="btn" ng-click="create(newStory)">Add story</button>
@@ -14,10 +14,13 @@
selected: story.isSelected,
'not-selected': !story.isSelected
}">
- <span>{{story.id}}</span>
- <span class="selected" ng-show="story.isSelected">
- <input id="boxForStory{{story.id}}" type="text" ng-model="story.summary"/>
- </span>
+ <div class="span1 story-id">{{story.id}}</div>
+ <div class="selected" ng-show="story.isSelected">
+ <form ng-submit="save(story)">
+ <input id="boxForStory{{story.id}}" type="text" ng-model="story.summary"/>
+ <button class="btn pull-right" type="button" ng-click="remove(story)">Remove</button>
+ </form>
+ </div>
<span class="not-selected" ng-show="!story.isSelected">{{story.summary}}</span>
</div>
</div>

0 comments on commit 41249e5

Please sign in to comment.