From debf820037fa34a07df0cb2b195191ac6ddd6ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 30 Sep 2014 10:27:56 +0200 Subject: [PATCH] New checkbox change is complete --- src/app/controllers/templateEditorCtrl.js | 3 +++ src/app/directives/tip.js | 5 +++-- src/app/partials/dasheditor.html | 2 +- src/app/partials/playlist.html | 3 ++- src/app/partials/roweditor.html | 8 ++------ src/app/partials/templating_editor.html | 18 ++++++------------ src/css/less/forms.less | 2 +- 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/app/controllers/templateEditorCtrl.js b/src/app/controllers/templateEditorCtrl.js index 058a190658b..394946447a7 100644 --- a/src/app/controllers/templateEditorCtrl.js +++ b/src/app/controllers/templateEditorCtrl.js @@ -72,6 +72,9 @@ function (angular, _) { if ($scope.current.type === 'interval') { $scope.current.query = '1m,10m,30m,1h,6h,12h,1d,7d,14d,30d'; } + if ($scope.current.type === 'query') { + $scope.current.query = ''; + } }; $scope.removeVariable = function(variable) { diff --git a/src/app/directives/tip.js b/src/app/directives/tip.js index 57dbd44cb04..ba1d373efb7 100644 --- a/src/app/directives/tip.js +++ b/src/app/directives/tip.js @@ -26,11 +26,12 @@ function (angular, kbn) { link: function(scope, elem, attrs) { var ngchange = attrs.change ? (' ng-change="' + attrs.change + '"') : ''; var tip = attrs.tip ? (' ' + attrs.tip + '') : ''; + var showIf = attrs.showIf ? (' ng-show="' + attrs.showIf + '" ') : ''; - var template = '
' + + var template = '
' + ' ' + - '' + ' '; diff --git a/src/app/partials/dasheditor.html b/src/app/partials/dasheditor.html index 74e757b2554..5cfad2d8d79 100644 --- a/src/app/partials/dasheditor.html +++ b/src/app/partials/dasheditor.html @@ -72,7 +72,7 @@
- +
diff --git a/src/app/partials/playlist.html b/src/app/partials/playlist.html index 1517678e730..b3be57e8fda 100644 --- a/src/app/partials/playlist.html +++ b/src/app/partials/playlist.html @@ -22,7 +22,8 @@ {{dashboard.title}} - + + diff --git a/src/app/partials/roweditor.html b/src/app/partials/roweditor.html index 032163ea64b..57060ebf93c 100644 --- a/src/app/partials/roweditor.html +++ b/src/app/partials/roweditor.html @@ -20,12 +20,8 @@
-
- -
-
- -
+ +
diff --git a/src/app/partials/templating_editor.html b/src/app/partials/templating_editor.html index 90d1fb50d26..1ac2c879d1c 100644 --- a/src/app/partials/templating_editor.html +++ b/src/app/partials/templating_editor.html @@ -66,10 +66,10 @@
-
- - -
+ +
@@ -80,10 +80,7 @@
-
- - -
+
@@ -118,10 +115,7 @@
-
- - -
+
diff --git a/src/css/less/forms.less b/src/css/less/forms.less index e70efb362c8..ab17dc81c94 100644 --- a/src/css/less/forms.less +++ b/src/css/less/forms.less @@ -4,7 +4,7 @@ input[type=text].input-fluid { padding: 14px; } -input[type="checkbox"] { +input[type="checkbox"].cr1 { display: none; }