Hi everybody,
I just got off the phone with Greg; we were talking about how the
Bricolage preview function might be changed and I think we've got a
pretty good idea. But I thought I should post our thoughts to the list
before building any of those changes, in case anybody has a better idea
than what we're proposing.
Here's the problem:
Some of our templates cause edits to stories. The best example is the
image resize and relate template, which takes a high-res picture and
creates multiple thumbnails, and then adds a container element for each
one of those thumbnails.
If you trigger a preview from the UI, while you're looking at the
profile of an element that will have children added by the preview, and
then you click "save," Bricolage throws a "state inconsistent" error,
because the new children are present in the story but are not in the
form being submitted.
So we want to make that error go away, and we also want to make sure the
UI shows story's elements in their current state.
Here's our proposed change (which could be turned on or off with a
configuration directive):
1. Instead of having the preview triggered from a popup browser window,
trigger it from the UI window. When "preview" is clicked, pop up an
in-window AJAX notice (a "modal" or a "fader" or whatever those things
are called) that the preview is in progress.
2. When the preview is complete and the callback tells the browser so,
have the modal notice change to offer a link to the preview. Clicking
that link would open a new browser and display the previewed document.
3. Meanwhile, because the UI window was be the one that actually called
the preview, it could be smart about refreshing its own view of the
story and its elements.
Turning the directive off would leave the preview process exactly as it
is, with previews executed by popup windows.
Anyway, I'd love to hear people's thoughts about the idea.
Thanks,
Bret
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret@pectopah.com
www.pectopah.com
I just got off the phone with Greg; we were talking about how the
Bricolage preview function might be changed and I think we've got a
pretty good idea. But I thought I should post our thoughts to the list
before building any of those changes, in case anybody has a better idea
than what we're proposing.
Here's the problem:
Some of our templates cause edits to stories. The best example is the
image resize and relate template, which takes a high-res picture and
creates multiple thumbnails, and then adds a container element for each
one of those thumbnails.
If you trigger a preview from the UI, while you're looking at the
profile of an element that will have children added by the preview, and
then you click "save," Bricolage throws a "state inconsistent" error,
because the new children are present in the story but are not in the
form being submitted.
So we want to make that error go away, and we also want to make sure the
UI shows story's elements in their current state.
Here's our proposed change (which could be turned on or off with a
configuration directive):
1. Instead of having the preview triggered from a popup browser window,
trigger it from the UI window. When "preview" is clicked, pop up an
in-window AJAX notice (a "modal" or a "fader" or whatever those things
are called) that the preview is in progress.
2. When the preview is complete and the callback tells the browser so,
have the modal notice change to offer a link to the preview. Clicking
that link would open a new browser and display the previewed document.
3. Meanwhile, because the UI window was be the one that actually called
the preview, it could be smart about refreshing its own view of the
story and its elements.
Turning the directive off would leave the preview process exactly as it
is, with previews executed by popup windows.
Anyway, I'd love to hear people's thoughts about the idea.
Thanks,
Bret
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret@pectopah.com
www.pectopah.com