CRM-13966 - Refactor out and remove crmasmselect
authorColeman Watts <coleman@civicrm.org>
Fri, 31 Jan 2014 18:27:49 +0000 (10:27 -0800)
committerColeman Watts <coleman@civicrm.org>
Fri, 31 Jan 2014 18:27:49 +0000 (10:27 -0800)
30 files changed:
CRM/Activity/Form/Activity.php
CRM/Campaign/BAO/Query.php
CRM/Case/Form/Case.php
CRM/Case/Form/CaseView.php
CRM/Contact/Form/Contact.php
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contribute/BAO/Query.php
CRM/Contribute/Form/ContributionPage/Settings.php
CRM/Contribute/Form/Search.php
CRM/Core/BAO/File.php
CRM/Core/Resources.php
CRM/Financial/Form/BatchTransaction.php
CRM/Grant/BAO/Query.php
CRM/Mailing/BAO/Query.php
CRM/Pledge/BAO/Query.php
css/civicrm.css
js/Common.js
templates/CRM/Activity/Form/Activity.tpl
templates/CRM/Campaign/Form/Search/Common.tpl
templates/CRM/Case/Form/Activity.tpl
templates/CRM/Case/Form/Case.tpl
templates/CRM/Case/Form/CaseView.tpl
templates/CRM/Contact/Form/Contact.tpl
templates/CRM/Contact/Form/Edit/TagsAndGroups.tpl
templates/CRM/Contribute/Form/ContributionPage/Settings.tpl
templates/CRM/Contribute/Form/Search.tpl
templates/CRM/Contribute/Form/Search/Common.tpl
templates/CRM/Financial/Form/BatchTransaction.tpl
templates/CRM/Form/attachment.tpl
templates/CRM/Mailing/Form/Search/Common.tpl

