Quellcode durchsuchen

Merge pull request #10574 from Jonnymcc/disable-mode-options-line-points-unchecked

Disable instead of hide mode options when line/points is unchecked
Carl Bergquist vor 8 Jahren
Ursprung
Commit
27d103adae
1 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 7 7
      public/app/plugins/panel/graph/tab_display.html

+ 7 - 7
public/app/plugins/panel/graph/tab_display.html

@@ -26,24 +26,24 @@
 		</div>
 		</div>
 		<div class="section gf-form-group">
 		<div class="section gf-form-group">
 			<h5 class="section-heading">Mode Options</h5>
 			<h5 class="section-heading">Mode Options</h5>
-			<div class="gf-form" ng-show="ctrl.panel.lines">
+			<div class="gf-form">
 				<label class="gf-form-label width-8">Fill</label>
 				<label class="gf-form-label width-8">Fill</label>
 				<div class="gf-form-select-wrapper max-width-5">
 				<div class="gf-form-select-wrapper max-width-5">
-					<select class="gf-form-input" ng-model="ctrl.panel.fill" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()"></select>
+					<select class="gf-form-input" ng-model="ctrl.panel.fill" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()" ng-disabled="!ctrl.panel.lines"></select>
 				</div>
 				</div>
 			</div>
 			</div>
-			<div class="gf-form" ng-show="(ctrl.panel.lines)">
+			<div class="gf-form">
 				<label class="gf-form-label width-8">Line Width</label>
 				<label class="gf-form-label width-8">Line Width</label>
 				<div class="gf-form-select-wrapper max-width-5">
 				<div class="gf-form-select-wrapper max-width-5">
-					<select class="gf-form-input" ng-model="ctrl.panel.linewidth" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()"></select>
+					<select class="gf-form-input" ng-model="ctrl.panel.linewidth" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()" ng-disabled="!ctrl.panel.lines"></select>
 				</div>
 				</div>
 			</div>
 			</div>
-			<gf-form-switch ng-show="ctrl.panel.lines" class="gf-form" label="Staircase" label-class="width-8" checked="ctrl.panel.steppedLine" on-change="ctrl.render()">
+			<gf-form-switch ng-disabled="!ctrl.panel.lines" class="gf-form" label="Staircase" label-class="width-8" checked="ctrl.panel.steppedLine" on-change="ctrl.render()">
 			</gf-form-switch>
 			</gf-form-switch>
-			<div class="gf-form" ng-show="ctrl.panel.points">
+			<div class="gf-form">
 				<label class="gf-form-label width-8">Point Radius</label>
 				<label class="gf-form-label width-8">Point Radius</label>
 				<div class="gf-form-select-wrapper max-width-5">
 				<div class="gf-form-select-wrapper max-width-5">
-					<select class="gf-form-input" ng-model="ctrl.panel.pointradius" ng-options="f for f in [1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()"></select>
+					<select class="gf-form-input" ng-model="ctrl.panel.pointradius" ng-options="f for f in [1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()" ng-disabled="!ctrl.panel.points"></select>
 				</div>
 				</div>
 			</div>
 			</div>
 		</div>
 		</div>