Peter Fogg
f9aecb2778
Add support for PNGs as course images.
...
Also change the file uploader to accept multiple file types.
2013-08-21 09:42:00 -04:00
Peter Fogg
9632f4fed8
Address PR comments:
...
- Internationalize upload errors.
- Move upload tests into their own files.
- Refactor upload dialog acceptance tests.
2013-08-21 09:42:00 -04:00
Peter Fogg
ce1a13f32c
Generalize file uploader.
...
Previously the file upload dialog was PDF- and textbook-specific. The
changes are adding parameters to the FileUpload model for the file
type, and adding an onSuccess callback to the UploadDialog view. Also
moved upload-specific SASS into its own file.
2013-08-21 09:42:00 -04:00
Will Daly
4b738d4cc3
Refactored into helper method
2013-08-12 08:55:30 -04:00
Will Daly
9769f364e1
Updated tests to weaken "number" input field requirement, which
...
isn't supported in Firefox.
2013-08-09 12:10:53 -04:00
David Baumgold
6e784d606f
Merge pull request #596 from edx/db/ff-subsection-datetime-bug
...
Fix Firefox subsection datetime bug
2013-08-07 09:25:17 -07:00
David Baumgold
a0123d3a27
Fixed Jasmine tests
2013-08-06 14:30:19 -04:00
Peter Fogg
9c84440501
PR comment cleanup.
2013-08-06 13:23:33 -04:00
Peter Fogg
08c5f955aa
Unstyled prototype for new list editor design.
2013-08-06 13:23:33 -04:00
Peter Fogg
74b815274f
Add a list view for metadata editor.
...
This is to be used with VideoAlpha's functionality allowing a choice
of multiple HTML5 video sources.
2013-08-06 13:23:33 -04:00
Alexander Kryklia
da4f295d00
Add TabsEditingDescriptor for VideoAlpha
...
Updates comment
Make Model descriptor class property.
Fix tests
2013-08-05 13:38:32 +03:00
David Baumgold
1eae675952
Create a dedicated CMS.Models.Course Backbone model
...
Initialize on every page that has a context_course set
2013-08-01 13:39:47 -04:00
Peter Fogg
e3e6fd2002
Remove commented-out code and add test.
2013-07-22 12:33:01 -04:00
Peter Fogg
925f0a5ee8
Remove @xhr.restore() to fix tests.
2013-07-22 11:37:09 -04:00
Peter Fogg
9fe4cb734c
Use Backbone notifications for course section delete.
2013-07-22 11:37:08 -04:00
Peter Fogg
8b13ff3dff
Merge pull request #376 from edx/peter-fogg/rename-notification-save
...
Rename CMS.Views.Notification.Saving to Mini.
2013-07-11 14:25:44 -07:00
Peter Fogg
5b4524d75e
Merge pull request #301 from edx/peter-fogg/explicit-course-settings
...
Peter fogg/explicit course settings
2013-07-11 14:09:07 -07:00
Peter Fogg
6e94960488
Fix many validation bugs and failing tests.
2013-07-11 16:09:59 -04:00
Peter Fogg
9c8f63726f
Rename CMS.Views.Notification.Saving to Mini, in line with its more diverse modern usage.
2013-07-11 13:13:08 -04:00
Peter Fogg
975e28e9dc
Remove undefined variable.
2013-07-10 16:31:43 -04:00
Peter Fogg
66b73c861f
Use new feedback notification when changing section release dates.
2013-07-10 16:07:25 -04:00
David Baumgold
8d809dbad6
Remove commented-out code
2013-07-09 19:16:43 -04:00
David Baumgold
cfa094e424
Validation tests for Backbone models
2013-07-09 19:16:43 -04:00
David Baumgold
fe8587566f
All textbook chapters must have name and asset_path
...
Previously, for a textbook with only one chapter, we allowed that chapter to
not have a title -- under the assumption that it would be shown as a monolithic
textbook, instead of a chaptered textbook. However, the UI doesn't support that
idea, the code was getting a bit messy, and there was no real benefit to the idea
of not having to specify a chapter title. This commit removes that special case,
and ensures that all textbook chapters must have a name and an asset path.
2013-07-09 19:16:43 -04:00
David Baumgold
fa62f48e57
Fix Jasmine test failures
2013-07-09 19:16:11 -04:00
David Baumgold
a608d8a38d
PDF Textbooks: handle model deletion
...
Previously, when a model was deleted, the entire collection would save itself
to the server again. Now, we just call model.destroy(), which doesn't affect
other models.
2013-07-09 19:16:08 -04:00
David Baumgold
8f2077b579
Test for Textbook.reset method
2013-07-09 19:16:08 -04:00
David Baumgold
70a011770e
Show a warning if the user tries to leave the page with unsaved textbook changes
2013-07-09 19:16:08 -04:00
David Baumgold
fedbf4585b
Prevent saving when textbook is in invalid state
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
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
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
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
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
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
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
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