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
9b6c9fea
Commit
9b6c9fea
authored
Aug 05, 2014
by
Ben McMorran
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove staff lock field when removing staff lock
parent
3c0612a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
cms/static/js/spec/views/pages/container_subviews_spec.js
+2
-2
cms/static/js/views/pages/container_subviews.js
+3
-1
No files found.
cms/static/js/spec/views/pages/container_subviews_spec.js
View file @
9b6c9fea
...
...
@@ -394,13 +394,13 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin
create_sinon
.
expectJsonRequest
(
requests
,
'POST'
,
'/xblock/locator-container'
,
{
publish
:
'republish'
,
metadata
:
{
visible_to_staff_only
:
isStaffOnly
}
metadata
:
{
visible_to_staff_only
:
isStaffOnly
?
true
:
null
}
});
create_sinon
.
respondWithJson
(
requests
,
{
data
:
null
,
id
:
"locator-container"
,
metadata
:
{
visible_to_staff_only
:
isStaffOnly
visible_to_staff_only
:
isStaffOnly
?
true
:
null
}
});
create_sinon
.
expectJsonRequest
(
requests
,
'GET'
,
'/xblock/locator-container'
);
...
...
cms/static/js/views/pages/container_subviews.js
View file @
9b6c9fea
...
...
@@ -174,9 +174,11 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/
};
saveAndPublishStaffLock
=
function
()
{
// Setting staff lock to null when disabled will delete the field from this xblock,
// allowing it to use the inherited value instead of using false explicitly.
return
xblockInfo
.
save
({
publish
:
'republish'
,
metadata
:
{
visible_to_staff_only
:
enableStaffLock
}},
metadata
:
{
visible_to_staff_only
:
enableStaffLock
?
true
:
null
}},
{
patch
:
true
}
).
always
(
function
()
{
xblockInfo
.
set
(
"publish"
,
null
);
...
...
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