Add Action Buttons on Browse Screen

Add Action Buttons on Browse Screen

Postby massiws » Sat Mar 22, 2014 4:19 am

After searching and filtering records on Browse screen, I want to be able to run an activity with an extra button, the same workflow as Print button, but with my logic.
I tried to solve with jQuery in nuLoadThis() function:
Code: Select all
function nuLoadThis() {
    $(".actionButton").filter(":last").append("<input>");
}

but don't work: new button dont appear.
Tried also to use addJSfunction() in Before Browse with the same result.

Is there a way to add an extra button to Browse Screen to run an activity?

Max
massiws
 
Posts: 503
Joined: Thu May 24, 2012 9:38 am
Location: Milan, Italy

Re: Add Action Buttons on Browse Screen

Postby massiws » Mon Mar 24, 2014 6:16 pm

I found a solution to make Extra Action buttons appear on browse form!

I added this code in Custom Code > Before Browse:
Code: Select all
$js = <<<EOJS
function nuLoadThis() {
  /* Append a new Action Button on Browse form */
  var elem = '<input id="execButton" type="button">';
  $( "#actionButtons" ).append( elem );
  $( "#execButton" )
    .addClass( "actionButton" )
    .attr( "value", "Execute" )
    .click(function() {
      // Do something
      alert( "Clicked!" );
    });
}
EOJS;
addJSfunction($js); 

BrowseActionButton.png
Extra Action Button on Browse form
BrowseActionButton.png (104.8 KiB) Viewed 5054 times


Max
massiws
 
Posts: 503
Joined: Thu May 24, 2012 9:38 am
Location: Milan, Italy


Return to General