CRM-13863 - Civi style for profile designer buttons
authorColeman Watts <coleman@civicrm.org>
Wed, 3 Sep 2014 21:24:23 +0000 (22:24 +0100)
committerColeman Watts <coleman@civicrm.org>
Wed, 3 Sep 2014 21:24:23 +0000 (22:24 +0100)
js/view/crm.designer.js
templates/CRM/UF/Page/ProfileTemplates.tpl

index 07501e6b8ff340ef318e35909b5534cf46a76f12..b4b49cd2492d5a2798d97ab911a6ccf50d35d6f7 100644 (file)
       'click .crm-designer-preview': 'doPreview'
     },
     onRender: function() {
-      this.$('.crm-designer-save').button().attr({
+      this.$('.crm-designer-save').button({icons: {primary: 'ui-icon-check'}}).attr({
         disabled: 'disabled',
-        style: 'opacity:.5; box-shadow:none; cursor:default;'
+        style: 'opacity:.5; cursor:default;'
       });
-      this.$('.crm-designer-preview').button();
+      this.$('.crm-designer-preview').button({icons: {primary: 'ui-icon-search'}});
     },
     initialize: function(options) {
       CRM.designerApp.vent.on('ufUnsaved', this.onUfChanged, this);
       if (!this.previewMode) {
         $('.crm-designer-preview-canvas').html('');
         $('.crm-designer-canvas > *, .crm-designer-palette-region').show();
-        $('.crm-designer-preview span').html(ts('Preview'));
+        $('.crm-designer-preview').button('option', {icons: {primary: 'ui-icon-search'}}).find('span').text(ts('Preview'));;
         return;
       }
       if (this.model.getRel('ufFieldCollection').hasDuplicates()) {
         $dialog.unblock();
         $('.crm-designer-canvas > *, .crm-designer-palette-region').hide();
         $('.crm-designer-preview-canvas').html(data).show().trigger('crmLoad').find(':input').prop('readOnly', true);
-        $('.crm-designer-preview span').html(ts('Edit'));
+        $('.crm-designer-preview').button('option', {icons: {primary: 'ui-icon-pencil'}}).find('span').text(ts('Edit'));
       });
     }
   });
index 9330d9c7de0ba109170fee341f4839e94814191e..d08eceb83a5f2028ceb2ab72eb846ad1e71f8ea5 100644 (file)
@@ -3,7 +3,7 @@
  *}
 <script type="text/template" id="designer_template">
   <div class="crm-designer-toolbar full-height">
-    <div class="crm-designer-buttonset-region">
+    <div class="crm-designer-buttonset-region ui-dialog-buttonset">
     </div>
     <hr />
     <div class="crm-designer-palette-region full-height">