Reset item shares variable, fixes autocomplete not showing people

This commit is contained in:
Michael Gapczynski 2012-08-08 11:39:00 -04:00
parent b1a7e30819
commit a22f30fb78
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,6 @@ OC.Share={
},
showDropDown:function(itemType, item, appendTo, privateLink, possiblePermissions) {
var html = '<div id="dropdown" class="drop" data-item-type="'+itemType+'" data-item="'+item+'">';
// TODO replace with autocomplete textbox
html += '<input id="shareWith" type="text" placeholder="Share with" style="width:90%;"/>';
html += '<ul id="shareWithList">';
html += '</ul>';
@ -86,6 +85,8 @@ OC.Share={
}
html += '</div>';
$(html).appendTo(appendTo);
// Reset item shares
OC.Share.itemShares = [];
var data = OC.Share.loadItem(itemType, item);
if (data) {
$.each(data, function(index, share) {