Removed 'newWindow' option for page menu items
authorAlexander Ebert <ebert@woltlab.com>
Tue, 25 Dec 2012 20:49:48 +0000 (21:49 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 25 Dec 2012 20:49:48 +0000 (21:49 +0100)
Opening external links in a new window is already covered by a global option, therefore no custom handling is required.

com.woltlab.wcf/template/mainMenu.tpl
com.woltlab.wcf/template/mainMenuSubMenu.tpl
wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl
wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php
wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/setup/db/install.sql

index 6dcc956a68aaabb392aab0fc9180999e04c71d96..9e103d46bdb2432614679b6dee779662c3f4d59c 100644 (file)
@@ -2,7 +2,7 @@
        <nav id="mainMenu" class="mainMenu">
                <ul>
                        {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=menuItem}
-                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="active"{/if}><a href="{$menuItem->getProcessor()->getLink()}"{if $menuItem->newWindow} target="_blank"{/if}>{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a></li>
+                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="active"{/if}><a href="{$menuItem->getProcessor()->getLink()}">{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a></li>
                        {/foreach}
                </ul>
        </nav>
index f3de76fe82c7422a2dc6955860d788febabed3f5..c0e5ec585c2ef02b25205a41c2f9e4196196b846 100644 (file)
@@ -2,7 +2,7 @@
        {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0 && $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem}
                <ul class="navigationMenuItems">
                        {foreach from=$__wcf->getPageMenu()->getMenuItems($menuItem->menuItem) item=subMenuItem}
-                               <li><a href="{$subMenuItem->getProcessor()->getLink()}"{if $menuItem->newWindow} target="_blank"{/if}><span>{lang}{$subMenuItem->menuItem}{/lang}</span></a>{if $subMenuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$subMenuItem->getProcessor()->getNotifications()}</span>{/if}</li>
+                               <li><a href="{$subMenuItem->getProcessor()->getLink()}"><span>{lang}{$subMenuItem->menuItem}{/lang}</span></a>{if $subMenuItem->getProcessor()->getNotifications()} <span class="badge badgeUpdate">{#$subMenuItem->getProcessor()->getNotifications()}</span>{/if}</li>
                        {/foreach}
                </ul>
        {/if}
index 02e2d2954af71d574ffa9a88a5f2ce98c915f0ea..ac029cf24941a7f089ded639d9973dc1e26aff73 100644 (file)
                                        {include file='multipleLanguageInputJavascript' elementIdentifier='menuItemLink' forceSelection=false}
                                </dd>
                        </dl>
-                       
-                       <dl>
-                               <dd>
-                                       <label><input type="checkbox" name="newWindow" id="newWindow" value="1"{if $newWindow} checked="checked"{/if} /> <span>{lang}wcf.acp.pageMenu.newWindow{/lang}</span></label>
-                               </dd>
-                       </dl>
                </fieldset>
                
                <fieldset>
index 43bbc1a704317e4d890dcfc85bf1a5b6f052273e..54d21f3dd599b5af3549db7afdcbb9fd597afb51 100644 (file)
@@ -71,12 +71,6 @@ class PageMenuItemAddForm extends ACPForm {
         */
        public $neededPermissions = array('admin.display.canManagePageMenu');
        
-       /**
-        * open link in new window
-        * @var boolean
-        */
-       public $newWindow = false;
-       
        /**
         * page menu item name
         * @var string
@@ -140,7 +134,6 @@ class PageMenuItemAddForm extends ACPForm {
                if (isset($_POST['isLandingPage'])) $this->isLandingPage = true;
                if (isset($_POST['menuItemController'])) $this->menuItemController = StringUtil::trim($_POST['menuItemController']);
                if (isset($_POST['menuPosition'])) $this->menuPosition = StringUtil::trim($_POST['menuPosition']);
-               if (isset($_POST['newWindow'])) $this->newWindow = true;
                if (isset($_POST['parentMenuItem'])) $this->parentMenuItem = StringUtil::trim($_POST['parentMenuItem']);
                if (isset($_POST['showOrder'])) $this->showOrder = intval($_POST['showOrder']);
        }
@@ -228,7 +221,6 @@ class PageMenuItemAddForm extends ACPForm {
                        'menuItemController' => $this->menuItemController,
                        'menuItemLink' => $this->menuItemLink,
                        'menuPosition' => $this->menuPosition,
-                       'newWindow' => ($this->newWindow) ? 1 : 0,
                        'parentMenuItem' => $this->parentMenuItem,
                        'showOrder' => $this->showOrder
                )));
@@ -257,7 +249,7 @@ class PageMenuItemAddForm extends ACPForm {
                WCF::getTPL()->assign('success', true);
                
                // reset variables
-               $this->isDisabled = $this->isInternalLink = $this->isLandingPage = $this->newWindow = false;
+               $this->isDisabled = $this->isInternalLink = $this->isLandingPage = false;
                $this->menuPosition = 'header';
                $this->menuItemController = $this->menuItemLink = $this->pageMenuItem = $this->parentMenuItem = '';
                $this->showOrder = 0;
@@ -285,7 +277,6 @@ class PageMenuItemAddForm extends ACPForm {
                        'menuItemController' => $this->menuItemController,
                        'menuItemLink' => $this->menuItemLink,
                        'menuPosition' => $this->menuPosition,
-                       'newWindow' => $this->newWindow,
                        'pageMenuItem' => $this->pageMenuItem,
                        'parentMenuItem' => $this->parentMenuItem,
                        'showOrder' => $this->showOrder
index 5893bd2663e3bb1c818d891e580afc441eb8d4c9..0699c7362dcc3242527466a75472b0de896c0ebe 100644 (file)
@@ -73,7 +73,6 @@ class PageMenuItemEditForm extends PageMenuItemAddForm {
                        $this->menuItemController = $this->menuItem->menuItemController;
                        $this->menuItemLink = $this->menuItem->menuItemLink;
                        $this->menuPosition = $this->menuItem->menuPosition;
-                       $this->newWindow = ($this->menuItem->newWindow) ? true : false;
                        $this->pageMenuItem = $this->menuItem->menuItem;
                        $this->parentMenuItem = $this->menuItem->parentMenuItem;
                        $this->showOrder = $this->menuItem->showOrder;
@@ -105,7 +104,6 @@ class PageMenuItemEditForm extends PageMenuItemAddForm {
                        'isLandingPage' => ($this->isLandingPage) ? 1 : 0,
                        'menuItemController' => $this->menuItemController,
                        'menuItemLink' => $this->menuItemLink,
-                       'newWindow' => ($this->newWindow) ? 1 : 0,
                        'parentMenuItem' => ($this->menuItem->menuPosition == 'header' ? $this->parentMenuItem : ''),
                        'showOrder' => $this->showOrder
                )));
index a22e993d74c57d16220f8076993997a500acaa2e..cc5ef45a129990b2d9eab377af89ab5ffa85565a 100644 (file)
                <item name="wcf.acp.pageMenu.menuPosition"><![CDATA[Position]]></item>
                <item name="wcf.acp.pageMenu.menuPosition.footer"><![CDATA[Fußzeile]]></item>
                <item name="wcf.acp.pageMenu.menuPosition.header"><![CDATA[Hauptmenü]]></item>
-               <item name="wcf.acp.pageMenu.newWindow"><![CDATA[Link in neuem Fenster öffnen]]></item>
                <item name="wcf.acp.pageMenu.pageMenuItem"><![CDATA[Name]]></item>
                <item name="wcf.acp.pageMenu.parentMenuItem"><![CDATA[Übergeordneter Menüpunkt]]></item>
                <item name="wcf.acp.pageMenu.showOrder"><![CDATA[Reihenfolge]]></item>
index 928a6263dbb9afb0533d611096dc52832eeae11d..f2866cb8fb9d122f3157138e4dab66d43dfe5fa5 100644 (file)
@@ -479,7 +479,6 @@ CREATE TABLE wcf1_page_menu_item (
        isDisabled TINYINT(1) NOT NULL DEFAULT 0,
        className VARCHAR(255) NOT NULL DEFAULT '',
        isLandingPage TINYINT(1) NOT NULL DEFAULT 0,
-       newWindow TINYINT(1) NOT NULL DEFAULT 0,
        UNIQUE KEY (packageID, menuItem)
 );