Commit a08cb52a by Torkel Ödegaard

tweaks to new panel menu, now how top area of panel is clickable, and if no…

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
parent b9604bf3
......@@ -26,7 +26,7 @@ function (angular, $) {
'<i class="icon-spinner icon-spin icon-large"></i>' +
'</span>' +
'<div panel-menu></div>' +
'<div class="panel-title-container" panel-menu></div>' +
'</div>'+
'</div>';
......
......@@ -9,7 +9,7 @@ function (angular, $, _) {
angular
.module('grafana.directives')
.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"'+
' jqyoui-draggable="{'+
'animate:false,'+
......@@ -62,8 +62,6 @@ function (angular, $, _) {
clearTimeout(timeout);
timeout = null;
console.log('dismiss', time);
if (time) {
timeout = setTimeout(dismiss, time);
return;
......@@ -124,7 +122,7 @@ function (angular, $, _) {
dismiss(2500);
};
$link.click(showMenu);
elem.click(showMenu);
$compile(elem.contents())($scope);
}
};
......
......@@ -10,7 +10,6 @@ function (angular, _) {
this.init = function($scope) {
if (!$scope.panel.span) { $scope.panel.span = 12; }
if (!$scope.panel.title) { $scope.panel.title = 'No title'; }
var menu = [
{
......
......@@ -15,6 +15,11 @@
padding: 0px 10px 5px 10px;
}
.panel-title-container {
min-height: 5px;
cursor: pointer;
}
.panel-title {
border: 0px;
font-weight: bold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment