Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adding 'add_tile' name to form - after sucessfull save redirect to tile view not to edit view
- Loading branch information
Showing
1 changed file
with
3 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garbas This commit breaks collective.tinymcetiles. The code below is trying to pickup the json tile data above and insert the tile placeholder into tinymce. What's the reasoning behind changing the behaviour to go to the rendered tile? Doing so doesn't make a lot of sense since the tile is to be inserted not viewed in isolation.
https://github.com/collective/collective.tinymcetiles/blob/master/collective/tinymcetiles/plugin/event.js
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can construct above JSON dictionary from info you had before you did this request and rest you can figure out from the response.
i was minimizing the requests you need to add a tile. before this you needed to do 4 requests now its only 2, while still having all the info available.
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think what is missing right now is documentation how this works and how someone could use this in javascript, right?
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@add-tile view doesn't have a url until the code above is called. After this redirect the view has no JS and is completely controlled by the tile. As I said, it doesn't make any sense to redirect to the tile rendering itself since it's meant to be embeded not viewed in isolation in the same context in a popup dialog. Redirecting back to the @@add-tile view makes sense since it includes JS which will let you close the dialog.
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best I can think of is trying to add a listener on the iframe in the popup. But this isn't possible to do nicely.
http://stackoverflow.com/questions/2433966/iframe-contents-change-event
I think we should change it back to how it worked before.
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think i'm following you. i'm busy next 3-4 days but i would to continue on this discussion with you after that.
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a working version the london sprint in a few days times time. It works with this code back in so I'm going to go ahead and put this code back in. If you want to optimise it later then please do so in a way that keeps it working. see #4
1ff5641
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.