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
771aaa6c
Commit
771aaa6c
authored
Nov 19, 2015
by
Kaloian Doganov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collapse actions dropdown after an action item is clicked.
TNL-3644
parent
72fbcdc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
lms/static/js/dashboard/legacy.js
+11
-4
No files found.
lms/static/js/dashboard/legacy.js
View file @
771aaa6c
...
...
@@ -79,8 +79,8 @@
return
properties
;
}
function
toggleCourseActionsDropdown
(
ev
ent
)
{
var
dashboard_index
=
$
(
this
)
.
data
(
'dashboard-index'
);
function
toggleCourseActionsDropdown
Internal
(
elem
ent
)
{
var
dashboard_index
=
element
.
data
(
'dashboard-index'
);
// Toggle the visibility control for the selected element and set the focus
var
dropdown_selector
=
'div#actions-dropdown-'
+
dashboard_index
;
...
...
@@ -97,6 +97,10 @@
var
anchor
=
$
(
anchor_selector
);
var
aria_expanded_state
=
(
anchor
.
attr
(
'aria-expanded'
)
===
'true'
);
anchor
.
attr
(
'aria-expanded'
,
!
aria_expanded_state
);
}
function
toggleCourseActionsDropdown
(
event
)
{
toggleCourseActionsDropdownInternal
(
$
(
this
));
// Suppress the actual click event from the browser
event
.
preventDefault
();
...
...
@@ -118,11 +122,13 @@
});
$
(
".action-email-settings"
).
click
(
function
(
event
)
{
$
(
"#email_settings_course_id"
).
val
(
$
(
event
.
target
).
data
(
"course-id"
)
);
$
(
"#email_settings_course_number"
).
text
(
$
(
event
.
target
).
data
(
"course-number"
)
);
var
element
=
$
(
event
.
target
);
$
(
"#email_settings_course_id"
).
val
(
element
.
data
(
"course-id"
)
);
$
(
"#email_settings_course_number"
).
text
(
element
.
data
(
"course-number"
)
);
if
(
$
(
event
.
target
).
data
(
"optout"
)
===
"False"
)
{
$
(
"#receive_emails"
).
prop
(
'checked'
,
true
);
}
toggleCourseActionsDropdownInternal
(
element
);
});
$
(
".action-unenroll"
).
click
(
function
(
event
)
{
...
...
@@ -138,6 +144,7 @@
},
true
));
$
(
'#refund-info'
).
html
(
element
.
data
(
"refund-info"
)
);
$
(
"#unenroll_course_id"
).
val
(
element
.
data
(
"course-id"
)
);
toggleCourseActionsDropdownInternal
(
element
);
});
$
(
'#unenroll_form'
).
on
(
'ajax:complete'
,
function
(
event
,
xhr
)
{
...
...
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