-<div class="messageTabMenu" data-preselect="{if $preselectTabMenu|isset}{$preselectTabMenu}{else}true{/if}">
+<div class="messageTabMenu" data-preselect="{if $preselectTabMenu|isset}{$preselectTabMenu}{else}true{/if}" data-wysiwyg-container-id="{$wysiwygContainerID}">
<nav class="messageTabMenuNavigation jsOnly">
<ul>
{if MODULE_SMILEY && $__wcf->getSession()->getPermission($permissionCanUseSmilies) && $smileyCategories|count}<li data-name="smilies"><a>{lang}wcf.message.smilies{/lang}</a></li>{/if}
{capture assign='__messageFormSettingsInlineContent'}{include file='messageFormSettingsInline'}{/capture}
{assign var='__messageFormSettingsInlineContent' value=$__messageFormSettingsInlineContent|trim}
-<div class="messageTabMenu"{if $preselectTabMenu|isset} data-preselect="{$preselectTabMenu}"{/if}>
+<div class="messageTabMenu"{if $preselectTabMenu|isset} data-preselect="{$preselectTabMenu}"{/if} data-wysiwyg-container-id="{$wysiwygContainerID}">
<nav class="messageTabMenuNavigation jsOnly">
<ul>
{if MODULE_SMILEY && $__wcf->getSession()->getPermission($permissionCanUseSmilies) && $smileyCategories|count}<li data-name="smilies"><a>{lang}wcf.message.smilies{/lang}</a></li>{/if}
this._wysiwygSelector = wysiwygSelector;
$('#smilies-' + this._wysiwygSelector).on('messagetabmenushow', $.proxy(this._click, this));
-
- // handle onload
- /*var self = this;
- new WCF.PeriodicalExecuter(function(pe) {
- pe.stop();
-
- self._click({ }, { newTab: $('#smilies > .menu li.ui-state-active') });
- }, 100);*/
},
/**
/**
* Handles smiley clicks.
+ *
+ * @param string wysiwygSelector
*/
WCF.Message.Smilies = Class.extend({
/**
*/
_redactor: null,
+ /**
+ * wysiwyg container id
+ * @var string
+ */
_wysiwygSelector: '',
/**
WCF.System.Dependency.Manager.register('Redactor_' + this._wysiwygSelector, $.proxy(function() {
this._redactor = $('#' + this._wysiwygSelector).redactor('getObject');
- // add smiley click handler
- $(document).on('click', '.jsSmiley', $.proxy(this._smileyClick, this));
+ $('.messageTabMenu[data-wysiwyg-container-id=' + this._wysiwygSelector + ']').on('click', '.jsSmiley', $.proxy(this._smileyClick, this));
}, this));
},