Commit 2ee22668 by Torkel Ödegaard

Fixes #4, also improves responsive layout for mobiles

parent 0c1df425
......@@ -531,8 +531,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return;
}
// IE doesn't work without this
elem.css({height:scope.height || scope.row.height});
try {
elem.css({ height:scope.panel.height || scope.row.height });
} catch(e) { return; }
_.each(data, function(series) {
series.label = series.info.alias;
......
......@@ -56,7 +56,7 @@
<div ng-show="rowSpan(row) < 10 && dashboard.panelDragging" class="panel" style="margin:5px;width:30%;background:rgba(100,100,100,0.50)" ng-class="{'dragInProgress':dashboard.panelDragging}" ng-style="{height:row.height}" data-drop="true" ng-model="row.panels" data-jqyoui-options jqyoui-droppable="{index:row.panels.length,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver',onOut:'panelMoveOut'}">
</div>
<span bs-modal="'app/partials/roweditor.html'" ng-show="row.editable && !dashboard.panelDragging">
<span bs-modal="'app/partials/roweditor.html'" ng-show="!dashboard.panelDragging && !dashboard.current.hideControls">
<i ng-hide="rowSpan(row) >= 10" class="pointer icon-plus-sign" ng-click="editor.index = 2" bs-tooltip="'Add a panel to this row'" data-placement="right"></i>
</span>
......
......@@ -21,3 +21,16 @@
// 768px-979px
@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
// Media queries
// ---------------------
@media (max-width: 767px) {
div.panel {
width: 100% !important;
padding: 0px !important;
}
body {
padding: 0;
}
}
\ No newline at end of file
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