Update action-menu styles
[civicrm-core.git] / templates / CRM / Activity / Form / ActivityLinks.tpl
index 6bad5c71b6d0114ba6bcf1e1d0e404361362d470..3eaff3d9014478ad1fec64962a92af9abcaedac6 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 {/if}
 
 {if $as_select} {* on 3.2, the activities can be either a drop down select (on the activity tab) or a list (on the action menu) *}
-<select name="other_activity" id="other_activity" class="form-select">
-  <option value="">{ts}- new activity -{/ts}</option>
+<select name="other_activity" class="crm-form-select crm-select2 crm-action-menu action-icon-plus">
+  <option value="">{ts}New activity{/ts}</option>
 {foreach from=$activityTypes key=k item=link}
   <option value="{$urls.$k}">{$link}</option>
 {/foreach}
 </select>
 {literal}
 <script type="text/javascript">
-  cj(function($) {
-    $('#other_activity').change(function() {
+  CRM.$(function($) {
+    $('[name=other_activity].crm-action-menu').change(function() {
       var
         $el = $(this),
         url = $el.val();
       if (url) {
-        $el.val('');
+        $el.select2('val', '');
         CRM.loadForm(url).on('crmFormSuccess', function() {
-          $el.closest('.crm-ajax-container, #crm-main-content-wrapper').crmSnippet().crmSnippet('refresh');
+          CRM.refreshParent($el);
         });
       }
     });