From: Coleman Watts Date: Wed, 29 Apr 2015 17:08:34 +0000 (-0600) Subject: CRM-16354 - Remove cms wysiwyg from core X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eca122c531a76f7ffc71726a4ccc10c76ae77279;p=civicrm-core.git CRM-16354 - Remove cms wysiwyg from core --- diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index 6fb5569b47..f005472063 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -131,11 +131,6 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { $defaults['sort_name_format'] = $this->_config->sort_name_format; } - $config = CRM_Core_Config::singleton(); - if ($config->userSystem->is_drupal == '1' && module_exists("wysiwyg")) { - $defaults['wysiwyg_input_format'] = variable_get('civicrm_wysiwyg_input_format', 0); - } - return $defaults; } @@ -154,37 +149,8 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { $config = CRM_Core_Config::singleton(); $extra = array(); - //if not using Joomla, remove Joomla default editor option - if ($config->userFramework != 'Joomla') { - unset($wysiwyg_options[3]); - } - - $drupal_wysiwyg = FALSE; - if (!$config->userSystem->is_drupal || !module_exists("wysiwyg")) { - unset($wysiwyg_options[4]); - } - else { - $extra['onchange'] = ' - if (this.value==4) { - cj("#crm-preferences-display-form-block-wysiwyg_input_format").show(); - } - else { - cj("#crm-preferences-display-form-block-wysiwyg_input_format").hide() - }'; - - $formats = filter_formats(); - $format_options = array(); - foreach ($formats as $id => $format) { - $format_options[$id] = $format->name; - } - $drupal_wysiwyg = TRUE; - } $this->addElement('select', 'editor_id', ts('WYSIWYG Editor'), $wysiwyg_options, $extra); - if ($drupal_wysiwyg) { - $this->addElement('select', 'wysiwyg_input_format', ts('Input Format'), $format_options, NULL); - } - $editOptions = CRM_Core_OptionGroup::values('contact_edit_options', FALSE, FALSE, FALSE, 'AND v.filter = 0'); $this->assign('editOptions', $editOptions); diff --git a/js/crm.drupal.js b/js/crm.drupal.js index 32ed437423..2f14c49921 100644 --- a/js/crm.drupal.js +++ b/js/crm.drupal.js @@ -1,16 +1,6 @@ // http://civicrm.org/licensing CRM.$(function($) { $(document) - .on('crmLoad', function(e) { - // This is drupal's old-school way of listening for 'load' type events. It has to be called manually. - Drupal.attachBehaviors(e.target); - }) - .on('crmUnload', function(e) { - // This function doesn't exist in D6 so call conditionally - if (typeof Drupal.detachBehaviors === 'function') { - Drupal.detachBehaviors(e.target); - } - }) .on('dialogopen', function(e) { // D7 hack to get the toolbar out of the way (CRM-15341) $('#toolbar').css('z-index', '100'); diff --git a/templates/CRM/Admin/Form/Preferences/Display.tpl b/templates/CRM/Admin/Form/Preferences/Display.tpl index 28131fbea4..de6c92fb27 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.tpl +++ b/templates/CRM/Admin/Form/Preferences/Display.tpl @@ -157,27 +157,6 @@ {$form.editor_id.label} {$form.editor_id.html} - {if $form.wysiwyg_input_format.html} - - {$form.wysiwyg_input_format.label} - - {$form.wysiwyg_input_format.html}{literal} - - {/literal} -
- - {ts}You will need to enable and configure several modules if you want to allow users to upload images while using a Drupal Default Editor.{/ts} - {docURL page="Configuring CiviCRM to Use the Default Drupal Editor" resource="wiki"} - - - - {/if}