* (bug 13234) Do not show grey category box for pages with only hidden categories
authorAndrew Garrett <werdna@users.mediawiki.org>
Sun, 9 Mar 2008 11:45:12 +0000 (11:45 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Sun, 9 Mar 2008 11:45:12 +0000 (11:45 +0000)
* Remove redundancy in monobook, chick and modern in use of <div id="catlinks"><div class="catlinks"></div></div> (necessary to make other part of commit work)

includes/Skin.php
skins/Modern.php
skins/MonoBook.php
skins/chick/main.css
skins/common/preview.js
skins/common/shared.css
skins/modern/main.css
skins/monobook/main.css

index 5b03953..c6e0496 100644 (file)
@@ -712,8 +712,15 @@ END;
 
        function getCategories() {
                $catlinks=$this->getCategoryLinks();
+               
+               $classes = 'catlinks';
+               
+               if(FALSE === strpos($catlinks,'<div id="mw-normal-catlinks">')) {
+                       $classes .= ' catlinks-allhidden';
+               }
+               
                if(!empty($catlinks)) {
-                       return "<div class='catlinks'>{$catlinks}</div>";
+                       return "<div class='$classes'>{$catlinks}</div>";
                }
        }
 
index a873066..3f4fd44 100644 (file)
@@ -130,7 +130,7 @@ class ModernTemplate extends QuickTemplate {
 
                <?php $this->html('bodytext') ?>
                <div class='mw_clear'></div>
-               <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php       $this->html('catlinks') ?></div><?php } ?>
+               <?php if($this->data['catlinks']) { ?><?php       $this->html('catlinks') ?><?php } ?>
        </div><!-- mw_contentholder -->
        </div><!-- mw_content -->
        </div><!-- mw_contentwrapper -->
index e930a5e..4061da8 100644 (file)
@@ -107,7 +107,7 @@ class MonoBookTemplate extends QuickTemplate {
                        <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
                        <!-- start content -->
                        <?php $this->html('bodytext') ?>
-                       <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php       $this->html('catlinks') ?></div><?php } ?>
+                       <?php if($this->data['catlinks']) { ?><?php       $this->html('catlinks') ?><?php } ?>
                        <!-- end content -->
                        <div class="visualClear"></div>
                </div>
index 17849b9..5fce24a 100644 (file)
@@ -198,7 +198,7 @@ span.subpages { display: block; }
     color: red;
     font-size: larger;
 }
-#catlinks {
+.catlinks {
     border:1px solid #aaaaaa;
     background-color:#f9f9f9;
     padding: 2px 5px;
index ad096e2..8c5c07d 100644 (file)
@@ -104,8 +104,7 @@ function lpStatusUpdate() {
                        categoryContainer.style.display = 'block';
                } else {
                        /* Just dump them somewhere */
-       /*              previewContainer.innerHTML += '<div id="catlinks">' +
-                               categoryElement.firstChild.data + '</div>';*/
+       /*              previewContainer.innerHTML += categoryElement.firstChild.data;*/
                }
        } else {
                /* Nothing to show, hide old data */
index e53ebc3..d9e7624 100644 (file)
@@ -82,6 +82,7 @@ body.ltr .magnify { float:right; }
  * Hidden categories
  */
 .mw-hidden-cats-hidden { display: none; }
+.catlinks-allhidden { display: none; }
 
 /* Convenience links to edit block and delete reasons */
 p.mw-ipb-conveniencelinks, p.mw-filedelete-editreasons, p.mw-delete-editreasons {
index e61935d..0cabd86 100644 (file)
@@ -579,7 +579,7 @@ img.thumbborder {
        text-align: center;
 }
 
-#catlinks {
+.catlinks {
        border: solid 1px #bbbbbb;
        background-color: #f0f0f0;
        padding: 0.5em 0.5em 0.5em 0.5em;
index db6eb58..1f8015e 100644 (file)
@@ -303,7 +303,7 @@ span.subpages {
        border: none;
 }
 
-#catlinks {
+.catlinks {
        border: 1px solid #aaa;
        background-color: #f9f9f9;
        padding: 5px;