update tiles using AJAX after edit #274

Closed
hvelarde opened this Issue Sep 3, 2013 · 3 comments

4 participants

@hvelarde
Plone Collective member

currently, when an user edits a tile a full refresh of the cover takes place; worst, even if the user press the Cancel key, the refresh takes place.

we need to fix this: update of tiles must be done using AJAX; avoid refresh ehn pressing Cancel.

@marcosfromero marcosfromero was assigned Sep 3, 2013
@marcosfromero

See https://github.com/collective/collective.cover/blame/master/src/collective/cover/static/cover.js#L157:
If we omit the onClose function, Cancel button won't refresh the page.
Suposedly it was added to fix issue #50, but I tested it (manually) and rich text content is saved nonetheless.
@cleberjsantos: do you remember why was that added?

@cleberjsantos
Plone Collective member

@marcosfromero was an issue with our RichText tile. In the TinyMCE function call on static/cover.js, was not saved rich text tile content when edited from the compose view.

But, this action of the reload after close overlay I think we can remove or change.

@Quimera

was added here 5cdc48e#L3R272 almost 100% that can be removed or replaced for something more useful. You can add the ajax code inside the "afterpost" method, the only thing to note, some tiles may depend on an initialization function in order to work properly (bound to jquery ready (?)) therefore are not going to work after an ajax dom replace :P...

@marcosfromero marcosfromero referenced this issue Sep 6, 2013
Merged

Issue 274 #277

@hvelarde hvelarde closed this in #277 Sep 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment