Selaa lähdekoodia

Merge pull request #15 from adelq/develop

Merge develop into master
Adel Qalieh 11 vuotta sitten
vanhempi
commit
503490f1f7

+ 1 - 1
.meteor/release

@@ -1 +1 @@
-0.8.2
+0.8.3

+ 7 - 1
README.md

@@ -11,6 +11,12 @@ soon!
 If you would like to help out with the Astroid project, you're in the right
 place.
 
+Screenshots
+-----------
+![Desktop](/public/screenshots/desktop.png?raw=true "Desktop")
+![Tablet](/public/screenshots/tablet.png?raw=true "Tablet")
+![Mobile](/public/screenshots/mobile.png?raw=true "Mobile")
+
 Getting Started With Development
 ---------------
 
@@ -29,4 +35,4 @@ project.
 License
 ---------------
 
-Astroid is licensed under the GNU Affero GPL License version 3.
+Astroid is licensed under the GNU Affero GPL License version 3.

+ 9 - 0
client/css/style.css

@@ -63,6 +63,15 @@ body {
 	-moz-border-radius: 25%;
 	border-radius: 25%;
 }
+
+.completeBox-warning {
+	border-color: #fbb03b;
+}
+
+.completeBox-danger {
+	border-color: #a0222a;
+}
+
 .taskRowTop {
 	padding-left: 45px;
 	cursor: pointer;

+ 2 - 2
client/views/main.html

@@ -34,14 +34,14 @@
 							</small>
 						</div>
 						<div class="taskListItem">
-							<a href="#" class="completeBox" style="border: 3px solid #a0222a;"></a>
+							<a href="#" class="completeBox completeBox-danger"></a>
 							<div class="taskRowTop">Dolor, provident odit pariatur</div>
 							<small class="taskRowBottom">
 								<span class="dueDate">21 Aug 2012</span> | <span class="taskItemList">Programming</span>
 							</small>
 						</div>
 						<div class="taskListItem">
-							<a href="#" class="completeBox" style="border: 3px solid #fbb03b;"></a>
+							<a href="#" class="completeBox completeBox-warning"></a>
 							<div class="taskRowTop">Aperiam, eos, mollitia! Iure</div>
 							<small class="taskRowBottom">
 								<span class="dueDate">16 Oct 2012</span> | <span class="taskItemList">Personal</span>

+ 27 - 18
client/views/tasks/add_task.coffee

@@ -3,21 +3,30 @@ Template.newTaskForm.events
     e.preventDefault()
     body = $('#new-task-text').val()
     $('#new-task-text').val("")
-    now = new Date()
-    priority = 'low'
-    list = 'Home'
-    Tasks.insert
-      body: body
-      dateDue: moment(now).add('w', 1).toDate()
-      dateCreated: now
-      dateCompleted: false
-      modified: now
-      list: list
-      priority: priority
-      completed: false
-      repeating: false
-    list = Lists.findOne
-      name: list
-    Lists.update list._id,
-      $inc:
-        numTodos: 1
+
+    if body
+      addEvent body
+      $('#addTaskInput').removeClass('has-warning')
+    else
+      $('#addTaskInput').addClass('has-warning')
+      $('#new-task-text').focus()
+
+addEvent = (taskTitle) ->
+  now = new Date()
+  priority = 'low'
+  list = 'Home'
+  Tasks.insert
+    body: taskTitle
+    dateDue: moment(now).add('w', 1).toDate()
+    dateCreated: now
+    dateCompleted: false
+    modified: now
+    list: list
+    priority: priority
+    completed: false
+    repeating: false
+  list = Lists.findOne
+    name: list
+  Lists.update list._id,
+    $inc:
+      numTodos: 1

BIN
public/screenshots/desktop.png


BIN
public/screenshots/mobile.png


BIN
public/screenshots/tablet.png