Show/hide internal items in agenda sort view.
This commit is contained in:
parent
e7ee8fbc07
commit
3ca254c88e
@ -572,6 +572,7 @@ angular.module('OpenSlidesApp.agenda.site', [
|
|||||||
}, function () {
|
}, function () {
|
||||||
$scope.items = AgendaTree.getTree(Agenda.getAll());
|
$scope.items = AgendaTree.getTree(Agenda.getAll());
|
||||||
});
|
});
|
||||||
|
$scope.showInternalItems = true;
|
||||||
|
|
||||||
// save parent and weight of moved agenda item (and all items on same level)
|
// save parent and weight of moved agenda item (and all items on same level)
|
||||||
$scope.treeOptions = {
|
$scope.treeOptions = {
|
||||||
|
@ -10,24 +10,33 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="details">
|
<div class="details agenda-sort">
|
||||||
<p translate>Drag and drop items to change the order of the agenda. Your modification will be saved immediately.</p>
|
<p translate>Drag and drop items to change the order of the agenda. Your modification will be saved immediately.</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button class="btn btn-default btn-sm" ng-click="showInternalItems=!showInternalItems">
|
||||||
|
<translate ng-if="showInternalItems">Hide internal items</translate>
|
||||||
|
<translate ng-if="!showInternalItems">Show internal items</translate>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div ui-tree="treeOptions" id="tree-root">
|
<div ui-tree="treeOptions" id="tree-root">
|
||||||
<ol ui-tree-nodes ng-model="items">
|
<ol ui-tree-nodes ng-model="items">
|
||||||
<li ng-repeat="item in items" ui-tree-node ng-include="'nodes_renderer.html'">
|
<li ng-repeat="item in items" ui-tree-node ng-include="'nodes_renderer.html'">
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<p class="spacer">* <translate>Internal item</translate</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Nested node template -->
|
<!-- Nested node template -->
|
||||||
<script type="text/ng-template" id="nodes_renderer.html">
|
<script type="text/ng-template" id="nodes_renderer.html">
|
||||||
<div ui-tree-handle>
|
<div ui-tree-handle ng-if="!item.item.is_hidden">
|
||||||
<span ng-if="item.item.is_hidden">*</span>
|
|
||||||
{{ item.item.getListViewTitle() }}
|
{{ item.item.getListViewTitle() }}
|
||||||
</div>
|
</div>
|
||||||
|
<div ui-tree-handle ng-if="item.item.is_hidden && showInternalItems" class="internal">
|
||||||
|
<i class="fa fa-ban"></i>
|
||||||
|
{{ item.item.getListViewTitle() }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ol ui-tree-nodes="" ng-model="item.children">
|
<ol ui-tree-nodes="" ng-model="item.children">
|
||||||
<li ng-repeat="item in item.children" ui-tree-node ng-include="'nodes_renderer.html'">
|
<li ng-repeat="item in item.children" ui-tree-node ng-include="'nodes_renderer.html'">
|
||||||
</ol>
|
</ol>
|
||||||
|
@ -1128,6 +1128,15 @@ img {
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Agenda sort view **/
|
||||||
|
.agenda-sort .internal {
|
||||||
|
padding: 7px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
.agenda-sort .angular-ui-tree-node {
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/** Footer **/
|
/** Footer **/
|
||||||
#footer {
|
#footer {
|
||||||
float: left;
|
float: left;
|
||||||
|
Loading…
Reference in New Issue
Block a user