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
f44989e5
Commit
f44989e5
authored
Mar 21, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Brian's open external method.
parent
fd9c29f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
cms/static/js/base.js
+6
-1
cms/static/js/views/checklists_view.js
+1
-8
No files found.
cms/static/js/base.js
View file @
f44989e5
...
...
@@ -167,10 +167,15 @@ function linkSmoothScroll(e) {
}
function
linkNewWindow
(
e
)
{
window
.
open
(
$
(
this
).
attr
(
'href'
));
window
.
open
(
$
(
e
.
target
).
attr
(
'href'
));
e
.
preventDefault
();
}
// On AWS instances, base.js gets wrapped in a separate scope as part of Django static
// pipelining (note, this doesn't happen on local runtimes). So if we set it on window,
// when we can access it from other scopes (namely the checklists)
window
.
cmsLinkNewWindow
=
linkNewWindow
;
function
toggleSections
(
e
)
{
e
.
preventDefault
();
...
...
cms/static/js/views/checklists_view.js
View file @
f44989e5
...
...
@@ -6,7 +6,7 @@ CMS.Views.Checklists = Backbone.View.extend({
events
:
{
'click .course-checklist .checklist-title'
:
"toggleChecklist"
,
'click .course-checklist .task input'
:
"toggleTask"
,
'click a[rel="external"]'
:
"openInNewTab"
'click a[rel="external"]'
:
window
.
cmsLinkNewWindow
},
initialize
:
function
()
{
...
...
@@ -85,11 +85,5 @@ CMS.Views.Checklists = Backbone.View.extend({
},
error
:
CMS
.
ServerError
});
},
openInNewTab
:
function
(
e
)
{
e
.
preventDefault
();
window
.
open
(
$
(
e
.
target
).
attr
(
'href'
));
}
});
\ 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