ux(dashboard): minor fixes

This commit is contained in:
Torkel Ödegaard 2016-10-28 16:37:13 +02:00
parent 366650e1ae
commit 3fc6f6d730
4 changed files with 9 additions and 10 deletions

View File

@ -28,15 +28,15 @@ function (coreModule) {
coreModule.default.controller('NewDashboardCtrl', function($scope) {
$scope.initDashboard({
meta: { canStar: false, canShare: false },
meta: { canStar: false, canShare: false, isNew: true },
dashboard: {
title: "New dashboard",
isNew: true,
rows: [
{
title: 'Dashboard Row',
height: '250px',
panels:[],
isNew: true,
}
]
},

View File

@ -65,15 +65,14 @@ export class DashboardModel {
this.links = data.links || [];
this.gnetId = data.gnetId || null;
if (this.id === null) {
this.editMode = true;
}
this.updateSchema(data);
this.initMeta(meta);
this.editMode = this.meta.isNew;
}
private initMeta(meta) {
console.log(meta);
meta = meta || {};
meta.canShare = meta.canShare !== false;

View File

@ -19,7 +19,7 @@ export class DashRowCtrl {
constructor(private $scope, private $rootScope, private $timeout, private uiSegmentSrv, private $q) {
this.row.title = this.row.title || 'Row title';
if (this.row.isNew) {
if (this.dashboard.meta.isNew) {
this.dropView = 1;
delete this.row.isNew;
}

View File

@ -353,9 +353,9 @@ div.flot-text {
.dash-row-add-panel {
margin: 0;
padding: $panel-margin*2;
display: flex;
align-items: flex-start;
position: relative;
// display: flex;
// align-items: flex-start;
// position: relative;
}
.add-panel-panels-scroll {