Skip to content

Commit

Permalink
fixed: group invites submitted to much data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Apr 7, 2016
1 parent 10f55eb commit a43721f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions views/default/input/group_invite_autocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
$minChars = 3;
}

echo elgg_format_element('div', ['class' => 'ui-front'], elgg_view('input/text', [
echo elgg_view('input/text', [
'id' => $id . '_autocomplete',
'class' => 'elgg-input-autocomplete',
'data-group-guid' => elgg_extract('group_guid', $vars),
'data-name' => $name,
'data-relationship' => $relationship,
'data-min-chars' => $minChars,
'data-destination' => $destination,
]));
]);

echo elgg_format_element('div', ['id' => $destination, 'class' => 'mtm clearfloat']);
?>
Expand Down
9 changes: 8 additions & 1 deletion views/default/js/group_tools/group_invite_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ define(function (require) {
noResults: '',
results: function() {}
}
}).data('ui-autocomplete')._renderItem = function(ul, item) {
});

$(this).data('ui-autocomplete')._renderItem = function(ul, item) {
return $('<li></li>')
.data('item.autocomplete', item)
.append(item.html)
.appendTo(ul);
};

$(this).data('ui-autocomplete')._resizeMenu = function() {
var autocomplete = this.element[0];
this.menu.element.outerWidth( $(autocomplete).outerWidth() );
};
});

$(document).on('click', '#' + data.destination + ' .elgg-icon-delete-alt', function() {
Expand Down

0 comments on commit a43721f

Please sign in to comment.