David Baumgold
5b9e283552
Load course info update template on page instead of via AJAX
2013-07-29 14:29:04 -04:00
David Baumgold
eac14615cd
Load advanced_entry template on page, rather than via AJAX
2013-07-29 14:28:40 -04:00
Peter Fogg
6eac259c08
Merge pull request #415 from edx/peter-fogg/notification-stories
...
Peter fogg/notification stories
2013-07-23 09:05:10 -07:00
David Baumgold
b51aa31231
PDF uploader dialog refers to "PDF" instead of "asset"
2013-07-22 12:54:16 -04:00
Peter Fogg
c4a21fc906
Merge pull request #403 from edx/peter-fogg/fix-stud-421
...
Validate date/time settings when typed in directly.
2013-07-22 08:41:04 -07:00
Peter Fogg
75edc65748
Use Backbone notifications for setting graded status.
2013-07-22 11:37:09 -04:00
Peter Fogg
58f147c161
Change delete asset prompt to Warning type for consistency.
2013-07-18 11:47:40 -04:00
Peter Fogg
5c0fd18910
Validate date/time settings when typed in directly.
...
The changeTime event isn't fired when the user types in the field, but
only when clicking on the time in the dropdown. I'd consider this a
timepicker bug, but for now we can just listen to the user typing in
the field and update the value (and thus validate) like we do with
other field types.
2013-07-15 11:00:43 -04:00
David Baumgold
a6f349dab9
Studio i18n
2013-07-12 16:25:39 -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
c2f0b7d4e9
Fix validation in many cases, and ensure that the notification bar pops up correctly.
2013-07-11 15:53:51 -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
f3837009af
Remove ellipsis from internationalized notifications.
2013-07-11 11:26:17 -04:00
Peter Fogg
ec13349ae3
Remove outdated deleteKeys from advanced settings.
2013-07-11 09:11:59 -04:00
Peter Fogg
3d4f9268da
Make sure that changing grading cutoffs triggers a save confirmation, and reliable reverting of changes.
2013-07-11 09:11:59 -04:00
Peter Fogg
9094f1890b
Change course settings to require explicit save.
...
Rather than asynchronously saving when a setting is updated, we now
prompt the user to confirm their changes and only persist the data if
they hit the save button. Lettuce tests are updated to expect this
behavior and some new ones are added.
2013-07-11 09:11:07 -04:00
Peter Fogg
164a469e9d
Factor showNotificationBar out into ValidatingView.
...
When all settings require an explicit save, this functionality will be
shared between each view (with slight changes, e.g. click handlers.)
2013-07-11 09:11:07 -04:00
David Baumgold
1a0d6d21bb
Forgot to call show() on saving notification
2013-07-09 19:16:43 -04:00
David Baumgold
eba5928009
Added a comment
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
e7088d50fd
Display error message when trying to upload a non-PDF file as a PDF textbook
2013-07-09 19:16:11 -04:00
David Baumgold
ca2339f15e
Remove unneeded arguments
...
They are the defaults now
2013-07-09 19:16:10 -04:00
Frances Botsford
b41d23747a
PDF Textbooks: implemented "View Live" link
2013-07-09 19:16:09 -04:00
David Baumgold
2a92a14054
Wrote simple lettuce tests for pdf textbooks
2013-07-09 19:16:09 -04:00
David Baumgold
2b9ed46440
Save chapter information more frequently
2013-07-09 19:16:09 -04:00
David Baumgold
11c5c14998
Add error class to invalid fields on PDF textbooks form
2013-07-09 19:16:09 -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
fedbf4585b
Prevent saving when textbook is in invalid state
2013-07-09 19:16:08 -04:00
David Baumgold
74b9703def
Reset model attributes when textbook editing is cancelled
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
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
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
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