From 6ed17fe62fe692a9a9961849b4c19653fc8efc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 29 May 2015 08:21:44 +0200 Subject: [PATCH] Removed selection state for single select variables --- public/app/directives/variableValueSelect.js | 15 ++------ .../partials/variableValueSelect.html | 9 ++--- public/css/less/submenu.less | 34 +++++++++++-------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/public/app/directives/variableValueSelect.js b/public/app/directives/variableValueSelect.js index c22154f68a6..f51c706bfe5 100644 --- a/public/app/directives/variableValueSelect.js +++ b/public/app/directives/variableValueSelect.js @@ -11,20 +11,8 @@ function (angular, app, _) { .module('grafana.directives') .directive('variableValueSelect', function($compile, $window, $timeout) { - function openDropdown(inputEl, linkEl) { - inputEl.css('width', (linkEl.width() + 16) + 'px'); - - linkEl.hide(); - inputEl.show(); - inputEl.focus(); - }; - return { - scope: { - variable: "=", - onUpdated: "&" - }, - + scope: { variable: "=", onUpdated: "&" }, templateUrl: 'app/features/dashboard/partials/variableValueSelect.html', link: function(scope, elem) { @@ -94,6 +82,7 @@ function (angular, app, _) { scope.search = {query: '', options: scope.options}; scope.selectedValuesCount = currentValues.length; + scope.selectedTags = scope.selectedTag || []; if (!scope.tags) { scope.tags = _.map(variable.tags, function(value) { diff --git a/public/app/features/dashboard/partials/variableValueSelect.html b/public/app/features/dashboard/partials/variableValueSelect.html index bb4f0ac03e6..303e1756033 100644 --- a/public/app/features/dashboard/partials/variableValueSelect.html +++ b/public/app/features/dashboard/partials/variableValueSelect.html @@ -2,7 +2,7 @@ {{labelText}}: -
+