Minor fixes for the article editing feature
authorAlexander Ebert <ebert@woltlab.com>
Tue, 18 Dec 2018 12:40:16 +0000 (13:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 18 Dec 2018 12:40:16 +0000 (13:40 +0100)
See #2681

com.woltlab.wcf/templates/articleAdd.tpl
com.woltlab.wcf/templates/categoryArticleList.tpl
wcfsetup/install/files/acp/templates/articleAdd.tpl
wcfsetup/install/files/lib/data/page/PageAction.class.php

index 9be114314246d2b967d87410680a65318418263b..f149a9eeeb68f9e522af7b210956443e0654c075 100644 (file)
                                                        <dd>
                                                                <textarea name="content[{@$availableLanguage->languageID}]" id="content{@$availableLanguage->languageID}" class="wysiwygTextarea" data-autosave="com.woltlab.wcf.article{$action|ucfirst}-{if $action == 'edit'}{@$articleID}{else}0{/if}-{@$availableLanguage->languageID}">{if !$content[$availableLanguage->languageID]|empty}{$content[$availableLanguage->languageID]}{/if}</textarea>
                                                                
-                                                               {capture append='__redactorJavaScript'}, '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabPage.js?v={@LAST_UPDATE_TIME}'{/capture}
-                                                               {capture append='__redactorConfig'}
-                                                                       buttonOptions.woltlabPage = { icon: 'fa-file-text-o', title: '{lang}wcf.editor.button.page{/lang}' };
-                                                                       
-                                                                       buttons.push('woltlabPage');
-                                                                       
-                                                                       config.plugins.push('WoltLabPage');
-                                                               {/capture}
-                                                               
+                                                               {include file='__wysiwygCmsToolbar'}
                                                                {include file='wysiwyg' wysiwygSelector='content'|concat:$availableLanguage->languageID}
                                                                
                                                                {if $errorField == 'content'|concat:$availableLanguage->languageID}
index c13eeebc7b241871eb848a8a30b0b44a7b692253..0bab7c32031caa6c897d409356c4adb72e5e78bf 100644 (file)
@@ -30,7 +30,7 @@
 
 {if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle')}
        {capture assign='contentHeaderNavigation'}
-               <li><a href="{link controller='ArticleAdd' isACP=true}categoryID={@$category->categoryID}{/link}" class="button"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
+               <li><a href="#" class="button jsButtonArticleAdd"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.acp.article.add{/lang}</span></a></li>
        {/capture}
 {/if}
 
        });
 </script>
 
+{include file='articleAddDialog'}
+
 {include file='footer'}
index 9be114314246d2b967d87410680a65318418263b..f149a9eeeb68f9e522af7b210956443e0654c075 100644 (file)
                                                        <dd>
                                                                <textarea name="content[{@$availableLanguage->languageID}]" id="content{@$availableLanguage->languageID}" class="wysiwygTextarea" data-autosave="com.woltlab.wcf.article{$action|ucfirst}-{if $action == 'edit'}{@$articleID}{else}0{/if}-{@$availableLanguage->languageID}">{if !$content[$availableLanguage->languageID]|empty}{$content[$availableLanguage->languageID]}{/if}</textarea>
                                                                
-                                                               {capture append='__redactorJavaScript'}, '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabPage.js?v={@LAST_UPDATE_TIME}'{/capture}
-                                                               {capture append='__redactorConfig'}
-                                                                       buttonOptions.woltlabPage = { icon: 'fa-file-text-o', title: '{lang}wcf.editor.button.page{/lang}' };
-                                                                       
-                                                                       buttons.push('woltlabPage');
-                                                                       
-                                                                       config.plugins.push('WoltLabPage');
-                                                               {/capture}
-                                                               
+                                                               {include file='__wysiwygCmsToolbar'}
                                                                {include file='wysiwyg' wysiwygSelector='content'|concat:$availableLanguage->languageID}
                                                                
                                                                {if $errorField == 'content'|concat:$availableLanguage->languageID}
index 993abd6f012f5eae82caadfc4d3272904309a2d9..1b57f0ad6ee267730abfe52e684b4f296cd3bd57 100644 (file)
@@ -59,7 +59,7 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
        /**
         * @inheritDoc
         */
-       protected $requireACP = ['create', 'delete', 'getSearchResultList', 'resetPosition', 'search', 'toggle', 'update', 'updatePosition'];
+       protected $requireACP = ['create', 'delete', 'getSearchResultList', 'resetPosition', 'toggle', 'update', 'updatePosition'];
        
        /**
         * @inheritDoc