Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7dcf36c2
Commit
7dcf36c2
authored
Jul 17, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added simple confirm dialog for unflagging
parent
93e3ce55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
43 deletions
+12
-43
lms/static/coffee/src/open_ended/open_ended.coffee
+10
-28
lms/templates/open_ended_problems/open_ended_flagged_problems.html
+2
-15
No files found.
lms/static/coffee/src/open_ended/open_ended.coffee
View file @
7dcf36c2
...
@@ -16,36 +16,18 @@ class OpenEnded
...
@@ -16,36 +16,18 @@ class OpenEnded
@
ban_button
=
$
(
'.ban-button'
)
@
ban_button
=
$
(
'.ban-button'
)
@
unflag_button
=
$
(
'.unflag-button'
)
@
unflag_button
=
$
(
'.unflag-button'
)
@
ban_button
.
click
@
ban
@
ban_button
.
click
@
ban
@
unflag_button
.
click
@
confirm_unflag
@
unflag_button
.
click
@
unflag
@
unflag_submission_confirmation
=
$
(
'.flag-submission-confirmation'
)
@
unflag_submission_cancel_button
=
$
(
'.flag-submission-confirmation-button'
)
@
unflag_submission_confirmation_button
=
$
(
'.flag-submission-removal-button'
)
@
unflag_submission_confirmation
.
hide
()
@
unflag_submission_cancel_button
.
click
@
close_dialog_box
()
@
unflag_submission_confirmation_button
.
click
@
remove_flag
()
remove_flag
:
()
=>
@
unflag
()
@
close_dialog_box
()
close_dialog_box
:
()
=>
$
(
".flag-submission-confirmation"
).
dialog
(
'close'
)
confirm_unflag
:
()
=>
$
(
".flag-submission-confirmation"
).
dialog
({
height
:
275
,
width
:
400
})
unflag
:
(
event
)
=>
unflag
:
(
event
)
=>
event
.
preventDefault
()
if
confirm
"Are you sure you want to unflag this submission?"
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
event
.
preventDefault
()
tr_children
=
parent_tr
.
children
()
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
action_type
=
"unflag"
tr_children
=
parent_tr
.
children
()
submission_id
=
parent_tr
.
data
(
'submission-id'
)
action_type
=
"unflag"
student_id
=
parent_tr
.
data
(
'student-id'
)
submission_id
=
parent_tr
.
data
(
'submission-id'
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
student_id
=
parent_tr
.
data
(
'student-id'
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
ban
:
(
event
)
=>
ban
:
(
event
)
=>
event
.
preventDefault
()
event
.
preventDefault
()
...
...
lms/templates/open_ended_problems/open_ended_flagged_problems.html
View file @
7dcf36c2
...
@@ -56,17 +56,4 @@
...
@@ -56,17 +56,4 @@
%endif
%endif
%endif
%endif
</div>
</div>
</section>
</section>
\ No newline at end of file
<!-- Flag submission confirmation dialog -->
<section
class=
"flag-submission-confirmation"
style=
"display: none;"
>
<br
/>
<h4>
Are you sure that you want to unflag this submission?
</h4>
<br
/>
<p>
You are about to unflag a submission. Please confirm, or cancel below.
</p>
<br
/>
<div>
<input
type=
"button"
class=
"flag-submission-removal-button"
value=
"Remove Flag"
name=
"calibration-interstitial-page-button"
/>
<input
type=
"button"
class=
"flag-submission-confirmation-button"
value=
"Keep Flag"
name=
"calibration-interstitial-page-button"
/>
</div>
</section>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment