Change layout for table of contents.
This commit is contained in:
parent
909e73270a
commit
4c17a79725
|
@ -154,11 +154,11 @@ define([
|
|||
showLast: true,
|
||||
allowScrollbar: true,
|
||||
itemTemplate: _.template([
|
||||
'<div id="<%= id %>" class="tree-item <% if (!isVisible) { %>' + 'hidden' + '<% } %>" style="display: block;padding-left: <%= level*10 + 26 %>px;">',
|
||||
'<div id="<%= id %>" class="tree-item <% if (!isVisible) { %>' + 'hidden' + '<% } %>" style="display: block;padding-left: <%= level*16 + 24 %>px;">',
|
||||
'<% if (hasSubItems) { %>',
|
||||
'<div class="tree-caret img-commonctrl ' + '<% if (!isExpanded) { %>' + 'up' + '<% } %>' + '" style="margin-left: <%= level*10 %>px;"></div>',
|
||||
'<div class="tree-caret img-commonctrl ' + '<% if (!isExpanded) { %>' + 'up' + '<% } %>' + '" style="margin-left: <%= level*16 %>px;"></div>',
|
||||
'<% } %>',
|
||||
'<div class="name"><%= name %></div>',
|
||||
'<div class="name <% if (isNotHeader) { %>' + 'not-header' + '<% } %>"><%= name %></div>',
|
||||
'</div>'
|
||||
].join(''))
|
||||
},
|
||||
|
|
|
@ -28,22 +28,22 @@
|
|||
|
||||
.tree-item {
|
||||
width: 100%;
|
||||
min-height: 32px;
|
||||
padding: 0px 0 0 26px;
|
||||
min-height: 28px;
|
||||
padding: 0px 0 0 24px;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
padding: 7px 0;
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tree-caret {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background-position: 4px -269px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-position: 3px -270px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
|
|
@ -116,6 +116,7 @@ define([
|
|||
if (count>0 && this._navigationObject.isFirstItemNotHeader()) {
|
||||
arr[0].set('hasSubItems', false);
|
||||
arr[0].set('isNotHeader', true);
|
||||
arr[0].set('name', this.txtBeginning);
|
||||
arr[0].set('tip', this.txtGotoBeginning);
|
||||
}
|
||||
this.getApplication().getCollection('Navigation').reset(arr);
|
||||
|
@ -173,7 +174,7 @@ define([
|
|||
var index = parseInt(menu.cmpEl.attr('data-value'));
|
||||
if (item.value == 'promote') {
|
||||
this._navigationObject.promote(index);
|
||||
} else if (item.value == 'indent') {
|
||||
} else if (item.value == 'demote') {
|
||||
this._navigationObject.demote(index);
|
||||
} else if (item.value == 'before') {
|
||||
this._navigationObject.insertHeader(index, true);
|
||||
|
@ -194,6 +195,7 @@ define([
|
|||
this.panelNavigation.viewNavigationList.expandToLevel(item.value-1);
|
||||
},
|
||||
|
||||
txtBeginning: 'Beginning of document',
|
||||
txtGotoBeginning: 'Go to the beginning of the document'
|
||||
|
||||
}, DE.Controllers.Navigation || {}));
|
||||
|
|
|
@ -80,8 +80,8 @@ define([
|
|||
value: 'promote'
|
||||
},
|
||||
{
|
||||
caption : this.txtIndent,
|
||||
value: 'indent'
|
||||
caption : this.txtDemote,
|
||||
value: 'demote'
|
||||
},
|
||||
{
|
||||
caption : '--'
|
||||
|
@ -148,7 +148,7 @@ define([
|
|||
|
||||
strNavigate: 'Table of Contents',
|
||||
txtPromote: 'Promote',
|
||||
txtIndent: 'Indent',
|
||||
txtDemote: 'Demote',
|
||||
txtHeadingBefore: 'New heading before',
|
||||
txtHeadingAfter: 'New heading after',
|
||||
txtNewHeading: 'New subheading',
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
#navigation-list {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 15px 0 10px 0;
|
||||
font-size: 13px;
|
||||
padding: 8px 0;
|
||||
font-size: 12px;
|
||||
|
||||
.name.not-header {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue