+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* should incorporte services for aggregation, minimization, etc.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*
*/
"bower_components/select2/select2.min.js",
"bower_components/select2/select2.min.css",
"bower_components/font-awesome/css/font-awesome.min.css",
- "packages/jquery/plugins/jquery.tableHeader.js",
"packages/jquery/plugins/jquery.form.min.js",
"packages/jquery/plugins/jquery.timeentry.min.js",
"packages/jquery/plugins/jquery.blockUI.min.js",
// add wysiwyg editor
$editor = Civi::settings()->get('editor_id');
if ($editor == "CKEditor") {
- $items[] = "js/wysiwyg/crm.ckeditor.js";
- $ckConfig = CRM_Admin_Page_CKEditorConfig::getConfigUrl();
- if ($ckConfig) {
- $items[] = array('config' => array('CKEditorCustomConfig' => $ckConfig));
- }
+ CRM_Admin_Page_CKEditorConfig::setConfigDefault();
+ $items[] = array(
+ 'config' => array(
+ 'wysisygScriptLocation' => Civi::paths()->getUrl("[civicrm.root]/js/wysiwyg/crm.ckeditor.js"),
+ 'CKEditorCustomConfig' => CRM_Admin_Page_CKEditorConfig::getConfigUrl(),
+ ),
+ );
}
// These scripts are only needed by back-office users
if (CRM_Core_Permission::check('access CiviCRM')) {
+ $items[] = "packages/jquery/plugins/jquery.tableHeader.js";
$items[] = "packages/jquery/plugins/jquery.menu.min.js";
$items[] = "css/civicrmNavigation.css";
$items[] = "packages/jquery/plugins/jquery.jeditable.min.js";
* is this page request an ajax snippet?
*/
public static function isAjaxMode() {
- return in_array(CRM_Utils_Array::value('snippet', $_REQUEST), array(
+ if (in_array(CRM_Utils_Array::value('snippet', $_REQUEST), array(
CRM_Core_Smarty::PRINT_SNIPPET,
CRM_Core_Smarty::PRINT_NOFORM,
CRM_Core_Smarty::PRINT_JSON,
- ));
+ ))
+ ) {
+ return TRUE;
+ }
+ return strpos(CRM_Utils_System::getUrlPath(), 'civicrm/ajax') === 0;
}
/**
* Provide a list of available entityRef filters.
- * FIXME: This function doesn't really belong in this class
- * @TODO: Provide a sane way to extend this list for other entities - a hook or??
+ * @todo: move component filters into their respective components (e.g. CiviEvent)
+ *
* @return array
*/
public static function getEntityRefFilters() {
array('key' => 'country', 'value' => ts('Country'), 'entity' => 'address'),
array('key' => 'gender_id', 'value' => ts('Gender')),
array('key' => 'is_deceased', 'value' => ts('Deceased')),
+ array('key' => 'source', 'value' => ts('Contact Source'), 'type' => 'text'),
);
if (in_array('CiviCase', $config->enableComponents)) {
}
}
+ CRM_Utils_Hook::entityRefFilters($filters);
+
return $filters;
}