Commit Graph

253 Commits

Author SHA1 Message Date
David Baumgold
74b9703def Reset model attributes when textbook editing is cancelled 2013-07-09 19:16:08 -04:00
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
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
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
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
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
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
cd0087ca53 use the new notification tools for the confirmation dialog 2013-06-17 11:10:35 -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
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
David Baumgold
9e864834bd Unify system feedback templates
Also, a SystemFeedback model no longer has a `type`, it has an `intent`. This is
because SystemFeedback views have `type`, as well, and this prevents a naming
collision.
2013-05-22 15:55:55 -04:00
David Baumgold
a8431eeae2 Section model shouldn't react to AJAX errors
Doing so overrides the AJAX error popup
2013-05-22 15:55:53 -04:00
Brian Talbot
02e022ec7b studio - revises the min amount of time the saving notification appears on the outline view 2013-05-22 15:55:53 -04:00
David Baumgold
a0a71c0df2 Internationalization for JS 2013-05-22 15:55:53 -04:00
David Baumgold
fcf4cdc75e Implement minShown and maxShown for notification views 2013-05-22 15:55:51 -04:00
David Baumgold
4af3325976 Move display logic into view
Model shouldn't know about things like close buttons, visibility, and so on
2013-05-22 15:55:51 -04:00
David Baumgold
0c368011da Move underscore templates into separate files, included in Mako templates 2013-05-22 15:55:50 -04:00
David Baumgold
e440580c79 Started writing Backbone tests
Hacking the Python, because our JS dependency management is borked.
2013-05-22 15:55:50 -04:00
David Baumgold
1333717871 Message action callbacks have model set to this 2013-05-22 15:55:50 -04:00
David Baumgold
f5f7cf705f Subclass CMS.Models.SystemFeedback
To create handy WarningMessage, ErrorMessage, and ConfirmationMessage classes
2013-05-22 15:55:50 -04:00
David Baumgold
c6c5e50d86 Hook up notification framework to default AJAX error callback
And delete `CMS.ServerError`
2013-05-22 15:55:49 -04:00
David Baumgold
0dc3446523 Handle saving popup 2013-05-22 15:55:49 -04:00
David Baumgold
5746121f5c Set up Notification and Prompt 2013-05-22 15:55:49 -04:00
David Baumgold
5ff2adb882 Rename alert model to SystemFeedback 2013-05-22 15:55:48 -04:00
David Baumgold
c0d69022cb Set up Backbone model/view for alerts 2013-05-22 15:55:48 -04:00
cahrens
4facd262bd Jasmine test for metadata model. 2013-05-20 16:26:48 -04:00
cahrens
b16e17a250 Some i18n work and other minor cleanup. 2013-05-17 14:57:25 -04:00
cahrens
235ecff28b In progress. 2013-05-16 10:40:48 -04:00
cahrens
17750a7d6d Use min, max, and step values from server. 2013-05-14 14:20:10 -04:00
cahrens
8c36918abf Support display names for choices. 2013-05-13 15:35:55 -04:00
cahrens
5edbf3d8f7 Merge branch 'master' into feature/christina/metadata-ui 2013-05-13 10:55:32 -04:00
cahrens
125c9c13c1 Got clearing of fields working. 2013-05-12 15:45:31 -04:00
cahrens
bfdbcc2f32 Beginnings of Backbone views/models. 2013-05-09 11:16:12 -04:00
David Baumgold
7f69e45b9e whitespace changes 2013-05-08 09:29:20 -04:00
cahrens
fa63bcce94 Allow clearing of dates (except for course start date).
https://edx.lighthouseapp.com/projects/102637/tickets/231
2013-03-25 17:25:49 -04:00
cahrens
a2a1478d92 Fix caching bug on back button. 2013-03-22 09:51:45 -04:00
cahrens
a03f6c3bf1 More Selenium test, code cleanup. 2013-03-19 14:02:07 -04:00
cahrens
49ee903eda Merge branch 'master' into feature/btalbot/studio-checklists
Conflicts:
	cms/djangoapps/contentstore/views.py
	cms/static/js/template_loader.js
2013-03-18 15:30:19 -04:00