From 9b9ac45295b7c14cf45ecc7e5ffe035c3fa2b0e7 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Tue, 12 Dec 2017 14:05:24 +0100 Subject: [PATCH] redesigning links editor --- public/app/features/dashlinks/editor.html | 10 ++++------ public/app/features/dashlinks/editor.ts | 22 +++++++++------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/public/app/features/dashlinks/editor.html b/public/app/features/dashlinks/editor.html index 471055bc8fc..2529f32f0b9 100644 --- a/public/app/features/dashlinks/editor.html +++ b/public/app/features/dashlinks/editor.html @@ -12,7 +12,7 @@
There are no dashboard links added yet
- + Add Dashboard Link @@ -33,7 +33,7 @@
@@ -126,8 +126,6 @@ - - + diff --git a/public/app/features/dashlinks/editor.ts b/public/app/features/dashlinks/editor.ts index 11e69933800..56bab85a318 100644 --- a/public/app/features/dashlinks/editor.ts +++ b/public/app/features/dashlinks/editor.ts @@ -30,26 +30,22 @@ export class DashLinkEditorCtrl { this.mode = 'list'; } - addLinkMode() { - this.mode = 'new'; - } - - editLinkMode(index) { - this.currentLink = index; - this.mode = 'edit'; - } - - addLink(type) { - this.dashboard.links.push({ type: type, icon: 'external link' }); - //this.dashboard.updateSubmenuVisibility(); + addLink() { + this.dashboard.links.push({ type: 'dashboard', icon: 'external link' }); + this.dashboard.updateSubmenuVisibility(); this.updated(); - this.mode = 'list'; + this.mode = 'new'; } editLink(index) { } + saveLink() { + this.updated(); + this.backToList(); + } + moveLink(index, dir) { _.move(this.dashboard.links, index, index+dir); this.updated();