this._element.wrap('<div class="dropdown preInput" />');
var $wrapper = this._element.parent();
var $button = $('<p class="button dropdownToggle"><span>' + WCF.Language.get('wcf.global.button.disabledI18n') + '</span></p>').prependTo($wrapper);
- $button.data('toggle', $wrapper.wcfIdentify()).click($.proxy(this._enable, this));
+ $button.data('target', $wrapper.wcfIdentify()).click($.proxy(this._enable, this));
// insert list
this._list = $('<ul class="dropdownMenu"></ul>').insertAfter($button);
}
else {
$button.addClass('dropdownCaption');
- this._element.css('height', $button.outerHeight());
+ this._element.css('height', $wrapper.outerHeight());
}
// insert available languages
_enable: function(event) {
if (!this._isEnabled) {
var $button = $(event.currentTarget);
- if ($button.hasClass('dropdownCaptionTextarea')) {
- $button.next('.dropdownMenu').css({
- top: ($button.outerHeight() - 1) + 'px'
- });
- }
+ $button.next('.dropdownMenu').css({
+ top: ($button.outerHeight() - 1) + 'px'
+ });
if ($button.getTagName() === 'p') {
$button = $button.children('span:eq(0)');