Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Roadmap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
Roadmap
Commits
36130dab
Commit
36130dab
authored
5 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
client:
#24
- cleanup
parent
6370d2f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/static/js/main.js
+22
-53
22 additions, 53 deletions
client/static/js/main.js
with
22 additions
and
53 deletions
client/static/js/main.js
+
22
−
53
View file @
36130dab
...
...
@@ -150,59 +150,6 @@ function createTrainMap()
}
}
function
editTask
(
task_ID
,
milestone_ID
)
{
var
edit
=
document
.
getElementById
(
'
edit
'
).
innerHTML
;
var
title
=
$
(
'
#title
'
).
val
();
var
description
=
$
(
'
#description
'
).
val
();
;
var
done
=
document
.
getElementById
(
"
checkbox-done
"
).
checked
;
if
(
isNull
(
title
))
{
alert
(
"
Title shouldn't be empty!
"
);
return
;
}
if
(
done
)
{
done
=
1
;
}
else
{
done
=
0
;
}
$
.
post
(
'
../admin/helper/edit-task.php
'
,
{
"
title
"
:
title
,
"
description
"
:
description
,
"
done
"
:
done
,
"
edit
"
:
edit
,
"
ID
"
:
task_ID
,
"
milestone-ID
"
:
milestone_ID
},
function
(
data
,
error
)
{
data
=
data
.
toString
().
trim
();
switch
(
data
)
{
case
"
error
"
:
alert
(
'
An error occurred
'
);
break
;
case
"
error-edit
"
:
alert
(
'
An error occurred while editing the task with the ID
'
+
task_ID
);
break
;
case
"
error-insert
"
:
alert
(
'
An error occurred while inserting the new task
'
);
break
;
default
:
window
.
location
.
href
=
"
../admin/admin-tasks.php?id=
"
+
milestone_ID
;
break
;
}
});
}
function
editSubtask
(
subtask_ID
,
task_ID
)
{
var
edit
=
document
.
getElementById
(
'
edit
'
).
innerHTML
;
...
...
@@ -300,6 +247,7 @@ function validateNewRoadmapForm()
return
false
;
}
}
function
validateNewMilestoneForm
()
{
var
versionCode
=
$
(
'
#version-code
'
).
val
();
...
...
@@ -345,6 +293,27 @@ function validateNewMilestoneForm()
return
true
;
}
function
validateNewTaskForm
()
{
var
title
=
$
(
'
#title
'
).
val
();
var
description
=
document
.
getElementById
(
'
description
'
);
if
(
isNull
(
title
))
{
alert
(
"
Title shouldn't be empty!
"
);
return
false
;
}
if
(
isNull
(
description
))
{
alert
(
"
Description shouldn't be empty!
"
);
return
false
;
}
return
true
;
}
function
markAllTasksAsDone
(
milestone_ID
)
{
$
.
post
(
'
../admin/helper/mark-all-tasks-as-done.php
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment