this._excludedSearchValues = excludedSearchValues;
}
this._searchInput = $(searchInput).keyup($.proxy(this._keyUp, this));
- this._searchInput.wrap('<span />');
- this._list = $('<ul class="wcf-dropdown" />').insertAfter(this._searchInput);
+ this._searchInput.wrap('<span class="dropdown" />');
+ this._list = $('<ul class="dropdownMenu" />').insertAfter(this._searchInput);
this._proxy = new WCF.Action.Proxy({
success: $.proxy(this._success, this)
* @param jQuery jqXHR
*/
_success: function(data, textStatus, jqXHR) {
+ this._clearList(false);
+
+ // no items available, abort
if (!$.getLength(data.returnValues)) {
- this._clearList(false);
-
return;
}
-
- this._clearList(false);
for (var $i in data.returnValues) {
var $item = data.returnValues[$i];
this._createListItem($item);
}
- this._list.addClass('open');
+ this._list.parent().addClass('dropdownOpen');
+
+ WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(true) }, this));
},
/**
this._searchInput.val('');
}
- this._list.removeClass('open').empty();
+ this._list.parent().removeClass('dropdownOpen').end().empty();
+
+ WCF.CloseOverlayHandler.removeCallback('WCF.Search.Base');
},
/**
var $listItem = this._super(item);
// insert item type
- $('<img src="' + WCF.Icon.get('wcf.icon.user' + (item.type == 'group' ? 's' : '')) + '" alt="" />').insertBefore($listItem.children('span:eq(0)'));
+ $('<img src="' + WCF.Icon.get('wcf.icon.user' + (item.type == 'group' ? 's' : '')) + '" alt="" class="icon16" style="margin-right: 4px;" />').prependTo($listItem.children('span:eq(0)'));
$listItem.data('type', item.type);
return $listItem;
--- /dev/null
+.aclContainer dd > span {
+ position: relative;
+}
+
+.aclList,
+.aclPermissionList {
+ margin-top: 0;
+ min-height: 100px;
+
+ li {
+ display: block;
+ padding: @wcfGapTiny;
+
+ &:first-child {
+ border-top-left-radius: @wcfContainerBorderRadius;
+ border-top-right-radius: @wcfContainerBorderRadius;
+ }
+
+ &:last-child {
+ border-bottom-left-radius: @wcfContainerBorderRadius;
+ border-bottom-right-radius: @wcfContainerBorderRadius;
+ }
+ }
+}
+
+.aclList {
+ margin-bottom: @wcfGapSmall;
+
+ li {
+ cursor: pointer;
+
+ &:hover,
+ &.active:hover {
+ background-color: @wcfHoverBackgroundColor;
+ }
+
+ &.active {
+ background-color: @wcfContainerAccentBackgroundColor;
+ }
+
+ img:last-child {
+ float: right;
+ margin-right: @wcfGapSmall;
+ }
+ }
+}
+
+.aclPermissionList {
+ margin-top: @wcfGapSmall;
+ min-height: 200px;
+ text-align: right;
+
+ li {
+ &:hover {
+ background-color: @wcfHoverBackgroundColor;
+ }
+
+ &.aclCategory {
+ background-color: @wcfHighlightBackgroundColor;
+ padding: @wcfGapSmall;
+ text-align: left;
+ }
+
+ span {
+ float: left;
+ padding-left: @wcfGapSmall;
+ }
+
+ label {
+ cursor: pointer;
+ margin: 0 @wcfGapSmall;
+ padding: 0 @wcfGapLarge;
+ }
+ }
+}
\ No newline at end of file