Commit Graph

1519 Commits

Author SHA1 Message Date
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
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
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
David Baumgold
7b02932fea Add tests for CMS.Views.ChapterEdit, save content before opening upload dialog 2013-07-09 19:16:06 -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
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
207453a37c Further basic tests for Backbone models 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
Brian Talbot
ab0cada683 studio - revises main nav dropdown jquery selectors 2013-07-01 17:32:16 -04:00
Peter Fogg
b3cd6af9aa Change deleted Alert to a Notification, with a timeout. 2013-06-28 14:46:58 -04:00
Peter Fogg
1be2068bcf Show a confirmation on asset delete. Fixes STUD-375. 2013-06-28 12:28:49 -04:00
David Baumgold
ddc986f775 Call event.preventDefault() on notification action buttons
But allow you to specify that the event should not be prevented
2013-06-25 11:29:42 -04:00
Peter Fogg
ad09236c82 Merge pull request #242 from edx/peter-fogg/advanced-backbone-notifications
Refactor Advanced Settings page to use Backbone notifications.
2013-06-24 12:37:26 -07:00
Peter Fogg
fb573a1db6 Hide "success" alert as soon as we start editing another field. 2013-06-24 13:59:14 -04:00
David Baumgold
72ffe2d8f2 Backbone notifications secondary actions
Handle secondary actions on notifications either specified as a single object,
or as a list of objects. Under the hood, the initialize method converts a single
object to a list containing a single object.
2013-06-24 13:44:50 -04:00
Peter Fogg
3e376bd780 Prevent "saved" and "error" views from showing at the same time.
Previously the "saved" view was never hidden, even after more data was
edited. So if one field was saved successfully and then another was
not, we would find ourselves in the unfortunate situation of seeing
both views at once, leading to much confusion.
2013-06-24 11:06:53 -04:00
Peter Fogg
72e08456a8 Refactor Advanced Settings page to use Backbone notifications. 2013-06-24 09:48:37 -04:00
cahrens
ad6e745762 Forgot to remove registration of onKeyUp function. 2013-06-24 09:09:05 -04:00
cahrens
250de3fcb6 Remove keybinding for work in progress (WIP).
STUD-329
2013-06-21 17:13:06 -04:00
David Baumgold
687779ba34 Clean up assets page notifications
Remove hack to work around multiple notification click issues -- and actually resolve
the issue so that the hack isn't necessary
2013-06-19 12:01:44 -04:00
David Baumgold
b6e3b0ee03 Refactor Backbone Notifications
Models are extraneous for something as temporary as a notifaction -- this change
moves all the configuration into the views, and removes the models entirely.
2013-06-18 10:20:31 -04:00
Chris Dodge
16e476e8e4 refactored asset page related JS into it's own page 2013-06-17 11:10:36 -04:00
Chris Dodge
cd0087ca53 use the new notification tools for the confirmation dialog 2013-06-17 11:10:35 -04:00
Chris Dodge
274d8997a2 update warning message 2013-06-17 11:10:35 -04:00
Chris Dodge
85b904f176 fix sizing of the delete column 2013-06-17 11:09:52 -04:00
Chris Dodge
be6fbf913e make local variable 2013-06-11 14:36:04 -04:00
Chris Dodge
1602f592b4 use better API 2013-06-11 14:32:33 -04:00
Chris Dodge
fa8ae228bf Seems like on chrome when cancel is hit in the file chooser, the 'changed' event is fired and startUpload() was being called. We need to check to see if the upload file is blank and - if so - just return immediately out of the function 2013-06-11 13:38:01 -04:00
cahrens
4d311f44cd Code review feedback. 2013-06-01 18:46:09 -04:00
cahrens
a82daf0710 Change to Backbone collection. 2013-05-31 15:59:53 -04:00
cahrens
8fd15ce45d Review feedback. 2013-05-30 14:13:10 -04:00
cahrens
5d41e2a952 Updates from code review. 2013-05-30 12:26:01 -04:00
cahrens
7d07309f9d Don't call setFixtures. Can stomp on other tests. 2013-05-29 14:03:16 -04:00
cahrens
24707f8f85 Jasmine test for views. 2013-05-29 12:09:42 -04:00
cahrens
625c6b518c Cleanup, change how we load templates. 2013-05-28 14:07:35 -04:00
cahrens
c95b44d851 Merge branch 'master' into feature/christina/metadata-ui
Conflicts:
	cms/envs/common.py
	cms/templates/base.html
	common/lib/xmodule/xmodule/combined_open_ended_module.py
2013-05-23 11:41:12 -04:00
cahrens
c8d6d5d283 Selenium tests. 2013-05-23 11:34:02 -04:00
David Baumgold
3cfadb8ae8 Migrated internationalization text into template for section name 2013-05-22 15:55:55 -04:00
Frances Botsford
fa330784d3 removed symbolset, replaced with fontawesome for gradable status; added transform-origin for saving notification animation to remove wobble 2013-05-22 15:55:55 -04:00