From 8a715cd122082b2f22f7a4775dee125e367d5764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 25 Oct 2016 10:47:13 +0200 Subject: [PATCH] using gf-form in row header --- public/app/features/dashboard/row/row.html | 115 +++++++++++---------- public/app/features/dashboard/row/row.ts | 8 ++ public/sass/_variables.scss | 2 +- public/sass/components/_gf-form.scss | 5 +- public/sass/pages/_dashboard.scss | 4 +- 5 files changed, 78 insertions(+), 56 deletions(-) diff --git a/public/app/features/dashboard/row/row.html b/public/app/features/dashboard/row/row.html index fbd1695c0a5..bdff7c8506e 100644 --- a/public/app/features/dashboard/row/row.html +++ b/public/app/features/dashboard/row/row.html @@ -1,71 +1,82 @@ -
+
-
-
-
- -
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
-
+
diff --git a/public/app/features/dashboard/row/row.ts b/public/app/features/dashboard/row/row.ts index 26c61f4a3b0..cf7dc9dce64 100644 --- a/public/app/features/dashboard/row/row.ts +++ b/public/app/features/dashboard/row/row.ts @@ -1,6 +1,9 @@ /// import _ from 'lodash'; +import $ from 'jquery'; +import angular from 'angular'; + import config from 'app/core/config'; import {coreModule, appEvents} from 'app/core/core'; @@ -12,6 +15,7 @@ export class DashRowCtrl { /** @ngInject */ constructor(private $scope, private $rootScope, private $timeout) { this.panelPlugins = config.panels; + this.row.title = this.row.title || 'Row title'; } onDrop(panelId, dropTarget) { @@ -32,6 +36,10 @@ export class DashRowCtrl { this.$rootScope.$broadcast('render'); } + onDragEnter(data) { + console.log('drag enter', data); + } + addPanel(panel) { this.dashboard.addPanel(panel, this.row); this.$timeout(() => { diff --git a/public/sass/_variables.scss b/public/sass/_variables.scss index e4f8c642a4b..186b22f2390 100644 --- a/public/sass/_variables.scss +++ b/public/sass/_variables.scss @@ -161,7 +161,7 @@ $table-sm-cell-padding: .3rem !default; // Forms $input-padding-x: .75rem !default; $input-padding-y: .6rem !default; -$input-line-height: 1.42rem !default; +$input-line-height: 1.35rem !default; $input-btn-border-width: 1px; $input-border-radius: 0 $border-radius $border-radius 0 !default; diff --git a/public/sass/components/_gf-form.scss b/public/sass/components/_gf-form.scss index b1df60426d7..c22418d70da 100644 --- a/public/sass/components/_gf-form.scss +++ b/public/sass/components/_gf-form.scss @@ -62,7 +62,7 @@ $gf-form-margin: 0.25rem; &--grow { flex-grow: 1; - min-height: 2.70rem; + min-height: 2.60rem; } } @@ -196,6 +196,9 @@ $gf-form-margin: 0.25rem; margin-right: $gf-form-margin; line-height: $input-line-height; font-size: $font-size-sm; + box-shadow: none; + border: $input-btn-border-width solid transparent; + @include border-radius($label-border-radius-sm); flex-shrink: 0; flex-grow: 0; diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index 273aa2c0bfd..5e7c37c1e10 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -210,7 +210,7 @@ div.flot-text { } .dash-row-handle-column { - width: 2rem; + min-width: 1.5rem; background: $input-label-bg; display: flex; flex-direction: column; @@ -235,8 +235,8 @@ div.flot-text { flex-direction: row; text-align: left; align-items: center; - background: $input-label-bg; margin-right: $panel-margin; + margin-left: $gf-form-margin; } .dash-row-header-title {