Created
September 9, 2012 12:55
-
-
Save jmertic/3684156 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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() < 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