Switch panes in APEX 5.0 Page Designer – Part 2

ok, it’s time for another hack-a-tronik. I’ve managed to add a bit more functionality to the pane switcher and it’s now actually starting to look like a plugin (but we ain’t there quite yet).

First off all, I’d like to point to the excellent hardlikesoftware blog by John Snyders. There’s tons of good APEX 5 information there.
You might want to check out his blog post on APEX 5.0 custom menus.

(I’m also very keen finding out if John’s work on the Javascript implementation of the StringTemplate framework will perhaps find some good use in a future APEX version).

Now, back to our hack-a-tronik. Basically I refactored the code of part 1 and named it Xplug. The idea is that Xplug will contain a collection of small enhancements to the APEX 5.0 Page Designer.

After running the below Javascript code, you get an additional button in Page Designer that installs a custom menu. In the menu there’s currently 1 menu entry called “Dock grid to the right”.
Basically this works as a toggle.

xplug_screenshot1

… When checked the middle and right pane are swapped …

xplug_screenshot2

On a sidenote, I defined the icon in the button using SVG which I embedded in the Javascript, so there are no external files loaded. That was kinda fun. Anyway it’s still no real plugin at this time.

For my own needs, I -for now- just attached the below Javascript code as a Greasemonkey script in Firefox and I’m ready to roll.

In the next part, I’ll see if I can make a real browser-plugin and add some small enhancements along the way.

Below is the javascript code. You can turn it into a Greasemonkey script or -for testing- copy it into your Javascript console after the Page Designer has loaded.

Enjoy!
Filip

5 thoughts on “Switch panes in APEX 5.0 Page Designer – Part 2

  1. Hi Filip,

    nice addon. I installed it as a Greasemonkey script in Firefox 39. With an english environment in the application builder it is working fine but when using a german env it is only changing the width of the panes and leaves the property editor on the right side. I tested it local and on apex.oracle.com.

    And is there a way to autoload or auto-execute it when opening the page designer? Now i have to do it manually every time.

    Thanks,
    Mathias

    1. Hi Mathias,

      thanks for letting me know. Until now I worked with an english environment. I’ll look into this and see if I can fix this for other environments.

      It also occured to me, that you have to select the option each time when opening page designer. Perhaps I can come up with a way to (locally?) store profile settings.

  2. I can answer this question

    (I’m also very keen finding out if John’s work on the Javascript implementation of the StringTemplate framework will perhaps find some good use in a future APEX version).

    No. The stringtemplate-js project has no connection with APEX or with Oracle. It is my own project on my own time.
    -John

Leave a Reply

Your email address will not be published. Required fields are marked *