CRM-14830 - Email tpl cleanup and removed unused function
authorColeman Watts <coleman@civicrm.org>
Sat, 16 Aug 2014 13:17:41 +0000 (14:17 +0100)
committerColeman Watts <coleman@civicrm.org>
Sat, 16 Aug 2014 13:17:41 +0000 (14:17 +0100)
js/Common.js
templates/CRM/Contact/Form/Task/Email.tpl

index c9c963663ea24dade5d9e8313989494cbad3c99d..395e61ccfb971870b6c50bcb33fe8a8bfadb6625 100644 (file)
@@ -251,38 +251,6 @@ CRM.strings = CRM.strings || {};
     return isDirty;
   };
 
-   /**
-   * Wrapper for toggle function which is deprecated in from jQuery 1.8;
-   * @param fn1,fn2 handlers
-   */
-
-  $.fn.toggleClick = function( fn1, fn2 ) {
-    // Don't mess with animation or css toggles
-    if ( !$.isFunction( fn1 ) || !$.isFunction( fn2 ) ) {
-      return;
-    }
-    // migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
-    // Save reference to arguments for access in closure
-    var args = arguments,
-    guid = fn1.guid || $.guid++,
-    i = 0,
-    toggler = function( event ) {
-      // Figure out which function to execute
-      var lastToggle = ( $._data( this, "lastToggle" + fn1.guid ) || 0 ) % i;
-      $._data( this, "lastToggle" + fn1.guid, lastToggle + 1 );
-      // Make sure that clicks stop
-      event.preventDefault();
-      // and execute the function
-      return args[ lastToggle ].apply( this, arguments ) || false;
-    };
-    // link all the functions, so any of them can unbind this click handler
-    toggler.guid = guid;
-    while ( i < args.length ) {
-      args[ i++ ].guid = guid;
-    }
-    return this.click( toggler );
-  };
-
   /**
    * Wrapper for select2 initialization function; supplies defaults
    * @param options object
index e5bf8413377ef21c67dc4a762b350eecdf7330bd..acaf141d36a89ea6f3b3c9c7f5c8217d51e5dcf7 100644 (file)
        <td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
        <td>
          {$form.to.html}{if $noEmails eq true}&nbsp;&nbsp;{$form.emailAddress.html}{/if}
-         <div>
-           <a href="#" rel="cc_id" class="add-cc-link crm-hover-button" {if $form.cc_id.value}style="display:none;"{/if}>{ts}Add CC{/ts}</a>&nbsp;&nbsp;
-           <a href="#" rel="bcc_id" class="add-cc-link crm-hover-button" {if $form.bcc_id.value}style="display:none;"{/if}>{ts}Add BCC{/ts}</a>
-         </div>
        </td>
     </tr>
     <tr class="crm-contactEmail-form-block-cc_id" {if !$form.cc_id.value}style="display:none;"{/if}>
         <a class="crm-hover-button clear-cc-link" rel="bcc_id" title="{ts}Clear{/ts}" href="#"><span class="icon close-icon"></span></a>
       </td>
     </tr>
+    <tr>
+      <td></td>
+      <td>
+        <div>
+          <a href="#" rel="cc_id" class="add-cc-link crm-hover-button" {if $form.cc_id.value}style="display:none;"{/if}>{ts}Add CC{/ts}</a>&nbsp;&nbsp;
+          <a href="#" rel="bcc_id" class="add-cc-link crm-hover-button" {if $form.bcc_id.value}style="display:none;"{/if}>{ts}Add BCC{/ts}</a>
+        </div>
+      </td>
+    </tr>
 
 {if $emailTask}
     <tr class="crm-contactEmail-form-block-template">