Use a model for resource extra data instance
Review Request #7398 — Created June 9, 2015 and submitted
The RB.ExtraDataModel is a simple model that has special JSON
serialization for our API, since our API takes flat values and not
nested ones.The RB.ExtraDataMixin provides overrides for Backbone.Model's set and
unset methods, as well as helper methods for setting and unsetting
members in a model's extra data.
Ran JS tests.
- Summary:
-
Use a model for resource extra data instance.Use a model for resource extra data instance
- Diff:
-
Revision 2 (+216 -57)
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/extraDataModel.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/extraDataModel.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
- Change Summary:
-
Fix unit test.
- Testing Done:
-
~ Ran JS tests. Currently, some tests are failing that use
model.save
, I'm not sure why.~ Ran JS tests.
- Diff:
-
Revision 3 (+218 -57)
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/extraDataModel.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/extraDataModel.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js