Skip to content

Commit 862ef84

Browse files
committed
added save icon
1 parent 8119753 commit 862ef84

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

icons/save.png

1.35 KB
Loading

index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,22 @@
7878
</div>
7979
</div>
8080
<div v-on:click="onLeftClick()" v-click-outside="addNewTask" class="task" v-bind:style="{ 'background-color': taskGroups[newTaskGroup] }">
81-
<div class="task-top-row">
82-
<span v-if="expanded" class="task-top-row-span">
81+
<div v-if="expanded" class="task-top-row">
82+
<span class="task-top-row-span">
8383
<img src="icons/increase.png" alt="Task priority factor" title="Task priority factor" height="20" width="20">
8484
<input type="text" ref="factor" v-on:input="inputAdjust()" v-model="newTaskFactor" aria-label="Task factor" class="task-top-row-input" />%
8585
</span>
86-
<span v-if="expanded" class="task-top-row-span">
86+
<span class="task-top-row-span">
8787
<img src="icons/tag.png" alt="Task group" title="Task group" height="20" width="20">
8888
<select v-model="newTaskGroup">
8989
<option v-for="(value, key) in taskGroups" v-bind:value="key" v-bind:style="{ 'background-color': value }">
9090
{{ key }}
9191
</option>
9292
</select>
9393
</span>
94+
<button v-on:click="addNewTask" class="task-top-row-button">
95+
<img src="icons/save.png" alt="Save task" title="Save task" height="20" width="20">
96+
</button>
9497
</div>
9598
<textarea ref="message" v-on:input="textAreaAdjust()" v-model="newTaskText" placeholder="Add a task" aria-label="Add a task" class="task-textarea" v-bind:style="{ 'background-color': taskGroups[newTaskGroup] }"></textarea>
9699
</div>
@@ -122,6 +125,7 @@
122125
:last-update="task.lastUpdate"
123126
:last-activity="task.lastActivity"
124127
v-on:outside="clickOutsideTask(task._id)"
128+
v-on:save="updateTask(task._id)"
125129
v-on:remove="deleteTask(task._id)"
126130
v-on:activity="onTaskActivity(task._id)"
127131
v-on:click.native="onLeftClickTask(task._id)"

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ Vue.component('task-item', {
204204
<button v-if="expanded" v-on:click="$emit('remove')" class="task-top-row-button">
205205
<img src="icons/delete.png" alt="Delete task" title="Delete task" height="20" width="20">
206206
</button>
207+
<button v-if="expanded" v-on:click="$emit('save')" class="task-top-row-button">
208+
<img src="icons/save.png" alt="Save task" title="Save task" height="20" width="20">
209+
</button>
207210
</div>
208211
<textarea v-if="expanded" ref="message" v-on:input="textAreaAdjust()" :value="text" @input="$emit('update:text', $event.target.value)" aria-label="Task text" class="task-textarea" v-bind:style="{ 'background-color': color }"></textarea>
209212
<div v-else v-html="autolinkedText" aria-label="Task text" class="task-formatted-textarea" v-bind:style="{ 'background-color': color }"></div>

worker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ var urlstocache = [
1212
'icons/count.png',
1313
'icons/day.png',
1414
'icons/delete.png',
15+
'icons/help.png',
1516
'icons/increase.png',
1617
'icons/pause.png',
1718
'icons/play.png',
1819
'icons/priority.png',
20+
'icons/save.png',
21+
'icons/tag.png',
1922
'icons/week.png',
2023
'https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css',
2124
'https://cdnjs.cloudflare.com/ajax/libs/pouchdb/6.4.3/pouchdb.min.js',

0 commit comments

Comments
 (0)