One more time "buttons"
authorLuzifr <szekely@woltlab.com>
Thu, 26 Jan 2012 14:34:02 +0000 (15:34 +0100)
committerLuzifr <szekely@woltlab.com>
Thu, 26 Jan 2012 14:34:02 +0000 (15:34 +0100)
(this time page navigation) - Someone please fix the implementation in
the "WCF.js"-file. I've done my best. ;-)

wcfsetup/install/files/acp/style/wcf.css
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/lib/system/template/plugin/PagesFunctionTemplatePlugin.class.php
wcfsetup/install/files/lib/system/template/plugin/SmallpagesFunctionTemplatePlugin.class.php

index 9618b05ffa5dcd8c11bfea088a3d26c44ffb2d12..aa13e99292374370b3261bb167225d07d1883d91 100644 (file)
@@ -3046,7 +3046,7 @@ tr .columnURL {
 
 /* ToDo */
 
-:not(.threadStatus) > .pageNavigation {
+:not(.statusDisplay) > .pageNavigation {
        margin: 7px 0;
        float: left;
 }
@@ -3126,7 +3126,7 @@ tr .columnURL {
 }
 
 .pageNavigation ul li.children > a {
-       margin-right: -30px;
+       margin-right: -17px;
        position: relative;
        z-index: 10;
 }
@@ -3137,10 +3137,15 @@ tr .columnURL {
 }
 
 .pageNavigation ul li.children img {
-       height: 9px;
+       position: relative;
        width: 7px;
+       height: 9px;
+       bottom: 1px;
+       left: 20px;
 }
 
+/* ToDo: Dropdown */
+
 .pageNavigation ul li.children .dropdown {
        text-align: left;
        border-color: transparent;
@@ -3206,15 +3211,15 @@ tr .columnURL {
 
 /* Special */
 
-.threadStatus .pageNavigation {
-       font-size: 75%;
+.statusDisplay .pageNavigation {
+       font-size: 80%;
 }
 
-.threadStatus .pageNavigation ul li {
+.statusDisplay .pageNavigation ul li {
        min-width: 9px;
 }
 
-.threadStatus .pageNavigation ul li:not(.skip) a {
+.statusDisplay .pageNavigation ul li:not(.skip) a {
        padding: 1px 3px;
 }
 
index bd558cafcc2cd2e865db66105796cdcb5555fbfb..7e158adf1b2021ac57201a9296acb3499f7dd385 100644 (file)
@@ -1771,7 +1771,7 @@ WCF.MultipleLanguageInput.prototype = {
        _prepareElement: function(enableOnInit) {
                this._element.wrap('<div class="preInput" />');
                var $wrapper = this._element.parent();
-               var $button = $('<p class="dropdownCaption"><span>enable i18n</span></p>').prependTo($wrapper);
+               var $button = $('<p class="button dropdownCaption"><span>enable i18n</span></p>').prependTo($wrapper);
 
                $button.click($.proxy(this._enable, this));
                WCF.CloseOverlayHandler.addCallback(this._element.wcfIdentify(), $.proxy(this._closeSelection, this));
@@ -4440,7 +4440,7 @@ $.widget('ui.wcfPages', {
                        var $pageList = $('<ul></ul>');
                        this.element.append($pageList);
                        
-                       var $previousElement = $('<li></li>').addClass('skip');
+                       var $previousElement = $('<li></li>').addClass('button skip');
                        $pageList.append($previousElement);
                        
                        if (this.options.activePage > 1) {
@@ -4505,14 +4505,14 @@ $.widget('ui.wcfPages', {
                                        var $leftChildren = $('<li class="children"></li>');
                                        $pageList.append($leftChildren);
                                        
-                                       var $leftChildrenLink = $('<a>&hellip;</a>');
+                                       var $leftChildrenLink = $('<a></a>');
                                        $leftChildren.append($leftChildrenLink);
                                        $leftChildrenLink.click($.proxy(this._startInput, this));
                                        
                                        var $leftChildrenImage = $('<img src="' + this.options.arrowDownIcon + '" alt="" />');
                                        $leftChildrenLink.append($leftChildrenImage);
                                        
-                                       var $leftChildrenInput = $('<input type="text" name="pageNo" class="tiny" />');
+                                       var $leftChildrenInput = $('<input type="text" name="pageNo" placeholder="…" class="tiny" />');
                                        $leftChildren.append($leftChildrenInput);
                                        $leftChildrenInput.keydown($.proxy(this._handleInput, this));
                                        $leftChildrenInput.keyup($.proxy(this._handleInput, this));
@@ -4548,14 +4548,14 @@ $.widget('ui.wcfPages', {
                                        var $rightChildren = $('<li class="children"></li>');
                                        $pageList.append($rightChildren);
                                        
-                                       var $rightChildrenLink = $('<a>&hellip;</a>');
+                                       var $rightChildrenLink = $('<a></a>');
                                        $rightChildren.append($rightChildrenLink);
                                        $rightChildrenLink.click($.proxy(this._startInput, this));
                                        
                                        var $rightChildrenImage = $('<img src="' + this.options.arrowDownIcon + '" alt="" />');
                                        $rightChildrenLink.append($rightChildrenImage);
                                        
-                                       var $rightChildrenInput = $('<input type="text" name="pageNo" class="tiny" />');
+                                       var $rightChildrenInput = $('<input type="text" name="pageNo" placeholder="…" class="tiny" />');
                                        $rightChildren.append($rightChildrenInput);
                                        $rightChildrenInput.keydown($.proxy(this._handleInput, this));
                                        $rightChildrenInput.keyup($.proxy(this._handleInput, this));
@@ -4581,7 +4581,7 @@ $.widget('ui.wcfPages', {
                        $pageList.append(this._renderLink(this.options.maxPage));
                        
                        // add next button
-                       var $nextElement = $('<li></li>').addClass('skip');
+                       var $nextElement = $('<li></li>').addClass('button skip');
                        $pageList.append($nextElement);
                        
                        if (this.options.activePage < this.options.maxPage) {
@@ -4612,7 +4612,7 @@ $.widget('ui.wcfPages', {
         * @return              $(element)
         */
        _renderLink: function(page, lineBreak) {
-               var $pageElement = $('<li></li>');
+               var $pageElement = $('<li class="button"></li>');
                if (lineBreak != undefined && lineBreak) {
                        $pageElement.addClass('break');
                }
index dfbab8296a7f5d0b7079709d7ce5494a7b215a44..22698ab4e3f77c5d9203825e6706bf8f60e29742 100644 (file)
@@ -57,10 +57,10 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
        protected function makeLink($link, $pageNo, $activePage, $break = false) {
                // first page
                if ($activePage != $pageNo) {
-                       return '<li'.($break ? ' class="break"' : '').'><a href="'.$this->insertPageNumber($link, $pageNo).'">'.StringUtil::formatInteger($pageNo).'</a></li>'."\n";
+                       return '<li class="button '.($break ? 'break' : '').'"><a href="'.$this->insertPageNumber($link, $pageNo).'">'.StringUtil::formatInteger($pageNo).'</a></li>'."\n";
                }
                else {
-                       return '<li class="'.($break ? 'break ' : '').'active"><span>'.StringUtil::formatInteger($pageNo).'</span></li>'."\n";
+                       return '<li class="button '.($break ? 'break ' : '').'active"><span>'.StringUtil::formatInteger($pageNo).'</span></li>'."\n";
                }
        }
        
@@ -101,10 +101,10 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
                        // previous page
                        $previousTitle = WCF::getLanguage()->getDynamicVariable('wcf.global.page.previous');
                        if ($tagArgs['page'] > 1) {
-                               $html .= '<li class="skip"><a href="'.$this->insertPageNumber($link, $tagArgs['page'] - 1).'" title="'.$previousTitle.'" class="balloonTooltip"><img src="'.self::getIconPath('previous1').'" alt="" /></a></li>'."\n";
+                               $html .= '<li class="button skip"><a href="'.$this->insertPageNumber($link, $tagArgs['page'] - 1).'" title="'.$previousTitle.'" class="balloonTooltip"><img src="'.self::getIconPath('previous1').'" alt="" /></a></li>'."\n";
                        }
                        else {
-                               $html .= '<li class="skip disabled"><img src="'.self::getIconPath('previous1D').'" alt="" /></li>'."\n";
+                               $html .= '<li class="button skip disabled"><img src="'.self::getIconPath('previous1D').'" alt="" /></li>'."\n";
                        }
                        
                        // first page
@@ -153,7 +153,7 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
                                        $html .= $this->makeLink($link, 2, $tagArgs['page']);
                                }
                                else {
-                                       $html .= '<li class="children"><a onclick="multiPagesLinks.startPageNumberInput(this)" class="dropdownCaption">&hellip;<img src="'.self::getIconPath('dropdown1').'" alt="" /></a><input type="text" name="pageNo" class="tiny" /><div class="dropdown"><span class="pointer"><span></span></span><ul>'."\n";
+                                       $html .= '<li class="children"><a onclick="multiPagesLinks.startPageNumberInput(this)" class="dropdownCaption"><img src="'.self::getIconPath('dropdown1').'" alt="" /></a><input type="text" name="pageNo" placeholder="…" class="tiny" /><div class="dropdown"><span class="pointer"><span></span></span><ul>'."\n";
                                        
                                        $k = 0;
                                        $step = intval(ceil(($left - 2) / self::SHOW_SUB_LINKS));
@@ -177,7 +177,7 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
                                        $html .= $this->makeLink($link, $tagArgs['pages'] - 1, $tagArgs['page']);
                                }
                                else {
-                                       $html .= '<li class="children"><a onclick="multiPagesLinks.startPageNumberInput(this)" class="dropdownCaption">&hellip;<img src="'.self::getIconPath('dropdown1').'" alt="" /></a><input type="text" name="page" class="tiny" /><div class="dropdown"><span class="pointer"><span></span></span><ul>'."\n";
+                                       $html .= '<li class="children"><a onclick="multiPagesLinks.startPageNumberInput(this)" class="dropdownCaption"><img src="'.self::getIconPath('dropdown1').'" alt="" /></a><input type="text" name="page" placeholder="…" class="tiny" /><div class="dropdown"><span class="pointer"><span></span></span><ul>'."\n";
                                        
                                        $k = 0;
                                        $step = intval(ceil(($tagArgs['pages'] - $right) / self::SHOW_SUB_LINKS));
@@ -196,7 +196,7 @@ class PagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
                        // next page
                        $nextTitle = WCF::getLanguage()->getDynamicVariable('wcf.global.page.next');
                        if ($tagArgs['page'] && $tagArgs['page'] < $tagArgs['pages']) {
-                               $html .= '<li class="skip"><a href="'.$this->insertPageNumber($link, $tagArgs['page'] + 1).'" title="'.$nextTitle.'" class="balloonTooltip"><img src="'.self::getIconPath('next1').'" alt="" /></a></li>'."\n";
+                               $html .= '<li class="button skip"><a href="'.$this->insertPageNumber($link, $tagArgs['page'] + 1).'" title="'.$nextTitle.'" class="balloonTooltip"><img src="'.self::getIconPath('next1').'" alt="" /></a></li>'."\n";
                        }
                        else {
                                $html .= '<li class="skip disabled"><img src="'.self::getIconPath('next1D').'" alt="" /></li>'."\n";
index 018b4d2c06f33b611faf0c631b0792d8c658f236..b1e1cc3c0f2cb272fc9adc23c7b9324080c1cb08 100644 (file)
@@ -49,7 +49,7 @@ class SmallpagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
         * @return      string
         */
        protected function makeLink($link, $pageNo) {
-               return '<li><a href="'.$this->insertPageNumber($link, $pageNo).'" title="' . WCF::getLanguage()->getDynamicVariable('wcf.page.pageNo', array('pageNo' => $pageNo)) . '">'.StringUtil::formatInteger($pageNo).'</a></li>'."\n";
+               return '<li class="button"><a href="'.$this->insertPageNumber($link, $pageNo).'" title="' . WCF::getLanguage()->getDynamicVariable('wcf.page.pageNo', array('pageNo' => $pageNo)) . '">'.StringUtil::formatInteger($pageNo).'</a></li>'."\n";
        }
        
        /**
@@ -90,7 +90,7 @@ class SmallpagesFunctionTemplatePlugin implements IFunctionTemplatePlugin {
                        
                        if ($tagArgs['pages'] > self::SHOW_LINKS) {
                                // jumper
-                               $html .= '<li><a onclick="var result = prompt(\''.WCF::getLanguage()->get('wcf.global.page.input').'\', \''.$tagArgs['pages'].'\'); if (typeof(result) != \'object\' &amp;&amp; typeof(result) != \'undefined\') document.location.href = fixURL((\''.StringUtil::replace("'", "\'", $link).'\').replace(/%d/, result));">&hellip;</a></li>'."\n";
+                               $html .= '<li class="button"><a onclick="var result = prompt(\''.WCF::getLanguage()->get('wcf.global.page.input').'\', \''.$tagArgs['pages'].'\'); if (typeof(result) != \'object\' &amp;&amp; typeof(result) != \'undefined\') document.location.href = fixURL((\''.StringUtil::replace("'", "\'", $link).'\').replace(/%d/, result));">&hellip;</a></li>'."\n";
 
                                // last page
                                $html .= $this->makeLink($link, $tagArgs['pages']);