Ver código fonte

Better selector for toolbox icons. Z-index fix (finally) for toolbox over page actions.

Jamie Thingelstad 11 anos atrás
pai
commit
e5b87de8dc

+ 1 - 1
Foreground.skin.php

@@ -105,7 +105,7 @@ class foregroundTemplate extends BaseTemplate {
 		         <li class="has-form">
 
 								<li class="has-dropdown active"><a href="#"><i class="fa fa-cogs"></i></a>
-									<ul class="dropdown">
+									<ul id="toolbox-dropdown" class="dropdown">
 										<?php foreach ( $this->getToolbox() as $key => $item ) { echo $this->makeListItem($key, $item); } ?>
 										<?php if ($wgForegroundFeatures['showRecentChangesUnderTools']): ?><li id="n-recentchanges"><?php echo Linker::specialLink('Recentchanges') ?></li><?php endif; ?>
 										<?php if ($wgForegroundFeatures['showHelpUnderTools']): ?><li id="n-help" <?php echo Linker::tooltip('help') ?>><a href="/wiki/Help:Contents"><?php echo wfMessage( 'help' )->text() ?></a></li><?php endif; ?>

+ 2 - 2
assets/scripts/foreground.js

@@ -42,8 +42,8 @@ jQuery(document).ready(function() {
   jQuery('li#t-permalink a').addClass('fa fa-dot-circle-o').text(' ' + jQuery('li#t-permalink a').text());
   jQuery('li#t-info a').addClass('fa fa-info').text(' ' + jQuery('li#t-info a').text());
 
-  jQuery('li#n-recentchanges a').addClass('fa fa-tasks').text(' ' + jQuery('li#n-recentchanges a').text());
-  jQuery('li#n-help a').addClass('fa fa-question').text(' ' + jQuery('li#n-help a').text());
+  jQuery('ul#toolbox-dropdown.dropdown>li#n-recentchanges a').addClass('fa fa-tasks').text(' ' + jQuery('ul#toolbox-dropdown.dropdown>li#n-recentchanges a').text());
+  jQuery('ul#toolbox-dropdown.dropdown>li#n-help a').addClass('fa fa-question').text(' ' + jQuery('ul#toolbox-dropdown.dropdown>li#n-help a').text());
 
 
   // Turn categories into labels

+ 4 - 0
assets/stylesheets/foreground.css

@@ -30,6 +30,10 @@ body.action-formedit .row.hide-on-form-edit { display: none;}
   z-index: 100000;
   white-space: nowrap;
 }
+/* Make sure top bar is even more z-indx! */
+#toolbox-dropdown {
+  z-index: 10000000;
+}
 
 td.mw-submit a,
 .htmlform-tip,