소스 검색

Restored the variable color for the label/name in the submenu

Torkel Ödegaard 10 년 전
부모
커밋
8c14e565a7
2개의 변경된 파일5개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      public/app/directives/templateParamSelector.js
  2. 3 0
      public/app/features/dashboard/partials/variableValueSelect.html

+ 2 - 6
public/app/directives/templateParamSelector.js

@@ -99,12 +99,8 @@ function (angular, app, _) {
           };
 
           scope.updateLinkText = function() {
-            scope.linkText = "";
-            if (!variable.hideLabel) {
-              scope.linkText = (variable.label || variable.name) + ': ';
-            }
-
-            scope.linkText += variable.current.text;
+            scope.labelText = variable.label || '$' + variable.name;
+            scope.linkText = variable.current.text;
           };
 
           scope.$watchGroup(['variable.hideLabel', 'variable.name', 'variable.label', 'variable.current.text'], function() {

+ 3 - 0
public/app/features/dashboard/partials/variableValueSelect.html

@@ -1,3 +1,6 @@
+<span class="template-variable" ng-show="!variable.hideLabel" style="padding-right: 5px">
+	{{labelText}}:
+</span>
 <a ng-click="show()" class="variable-value-link">
 	{{linkText}}
 	<i class="fa fa-caret-down"></i>