redesigning links editor

This commit is contained in:
Patrick O'Carroll
2017-12-12 13:06:32 +01:00
parent 6ae94dda87
commit a69c260173
2 changed files with 5 additions and 9 deletions
+1 -5
View File
@@ -40,7 +40,6 @@
<thead>
<tr>
<th>Type</th>
<th>Tags</th>
<th colspan="3"></th>
</tr>
</thead>
@@ -50,9 +49,6 @@
<i class="fa fa-fw fa-external-link"></i>
{{link.type}}
</td>
<td class="pointer">
{{link.tags}}
</td>
<td style="width: 1%">
<i ng-click="ctrl.moveLink($index, -1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i>
</td>
@@ -130,7 +126,7 @@
</div>
</div>
</div>
<button class="btn btn-success" ng-if="ctrl.mode == 'new'" ng-click="ctrl.addLink(link.type, link.tags, link.url, link.title)">
<button class="btn btn-success" ng-if="ctrl.mode == 'new'" ng-click="ctrl.addLink(link.type)">
<i class="fa fa-plus"></i> Add</button>
<button class="btn btn-success" ng-if="ctrl.mode == 'edit'" ng-click="ctrl.editLink()">
<i class="fa fa-plus"></i> Edit</button>
+4 -4
View File
@@ -39,9 +39,9 @@ export class DashLinkEditorCtrl {
this.mode = 'edit';
}
addLink(type, tags) {
this.dashboard.links.push({ type: type, tags: tags, icon: 'external link' });
this.dashboard.updateSubmenuVisibility();
addLink(type) {
this.dashboard.links.push({ type: type, icon: 'external link' });
//this.dashboard.updateSubmenuVisibility();
this.updated();
this.mode = 'list';
}
@@ -61,7 +61,7 @@ export class DashLinkEditorCtrl {
deleteLink(index) {
this.dashboard.links.splice(index, 1);
this.dashboard.updateSubmenuVisibility();
//this.dashboard.updateSubmenuVisibility();
this.updated();
}
}