Skip to content

Instantly share code, notes, and snippets.

<?php
$bean_name = $GLOBALS['beanList'][$moduleName];
$mod = new $bean_name();
$mod->retrieve($id);
<?php
$mod = BeanFactory::getBean($moduleName, $id);
<?php
// Modules to make sure are hidden
$exemptModules[] = 'ModuleYouShouldNotReportOn';
// Modules we want to always be available
$additionalModules[] = 'MySuperSecretModule'
// Display a message to the user before the action
ajaxStatus.showStatus('Message to display while doing the action');
//
// Perform the AJAX action
//
// Now hide the message when we are done
ajaxStatus.hideStatus();
<?php
...
,
'users' => array(
'top_buttons' => array (
array (
'widget_class' => 'SubPanelTopSelectButton',
'mode' => 'MultiSelect', // Add this in to enable selecting multiple record, remove to disable it
),
),
<?php
class CalendarDisplay
{
/**
* colors of items on calendar
*/
public $activity_colors = array(
'Meetings' => array(
'border' => '#1C5FBD',
el.style.backgroundColor = CAL.activity_colors[item.module_name]['body'];
el.style.borderColor = CAL.activity_colors[item.module_name]['border'];
// ------------------------------------------------------------
// Lets lookup the item.status in the activity_colors
// ------------------------------------------------------------
if (item.module_name =="Meetings") {
el.style.backgroundColor = CAL.activity_colors[item.status]['body'];
el.style.borderColor = CAL.activity_colors[item.status]['border'];
}
else {
// The next 2 lines are the orignial Cal.js code.
<?php
...
,
'users' => array(
'top_buttons' => array (
array (
'widget_class' => 'SubPanelTopCreateButton',
),
),
...
<?php
...
,
'users' => array(
'top_buttons' => array (
array (
'widget_class' => 'SubPanelTopButtonQuickCreate',
),
),
...