Added message preview buttons
authorAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 09:05:01 +0000 (11:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 09:05:01 +0000 (11:05 +0200)
files/lib/page/ConversationPage.class.php
templates/conversationAdd.tpl
templates/conversationMessageInlineEditor.tpl
templates/conversationQuickReply.tpl

index 25abb67b2874db61d4b252bd6af9d5646bb0e821..bfdaf182016272170fc79578713416619f2eb660 100644 (file)
@@ -257,7 +257,7 @@ class ConversationPage extends MultipleLinkPage {
                        'permissionCanUseSmilies' => 'user.message.canUseSmilies'
                ]);
                
-               BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes')));
+               BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.disallowedBBCodes')));
        }
        
        /**
index 1e5c717d0daf7ccbb6620783ae4d7a826f708fc7..db9b381660e9a99a9795d3159e64af66b3183b16 100644 (file)
        <div class="formSubmit">
                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
                <button name="draft" accesskey="d" value="1">{lang}wcf.conversation.button.saveAsDraft{/lang}</button>
-               {include file='messageFormPreviewButton'}
+               {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0}
                {@SECURITY_TOKEN_INPUT_TAG}
        </div>
 </form>
index b837163e2c66298e8c52e64f95b70177956d88fb..79fd56b6ebc4ceb7afd61f48f133c7291b356b9b 100644 (file)
@@ -1,5 +1,6 @@
+{capture assign='wysiwygSelector'}messageEditor{@$message->messageID}{/capture}
 <div class="messageInlineEditor">
-       <textarea id="messageEditor{@$message->messageID}" class="wysiwygTextarea"
+       <textarea id="{$wysiwygSelector}" class="wysiwygTextarea"
                  data-autosave="com.woltlab.wcf.conversation.messageEdit-{@$message->messageID}"
                  data-support-mention="true"
        >{$message->message}</textarea>
@@ -8,6 +9,9 @@
        
        <div class="formSubmit">
                <button class="buttonPrimary" data-type="save">{lang}wcf.global.button.submit{/lang}</button>
+               
+               {include file='messageFormPreviewButton' previewMessageFieldID=$wysiwygSelector previewButtonID=$wysiwygSelector|concat:'_PreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=$message->messageID}
+               
                <button data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
        </div>
        
index f8903bd852dd1ba875745bd7999a730d0aaeaa72..6e31837546f2d962e1915e1deb4596f696e2d855 100644 (file)
@@ -18,6 +18,7 @@
                        <footer class="messageFooter">
                                <div class="formSubmit">
                                        <button class="buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
+                                       {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0}
                                </div>
                        </footer>
                </div>