Hi,
I just finished up writing the code for WHO to copy and paste elements
between stories (or within itself). I have attached the patch (diff
against trunk) and the copy icon (put it in comp/media/images). The
icon is from a free icon set:
http://famfamfam.com/lab/icons/mini/
Not sure if you guys have another source for icons.
Some notes about things I'm not 100% about:
- Copy data is stored in the session (get_state_data('copy_buffer',
'buffer')) - this should be okay right?
- It shows the copy action on items like the Deck on a story. However,
since you can't remove or add more than one deck element, copying it is
useless. Is there any way to know when copying doesn't make any sense?
- I found a bug with the way elements are added or removed. When you do
so, the container's delete/copy icon is lost because it's coded not to
show up on the top level container. This is fine on the first page
load, but on delete/add, it thinks it's the top level element when
drawing that container, so those buttons are lost.
- There's a bit of overlap on the icons when you have a field that only
takes up one line of space.
- I had to change Bric::App::Callback::ContainerProf::_locate_subelement
to also be able to search for fields rather than just containers.
Let me know what you think.
Adrian
I just finished up writing the code for WHO to copy and paste elements
between stories (or within itself). I have attached the patch (diff
against trunk) and the copy icon (put it in comp/media/images). The
icon is from a free icon set:
http://famfamfam.com/lab/icons/mini/
Not sure if you guys have another source for icons.
Some notes about things I'm not 100% about:
- Copy data is stored in the session (get_state_data('copy_buffer',
'buffer')) - this should be okay right?
- It shows the copy action on items like the Deck on a story. However,
since you can't remove or add more than one deck element, copying it is
useless. Is there any way to know when copying doesn't make any sense?
- I found a bug with the way elements are added or removed. When you do
so, the container's delete/copy icon is lost because it's coded not to
show up on the top level container. This is fine on the first page
load, but on delete/add, it thinks it's the top level element when
drawing that container, so those buttons are lost.
- There's a bit of overlap on the icons when you have a field that only
takes up one line of space.
- I had to change Bric::App::Callback::ContainerProf::_locate_subelement
to also be able to search for fields rather than just containers.
Let me know what you think.
Adrian