David Baumgold
9797b34c4e
Pluralize CMS.URL.TEXTBOOK
2013-07-09 19:16:08 -04:00
David Baumgold
77ae9a6a78
PDF Textbooks: fetch/save individual textbooks
...
Created a few RESTful API endpoints, which required creating and assigning
arbitrary IDs to PDF textbooks. Changed the Backbone views to save individual
models, instead of saving a whole collection.
2013-07-09 19:16:07 -04:00
David Baumgold
27e895393c
Added generic JsonResponse class
...
Based on http://djangosnippets.org/snippets/154/
2013-07-09 19:16:07 -04:00
David Baumgold
307c6c1715
CMS.Views.Notification.Saving should have sensible defaults
...
minShown = 1250, closeIcon = false
2013-07-09 19:16:07 -04:00
David Baumgold
7b502ced1c
Add validation functions for PDF Textbook models
2013-07-09 19:16:07 -04:00
David Baumgold
7856db1e09
Provide correct path to Chapter model
2013-07-09 19:16:07 -04:00
David Baumgold
dc5123c836
Allow multiple textbook edit forms on the page simultaneously
2013-07-09 19:16:07 -04:00
David Baumgold
404c36b8f4
PDF textbooks: namespace JS variables for URLs
2013-07-09 19:16:07 -04:00
David Baumgold
696a795c12
Don't remove all chapters on closing EditTextbook view
...
Previously, the code would dynamically add a chapter on render() if the textbook
had no chapters, and would remove all empty chapters when the edit view was closed.
Now, the render method doesn't modify the model at all anymore (yay!) and when the
edit view is closed, remove all empty chapters but be sure to leave at least one
left.
2013-07-09 19:16:07 -04:00
David Baumgold
0048c82092
Simply context passing for textbooks
2013-07-09 19:16:07 -04:00
David Baumgold
5836286fda
PDF textbooks: unified naming conventions
2013-07-09 19:16:06 -04:00
David Baumgold
c45dbca771
Fix JS dependency issues
...
textbook.js is apparently being loaded on every page, so I just made sure that
Backbone Associations was also loaded on every page to be sure that the dependency
was always being met.
2013-07-09 19:16:06 -04:00
Brian Talbot
414c9d38b6
studio - revises plus icon treatment throughout new-button actions
2013-07-09 19:16:06 -04:00
David Baumgold
a861e01536
Reorganize Jasmine uploader tests
2013-07-09 19:16:06 -04:00
David Baumgold
c2ef6a53f5
PDF textbook upload: show success message for 2 seconds following successful upload
2013-07-09 19:16:06 -04:00
David Baumgold
cae5c324a6
modifications to Backbone textbook structure
...
Textbooks now have an empty chapterset by default, instead of one with one empty
chapter. The TextbookEdit view dynamically adds an empty chapter if the chapterset
is empty; the close button removes all empty chapters from the chapterset.
2013-07-09 19:16:06 -04:00
Frances Botsford
27f2339537
additional refinements to PDF textbooks, including making the edit buttons work again
2013-07-09 19:16:06 -04:00
David Baumgold
7b02932fea
Add tests for CMS.Views.ChapterEdit, save content before opening upload dialog
2013-07-09 19:16:06 -04:00
David Baumgold
c750f08d21
Fix failing unit tests due to bad rebase
2013-07-09 19:16:06 -04:00
David Baumgold
3b0b1b36b3
Import gettext in textbook template
2013-07-09 19:16:05 -04:00
Frances Botsford
947a4ee714
adding some finesse to the PDF textbooks page
2013-07-09 19:16:05 -04:00
David Baumgold
0673c79f28
i18n
2013-07-09 19:16:05 -04:00
David Baumgold
4c1ea5aaac
PDF Textbook i18n
2013-07-09 19:16:05 -04:00
Frances Botsford
e059060cf3
updated textbook page html and sass, and added basic styling for error on wrong file type
2013-07-09 19:16:05 -04:00
David Baumgold
e8b79dc696
PDF textbooks only accept PDF files
...
All other file types will trigger a validation error
2013-07-09 19:16:05 -04:00
David Baumgold
4c304f1d18
Add unit test for failure case
2013-07-09 19:16:05 -04:00
David Baumgold
05cb13b171
Adding and fixing tests
2013-07-09 19:16:04 -04:00
David Baumgold
77db1f8a5a
Fixups and test fixes post-rebase
2013-07-09 19:16:04 -04:00
Frances Botsford
4b2eb79de9
revamp of textbook list html, stage 1
2013-07-09 19:16:04 -04:00
David Baumgold
8934cf35ba
Add pdf_textbooks tab when textbooks are created
2013-07-09 19:16:04 -04:00
David Baumgold
c59d515cdf
Added unit tests for file upload widget
2013-07-09 19:16:04 -04:00
David Baumgold
7bb86b6cd2
Fix showSpies and editSpies resetting in tests
2013-07-09 19:16:04 -04:00
David Baumgold
27398a5c6f
Added tests for CMS.Views.ListTextbooks
2013-07-09 19:16:04 -04:00
David Baumgold
8ba21ca34a
More backbone view tests
2013-07-09 19:16:04 -04:00
David Baumgold
3f0efe70cf
Added jasmine-stealth library, v0.0.12
2013-07-09 19:16:03 -04:00
David Baumgold
8227a8c3db
Started adding tests for textbook backbone views
2013-07-09 19:16:03 -04:00
David Baumgold
609c299f48
Finished backbone model tests for textbooks
2013-07-09 19:16:03 -04:00
David Baumgold
207453a37c
Further basic tests for Backbone models
2013-07-09 19:16:03 -04:00
David Baumgold
001cd5d004
First few unit tests
2013-07-09 19:16:03 -04:00
David Baumgold
40098f6593
renamed textbooks.js to textbook.js
2013-07-09 19:16:03 -04:00
David Baumgold
9af447de97
Moved Backbone models/views out to separate files for pdf textbooks project
2013-07-09 19:16:03 -04:00
David Baumgold
0d415d814b
Remove unused imports
2013-07-09 19:16:03 -04:00
David Baumgold
14be4310c3
Add confirmation step for deleting a textbook
2013-07-09 19:16:02 -04:00
David Baumgold
9de2dc51ec
Can't add new textbook if the currently-editing textbook is empty
2013-07-09 19:16:02 -04:00
David Baumgold
c0b00f7dd5
persist textbook deletions to the server
2013-07-09 19:16:02 -04:00
David Baumgold
486bacede4
Clean up HTML structure in textbooks page
2013-07-09 19:16:02 -04:00
David Baumgold
4509dc03b0
Pull and save pdf textbook information to/from the correct modulestore
2013-07-09 19:16:02 -04:00
David Baumgold
64adb62d48
make sure to save textbook name when it changes
2013-07-09 19:16:02 -04:00
David Baumgold
ce26d52420
set order attribute on chapters from server
2013-07-09 19:16:02 -04:00
David Baumgold
f6ee5cf680
rename view.save() to view.setValues()
...
to make it clearer that it doesn't persist values to the server
2013-07-09 19:16:02 -04:00