fixed generated data for CRM-15934
[civicrm-core.git] / js / view / crm.profile-selector.js
index befceec4cebc30407d65c5169d9f028d073eb5f1..0c1877fee39c69b4aef2d216899cb9bfc6a70efd 100644 (file)
@@ -71,7 +71,7 @@
       this.$('.crm-profile-selector-edit,.crm-profile-selector-copy').prop('disabled', !this.hasUfGroupId());
     },
     hasUfGroupId: function() {
-      return (this.getUfGroupId() && this.getUfGroupId() != '') ? true : false;
+      return (this.getUfGroupId() && this.getUfGroupId() !== '') ? true : false;
     },
     setUfGroupId: function(value, options) {
       this.options.ufGroupId = value;
       var $pane = this.$('.crm-profile-selector-preview-pane');
       if ($preview.hasClass('crm-profile-selector-preview-show')) {
         $preview.removeClass('crm-profile-selector-preview-show');
+        $preview.find('.icon').removeClass('ui-icon-zoomin').addClass('ui-icon-zoomout');
         $pane.show();
       } else {
         $preview.addClass('crm-profile-selector-preview-show');
+        $preview.find('.icon').removeClass('ui-icon-zoomout').addClass('ui-icon-zoomin');
         $pane.hide();
       }
     },
     disableForm: function() {
-      this.$(':input', '.crm-profile-selector-preview-pane').prop('readOnly', true);
+      this.$(':input', '.crm-profile-selector-preview-pane').not('.select2-input').prop('readOnly', true);
     },
     doEdit: function(e) {
       e.preventDefault();