Browse Source

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

Torkel Ödegaard 10 năm trước cách đây
mục cha
commit
8c14e565a7

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

@@ -99,12 +99,8 @@ function (angular, app, _) {
           };
           };
 
 
           scope.updateLinkText = function() {
           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() {
           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">
 <a ng-click="show()" class="variable-value-link">
 	{{linkText}}
 	{{linkText}}
 	<i class="fa fa-caret-down"></i>
 	<i class="fa fa-caret-down"></i>