Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created September 9, 2012 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jmertic/3684156 to your computer and use it in GitHub Desktop.
Save jmertic/3684156 to your computer and use it in GitHub Desktop.
<?php
require_once('include/MVC/View/views/view.list.php');
class CustomAccountsViewList extends ViewList
{
/**
* @see ViewList::preDisplay()
*/
public function preDisplay()
{
parent::preDisplay();
$this->lv->actionsMenuExtraItems[] = $this->buildMyMenuItem();
}
/**
* @return string HTML
*/
protected function buildMyMenuItem()
{
global $app_strings;
return <<<EOHTML
<a class="menuItem" style="width: 150px;" href="#" onmouseover='hiliteItem(this,"yes");'
onmouseout='unhiliteItem(this);'
onclick="sugarListView.get_checks();
if(sugarListView.get_checks_count() &lt; 1) {
alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
return false;
}
document.MassUpdate.action.value='displaypassedids';
document.MassUpdate.submit();">Send records to a new view!</a>
EOHTML;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment