This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new b9889f6  Fix the inline edit configuration for the policies in app 
inspector
     new 8f926fc  This closes #121
b9889f6 is described below

commit b9889f65b740ab9462b494a6a3b6875552274afa
Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com>
AuthorDate: Fri Feb 1 14:47:10 2019 +0000

    Fix the inline edit configuration for the policies in app inspector
---
 .../components/entity-policy/entity-policy.less    | 71 +++++++++++-----------
 .../entity-policy/entity-policy.template.html      | 20 +++---
 2 files changed, 47 insertions(+), 44 deletions(-)

diff --git 
a/ui-modules/app-inspector/app/components/entity-policy/entity-policy.less 
b/ui-modules/app-inspector/app/components/entity-policy/entity-policy.less
index 49b65bd..3506117 100644
--- a/ui-modules/app-inspector/app/components/entity-policy/entity-policy.less
+++ b/ui-modules/app-inspector/app/components/entity-policy/entity-policy.less
@@ -103,50 +103,51 @@ entity-policy {
   padding-top: 20px;
 }
 
-
 /* Editable text */
-
-
 .table-editable {
-  td.editable-click {
-    color: black;
-    &:hover {
-      border: none;
-    }
+  .editable {
+    color: #000000;
+    border: none;
   }
-  td.editable:not(.edit-disabled) {
-    cursor: pointer;
-    color: black;
 
-    &:hover {
-      border: none;
-      background: fade(@primary-500, 10%);
-      &:before {
-        opacity: 1.0;
+  .editable-column {
+    padding: 0;
+
+    .editable:not(.edit-disabled):after {
+      font-family: "myriad-pro-1", Helvetica, Arial, sans-serif, FontAwesome;
+      content: '\f040 Edit';
+      opacity: 0.2;
+      color: @primary-500;
+    }
+    .editable {
+      display: flex;
+      justify-content: space-between;
+      width: 100%;
+      padding: 8px;
+
+      &:hover {
+        border: none;
+        background: fade(@primary-500, 10%);
+        &:after {
+          opacity: 1.0;
+        }
       }
     }
-  }
-  td.editable:not(.edit-disabled):before {
-    font-family: "myriad-pro-1", Helvetica, Arial, sans-serif, FontAwesome;
-    content: '\f040 Edit';
-    float: right;
-    opacity: 0.2;
-    color: @primary-500;
-  }
 
-  .editable-wrap {
-    width: 100%;
-    .editable-controls {
-      display: flex;
-      flex-direction: row;
+    .editable-wrap {
+      width: 100%;
+      .editable-controls {
+        display: flex;
+        flex-direction: row;
 
-      input {
-        flex-grow: 2;
-      }
+        input {
+          flex-grow: 2;
+        }
 
-      .editable-buttons {
-        flex-grow: 0;
-        flex-shrink: 0;
+        .editable-buttons {
+          flex-grow: 0;
+          flex-shrink: 0;
+        }
       }
     }
   }
diff --git 
a/ui-modules/app-inspector/app/components/entity-policy/entity-policy.template.html
 
b/ui-modules/app-inspector/app/components/entity-policy/entity-policy.template.html
index e5cab31..2f2be4c 100644
--- 
a/ui-modules/app-inspector/app/components/entity-policy/entity-policy.template.html
+++ 
b/ui-modules/app-inspector/app/components/entity-policy/entity-policy.template.html
@@ -37,18 +37,20 @@
                 </tr>
             </thead>
             <tbody>
-                <tr ng-repeat="item in info | orderBy:'name':reverse | 
filter:{name: searchCriteria} track by item.name" ng-switch="item.type">
+                <tr ng-repeat="item in info | orderBy:'name':reverse | 
filter:{name: searchCriteria} track by item.name">
                     <td>
                         {{item.name}}
                     </td>
-                    <td ng-switch-when="java.lang.Number" 
editable-number="item.value" edit-disabled="!item.reconfigurable" 
onbeforesave="updateAdjunctConfig(item, $data)" buttons="right" 
e-disabled-submit-on-enter>
-                        {{item.value}}
-                    </td>
-                    <td ng-switch-when="java.lang.Integer" 
ng-class="{'edit-disabled': !item.reconfigurable}" editable-number="item.value" 
edit-disabled="!item.reconfigurable" onbeforesave="updateAdjunctConfig(item, 
$data)" buttons="right" e-disabled-submit-on-enter>
-                        {{item.value}}
-                    </td>
-                    <td ng-switch-default ng-class="{'edit-disabled': 
!item.reconfigurable}" editable-text="item.value" 
edit-disabled="!item.reconfigurable" onbeforesave="updateAdjunctConfig(item, 
$data)" buttons="right" e-disabled-submit-on-enter>
-                        {{item.value}}
+                    <td ng-switch="item.type" ng-class="{'editable-column': 
item.reconfigurable}">
+                        <div ng-switch-when="java.lang.Number" 
editable-number="item.value" edit-disabled="!item.reconfigurable" 
onbeforesave="updateAdjunctConfig(item, $data)" buttons="right" 
e-disabled-submit-on-enter>
+                            <span>{{item.value}}</span>
+                        </div>
+                        <div ng-switch-when="java.lang.Integer" 
ng-class="{'edit-disabled': !item.reconfigurable}" editable-number="item.value" 
edit-disabled="!item.reconfigurable" onbeforesave="updateAdjunctConfig(item, 
$data)" buttons="right" e-disabled-submit-on-enter>
+                            <span>{{item.value}}</span>
+                        </div>
+                        <div ng-switch-default ng-class="{'edit-disabled': 
!item.reconfigurable}" editable-text="item.value" 
edit-disabled="!item.reconfigurable" onbeforesave="updateAdjunctConfig(item, 
$data)" buttons="right" e-disabled-submit-on-enter>
+                            <span>{{item.value}}</span>
+                        </div>
                     </td>
                 </tr>
                 <tr ng-if="item.length == 0 ">

Reply via email to