Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Commit 10f4d96

Browse files
author
Steven Morrison
committed
SM: Cleaned up old modal code.
1 parent 807928b commit 10f4d96

File tree

3 files changed

+11
-46
lines changed

3 files changed

+11
-46
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
## VueJS Task Manager
2-
Version 1.0.0
2+
Version 0.1.0
33

44
Trello inspired task manager written in JavaScript using the VueJS framework.
55

66
![Task Manager](screenshot.JPG?raw=true)
77

8-
### Possible future Additions:
9-
* Add Z-indez to task deletion icon.
8+
### Future Additions:
109
* Category/Task edit.
1110
* Task input focus open, and close on unfocus.
1211
* Unfocus on category create.

css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* --------------------------------------------------------
22
VueJS - Task Manager
3-
Version: 0.0.1
3+
Version: 0.1.0
44
Author: Steven Morrison
55
Website: www.zaffri.com
66
GitHub: github.com/Zaffri

js/app.js

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* --------------------------------------------------------
22
VueJS - Task Manager
3-
Version: 0.0.1
3+
Version: 0.1.0
44
Author: Steven Morrison
55
Website: www.zaffri.com
66
GitHub: github.com/Zaffri
@@ -28,38 +28,6 @@ var app = new Vue({
2828
cancelText: "Cancel",
2929
callbackData: {}
3030
},
31-
/*modalConfig: {
32-
// Modal visibility
33-
visible: false,
34-
35-
// type: notify || confirm
36-
type: "confirm",
37-
38-
// display data
39-
title: "Delete",
40-
messageBody: "Are you sure you want to delete this?",
41-
confirmText: "Confirm",
42-
43-
// optional - for confirm modal type
44-
cancelText: "Cancel",
45-
callbackData: {
46-
type: null,
47-
index: 0,
48-
parentIndex: 0 // parentIndex for tasks (cat index)
49-
},
50-
confirmCallback: function(action, data) {
51-
52-
// Check action & handle callback data
53-
if(action) {
54-
if(data.type === "task-delete")
55-
this.deleteCategory(data);
56-
57-
if(data.type === "category-delete")
58-
this.deleteTask(data);
59-
}
60-
console.log("DATA: " + JSON.stringify(data));
61-
}
62-
},*/
6331
categories: [] // all app data
6432
},
6533
created: function() {
@@ -165,21 +133,19 @@ var app = new Vue({
165133
this.modalConfig.visible = true;
166134
},
167135
modalCallback: function(action) {
136+
// Hide modal
168137
this.modalConfig.visible = false;
169-
170-
console.log('Action: ' + action);
171-
console.log('Data: ' + JSON.stringify(this.modalConfig.callbackData));
172138

173139
// if action = true (confirm clicked)
174-
/*if(action == true) {
175-
var actionData = this.zaffriModal.action;
140+
if(action == true) {
141+
var callbackData = this.modalConfig.callbackData;
176142
// check action type
177-
if(actionData.type == "category-delete") {
178-
this.deleteCategory(actionData);
143+
if(callbackData.type == "category-delete") {
144+
this.deleteCategory(callbackData);
179145
} else {
180-
this.deleteTask(actionData);
146+
this.deleteTask(callbackData);
181147
}
182-
}*/
148+
}
183149
}
184150
}
185151
});

0 commit comments

Comments
 (0)