this._buildStructure();
+ if (this._list.children('li').length < 2) {
+ this._list.addClass('flexibleCategoryListDisabled');
+ return;
+ }
+
if ($.browser.chrome) {
this._resize();
var $items = this._list.children('li');
$items.each(function(index, item) {
- if ($referenceOffset === -1) {
+ if ($referenceOffset === -1 || index + 1 === $items.length || $items[index + 1].offsetLeft != $referenceOffset) {
+ var $item = $(item);
+ var $height = $item.outerHeight(true);
+ var $offset = $item.position();
+
+ $realBottom = Math.max($realBottom, $offset.top + $height);
$referenceOffset = item.offsetLeft;
}
- else {
- if (index + 1 === $items.length || $items[index + 1].offsetLeft != $referenceOffset) {
- var $item = $(item);
- var $height = $item.outerHeight(true);
- var $offset = $item.position();
-
- $realBottom = Math.max($realBottom, $offset.top + $height);
- $referenceOffset = item.offsetLeft;
- }
- }
});
this._list.css('max-height', $realBottom + 'px');
}
}
- .flexibleCategoryList {
+ .flexibleCategoryList:not(.flexibleCategoryListDisabled) {
/* WebKit */
-webkit-column-count: 2;
/* WebKit */
-webkit-column-break-inside: avoid;
- /* Firefox */
- page-break-inside: avoid;
-
/* CSS 3 / Internet Explorer */
break-inside: avoid;
}
}
}
+
+ /* Firefox */
+ @-moz-document url-prefix() {
+ .flexibleCategoryList:not(.flexibleCategoryListDisabled) > li {
+ display: block;
+ overflow: hidden;
+ }
+ }
}
.sidebarNestedCategoryList {