can edit memberships now (js bug)
This commit is contained in:
parent
42a2bba538
commit
1703c05693
@ -3,7 +3,7 @@ class Locomotive.Models.Membership extends Backbone.Model
|
||||
toJSONForSave: ->
|
||||
_.tap {}, (hash) =>
|
||||
for key, value of @.toJSON()
|
||||
hash[key] = value if _.include(['id', 'role', '_destroy'], key)
|
||||
hash[key] = value if _.include(['id', '_id', 'role', '_destroy'], key)
|
||||
|
||||
class Locomotive.Models.MembershipsCollection extends Backbone.Collection
|
||||
|
||||
|
@ -21,7 +21,8 @@ class Locomotive.Models.Site extends Backbone.Model
|
||||
|
||||
toJSON: ->
|
||||
_.tap super, (hash) =>
|
||||
hash.memberships = @get('memberships').toJSONForSave() if @get('memberships')
|
||||
delete hash.memberships
|
||||
hash.memberships_attributes = @get('memberships').toJSONForSave() if @get('memberships')? && @get('memberships').length > 0
|
||||
hash.domains = _.map(@get('domains'), (domain) -> domain.get('name'))
|
||||
|
||||
class Locomotive.Models.CurrentSite extends Locomotive.Models.Site
|
||||
|
7
doc/TODO
7
doc/TODO
@ -104,18 +104,23 @@ x deployment
|
||||
x data ?
|
||||
x script to migrate existing site
|
||||
x i18n
|
||||
- upgrade to rails 3.2 (https://github.com/locomotivecms/engine/pull/281/files)
|
||||
- missing custom_fields
|
||||
x belongs_to
|
||||
- has_many
|
||||
- many_to_many
|
||||
- heroku module for locomotive
|
||||
- refactoring
|
||||
x remove the import / export scripts
|
||||
x remove the cross domain authentication (use auth_token instead)
|
||||
- where to put Locomotive::InlineEditorMiddleware ?
|
||||
- upgrade to rails 3.2 (https://github.com/locomotivecms/engine/pull/281/files)
|
||||
|
||||
- bugs / ui tweaks
|
||||
x unable to toggle the "required" check_boxes for content types
|
||||
x unable to sign out
|
||||
x unable to remove a field
|
||||
x "back to admin" link does not work if inline editor disabled
|
||||
x unable to delete memberships
|
||||
- display by categories does not work when localized
|
||||
- disallow to click twice on the submit form button (spinner ?)
|
||||
- message to notify people if their browser is too old
|
||||
|
Loading…
Reference in New Issue
Block a user