X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FResources.php;h=d12afab2d06dbc48d90a69ccd4b38fcc4a7bde40;hb=491fe45a865fd4177204b44877315b2ebad9f2c3;hp=f098456209a92473a7f7391fec47c79d35ac59cb;hpb=65742a3ed0f9444378e73bdab10469176f07ce49;p=civicrm-core.git diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index f098456209..d12afab2d0 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.6 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | + | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -37,7 +37,7 @@ * should incorporte services for aggregation, minimization, etc. * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2014 + * @copyright CiviCRM LLC (c) 2004-2015 * $Id$ * */ @@ -387,6 +387,7 @@ class CRM_Core_Resources { foreach ((array) $text as $str) { $translated = ts($str, array( 'domain' => ($domain == 'civicrm') ? NULL : array($domain, NULL), + 'raw' => TRUE, )); // We only need to push this string to client if the translation @@ -524,7 +525,7 @@ class CRM_Core_Resources { $patterns = (array) $patterns; $files = array(); foreach ($patterns as $pattern) { - if ($pattern{0} === '/') { + if (CRM_Utils_File::isAbsolute($pattern)) { // Absolute path. $files = array_merge($files, (array) glob($pattern, $flags)); } @@ -700,20 +701,29 @@ class CRM_Core_Resources { "bower_components/jquery-ui/themes/smoothness/jquery-ui$min.css", "bower_components/lodash-compat/lodash.min.js", "packages/jquery/plugins/jquery.mousewheel$min.js", - "packages/jquery/plugins/select2/select2$min.js", - "packages/jquery/plugins/select2/select2.css", + "bower_components/select2/select2$min.js", + "bower_components/select2/select2$min.css", "packages/jquery/plugins/jquery.tableHeader.js", - "packages/jquery/plugins/jquery.textarearesizer.js", "packages/jquery/plugins/jquery.form$min.js", "packages/jquery/plugins/jquery.timeentry$min.js", "packages/jquery/plugins/jquery.blockUI$min.js", - "packages/jquery/plugins/DataTables/media/js/jquery.dataTables$min.js", - "packages/jquery/plugins/DataTables/media/css/jquery.dataTables$min.css", - "packages/jquery/plugins/jquery.validate$min.js", + "bower_components/datatables/media/js/jquery.dataTables$min.js", + "bower_components/datatables/media/css/jquery.dataTables$min.css", + "bower_components/jquery-validation/dist/jquery.validate$min.js", "packages/jquery/plugins/jquery.ui.datepicker.validation.pack.js", "js/Common.js", "js/crm.ajax.js", ); + // add wysiwyg editor + $editorID = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'editor_id'); + $editor = CRM_Utils_Array::value($editorID, + CRM_Core_OptionGroup::values('wysiwyg_editor', FALSE, FALSE, FALSE, NULL, 'name') + ); + $items[] = "js/wysiwyg/crm.wysiwyg.js"; + if ($editor == "CKEditor") { + $items[] = "bower_components/ckeditor/ckeditor.js"; + $items[] = "js/wysiwyg/crm.ckeditor.js"; + } // These scripts are only needed by back-office users if (CRM_Core_Permission::check('access CiviCRM')) {