* 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)
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>";
}
}
<?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 -->
<?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>
color: red;
font-size: larger;
}
-#catlinks {
+.catlinks {
border:1px solid #aaaaaa;
background-color:#f9f9f9;
padding: 2px 5px;
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 */
* 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 {
text-align: center;
}
-#catlinks {
+.catlinks {
border: solid 1px #bbbbbb;
background-color: #f0f0f0;
padding: 0.5em 0.5em 0.5em 0.5em;
border: none;
}
-#catlinks {
+.catlinks {
border: 1px solid #aaa;
background-color: #f9f9f9;
padding: 5px;