redesigning links editor
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
<div class="empty-list-cta__title">
|
<div class="empty-list-cta__title">
|
||||||
There are no dashboard links added yet
|
There are no dashboard links added yet
|
||||||
</div>
|
</div>
|
||||||
<a ng-click="ctrl.addLinkMode()" class="empty-list-cta__button btn btn-xlarge btn-success">
|
<a ng-click="ctrl.addLink()" class="empty-list-cta__button btn btn-xlarge btn-success">
|
||||||
<i class="gicon gicon-dashboard-new"></i>
|
<i class="gicon gicon-dashboard-new"></i>
|
||||||
Add Dashboard Link
|
Add Dashboard Link
|
||||||
</a>
|
</a>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<div ng-if="ctrl.dashboard.links.length > 0">
|
<div ng-if="ctrl.dashboard.links.length > 0">
|
||||||
<div class="page-action-bar">
|
<div class="page-action-bar">
|
||||||
<div class="page-action-bar__spacer"></div>
|
<div class="page-action-bar__spacer"></div>
|
||||||
<a type="button" class="btn btn-success" ng-click="ctrl.addLinkMode()">
|
<a type="button" class="btn btn-success" ng-click="ctrl.addLink()">
|
||||||
<i class="fa fa-plus"></i> New</a>
|
<i class="fa fa-plus"></i> New</a>
|
||||||
</div>
|
</div>
|
||||||
<table class="filter-table filter-table--hover">
|
<table class="filter-table filter-table--hover">
|
||||||
@@ -126,8 +126,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-success" ng-if="ctrl.mode == 'new'" ng-click="ctrl.addLink(link.type)">
|
<button class="btn btn-success" ng-click="ctrl.saveLink()">
|
||||||
<i class="fa fa-plus"></i> Add</button>
|
<i class="fa fa-plus"></i>Save</button>
|
||||||
<button class="btn btn-success" ng-if="ctrl.mode == 'edit'" ng-click="ctrl.editLink()">
|
|
||||||
<i class="fa fa-plus"></i> Edit</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,26 +30,22 @@ export class DashLinkEditorCtrl {
|
|||||||
this.mode = 'list';
|
this.mode = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
addLinkMode() {
|
addLink() {
|
||||||
this.mode = 'new';
|
this.dashboard.links.push({ type: 'dashboard', icon: 'external link' });
|
||||||
}
|
this.dashboard.updateSubmenuVisibility();
|
||||||
|
|
||||||
editLinkMode(index) {
|
|
||||||
this.currentLink = index;
|
|
||||||
this.mode = 'edit';
|
|
||||||
}
|
|
||||||
|
|
||||||
addLink(type) {
|
|
||||||
this.dashboard.links.push({ type: type, icon: 'external link' });
|
|
||||||
//this.dashboard.updateSubmenuVisibility();
|
|
||||||
this.updated();
|
this.updated();
|
||||||
this.mode = 'list';
|
this.mode = 'new';
|
||||||
}
|
}
|
||||||
|
|
||||||
editLink(index) {
|
editLink(index) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveLink() {
|
||||||
|
this.updated();
|
||||||
|
this.backToList();
|
||||||
|
}
|
||||||
|
|
||||||
moveLink(index, dir) {
|
moveLink(index, dir) {
|
||||||
_.move(this.dashboard.links, index, index+dir);
|
_.move(this.dashboard.links, index, index+dir);
|
||||||
this.updated();
|
this.updated();
|
||||||
|
|||||||
Reference in New Issue
Block a user