Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Damien Green 72 posts 134 karma points
    Aug 16, 2015 @ 10:28
    Damien Green
    0

    Custom property editor questions, adding buttons to bottom bar and event called when top tabs clicked

    Hi Guys,

    A couple of questions about developing a custom Umbraco property editor.

    1. Is it possible to add buttons to the bottom button bar, the one that contains Preview and the green Save and Publish button? If so, can someone point me in the right direction?

    enter image description here

    1. Is there a client side event I can wire into so I can run a custom function when the tab (pictured) is clicked and if so how do I hook into it, presumably by adding some sort of angular directive...?

    enter image description here

    Many thanks,

    Damien

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Aug 17, 2015 @ 06:50
    Dave Woestenborghs
    0

    Hi Damien,

    I think both are possible, but require some hacking to achieve this. This code can also break on Umbraco upgrades.

    Maybe you can explain what you are trying to do ? Maybe there is a alternative.

    Dave

  • Damien Green 72 posts 134 karma points
    Aug 17, 2015 @ 08:10
    Damien Green
    0

    Hi Dave,

    Many thanks for your response, I feared this might be the case. Hacking the core libraries isn't really a path I would like to go down since as you say it weill break each time the Umbraco packages are updated and may also have undersrable effects on the rest of the backend.

    Basically I have an image gallery that needs to do some layout once the tab is activated. I have tried putting the code into various callback functions as the images are loaded etc. but the problem is that until that tab is activated every element has a size of 0 so it is impossible to perform any layout. I was hoping to hook into some sort of event that occurs when the tab is activated and the elements within the tab have some dimensions so I can perform my layout. My other thought is to attach a listener to an event on one of the objects contained within the editor that will tell me once the object has some dimensions but I'm not entirely sure what Umbraco does to objects within tabs that are not activated - clearly it doesn't change the opacity, I presume it's calling something like hide.

    The reason behind wanting to use the bottom button bar is that it is a fixed panel and I have a couple of controls fore zooming in and out of the gallery. It would be nice if I could have these fixed in place so theyt are always availabble when scrolling through the gallery. I have tried other fixed controls on the screen, but I haven't been able to achieve a satisfactory layout yet - each method I have tried comes with several caveats that involve hacking Javscript and lead to a result I'm not happy with. This is only really a nice to have resolving the top issue is the priority here.

    Many thanks,

    Damien

Please Sign in or register to post replies

Write your reply to:

Draft