[DE] Check empty items in the table of contents.

This commit is contained in:
Julia Radzhabova 2017-12-25 12:03:51 +03:00
parent db8840f4ec
commit 6f7d5cc533
2 changed files with 6 additions and 4 deletions

View file

@ -52,6 +52,7 @@ define([
name: '',
isNotHeader: false,
hasSubItems: false,
isEmptyItem: false,
isExpanded: true,
isVisible: true,
selected: false,
@ -168,10 +169,10 @@ define([
'<% if (hasSubItems) { %>',
'<div class="tree-caret img-commonctrl ' + '<% if (!isExpanded) { %>' + 'up' + '<% } %>' + '" style="margin-left: <%= level*16 %>px;"></div>',
'<% } %>',
'<% if (name!=="") { %>',
' <div class="name <% if (isNotHeader) { %>' + 'not-header' + '<% } %>"><%= name %></div>',
'<% if (isEmptyItem) { %>',
'<div class="name empty">' + options.emptyItemText + '</div>',
'<% } else { %>',
' <div class="name empty">' + options.emptyItemText + '</div>',
'<div class="name <% if (isNotHeader) { %>' + 'not-header' + '<% } %>"><%= name %></div>',
'<% } %>',
'</div>'
].join(''));

View file

@ -109,7 +109,8 @@ define([
arr.push(new Common.UI.TreeViewModel({
name : this._navigationObject.get_Text(i),
level: level,
index: i
index: i,
isEmptyItem: this._navigationObject.isEmptyItem(i)
}));
prev_level = level;
}