-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_new.js
215 lines (203 loc) · 8.05 KB
/
create_new.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
var task_id = 0;
var story_id = 0;
var dependancy_id = 0;
var blocker_id = 0;
function create_new_task() {
// alert("test!");
var new_task = document.createElement('div');
new_task.id = "task_" + task_id;
task_id++;
// alert(new_task.id + ", " + task_id);
new_task.className = 'task_note';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_task.setAttributeNode(candragya);
new_task.setAttributeNode(dragstart);
// document.getElementById("note_holder").appendChild(new_task);
document.getElementById("committed_tasks").appendChild(new_task);
var new_task_title = document.createElement('p');
new_task.appendChild(new_task_title);
new_task_title.textContent = "Task: "; // + Date();
var new_task_story = document.createElement('p');
var new_task_owner = document.createElement('p');
var new_task_id = document.createElement('p');
new_task.appendChild(new_task_story);
new_task.appendChild(new_task_owner);
new_task.appendChild(new_task_id);
new_task_story.textContent = "Story: "; // + Date();
new_task_owner.textContent = "Owner: "; // + Date();
new_task_id.textContent = "ID: " + new_task.id;
// + ', ' + new_task.className);
// body...
}
function create_new_story() {
// alert("test!");
var new_story = document.createElement('div');
new_story.id = "story_" + story_id;
story_id++;
new_story.className = 'story_note';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_story.setAttributeNode(candragya);
new_story.setAttributeNode(dragstart);
// document.getElementById("note_holder").appendChild(new_story);
document.getElementById("backlog").appendChild(new_story);
var new_story_title = document.createElement('p');
new_story.appendChild(new_story_title);
new_story_title.textContent = "Story: "; // + Date();
var new_story_story = document.createElement('p');
var new_story_owner = document.createElement('p');
new_story.appendChild(new_story_story);
new_story.appendChild(new_story_owner);
new_story_story.textContent = "Desc: "; // + Date();
new_story_owner.textContent = "Owner: "; // + Date();
// + ', ' + new_story.className);
// body...
}
function create_new_dependancy() {
// alert("test!");
var new_dependancy = document.createElement('div');
new_dependancy.id = "dependancy_" + dependancy_id;
dependancy_id++;
// alert(new_dependancy.id + ", " + dependancy_id);
new_dependancy.className = 'dependancy_note';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_dependancy.setAttributeNode(candragya);
new_dependancy.setAttributeNode(dragstart);
// get element id based on where it needs to be and what it needs to be attached to.
document.getElementById("backlog").appendChild(new_dependancy);
var new_dependancy_title = document.createElement('p');
new_dependancy.appendChild(new_dependancy_title);
new_dependancy_title.textContent = "Dependancy: "; // + Date();
var new_dependancy_story = document.createElement('p');
var new_dependancy_owner = document.createElement('p');
new_dependancy.appendChild(new_dependancy_story);
new_dependancy.appendChild(new_dependancy_owner);
new_dependancy_story.textContent = "Story or Task: "; // + Date();
new_dependancy_owner.textContent = "Owner: "; // + Date();
}
function create_new_blocker() {
// alert("test!");
var new_blocker = document.createElement('div');
new_blocker.id = "blocker_" + blocker_id;
blocker_id++;
// alert(new_blocker.id + ", " + blocker_id);
new_blocker.className = 'blocker_note';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_blocker.setAttributeNode(candragya);
new_blocker.setAttributeNode(dragstart);
// Place according to the needed location.
document.getElementById("backlog").appendChild(new_blocker);
var new_blocker_title = document.createElement('p');
new_blocker.appendChild(new_blocker_title);
new_blocker_title.textContent = "Blocker: "; // + Date();
var new_blocker_story = document.createElement('p');
var new_blocker_owner = document.createElement('p');
new_blocker.appendChild(new_blocker_story);
new_blocker.appendChild(new_blocker_owner);
new_blocker_story.textContent = "Story or Task: "; // + Date();
new_blocker_owner.textContent = "Owner: "; // + Date();
}
// =================================================================
function create_new_task_small() {
// alert("test!");
var new_task = document.createElement('div');
new_task.id = "task_" + task_id;
task_id++;
// alert(new_task.id + ", " + task_id);
new_task.className = 'task_note_small';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_task.setAttributeNode(candragya);
new_task.setAttributeNode(dragstart);
// document.getElementById("note_holder").appendChild(new_task);
document.getElementById("div1").appendChild(new_task);
var new_task_id = document.createElement('p');
new_task.appendChild(new_task_id);
new_task_id.textContent = "ID: " + new_task.id;
}
function create_new_story_small() {
// alert("test!");
var new_story = document.createElement('div');
new_story.id = "story_" + story_id;
story_id++;
new_story.className = 'story_note_small';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_story.setAttributeNode(candragya);
new_story.setAttributeNode(dragstart);
// document.getElementById("note_holder").appendChild(new_story);
document.getElementById("div1").appendChild(new_story);
var new_story_id = document.createElement('p');
new_story.appendChild(new_story_id);
new_story_id.textContent = "ID: " + new_story.id;
}
}
function create_new_dependancy_small() {
// alert("test!");
var new_dependancy = document.createElement('div');
new_dependancy.id = "dependancy_" + dependancy_id;
dependancy_id++;
// alert(new_dependancy.id + ", " + dependancy_id);
new_dependancy.className = 'dependancy_note_small';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_dependancy.setAttributeNode(candragya);
new_dependancy.setAttributeNode(dragstart);
// get element id based on where it needs to be and what it needs to be attached to.
document.getElementById("div1").appendChild(new_dependancy);
var new_dependancy_id = document.createElement('p');
new_dependancy.appendChild(new_dependancy_id);
new_dependancy_id.textContent = "ID: " + new_dependancy.id;
}
function create_new_blocker_small() {
// alert("test!");
var new_blocker = document.createElement('div');
new_blocker.id = "blocker_" + blocker_id;
blocker_id++;
// alert(new_blocker.id + ", " + blocker_id);
new_blocker.className = 'blocker_note_small';
var candragya = document.createAttribute("draggable");
var dragstart = document.createAttribute("ondragstart");
candragya.value = "true";
dragstart.value = "drag(event)";
// isdraggable
// isdragstart
new_blocker.setAttributeNode(candragya);
new_blocker.setAttributeNode(dragstart);
// Place according to the needed location.
document.getElementById("div1").appendChild(new_blocker);
var new_blocker_id = document.createElement('p');
new_blocker.appendChild(new_blocker_id);
new_blocker_id.textContent = "ID: " + new_blocker.id;
}