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
9de2dc51
Commit
9de2dc51
authored
Jun 12, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Can't add new textbook if the currently-editing textbook is empty
parent
c0b00f7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
cms/templates/textbooks.html
+2
-0
No files found.
cms/templates/textbooks.html
View file @
9de2dc51
...
@@ -250,6 +250,8 @@ CMS.Views.ListTextbooks = Backbone.View.extend({
...
@@ -250,6 +250,8 @@ CMS.Views.ListTextbooks = Backbone.View.extend({
},
},
addOne
:
function
(
e
)
{
addOne
:
function
(
e
)
{
if
(
e
&&
e
.
preventDefault
)
{
e
.
preventDefault
();
}
if
(
e
&&
e
.
preventDefault
)
{
e
.
preventDefault
();
}
// if the existing edited textbook is empty, don't do anything
if
(
this
.
collection
.
editing
&&
this
.
collection
.
editing
.
isEmpty
())
{
return
;
}
var
m
=
new
this
.
collection
.
model
;
var
m
=
new
this
.
collection
.
model
;
this
.
collection
.
add
(
m
);
this
.
collection
.
add
(
m
);
this
.
collection
.
trigger
(
"editOne"
,
m
);
this
.
collection
.
trigger
(
"editOne"
,
m
);
...
...
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