0
My manager would like to see transition buttons in our main application moved to the right, from the left. This would make the application look more like another application we have that is a Solution, with 3 or 4 buttons designed to be on the right, and any remaining buttons under a More drop-down. I guess the only way to accomplish this is to redesign every one of innumerable custom forms to use the same structure as the Solution.

The Solution has only a few custom forms that use form actions to accommodate use by multiple states, whereas the main application has a custom form for each of numerous states.

Also, there are states that use quick forms. Surely there's no global (or any) way to make the buttons right-justified on all the quick forms.
Responses (3)
  • Accepted Answer

    Thursday, May 31 2018, 05:31 PM - #Permalink
    0
    If you use something like Chrome Developer tools you can drill into the source to see how the transition buttons are being displayed and there is possibly a style sheet change you can make to change the alignment from left to right.

    I had a quick look and the table cell that contains the transition buttons is set as align="left" - and if it is changed to 'right' then that works - but you would need to look for where that particular style is coming from.

    Of course editing stylesheets are not something to enter into lightly - and of course after every upgrade you would need to re-apply your changes. You can add css directly to a custom form, but if you have lots you probably don't want to do that,
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 01 2018, 08:54 AM - #Permalink
    0
    I agree with David Sheaffe, but I would think that you could do this via custom forms. As such, you wouldn't be wrestling with the SBM CSS files on every upgrade.
    • Don Inghram
      3 weeks ago
      I mean, I agree you can do this with CSS, but I'd think you can do it with CSS on custom forms rather than system-level CSS files.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 15 2018, 06:27 PM - #Permalink
    0
    David:
    Try this ...

    In Composer, create a JavaScript "element" with this code :
    AddDelayCallback(function() {
    // Assume it's a STATE form. Get the Transition Buttons section
    var jq_BtnTd = jQuerySBM("#transitionbuttons") ;
    // If we found something, move stuff around.
    if (jq_BtnTd.length > 0) { jq_BtnTd.attr({align:"right" , width:"100%"}).parent().css("white-space","nowrap") ; }
    });

    I called it "Buttons to Right".

    In the JavaScript attribute for your STATE forms, include that JavaScript element.

    The code didn't work so good in a Form Action / On Form Load / "Execute JavaScript". I didn't try it in an HTML JavaScript Widget.

    I was trying the same code for the OK/CANCEL buttons on a Transition form, but the HTML in those types of forms is sufficiently different to require more investigation and development.
    The reply is currently minimized Show
Your Reply

Recent Tweets