Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COMP90082-ePortfolio-team03
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Tian Ye
COMP90082-ePortfolio-team03
Commits
33eaec5b
Commit
33eaec5b
authored
May 31, 2020
by
Ye Tian
Browse files
Options
Downloads
Patches
Plain Diff
commit
parent
454a84be
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
web/js/Privacy/request.js
+21
-36
21 additions, 36 deletions
web/js/Privacy/request.js
web/js/ToolBar/pagebar.js
+1
-1
1 addition, 1 deletion
web/js/ToolBar/pagebar.js
web/webpage/privacy/privacy-my.html
+14
-0
14 additions, 0 deletions
web/webpage/privacy/privacy-my.html
with
36 additions
and
37 deletions
web/js/Privacy/request.js
+
21
−
36
View file @
33eaec5b
...
@@ -38,24 +38,8 @@ function getReqeustedProjects(){
...
@@ -38,24 +38,8 @@ function getReqeustedProjects(){
// ' </div>\n' +
// ' </div>\n' +
// ' </li>');
// ' </li>');
// }
// }
var
idStr
=
"
requestProjectList
"
;
var
htmlStr
=
"
' <li>
\\
n' +
\n
"
+
"
' <div class=
\"
req-in
\"
>
\\
n' +
\n
"
+
"
' <div class=
\"
proj-des
\"
>
\\
n' +
\n
"
+
"
' <h3><a href=
\"
webpage/project-related/project-show.html
\"
>' + data[x].projectname + '</a></h3>
\\
n' +
\n
"
+
"
' <h5>' + data[x].projectdescription + '</h5>
\\
n' +
\n
"
+
"
' </div>
\\
n' +
\n
"
+
"
' <div class=
\"
req-des
\"
>
\\
n' +
\n
"
+
"
' <span>Total number of Applicants: ' + data[x].countrequest + '</span>
\\
n' +
\n
"
+
"
' <div class=
\"
req-button
\"
>
\\
n' +
\n
"
+
"
' <a href=
\"
#project=' + data[x].projectname + '
\"
><button class=
\"
candidate
\"
onclick=
\"
loadCandidates('+data[x].projectid+')
\"
>See applicants</button></a>
\\
n' +
\n
"
+
"
' <button class=
\"
agree
\"
onclick=
\"
agreeAll('+projectId+')
\"
>Agree all</button>
\\
n' +
\n
"
+
"
' </div>
\\
n' +
\n
"
+
"
' </div>
\\
n' +
\n
"
+
"
' </div>
\\
n' +
\n
"
+
"
' </li>'
"
;
loadSubPage
(
data
);
loadSubPage
(
data
,
1
);
},
},
error
:
function
(
msg
)
{
error
:
function
(
msg
)
{
alert
(
"
get projects failed
"
);
alert
(
"
get projects failed
"
);
...
@@ -309,25 +293,26 @@ function getMyRequests(){
...
@@ -309,25 +293,26 @@ function getMyRequests(){
dataType
:
'
json
'
,
dataType
:
'
json
'
,
success
:
function
(
data
){
success
:
function
(
data
){
console
.
log
(
data
);
console
.
log
(
data
);
for
(
x
in
data
){
// for(x in data){
var
statusNum
=
data
[
x
].
requeststatus
;
// var statusNum = data[x].requeststatus;
var
status
=
"
Unhandled
"
;
// var status = "Unhandled";
if
(
statusNum
==
'
1
'
)
status
=
"
Refused
"
;
// if(statusNum == '1') status = "Refused";
else
if
(
statusNum
==
'
2
'
)
status
=
"
Approved
"
;
// else if(statusNum == '2') status = "Approved";
$
(
"
#myRequestsList
"
).
append
(
'
<li>
\n
'
+
// $("#myRequestsList").append(' <li>\n' +
'
<div class="req-in">
\n
'
+
// ' <div class="req-in">\n' +
'
<div class="req-detail">
\n
'
+
// ' <div class="req-detail">\n' +
'
<span style="font-size: x-large; ">
'
+
data
[
x
].
projectname
+
'
</span>
\n
'
+
// ' <span style="font-size: x-large; ">'+data[x].projectname+'</span>\n' +
'
<h4>Project Owner: <a href="other-person.html?id=
'
+
data
[
x
].
userid
+
'
">
'
+
data
[
x
].
name
+
'
</a> Apply date:
'
+
data
[
x
].
str_requesttime
+
'
</h4>
\n
'
+
// ' <h4>Project Owner: <a href="other-person.html?id='+data[x].userid+'">'+data[x].name+'</a> Apply date: '+data[x].str_requesttime+'</h4>\n' +
'
</div>
\n
'
+
// ' </div>\n' +
'
<div class="req-status">
\n
'
+
// ' <div class="req-status">\n' +
'
<span>Status:</span>
\n
'
+
// ' <span>Status:</span>\n' +
'
<span class="status">
'
+
status
+
'
</span>
\n
'
+
// ' <span class="status">'+status+'</span>\n' +
'
</div>
\n
'
+
// ' </div>\n' +
'
<div class="req-btn"><input type="button" onclick="deleteRequest(
'
+
data
[
x
].
requestid
+
'
)" value="DELETE"/></div>
'
+
// ' <div class="req-btn"><input type="button" onclick="deleteRequest('+data[x].requestid+')" value="DELETE"/></div>' +
'
</div>
\n
'
+
// ' </div>\n' +
'
</li>
'
);
// ' </li>');
}
// }
loadSubPage
(
data
,
2
);
},
},
error
:
function
(
msg
)
{
error
:
function
(
msg
)
{
alert
(
"
get my requests failed
"
);
alert
(
"
get my requests failed
"
);
...
...
This diff is collapsed.
Click to expand it.
web/js/ToolBar/pagebar.js
+
1
−
1
View file @
33eaec5b
...
@@ -10,7 +10,7 @@ loadSubPage = function(data, type){
...
@@ -10,7 +10,7 @@ loadSubPage = function(data, type){
var
dataStr
=
JSON
.
stringify
(
data
);
var
dataStr
=
JSON
.
stringify
(
data
);
if
(
pageNum
==
0
){
if
(
pageNum
==
0
){
$
(
"
#page-bar
"
).
append
(
'
<h4>No data here</h4>
'
);
//
$("#page-bar").append('<h4>No data here</h4>');
}
else
{
}
else
{
$
(
"
#page-bar
"
).
append
(
'
<div id="currentPage" style="display: none"></div>
'
);
//用来存放当前页面编号
$
(
"
#page-bar
"
).
append
(
'
<div id="currentPage" style="display: none"></div>
'
);
//用来存放当前页面编号
$
(
"
#page-bar
"
).
append
(
"
<li id='previousBtn' class='page-item disabled'>
\n
"
+
$
(
"
#page-bar
"
).
append
(
"
<li id='previousBtn' class='page-item disabled'>
\n
"
+
...
...
This diff is collapsed.
Click to expand it.
web/webpage/privacy/privacy-my.html
+
14
−
0
View file @
33eaec5b
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
<!--<script src="../../js/custom.js"></script>-->
<!--<script src="../../js/custom.js"></script>-->
<!--<script src="../../js/jquery.metisMenu.js"></script>-->
<!--<script src="../../js/jquery.metisMenu.js"></script>-->
<script
src=
"/js/ToolBar/pagebar.js"
></script>
<script
src=
"/js/Privacy/request.js"
></script>
<script
src=
"/js/Privacy/request.js"
></script>
<script>
<script>
$
(
function
(){
$
(
function
(){
...
@@ -51,6 +52,19 @@
...
@@ -51,6 +52,19 @@
<!--动态加载请求列表-->
<!--动态加载请求列表-->
</ul>
</ul>
<nav
aria-label=
"Page navigation example"
class=
"m-t-40"
>
<ul
class=
"pagination"
id=
"page-bar"
>
<!-- <li class="page-item disabled">-->
<!-- <a class="page-link" href="#" tabindex="-1">Previous</a>-->
<!-- </li>-->
<!-- <li class="page-item"><a class="page-link" href="#">1</a></li>-->
<!-- <li class="page-item"><a class="page-link" href="#">2</a></li>-->
<!-- <li class="page-item"><a class="page-link" href="#">3</a></li>-->
<!-- <li class="page-item">-->
<!-- <a class="page-link" href="#">Next</a>-->
<!-- </li>-->
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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