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
042aaf94
Commit
042aaf94
authored
Sep 17, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1030 from edx/christina/textbook-cleanup
Minor cleanup.
parents
3717df20
e65e9b53
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
cms/static/coffee/spec/models/textbook_spec.coffee
+4
-4
cms/static/js/views/textbook.js
+0
-4
No files found.
cms/static/coffee/spec/models/textbook_spec.coffee
View file @
042aaf94
...
...
@@ -25,7 +25,7 @@ describe "CMS.Models.Textbook", ->
expect
(
@
model
.
isEmpty
()).
toBeTruthy
()
it
"should have a URL set"
,
->
expect
(
_
.
result
(
@
model
,
"url"
)).
toBeTruthy
()
expect
(
@
model
.
url
(
)).
toBeTruthy
()
it
"should be able to reset itself"
,
->
@
model
.
set
(
"name"
,
"foobar"
)
...
...
@@ -124,14 +124,14 @@ describe "CMS.Models.Textbook", ->
describe
"CMS.Collections.TextbookSet"
,
->
beforeEach
->
CMS
.
URL
.
TEXTBOOK
=
"/textbooks"
CMS
.
URL
.
TEXTBOOK
S
=
"/textbooks"
@
collection
=
new
CMS
.
Collections
.
TextbookSet
()
afterEach
->
delete
CMS
.
URL
.
TEXTBOOK
delete
CMS
.
URL
.
TEXTBOOK
S
it
"should have a url set"
,
->
expect
(
_
.
result
(
@
collection
,
"url"
),
"/textbooks"
)
expect
(
@
collection
.
url
()).
toEqual
(
"/textbooks"
)
it
"can call save"
,
->
spyOn
(
@
collection
,
"sync"
)
...
...
cms/static/js/views/textbook.js
View file @
042aaf94
...
...
@@ -156,7 +156,6 @@ CMS.Views.ListTextbooks = Backbone.View.extend({
initialize
:
function
()
{
this
.
emptyTemplate
=
_
.
template
(
$
(
"#no-textbooks-tpl"
).
text
());
this
.
listenTo
(
this
.
collection
,
'all'
,
this
.
render
);
this
.
listenTo
(
this
.
collection
,
'destroy'
,
this
.
handleDestroy
);
},
tagName
:
"div"
,
className
:
"textbooks-list"
,
...
...
@@ -185,9 +184,6 @@ CMS.Views.ListTextbooks = Backbone.View.extend({
addOne
:
function
(
e
)
{
if
(
e
&&
e
.
preventDefault
)
{
e
.
preventDefault
();
}
this
.
collection
.
add
([{
editing
:
true
}]);
},
handleDestroy
:
function
(
model
,
collection
,
options
)
{
collection
.
remove
(
model
);
}
});
CMS
.
Views
.
EditChapter
=
Backbone
.
View
.
extend
({
...
...
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