The default Add/Edit Item dialog for a custom list allows you to double-click on the Edit ribbon tab to minimize/collapse the action button row for the ribbon. I would like to be able to have a little bit of JavaScript on the form that hides those buttons by default. This is causing some confusion for some users as they also see the Approve button for publishing when they are being instructed to "approve" a custom workflow item.
If I have double-clicked to hide the ribbon tab container, I can bring it back with the following sample jQuery code:
$("span.ms-cui-tt-span").click();
Despite my best efforts to simulate a double click, I can't seem to get it to fire. None of these work properly:
$("span.ms-cui-tt-span").dblclick();
$("span.ms-cui-tt-span").trigger("dblclick");
$("span.ms-cui-tt-span").trigger("doubleclick");
$("span.ms-cui-tt-span").trigger("click").trigger("click");
$("span.ms-cui-tt-span").click(); $("span.ms-cui-tt-span").click();
I may try to use the profiler and see if I can unwind through the stack and get some better info. It looks like OnRibbonMinimizedChanged is called at some point in the process and that may give some good clues as well.
Here are two screenshots. The first showing the normal ribbon in the add new item dialog and the second showing the result of double clicking on the Edit ribbon tab and collapsing the action area under the tab: