Selaa lähdekoodia

Add CSS

Add pointer cursor for clickable actions
Move icon-chevron-* next to dataset name
jmacura 5 vuotta sitten
vanhempi
commit
6982eaa903
3 muutettua tiedostoa jossa 7 lisäystä ja 13 poistoa
  1. 3 13
      src/adjuster/adjuster.directive.html
  2. 3 0
      src/app.css
  3. 1 0
      src/app.js

+ 3 - 13
src/adjuster/adjuster.directive.html

@@ -1,29 +1,19 @@
 <div class="card card-default mainpanel">
   <hs.layout.panel-header panel-name="adjuster" panel-title="'Adjust factors'||translate"></hs.layout.panel-header>
-  <style>
-    .weather-table>tbody>tr>td,
-    .table-condensed>tbody>tr>th,
-    .table-condensed>tfoot>tr>td,
-    .table-condensed>tfoot>tr>th,
-    .table-condensed>thead>tr>td,
-    .table-condensed>thead>tr>th {
-      padding: 2px;
-    }
-  </style>
   <div class="card-body">
     <button type="button" class="btn btn-primary" ng-click="PraAdjusterService.apply()" ng-disabled="PraAdjusterService.isClusteringInProcess()">Calculate clusters</button>
     <div class="card-body">
       <div ng-repeat="factor in PraAdjusterService.factors">
         <div class="d-flex flex-row">
           <div class="p-2 flex-grow-1">
-            <label>{{factor.name}}</label>
+            <span class="glyphicon cursor-pointer" ng-class="datasetlistVisible ? 'icon-chevron-left' : 'icon-chevron-right'"
+              ng-click="datasetlistVisible = !datasetlistVisible"></span>
+            <label class="cursor-pointer" ng-click="datasetlistVisible = !datasetlistVisible">{{factor.name}}</label>
           </div>
           <div class="p-2">{{(factor.weight * 100).toFixed(0)}}&nbsp;%</div>
         </div>
         <input type="range" class="custom-range" ng-model="factor.weight" min="0"
           max="1.0" step="0.05">
-        <span class="glyphicon" ng-class="datasetlistVisible ? 'icon-chevron-left' : 'icon-chevron-right'"
-          ng-click="datasetlistVisible = !datasetlistVisible"></span>
         <div ng-init="datasetlistVisible = false" ng-show="datasetlistVisible">
           <div ng-repeat="dataset in factor.datasets">
             <button type="button" class="btn btn-sm btn-light hs-lm-item-visibility"

+ 3 - 0
src/app.css

@@ -0,0 +1,3 @@
+.cursor-pointer {
+  cursor: pointer;
+}

+ 1 - 0
src/app.js

@@ -14,6 +14,7 @@ import 'hslayers-ng/components/toolbar/toolbar.module';
 // hslayers-ng components must be loaded first, otherwise angular will be undefined
 // eslint-disable-next-line sort-imports-es6-autofix/sort-imports-es6
 import './adjuster/adjuster.module.js';
+import './app.css';
 import VectorLayer from 'ol/layer/Vector';
 import View from 'ol/View';
 import hsv2rgb from 'hsv2rgb';