Commit Graph

211 Commits

Author SHA1 Message Date
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
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
David Baumgold
02626ffda7 Removed unused test code 2013-06-18 11:27:13 -04:00
David Baumgold
fb0d16afe2 Only show at most 300 chars in AJAX error notification 2013-06-18 10:23:44 -04:00
David Baumgold
aa24508024 Add underscore.string library
http://epeli.github.io/underscore.string/
2013-06-18 10:23:18 -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
cahrens
21dc4d863e Put back in some older code to save source_code property. 2013-06-14 14:10:40 -04:00
Peter Fogg
8a67454f98 Prevent creation of unnecessary template divs, and rename .single_templates to .single-templates for convention. 2013-06-03 15:36:55 -04:00
Peter Fogg
ff0c56b7fb Cleaning up code -- removed unnecessary lines, fixed indentation, renamed method. 2013-06-03 14:21:50 -04:00
Peter Fogg
cce65ce9ae Merge branch 'master' of github.com:edx/edx-platform into peter-fogg/single-click-video-creation 2013-06-03 09:15:52 -04:00
Peter Fogg
68581610a4 Allow single-click creation of course components that only have one template. 2013-05-31 16:22:51 -04:00
cahrens
a82daf0710 Change to Backbone collection. 2013-05-31 15:59:53 -04:00
Peter Fogg
56ed47b37f Allow single-click video creation. 2013-05-31 12:52:53 -04:00
cahrens
c0c5e920a3 Go back to setFixtures. 2013-05-30 12:56:55 -04:00
cahrens
f0260757c5 Cleanup. 2013-05-29 16:50:22 -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
David Baumgold
c26edbd631 jasmine-jquery compatiblity post-backport 2013-05-23 10:14:47 -04:00
David Baumgold
4736527952 Add Jasmine tests to cover AJAX error notifications 2013-05-22 15:55:56 -04:00
David Baumgold
0a7222b123 Allow an AJAX call to specify that it should not notify on error
Because there are some cases where it's OK to fail, and it's not the user's fault
2013-05-22 15:55:56 -04:00
David Baumgold
3738078ce9 Load system feedback template for SectionEdit tests 2013-05-22 15:55:56 -04:00
David Baumgold
dc2acb18ee Moved global AJAX Error handler definition to main.coffee 2013-05-22 15:55:55 -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
5a06c69289 Add toBeShown and toBeHiding matchers for Jasmine
To reduce redundancy in tests
2013-05-22 15:55:54 -04:00
David Baumgold
0052eaacbc Backbone section: don't save name on validation error 2013-05-22 15:55:54 -04:00
David Baumgold
c628a8a360 Fix test 2013-05-22 15:55:53 -04:00
David Baumgold
525fe2d581 Expose a dummy gettext function in the Jasmine test env 2013-05-22 15:55:53 -04:00
David Baumgold
9cbfee9894 Fix Jasmine tests related to invalid messages for section model 2013-05-22 15:55:53 -04:00
David Baumgold
2b01273f7f Added some Jasmine tests for section views in Backbone 2013-05-22 15:55:52 -04:00
David Baumgold
6ed5a2aa01 Added tests for Backbone section models 2013-05-22 15:55:52 -04:00
David Baumgold
56d8a467c8 Add tests for minShown and maxShown in views 2013-05-22 15:55:52 -04:00
David Baumgold
d10e644c6e Added sinon.js to project 2013-05-22 15:55:52 -04:00
David Baumgold
dc76d71c42 4-space indents for coffeescript 2013-05-22 15:55:52 -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
528987342a Add tests for primary and secondary CSS classes 2013-05-22 15:55:51 -04:00
David Baumgold
fedfe8627f Add tests for click events on views 2013-05-22 15:55:51 -04:00
David Baumgold
070d24cf61 Jasmine doesn't like asserting on the <body> element :( 2013-05-22 15:55:51 -04:00
David Baumgold
10ec604630 Got jasmine tests working with fixtures properly 2013-05-22 15:55:50 -04:00
David Baumgold
5275e41e4a Adding new feedback view tests 2013-05-22 15:55:50 -04:00
David Baumgold
39f81df476 Added a few more tests for feedback models 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
cahrens
4facd262bd Jasmine test for metadata model. 2013-05-20 16:26:48 -04:00
cahrens
3229aaf503 Call polyfill at right time. 2013-05-20 11:16:20 -04:00
marco
aa41aed9d1 prototype for polyfill on number input fields, minimal styling to up down buttons 2013-05-20 09:45:33 -04:00
cahrens
b16e17a250 Some i18n work and other minor cleanup. 2013-05-17 14:57:25 -04:00
cahrens
01ff8396e3 Fix CodeMirror initialization problem. 2013-05-16 12:34:39 -04:00
cahrens
235ecff28b In progress. 2013-05-16 10:40:48 -04:00
marco
bbb6a3c60d resolved metadata-edit conflict, adding in latex item into settings 2013-05-15 16:27:04 -04:00