本文整理汇总了PHP中ACLController::addJavascript方法的典型用法代码示例。如果您正苦于以下问题:PHP ACLController::addJavascript方法的具体用法?PHP ACLController::addJavascript怎么用?PHP ACLController::addJavascript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACLController
的用法示例。
在下文中一共展示了ACLController::addJavascript方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: query_module_access_list
$modListHeader = query_module_access_list($current_user);
}
}
if (array_key_exists($_REQUEST['module'], $modListHeader) || in_array($_REQUEST['module'], $modInvisList) || (array_key_exists("Activities", $modListHeader) || array_key_exists("Calendar", $modListHeader)) && in_array($_REQUEST['module'], $modInvisListActivities) || $_REQUEST['module'] == "iFrames" && isset($_REQUEST['record'])) {
// Only include the file if there is a file. User login does not have a filename but does have a module.
if (!empty($currentModuleFile)) {
///////////////////////////////////////////////////////////////////////
//// DISPLAY REQUESTED PAGE
$GLOBALS['log']->debug('---------> BEGING INCLUDING REQUESTED PAGE: [' . $currentModuleFile . '] <------------');
include $currentModuleFile;
$GLOBALS['log']->debug('---------> END INCLUDING REQUESTED PAGE: [' . $currentModuleFile . '] <------------');
//// END DISPLAY REQUESTED PAGE
///////////////////////////////////////////////////////////////////////
}
if (isset($focus) && is_subclass_of($focus, 'SugarBean') && $focus->bean_implements('ACL')) {
ACLController::addJavascript($focus->module_dir, '', $focus->isOwner($current_user->id));
}
} else {
// avoid js error when set_focus is not defined
echo '<script>function set_focus(){return;}</script><p class="error">Warning: You do not have permission to access this module.</p>';
}
if (!$skipFooters) {
echo "<!-- crmprint -->";
echo $jsalerts->getScript();
include 'themes/' . $theme . '/footer.php';
if (!isset($_SESSION['avail_themes'])) {
$_SESSION['avail_themes'] = serialize(get_themes());
}
if (!isset($_SESSION['avail_languages'])) {
$_SESSION['avail_languages'] = serialize(get_languages());
}
示例2: get_image
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>");
}
$detailView->processListNavigation($xtpl, "OPPORTUNITY", $offset, $focus->is_AuditEnabled());
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main.open_source");
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Opportunities');
echo $subpanel->display();
echo ACLController::addJavascript($focus->module_dir, '', $focus->assigned_user_name == $current_user->user_name);
require_once 'modules/SavedSearch/SavedSearch.php';
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('Opportunities')));
$str = "<script>\nYAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, {$savedSearchSelects});\n</script>";
echo $str;