mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tweaks to new panel menu, now how top area of panel is clickable, and if no title a 5px high area can be clicked, this will enable panels without title which is something I have wanted
This commit is contained in:
parent
b9604bf3bc
commit
a08cb52ad9
@ -26,7 +26,7 @@ function (angular, $) {
|
|||||||
'<i class="icon-spinner icon-spin icon-large"></i>' +
|
'<i class="icon-spinner icon-spin icon-large"></i>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
|
|
||||||
'<div panel-menu></div>' +
|
'<div class="panel-title-container" panel-menu></div>' +
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ function (angular, $, _) {
|
|||||||
angular
|
angular
|
||||||
.module('grafana.directives')
|
.module('grafana.directives')
|
||||||
.directive('panelMenu', function($compile) {
|
.directive('panelMenu', function($compile) {
|
||||||
var linkTemplate = '<a class="pointer panel-title">{{panel.title || interpolateTemplateVars}}</a>';
|
var linkTemplate = '<a class="panel-title">{{panel.title || interpolateTemplateVars}}</a>';
|
||||||
var moveAttributes = ' data-drag=true data-jqyoui-options="kbnJqUiDraggableOptions"'+
|
var moveAttributes = ' data-drag=true data-jqyoui-options="kbnJqUiDraggableOptions"'+
|
||||||
' jqyoui-draggable="{'+
|
' jqyoui-draggable="{'+
|
||||||
'animate:false,'+
|
'animate:false,'+
|
||||||
@ -62,8 +62,6 @@ function (angular, $, _) {
|
|||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = null;
|
timeout = null;
|
||||||
|
|
||||||
console.log('dismiss', time);
|
|
||||||
|
|
||||||
if (time) {
|
if (time) {
|
||||||
timeout = setTimeout(dismiss, time);
|
timeout = setTimeout(dismiss, time);
|
||||||
return;
|
return;
|
||||||
@ -124,7 +122,7 @@ function (angular, $, _) {
|
|||||||
dismiss(2500);
|
dismiss(2500);
|
||||||
};
|
};
|
||||||
|
|
||||||
$link.click(showMenu);
|
elem.click(showMenu);
|
||||||
$compile(elem.contents())($scope);
|
$compile(elem.contents())($scope);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,6 @@ function (angular, _) {
|
|||||||
|
|
||||||
this.init = function($scope) {
|
this.init = function($scope) {
|
||||||
if (!$scope.panel.span) { $scope.panel.span = 12; }
|
if (!$scope.panel.span) { $scope.panel.span = 12; }
|
||||||
if (!$scope.panel.title) { $scope.panel.title = 'No title'; }
|
|
||||||
|
|
||||||
var menu = [
|
var menu = [
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
padding: 0px 10px 5px 10px;
|
padding: 0px 10px 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel-title-container {
|
||||||
|
min-height: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.panel-title {
|
.panel-title {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
Loading…
Reference in New Issue
Block a user