Commit 7919d793 by Torkel Ödegaard

Another cache header fix

parent a5c38552
......@@ -66,12 +66,12 @@ func newMacaron() *macaron.Macaron {
func mapStatic(m *macaron.Macaron, dir string, prefix string) {
headers := func(c *macaron.Context) {
c.Resp.Header().Set("Cache-Control", "public max-age: 3600")
c.Resp.Header().Set("Cache-Control", "public, max-age: 3600")
}
if setting.Env == setting.DEV {
headers = func(c *macaron.Context) {
c.Resp.Header().Set("Cache-Control", "max-age: 0")
c.Resp.Header().Set("Cache-Control", "max-age: 0, must-revalidate")
}
}
......
......@@ -168,4 +168,12 @@ function (angular, app, _, config) {
};
});
module.directive('panelGhostPanel', function() {
return function(scope, element) {
var dropZoneSpan = 12 - scope.dashboard.rowSpan(scope.row);
element.find('.panel-container').css('height', scope.row.height);
element[0].style.width = ((dropZoneSpan / 1.2) * 10) + '%';
};
});
});
......@@ -86,6 +86,14 @@
<panel-loader type="panel.type" class="panel-margin"></panel-loader>
</div>
<div panel-ghost-panel class="panel ghost-panel panel-margin">
<div class="panel-container">
<div style="text-align: center">
<h2>Add panel</h2>
</div>
</div>
</div>
<div panel-drop-zone class="panel panel-drop-zone"
ui-on-drop="onDrop($data, row)"
data-drop="true">
......
......@@ -169,6 +169,18 @@
}
}
.ghost-panel {
&:hover {
.panel-container {
visibility: visible;
}
}
.panel-container {
visibility: hidden;
border: 1px solid @grayDark;
}
}
.panel-time-info {
font-weight: bold;
float: right;
......
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