update item editor

This commit is contained in:
Luke Pulverenti 2016-02-08 14:14:41 -05:00
parent a4220131dd
commit 21f8bbba66
3 changed files with 20 additions and 19 deletions

View File

@ -757,34 +757,36 @@
var lastType = '';
var html = '';
var elem = $('#peopleList', context);
var elem = context.querySelector('#peopleList');
for (var i = 0, length = people.length; i < length; i++) {
var person = people[i];
var type = person.Type || Globalize.translate('PersonTypePerson');
html += '<paper-icon-item>';
if (type != lastType) {
html += '<li data-role="list-divider">' + type + '</li>';
lastType = type;
}
html += '<paper-fab class="btnEditPerson" data-index="' + i + '" mini style="background-color:#444;" icon="person" item-icon></paper-fab>';
html += '<li><a class="btnEditPerson" href="#" data-index="' + i + '">';
html += '<paper-item-body>';
html += '<a class="btnEditPerson clearLink" href="#" data-index="' + i + '">';
html += '<h3>' + (person.Name || '') + '</h3>';
html += '<div class="textValue">';
html += (person.Name || '');
html += '</div>';
if (person.Role && person.Role != lastType) {
html += '<p>' + (person.Role) + '</p>';
html += '<div secondary>' + (person.Role) + '</div>';
}
html += '</a>';
html += '</paper-item-body>';
html += '<a class="btnDeletePerson" href="#" data-icon="delete" data-index="' + i + '">' + Globalize.translate('Delete') + '</a>';
html += '<paper-icon-button icon="delete" data-index="' + i + '" class="btnDeletePerson"></paper-icon-button>';
html += '</li>';
html += '</paper-icon-item>';
}
//elem.html(html);
elem.innerHTML = html;
$('.btnDeletePerson', elem).on('click', function () {

View File

@ -1,5 +1,5 @@
<div class="dialogHeader">
<paper-icon-button icon="close" class="btnCancel"></paper-icon-button>
<paper-icon-button icon="close" class="btnCancel" tabindex="-1"></paper-icon-button>
<div class="dialogHeaderTitle">
${ButtonEdit}
</div>
@ -236,8 +236,7 @@
<iron-icon icon="add"></iron-icon>
<span>${ButtonAdd}</span>
</paper-button>
<div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="peopleList"></ul>
<div id="peopleList" class="paperList">
</div>
</div>
<div id="keywordsCollapsible" class="editableListviewContainer" style="display: none; margin-top: 3em;">

View File

@ -902,12 +902,12 @@
editMetadata: function (itemId) {
Dashboard.navigate('edititemmetadata.html?id=' + itemId);
//Dashboard.navigate('edititemmetadata.html?id=' + itemId);
//require(['components/metadataeditor/metadataeditor'], function (metadataeditor) {
require(['components/metadataeditor/metadataeditor'], function (metadataeditor) {
// metadataeditor.show(itemId);
//});
metadataeditor.show(itemId);
});
},
showMoreCommands: function (positionTo, itemId, commands) {