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
41ca47ed
Commit
41ca47ed
authored
Dec 13, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flag to turn template caching on/off (default to off)
parent
113c99e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
cms/static/js/base.js
+4
-0
cms/static/js/template_loader.js
+2
-1
No files found.
cms/static/js/base.js
View file @
41ca47ed
...
...
@@ -16,6 +16,10 @@ $(document).ready(function() {
// scopes (namely the course-info tab)
window
.
$modalCover
=
$modalCover
;
// Control whether template caching in local memory occurs (see template_loader.js). Caching screws up development but may
// be a good optimization in production (it works fairly well)
window
.
cachetemplates
=
false
;
$body
.
append
(
$modalCover
);
$newComponentItem
=
$
(
'.new-component-item'
);
$newComponentTypePicker
=
$
(
'.new-component'
);
...
...
cms/static/js/template_loader.js
View file @
41ca47ed
...
...
@@ -35,7 +35,8 @@
localStorageAvailable
:
function
()
{
try
{
return
'localStorage'
in
window
&&
window
[
'localStorage'
]
!==
null
;
// window.cachetemplates is global set in base.js to turn caching on/off
return
window
.
cachetemplates
&&
'localStorage'
in
window
&&
window
[
'localStorage'
]
!==
null
;
}
catch
(
e
)
{
return
false
;
}
...
...
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