I remember seeing a thread on similar idea long time ago, unfortunately couldn't find it again. So I would be thrilled to know if it's already working.
The ideal is very simple, to be able to create an ActionMenuItem that will run a javascript in the current window.
Test case to why:
Say user wants to select a few Shots and run a packaging script on them.
Before we run the packing code (Python), I would like to open up a dialog-box and show him a few options/checkboxs.
Then I can pass his/hers input forward to a python script to handle the rest.
Currently ( to my knowledge ):
We can do all of this, but it would have to open up in a separate window, where we can do all of this.
But the downside, it's disconnecting the user from Shotgun and create a refresh issue in case we made changes to his current page.
Why running javascript inside his window would help:
A. running javascript would make it easier to dynamically create the dialog-box in his current window and show relevant information.
B. That way we keeping the user in context. one window one thing to focus on instead of pop-ups and tabs.
C. using the power of javascript and ajax, we can call backend-python ( django as an example ) to retrieve information we need to show/create for the user. Then he could click "submit" and off it goes to the backend.
Also I'm hoping allowing us to run javascript in the current window isn't a lot of development work for Shotgun.
Cause then I'll ask for a jQuery like API for Shotgun to control the UI... But I didn't say that... that's for 2015.
Hope it was clear,
Asi