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
d223e5ba
Commit
d223e5ba
authored
Jul 15, 2014
by
Ben McMorran
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes view and preview buttons on unit page
parent
bfb6db76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
cms/static/js/spec/views/pages/container_subviews_spec.js
+2
-2
cms/static/js/views/pages/container_subviews.js
+2
-2
cms/templates/js/mock/mock-container-page.underscore
+2
-2
common/test/acceptance/pages/studio/container.py
+2
-2
No files found.
cms/static/js/spec/views/pages/container_subviews_spec.js
View file @
d223e5ba
...
...
@@ -62,8 +62,8 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin
};
describe
(
"PreviewActionController"
,
function
()
{
var
viewPublishedCss
=
'.
view-button
'
,
previewCss
=
'.
preview-button
'
;
var
viewPublishedCss
=
'.
button-view
'
,
previewCss
=
'.
button-preview
'
;
it
(
'renders correctly for private unit'
,
function
()
{
renderContainerPage
(
mockContainerXBlockHtml
,
this
);
...
...
cms/static/js/views/pages/container_subviews.js
View file @
d223e5ba
...
...
@@ -32,8 +32,8 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/
var
PreviewActionController
=
UnitStateListenerView
.
extend
({
render
:
function
()
{
var
previewAction
=
this
.
$el
.
find
(
'.
preview-button
'
),
viewLiveAction
=
this
.
$el
.
find
(
'.
view-button
'
);
var
previewAction
=
this
.
$el
.
find
(
'.
button-preview
'
),
viewLiveAction
=
this
.
$el
.
find
(
'.
button-view
'
);
if
(
this
.
model
.
get
(
'published'
))
{
viewLiveAction
.
removeClass
(
disabledCss
);
}
...
...
cms/templates/js/mock/mock-container-page.underscore
View file @
d223e5ba
...
...
@@ -16,12 +16,12 @@
<ul>
% if is_unit_page:
<li class="action-item action-view nav-item">
<a href="${published_preview_link}" class="button
view-button
action-button is-disabled">
<a href="${published_preview_link}" class="button
button-view
action-button is-disabled">
<span class="action-button-text">${_("View Published Version")}</span>
</a>
</li>
<li class="action-item action-preview nav-item">
<a href="${draft_preview_link}" class="button
preview-button
action-button is-disabled">
<a href="${draft_preview_link}" class="button
button-preview
action-button is-disabled">
<span class="action-button-text">${_("Preview Changes")}</span>
</a>
</li>
...
...
common/test/acceptance/pages/studio/container.py
View file @
d223e5ba
...
...
@@ -102,7 +102,7 @@ class ContainerPage(PageObject):
Switches the browser to the newly opened LMS window.
"""
self
.
q
(
css
=
'.
view-button
'
)
.
first
.
click
()
self
.
q
(
css
=
'.
button-view
'
)
.
first
.
click
()
self
.
_switch_to_lms
()
def
preview
(
self
):
...
...
@@ -111,7 +111,7 @@ class ContainerPage(PageObject):
Switches the browser to the newly opened LMS window.
"""
self
.
q
(
css
=
'.
preview-button
'
)
.
first
.
click
()
self
.
q
(
css
=
'.
button-preview
'
)
.
first
.
click
()
self
.
_switch_to_lms
()
def
_switch_to_lms
(
self
):
...
...
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