GUI: Entity tab style improvements
authorColeman Watts <coleman@civicrm.org>
Sat, 9 Nov 2019 14:07:14 +0000 (09:07 -0500)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:20 +0000 (19:13 -0700)
ext/afform/gui/ang/afGuiEditor.css
ext/afform/gui/ang/afGuiEditor/button.html
ext/afform/gui/ang/afGuiEditor/entity.html

index 08944397a16b9b8650d20e553145c0a000347188..9a3be933292699e989e0688af00737b8c2c8337f 100644 (file)
@@ -2,10 +2,6 @@
   display: flex;
 }
 
-#afGuiEditor .panel.panel-default {
-  /*margin-bottom: 0;*/
-}
-
 #afGuiEditor #afGuiEditor-palette {
   flex: 1;
   margin-right: 5px;
   margin-left: 5px;
 }
 
-#afGuiEditor-canvas .panel-body {
+#afGuiEditor .panel-body {
+  padding: 5px 12px;
+  position: relative;
+}
+
+#afGuiEditor fieldset legend {
   padding-top: 5px;
+  font-size: 16px;
+  margin-bottom: 5px !important;
+}
+
+#afGuiEditor hr {
+  margin-top: 15px;
+  margin-bottom: 10px;
 }
 
 #afGuiEditor #afGuiEditor-palette-tabs li {
   font-size: 12px;
 }
 
-#afGuiEditor #afGuiEditor-palette-tabs .dropdown-menu {
-  max-height: 500px;
-  overflow-y: auto;
+#afGuiEditor .af-gui-columns {
+  display: flex;
+  position: relative;
+  flex-wrap: wrap;
+}
+#afGuiEditor .af-gui-columns > * {
+  flex: 1;
+  min-width: 200px;
+}
+
+#afGuiEditor .af-gui-remove-entity {
+  position: absolute;
+  right: 3px;
+  top: 3px;
 }
 
 #afGuiEditor .crm-editable-enabled,
   color: white;
 }
 
-#afGuiEditor .af-gui-entity-fields legend {
-  margin-bottom: 0 !important;
-}
-
 #afGuiEditor [ui-sortable] {
   min-height: 25px;
 }
   position: relative;
   top: -8px;
 }
+
+#afGuiEditor .af-gui-button > .btn.disabled {
+  cursor: default !important;
+  color: white !important;
+}
+
+#afGuiEditor .af-gui-button > .btn-default.disabled {
+  background-color: lightgrey !important;
+}
+
index 60d8a0a8c2de082f5521faa282ff29ea806ac905..391130c45a4fcb19a1ceeab7921028d1d741941b 100644 (file)
@@ -22,7 +22,7 @@
     </div>
   </div>
 </div>
-<button type="button" class="btn {{ getStyle() }}">
+<button type="button" class="btn {{ getStyle() }} disabled">
   <span class="crm-editable-enabled" ng-click="pickIcon()" >
     <i class="crm-i {{ node['crm-icon'] }}"></i>
   </span>
index 558110b11b789907a4858519552bacb500c88551..3359340867e0da1864c9acc952888fe166d2e621 100644 (file)
@@ -1,17 +1,14 @@
-<div>
-  <a href ng-click="editor.removeEntity(entity.name)" class="btn btn-sm btn-danger-outline pull-right">
-    <i class="crm-i fa-trash"></i>
-  </a>
-
+<div class="af-gui-columns">
   <fieldset class="af-gui-entity-values">
     <legend>{{ ts('Values') }}</legend>
     <div class="form-inline" ng-if="entity.data" ng-repeat="(fieldName, value) in entity.data">
-      <label>{{ editor.getField(entity.type, fieldName).title }}:</label>
+      <label>{{ editor.getField(entity.type, fieldName).title }}:</label><br />
       <input class="form-control" af-gui-field-value="editor.getField(entity.type, fieldName)" ng-model="entity.data[fieldName]" />
-      <a href class="pull-right" ng-click="removeValue(entity, fieldName)">
+      <a href class="" ng-click="removeValue(entity, fieldName)">
         <i class="crm-i fa-times"></i>
       </a>
     </div>
+    <hr />
     <div class="form-inline">
       <input class="form-control" ng-model="controls.addValue" crm-ui-select="{data: valuesFields}" placeholder="Add value" />
     </div>
       </div>
     </div>
   </fieldset>
+</div>
 
-  <fieldset>
-    <legend>{{ ts('Options') }}</legend>
-  </fieldset>
+<a href ng-click="editor.removeEntity(entity.name)" class="btn btn-sm btn-danger-outline af-gui-remove-entity" title="{{ ts('Remove %1', {1: entity.type}) }}">
+  <i class="crm-i fa-trash"></i>
+</a>
 
-</div>
+<fieldset>
+  <legend>{{ ts('Options') }}</legend>
+</fieldset>