index bc09379a2a454ba66de76271a4b5e607da8f2a49..1b0fcc307ca480525db9a1d94c100bfe9b730503 100644 (file)
@@ -835,7 +835,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
 
     if (!empty($tags)) {
       $this->add('select', 'tag', ts('Tags'), $tags, FALSE,
-        array('id' => 'tags', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'tags', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
 
index 177a7f61bd6334055f4a1ba26fb38e12079f3a60..fbc2d325e7e1887b9b0e77f520cb4720a99bfabf 100755 (executable)
@@ -331,11 +331,11 @@ civicrm_activity_assignment.record_type_id = $assigneeID ) ";
 
     $contactTypes = CRM_Contact_BAO_ContactType::getSelectElements();
     $form->add('select', 'contact_type', ts('Contact Type(s)'), $contactTypes, FALSE,
-      array('id' => 'contact_type', 'multiple' => 'multiple', 'title' => ts('- select -'))
+      array('id' => 'contact_type', 'multiple' => 'multiple', 'class' => 'crm-select2')
     );
     $groups = CRM_Core_PseudoConstant::group();
     $form->add('select', 'group', ts('Groups'), $groups, FALSE,
-      array('id' => 'group', 'multiple' => 'multiple', 'title' => ts('- select -'))
+      array('id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2')
     );
 
     $showInterviewer = FALSE;
index 255ecc6b328694945a3e744dd9a6008a636e3340..7c37a1308e5d5a5068b4f7ad9e91f0e3379a5dbc 100644 (file)
@@ -269,7 +269,7 @@ class CRM_Case_Form_Case extends CRM_Core_Form {
     $tags = CRM_Core_BAO_Tag::getTags('civicrm_case');
     if (!empty($tags)) {
       $this->add('select', 'tag', ts('Select Tags'), $tags, FALSE,
-        array('id' => 'tags', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'tags', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
 
index 248e19955c72f889b76c6e369cfb1433c907905c..4e5234cc656af908a33721572e868c545ac8fc71 100644 (file)
@@ -425,7 +425,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
 
     if (!empty($allTags)) {
       $this->add('select', 'case_tag', ts('Tags'), $allTags, FALSE,
-        array('id' => 'tags', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'tags', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
 
       $tags = CRM_Core_BAO_EntityTag::getTag($this->_caseID, 'civicrm_case');
index 2610fa6376240f6bde6f232cd8a4b2f22b4b2bb2..3af21b4c87573d42a3304a010ab44c6781c13fcc 100644 (file)
@@ -779,15 +779,14 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
     }
 
     // subtype is a common field. lets keep it here
-    $subtypes = CRM_Contact_BAO_ContactType::subTypePairs($this->_contactType);
+    $subtypes = CRM_Contact_BAO_Contact::buildOptions('contact_sub_type', 'create', array('contact_type' => $this->_contactType));
     if (!empty($subtypes)) {
       $sel = $this->add('select', 'contact_sub_type', ts('Contact Type'),
         $subtypes, FALSE,
         array(
           'id' => 'contact_sub_type',
           'multiple' => 'multiple',
-          'title' => '- ' . ts('select') . ' -',
-          'class' => $buildCustomData,
+          'class' => $buildCustomData . ' crm-select2',
         )
       );
     }
@@ -807,7 +806,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
 
     // build tags and groups
     CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm($this, 0, CRM_Contact_Form_Edit_TagsAndGroups::ALL,
-      FALSE, NULL, 'Group(s)', 'Tag(s)', NULL, 'crmasmSelect');
+      FALSE, NULL, 'Group(s)', 'Tag(s)', NULL, 'select');
 
     // build location blocks.
     CRM_Contact_Form_Edit_Lock::buildQuickForm($this);
index 7917cc3a1d55797588b3747c44029e0c09d13502..3bbaf5480c13695f3d55d8252ac9f7929da6590b 100644 (file)
@@ -111,7 +111,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
             continue;
           }
           
-          if ($groupElementType == 'crmasmSelect') {
+          if ($groupElementType == 'select') {
             $groupsOptions[$id] = $group['title'];
           }
           else {
@@ -120,9 +120,9 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
           }
         }
 
-        if ($groupElementType == 'crmasmSelect' && !empty($groupsOptions)) {
+        if ($groupElementType == 'select' && !empty($groupsOptions)) {
           $form->add('select', $fName, ts('%1', array(1 => $groupName)), $groupsOptions, FALSE,
-            array('id' => $fName, 'multiple' => 'multiple', 'title' => ts('- select -'))
+            array('id' => $fName, 'multiple' => 'multiple', 'class' => 'crm-select2')
           );
           $form->assign('groupCount', count($groupsOptions));
         }
@@ -190,7 +190,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
       $contactGroup = CRM_Contact_BAO_GroupContact::getContactGroup($id, 'Added', NULL, FALSE, TRUE);
       if ($contactGroup) {
         foreach ($contactGroup as $group) {
-          if ($groupElementType == 'crmasmSelect') {
+          if ($groupElementType == 'select') {
             $defaults[$fName][] = $group['group_id'];
           }
           else {
@@ -242,7 +242,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
         // set the group and tag ids
         $groupElementType = 'checkbox';
         if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
-          $groupElementType = 'crmasmSelect';
+          $groupElementType = 'select';
         }
         self::setDefaults($form->_contactId, $defaults, self::ALL, NULL, $groupElementType);
       }
index 20e6bc8039ffa056778e80485552aebcb609fcd5..48335e2452cd803d9bcdd345c5ecc56045013d9f 100644 (file)
@@ -752,21 +752,23 @@ class CRM_Contribute_BAO_Query {
       ts('Currency Type'),
       array(
         '' => ts('- any -')) +
-      CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name'))
+      CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name')),
+      FALSE, array('class' => 'crm-select2')
     );
 
     // CRM-13848
     $form->add('select', 'financial_type_id',
       ts('Financial Type'),
       CRM_Contribute_PseudoConstant::financialType(), FALSE,
-        array('id' => 'financial_type_id', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'financial_type_id', 'multiple' => 'multiple', 'class' => 'crm-select2')
     );
 
     $form->add('select', 'contribution_page_id',
       ts('Contribution Page'),
       array(
         '' => ts('- any -')) +
-      CRM_Contribute_PseudoConstant::contributionPage()
+      CRM_Contribute_PseudoConstant::contributionPage(),
+      FALSE, array('class' => 'crm-select2')
     );
 
 
@@ -774,14 +776,16 @@ class CRM_Contribute_BAO_Query {
       ts('Payment Instrument'),
       array(
         '' => ts('- any -')) +
-      CRM_Contribute_PseudoConstant::paymentInstrument()
+      CRM_Contribute_PseudoConstant::paymentInstrument(),
+      FALSE, array('class' => 'crm-select2')
     );
 
     $form->add('select', 'contribution_pcp_made_through_id',
       ts('Personal Campaign Page'),
       array(
         '' => ts('- any -')) +
-      CRM_Contribute_PseudoConstant::pcPage()
+      CRM_Contribute_PseudoConstant::pcPage(),
+      FALSE, array('class' => 'crm-select2')
     );
 
     $status = array();
@@ -848,7 +852,9 @@ class CRM_Contribute_BAO_Query {
     if ( !empty( $batches ) ) {
       $form->add('select', 'contribution_batch_id',
         ts('Batch Name'),
-        array( '' => ts('- any -')) + $batches );
+        array('' => ts('- any -')) + $batches,
+        FALSE, array('class' => 'crm-select2')
+      );
     }
 
     $form->assign('validCiviContribute', TRUE);
index 4b0ab46472747fea076d374064de0b2f73e1be89..be06c45e17a15473b83e16c49e8922070993185f 100644 (file)
@@ -217,7 +217,7 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_
       array(
         'id' => 'soft_credit_types',
         'multiple' => 'multiple',
-        'title' => '- ' . ts('select') . ' -',
+        'class' => 'crm-select2',
       )
     );
 
index 47ed3d7cfe5ad2d9220da83978c4b57a4c0a8aef..93e281a640e46e0c5b41f03831ca5fe043aa0e00 100644 (file)
@@ -243,17 +243,16 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form {
     // multiselect for groups
     if ($this->_group) {
       $this->add('select', 'group', ts('Groups'), $this->_group, FALSE,
-        array('id' => 'group', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
 
     // multiselect for tags
-    require_once 'CRM/Core/BAO/Tag.php';
     $contactTags = CRM_Core_BAO_Tag::getTags();
 
     if ($contactTags) {
       $this->add('select', 'contact_tags', ts('Tags'), $contactTags, FALSE,
-        array('id' => 'contact_tags', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'contact_tags', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
 
index 540d4ec628d4f13c436f541c5fae8dad1bb7b2b7..4145fad2fa866e30d56f7805b63cd8c18cddb7ef 100644 (file)
 
        if (!empty($tags)) {
          $form->add('select', "tag_$i", ts('Tags'), $tags, FALSE,
-           array('id' => "tags_$i", 'multiple' => 'multiple', 'title' => ts('- select -'))
+           array('id' => "tags_$i", 'multiple' => 'multiple', 'class' => 'crm-select2')
          );
        }
      }
index 9a79b94b1ccbdcd62308a0c3a366e9e4cfa08c60..26bd78fc75c562db662919fef5ad96a3a5153fa2 100644 (file)
@@ -575,7 +575,6 @@ class CRM_Core_Resources {
       "js/Common.js",
 
       "js/jquery/jquery.crmeditable.js",
-      "js/jquery/jquery.crmasmselect.js",
     );
 
     // Add localized jQuery UI files
index fa4a94898f591fb8e8fbd4d9fd6b2979541e6a8e..6112332fb59743c7447c51d406fe03323a4c5a47 100644 (file)
@@ -106,14 +106,14 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
     // multiselect for groups
     if ($this->_group) {
       $this->add('select', 'group', ts('Groups'), $this->_group, FALSE,
-        array('id' => 'group', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
     $contactTags = CRM_Core_BAO_Tag::getTags();
 
     if ($contactTags) {
       $this->add('select', 'contact_tags', ts('Tags'), $contactTags, FALSE,
-        array('id' => 'contact_tags', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'contact_tags', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
     CRM_Contribute_BAO_Query::buildSearchForm($this);
index b3d14f7cdba82a127318881f4243c99ba8eb46f8..91da27c50db156b0fe5f7bd2927120b71148981d 100644 (file)
@@ -301,14 +301,14 @@ class CRM_Grant_BAO_Query {
 
     $grantType = CRM_Core_OptionGroup::values('grant_type');
     $form->add('select', 'grant_type_id', ts('Grant Type'),
-      array(
-        '' => ts('- any -')) + $grantType
+      array('' => ts('- any -')) + $grantType,
+      FALSE, array('class' => 'crm-select2')
     );
 
     $grantStatus = CRM_Core_OptionGroup::values('grant_status');
     $form->add('select', 'grant_status_id', ts('Grant Status'),
-      array(
-        '' => ts('- any -')) + $grantStatus
+      array('' => ts('- any -')) + $grantStatus,
+      FALSE, array('class' => 'crm-select2')
     );
 
     $form->addDate('grant_application_received_date_low', ts('App. Received Date - From'), FALSE, array('formatType' => 'searchDate'));
index ea18d25891bee3bf0cd4abcd1fc79f754c6cbb26..5b14a88136326204303e2fbe1daafaae3989df0a 100644 (file)
@@ -363,7 +363,7 @@ class CRM_Mailing_BAO_Query {
 
     if (!empty($mailings)) {
       $form->add('select', 'mailing_id', ts('Mailing Name(s)'), $mailings, FALSE,
-        array('id' => 'mailing_id', 'multiple' => 'multiple', 'title' => ts('- select -'))
+        array('id' => 'mailing_id', 'multiple' => 'multiple', 'class' => 'crm-select2')
       );
     }
 
@@ -383,7 +383,7 @@ class CRM_Mailing_BAO_Query {
       array('keyColumn' => 'id', 'labelColumn' => 'name')
     );
     $form->add('select', 'mailing_bounce_types', ts('Bounce Types'), $mailingBounceTypes, FALSE,
-      array('id' => 'mailing_bounce_types', 'multiple' => 'multiple', 'title' => ts('- select -'))
+      array('id' => 'mailing_bounce_types', 'multiple' => 'multiple', 'class' => 'crm-select2')
     );
 
     // event filters
index c21945c4afaf05d0a2e52d13931f4617c7d1e90e..05b50c6797664aff047c85946cd193a37dc35d66 100644 (file)
@@ -549,16 +549,14 @@ class CRM_Pledge_BAO_Query {
 
     $form->add('select', 'pledge_financial_type_id',
       ts( 'Financial Type' ),
-      array(
-        '' => ts('- select -')) +
-        CRM_Contribute_PseudoConstant::financialType()
+      array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::financialType(),
+      FALSE, array('class' => 'crm-select2')
     );
 
     $form->add('select', 'pledge_contribution_page_id',
       ts('Contribution Page'),
-      array(
-        '' => ts('- any -')) +
-        CRM_Contribute_PseudoConstant::contributionPage()
+      array('' => ts('- any -')) + CRM_Contribute_PseudoConstant::contributionPage(),
+      FALSE, array('class' => 'crm-select2')
     );
 
     //add fields for pledge frequency
@@ -571,8 +569,7 @@ class CRM_Pledge_BAO_Query {
 
     $form->add('select', 'pledge_frequency_unit',
       ts('Pledge Frequency'),
-      array(
-        '' => ts('- any -')) + $freqUnitsDisplay
+      array('' => ts('- any -')) + $freqUnitsDisplay
     );
 
     // add all the custom  searchable fields
index 38c2e0c85db220dad68b4974e9250d690d1dfe05..2a2a5ded55e0bd09630e3adac5f10c3823013fe0 100644 (file)
@@ -229,67 +229,6 @@ div.crm-container fieldset label{
   color: #3E3E3E;
 }
 
-/* crm advanced select styling */
-.crm-container .crmasmContainer,
-.crm-container .crmasmSelect,
-.crm-container .crmasmSelectCampaigns,
-.crm-container .crmtagContainer,
-.crm-container .crmtagSelect {
-  width: 160px;
-}
-
-.crm-container .crmasmSelect,
-.crm-container .crmtagSelect,
-.crm-container .crmasmSelectCampaigns {
-  padding: 2px;
-}
-
-.crm-container .crmasmSelect .child-1 {
-  padding-left: 1em;
-}
-.crm-container .crmasmSelect .child-2 {
-  padding-left: 2em;
-}
-
-.crm-container .crmasmHighlight,
-.crm-container .crmtagHighlight {
-  display: block;
-  padding: 2px 4px;
-  background-color: #EEF4B8;
-}
-
-.crm-container .crmasmList,
-.crm-container .crmtagList {
-  margin: 0px;
-  padding: 0px;
-}
-
-.crm-container .crmasmList li,
-.crm-container .crmtagList li {
-  background-color: #3E3E3E;
-  background-image: none;
-  padding: 2px 4px;
-  list-style-type: none;
-  margin: 1px 0px;
-  color: #F5F6F1;
-}
-
-.crm-container .crmasmListItem,
-.crm-container .crmtagListItem {
-  position: relative;
-}
-
-.crm-container .crmasmListItemRemove,
-.crm-container .crmtagListItemRemove {
-  padding: 5px;
-  position: absolute;
-  right: 5px;
-  top: 2px;
-  font-size: 11px;
-  margin: 0px;
-  padding: 0px;
-}
-
 .crm-container textarea {
   border: 1px solid #999;
 }
@@ -3829,6 +3768,12 @@ div.m ul#civicrm-menu,
 }
 
 /* select2 */
+.crm-select2 {
+  width: 15em;
+}
+.crm-container .select2-container {
+  min-width: 15em !important;
+}
 /* Move background image into outer container so we can place an icon in the inner container */
 .crm-container .select2-container-multi {
   background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
@@ -3837,6 +3782,9 @@ div.m ul#civicrm-menu,
   background-image: linear-gradient(top, #eee 1%, #fff 15%);
 }
 .crm-container .select2-container-multi .select2-choices {
+  background: url("../i/TreeMinus.gif") no-repeat scroll right 5px;
+}
+.crm-container .select2-container-multi.select2-container-active .select2-choices {
   background: url("../packages/jquery/plugins/select2/select2.png") no-repeat scroll right -22px;
 }
 
index e9a5bb2380f67554b050f80a78b86689111a722a..14a2c1d23abad8b1e963e46c5a4c9d92a1fe8973 100644 (file)
@@ -285,7 +285,7 @@ $.fn.select2.defaults.width = 'resolve';
         $(this).remove();
       });
       var options = $(this).data('select2') || {};
-      $(this).removeClass('crm-select2').select2(options);
+      $(this).select2(options).removeClass('crm-select2');
     });
   });
 
index a15547929674d0a869227cb4797e80073b1b84ef..0a6f7720f4f4be177febeae5f0d4130e674c507b 100644 (file)
   {if $form.tag.html}
   <tr class="crm-activity-form-block-tag">
     <td class="label">{$form.tag.label}</td>
-    <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
-      {literal}
-        <script type="text/javascript">
-          cj(".crm-activity-form-block-tag select[multiple]").crmasmSelect({
-            addItemTarget: 'bottom',
-            animate: true,
-            highlight: true,
-            sortable: true,
-            respectParents: true
-          });
-        </script>
-      {/literal}
+    <td class="view-value">
+      <div class="crm-select-container">{$form.tag.html}</div>
     </td>
   </tr>
   {/if}
index f4d08395df9bed2ceadfdfbe78029102bc8cdb71..159df5e2e7872daf7153383a1834b8bbac6a8235 100755 (executable)
           </td>
           <td><label>{ts}Contact Type(s){/ts}</label><br />
             {$form.contact_type.html}
-            {literal}
-              <script type="text/javascript">
-                cj("select#contact_type").crmasmSelect({
-                  addItemTarget: 'bottom',
-                  animate: false,
-                  highlight: true,
-                  sortable: true,
-                  respectParents: true
-                });
-              </script>
-            {/literal}
           </td>
           <td><label>{ts}Group(s){/ts}</label>
             {$form.group.html}
-            {literal}
-              <script type="text/javascript">
-                cj("select#group").crmasmSelect({
-                  addItemTarget: 'bottom',
-                  animate: false,
-                  highlight: true,
-                  sortable: true,
-                  respectParents: true,
-                  selectClass:'campaignGroupsSelect'
-                });
-              </script>
-            {/literal}
           </td>
         </tr>
         <tr>
@@ -220,34 +197,24 @@ function buildCampaignGroups( surveyId ) {
     function( data ) {
       if ( data.status != 'success' ) return;
 
-      var selectName         = 'campaignGroupsSelect';
-      var groupSelect        = cj("select[id^=" + selectName + "]");
-      var groupSelectCountId  = cj( groupSelect ).attr( 'id' ).replace( selectName, '' );
-
       //first remove all groups for given survey.
-      cj( "#group" ).find('option').remove( );
-      cj( groupSelect ).find('option').remove( );
-      cj( '#crmasmContainer' + groupSelectCountId ).find( 'span' ).remove( );
-      cj( '#crmasmList' + groupSelectCountId ).find( 'li' ).remove( );
+      cj("#group").find('option').remove();
 
       var groups = data.groups;
 
       //build the new group options.
       var optCount = 0;
       for ( group in groups ) {
-        title = groups[group].title;
-        value = groups[group].value;
-        if ( !title ) continue;
-        var crmOptCount = 'asm' + groupSelectCountId + 'option' + optCount;
+        var title = groups[group].title;
+        var value = groups[group].value;
+        if ( !value ) continue;
 
         //add options to main group select.
-        cj( "#group" ).append( cj('<option></option>').val( value ).html( title ).attr( 'id', crmOptCount ) );
-
-        //add option to crm multi select ul.
-        cj( groupSelect ).append( cj('<option></option>').val(value).html(title).attr( 'rel', crmOptCount ) );
+        cj( "#group" ).append( cj('<option></option>').val( value ).html(title));
 
         optCount++;
       }
+      cj("#group").trigger('change');
     },
     'json');
 }
index 3a0220d2280cd17bec134ea41b287caf021a5c61..3cfb2cb5bab9af9f848262c7802c530d946f9fad 100644 (file)
     {if $form.tag.html}
     <tr class="crm-case-activity-form-block-tag">
       <td class="label">{$form.tag.label}</td>
-      <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
-        {literal}
-          <script type="text/javascript">
-            cj(".crm-case-activity-form-block-tag select[multiple]").crmasmSelect({
-              addItemTarget: 'bottom',
-              animate: true,
-              highlight: true,
-              sortable: true,
-              respectParents: true
-            });
-          </script>
-        {/literal}
-
+      <td class="view-value">
+        <div class="crm-select-container">{$form.tag.html}</div>
       </td>
     </tr>
     {/if}
index 3cd223ba991e7e91e7d66c574c5f09130cb1a56a..90864961cab21971e8c9cdf0ed56fcb87e343b8b 100644 (file)
     <tr class="crm-case-form-block-tag">
       <td class="label">{$form.tag.label}</td>
       <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
-{literal}
-<script type="text/javascript">
-cj(".crm-case-form-block-tag select[multiple]").crmasmSelect({
-    addItemTarget: 'bottom',
-    animate: true,
-    highlight: true,
-    sortable: true,
-    respectParents: true
-});
-</script>
-{/literal}
       </td>
     </tr>
 {/if}
index 60334a4154f855550e01c0024948276950786be2..769a3b24ddef11453e8a627985ef64a0997c34f0 100644 (file)
@@ -820,13 +820,6 @@ function addRole() {
 
 {literal}
 <script type="text/javascript">
-cj("#manageTags select[multiple]").crmasmSelect({
-  addItemTarget: 'bottom',
-  animate: true,
-  highlight: true,
-  sortable: true,
-  respectParents: true
-});
 
 cj("#manageTags").hide( );
 function addTags() {
index cb7482b2be63c11ad7af51cadfa9c2f4f22d2cc9..7caa0c97504b3996aff7a73ff078c3e99f0b4c91 100644 (file)
       return true;
     });
     {/literal}{/if}{literal}
-
-    $("select#contact_sub_type").crmasmSelect({
-      addItemTarget: 'bottom',
-      animate: false,
-      highlight: true,
-      respectParents: true
-    });
   });
 
 </script>
index 6779b3cbd581805341ff131d247e51da4caebc4b..9ecd2c1b9f1e396b808dd82912fad314b2d44963 100644 (file)
 {/if}
     <table class="form-layout-compressed{if $context EQ 'profile'} crm-profile-tagsandgroups{/if}">
       <tr>
-       {if $groupElementType eq 'crmasmSelect'}
+       {if $groupElementType eq 'select'}
           <td><span class="label">{if $title}{$form.group.label}{/if}</span>
             {$form.group.html}
-            {literal}
-            <script type="text/javascript">
-             cj(function(){
-               cj("select#group").crmasmSelect({
-                 respectParents: true
-               });
-             });
-             </script>
-             {/literal}
           </td>
       {/if}
       {foreach key=key item=item from=$tagGroup}
index 3b0d36e73a194d0a117beb12fc5f87398cf8a88a..54d8327c642e7ee464ffa859f0e63cfaa944ee92 100644 (file)
       return false;
     })
 
-    cj("select#soft_credit_types").crmasmSelect({
-       addItemTarget: 'bottom',
-       animate: false,
-       highlight: true,
-       respectParents: true
-    });
  {/literal}
 </script>
 
index 2008a10a74c0c97165718907ffc145be01441afe..fe4393fde6fe13f05ce35d8c93a8a8521023b44a 100644 (file)
               {if $form.contact_tags}
                 <td><label>{ts}Contributor Tag(s){/ts}</label>
                     {$form.contact_tags.html}
-                    {literal}
-                    <script type="text/javascript">
-
-                    cj("select#contact_tags").crmasmSelect({
-                        addItemTarget: 'bottom',
-                        animate: false,
-                        highlight: true,
-                        sortable: true,
-                        respectParents: true
-                    });
-                    </script>
-                    {/literal}   
                 </td>
               {else}
                 <td>&nbsp;</td>
               {if $form.group}
                 <td><label>{ts}Contributor Group(s){/ts}</label>
                     {$form.group.html}
-                    {literal}
-                    <script type="text/javascript">
-                    cj("select#group").crmasmSelect({
-                        addItemTarget: 'bottom',
-                        animate: false,
-                        highlight: true,
-                        sortable: true,
-                        respectParents: true
-                    });
-
-                    </script>
-                    {/literal}
                 </td>
               {else}
                 <td>&nbsp;</td>
index 140b5209c108ca9970c2fd0af097b68fb48d6886..72a152621c05aab8bcbd0ca3089433e6cd9c41bc 100644 (file)
@@ -41,7 +41,7 @@
   <td>
     <div class="float-left">
       <label>{ts}Payment Method{/ts}</label> <br />
-      {$form.contribution_payment_instrument_id.html}
+      {$form.contribution_payment_instrument_id.html|crmAddClass:twenty}
     </div>
     <div class="float-left" id="contribution_check_number_wrapper">
       {$form.contribution_check_number.label} <br />
   <td>
     <label>{ts}Financial Type{/ts}</label> <br />
     {$form.financial_type_id.html|crmAddClass:twenty}
-    {* CRM-13848 *}
-    {literal}
-    <script type="text/javascript">
-    cj("select#financial_type_id").crmasmSelect({
-      addItemTarget: 'bottom',
-      animate: false,
-      highlight: true,
-      sortable: true,
-      respectParents: true
-    });
-    </script>
-    {/literal}
   </td>
   <td>
     <label>{ts}Contribution Page{/ts}</label> <br />
 <tr>
   <td>
     <label>{ts}Currency{/ts}</label> <br />
-    {$form.contribution_currency_type.html}
+    {$form.contribution_currency_type.html|crmAddClass:twenty}
   </td>
   {if $form.contribution_batch_id.html }
     <td>
index 4f5ff95936485f7d14a886dc99a4dee40cacfe72..7418795569f8eadabcd8137a89f5ad0d2207e364 100644 (file)
           {if $form.contact_tags}
             <td><label>{ts}Contributor Tag(s){/ts}</label>
               {$form.contact_tags.html}
-              {literal}
-                <script type="text/javascript">
-                  cj("select#contact_tags").crmasmSelect({
-                    addItemTarget: 'bottom',
-                    animate: false,
-                    highlight: true,
-                    sortable: true,
-                    respectParents: true
-                  });
-                </script>
-              {/literal}
             </td>
             {else}
             <td>&nbsp;</td>
           {if $form.group}
             <td><label>{ts}Contributor Group(s){/ts}</label>
               {$form.group.html}
-              {literal}
-                <script type="text/javascript">
-                  cj("select#group").crmasmSelect({
-                    addItemTarget: 'bottom',
-                    animate: false,
-                    highlight: true,
-                    sortable: true,
-                    respectParents: true
-                  });
-
-                </script>
-              {/literal}
             </td>
             {else}
             <td>&nbsp;</td>
index 183d649567856bf68c140c5dadce2927aab88486..8b0c72cac5fa7dc0b062d3a0e49e300329d530d9 100644 (file)
             {/if}
         {/section}
 
-        {literal}
-          <script type="text/javascript">
-            cj(".crm-attachment-tags select[multiple]").crmasmSelect({
-              addItemTarget: 'bottom',
-              animate: true,
-              highlight: true,
-              sortable: true,
-              respectParents: true
-            });
-          </script>
-        {/literal}
       {/if}
       {if $currentAttachmentInfo}
         <tr class="attachment-fieldset"><td colspan="2"></td></tr>
index 4e170c61791c584442a0b4e3b92bab362d0b81b9..00db5d5d58bdf2838a9ee599b999f1d693238a9e 100644 (file)
@@ -3,16 +3,6 @@
   {$form.mailing_id.label}
     <br />
   {$form.mailing_id.html}
-  {literal}
-    <script type="text/javascript">
-      cj("select#mailing_id").crmasmSelect({
-        addItemTarget: 'bottom',
-        animate: false,
-        highlight: true,
-        sortable: true
-      });
-    </script>
-  {/literal}
   </td>
 <td>
   {$form.mailing_job_status.label}
   <br />
   {$form.mailing_bounce_types.label}
   {$form.mailing_bounce_types.html}
-  {literal}
-    <script type="text/javascript">
-      cj("select#mailing_bounce_types").crmasmSelect({
-        addItemTarget: 'bottom',
-        animate: false,
-        highlight: true,
-        sortable: true
-      });
-    </script>
-   {/literal}
   </td>
   <td>
   {$form.mailing_open_status.label}