1
0
mirror of https://github.com/Hutchy68/pivot.git synced 2024-11-24 03:19:02 +01:00

Fixes for Visual Editor to Work

This commit is contained in:
Tom Hutchison 2017-03-29 11:39:45 -04:00
parent e84c9c9a7e
commit 237fcc81bc
4 changed files with 20 additions and 5 deletions

View File

@ -210,6 +210,7 @@ class pivotTemplate extends BaseTemplate {
$newtitle = str_replace($namespace.':', '', $pagetitle); $newtitle = str_replace($namespace.':', '', $pagetitle);
$displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?> ?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?>
<div id="content">
<h2 class="title"><?php print $displaytitle; ?></h2> <h2 class="title"><?php print $displaytitle; ?></h2>
<?php if ($wgPivotFeatures['useAddThisShare'] !== '') { ?> <?php if ($wgPivotFeatures['useAddThisShare'] !== '') { ?>
<!-- Go to www.addthis.com/dashboard to customize your tools --> <!-- Go to www.addthis.com/dashboard to customize your tools -->
@ -232,6 +233,7 @@ class pivotTemplate extends BaseTemplate {
?> ?>
<div class="clear_both"></div> <div class="clear_both"></div>
</div> </div>
</div>
<div id="categories" class="row"> <div id="categories" class="row">
<div class="small-12 columns"> <div class="small-12 columns">
<div class="group"><?php $this->html('catlinks'); ?></div> <div class="group"><?php $this->html('catlinks'); ?></div>

View File

@ -17,8 +17,6 @@ jQuery(document).ready(function() {
// Append font-awesome icons // Append font-awesome icons
jQuery('[id^=ca-nstab] a').prepend('<div id="drop-icon"><i class="fa fa-file fa-fw"></i></div>') jQuery('[id^=ca-nstab] a').prepend('<div id="drop-icon"><i class="fa fa-file fa-fw"></i></div>')
jQuery('li#ca-talk a').prepend('<div id="drop-icon"><i class="fa fa-comments-o fa-fw"></i></div>') jQuery('li#ca-talk a').prepend('<div id="drop-icon"><i class="fa fa-comments-o fa-fw"></i></div>')
jQuery('li#ca-edit a').prepend('<div id="drop-icon"><i class="fa fa-pencil-square-o fa-fw"></i></div>')
jQuery('li#ca-viewsource a').prepend('<div id="drop-icon"><i class="fa fa-book fa-fw"></i></div>')
jQuery('li#ca-form_edit a').prepend('<div id="drop-icon"><i class="fa fa-pencil-square fa-fw"></i></div>') jQuery('li#ca-form_edit a').prepend('<div id="drop-icon"><i class="fa fa-pencil-square fa-fw"></i></div>')
jQuery('li#ca-history a').prepend('<div id="drop-icon"><i class="fa fa-archive fa-fw"></i></div>') jQuery('li#ca-history a').prepend('<div id="drop-icon"><i class="fa fa-archive fa-fw"></i></div>')
jQuery('li#ca-delete a').prepend('<div id="drop-icon"><i class="fa fa-trash-o fa-fw"></i></div>') jQuery('li#ca-delete a').prepend('<div id="drop-icon"><i class="fa fa-trash-o fa-fw"></i></div>')
@ -68,7 +66,11 @@ if ( jQuery( '#ca-addsection' ).length ) {
// Turn categories into labels // Turn categories into labels
jQuery('#mw-normal-catlinks ul li a').addClass('label'); jQuery('#mw-normal-catlinks ul li a').addClass('label');
// Make the Page Action button respond to hover });
// Have to wait until the window is fully loaded because of Visual Editor to prepend icons for editing
jQuery(window).load(function() {
jQuery('li#ca-ve-edit a').prepend('<div id="drop-icon"><i class="fa fa-pencil fa-fw"></i></div>')
jQuery('li#ca-viewsource a').prepend('<div id="drop-icon"><i class="fa fa-book fa-fw"></i></div>')
jQuery('li#ca-edit a').prepend('<div id="drop-icon"><i class="fa fa-pencil-square-o fa-fw"></i></div>')
}); });

View File

@ -1143,4 +1143,15 @@ ul[class*="block-grid"] {
/* background of buttions adhere to #p-cactions*/ /* background of buttions adhere to #p-cactions*/
.wikiEditor-ui-buttons { .wikiEditor-ui-buttons {
background-color: #f6f6f6; background-color: #f6f6f6;
/* Visual Editor Fixes */
.ve-activated #content {
margin-top: 4em;
}
.ve-ce-documentNode {
background:#fff;
}
.oo-ui-barToolGroup.oo-ui-widget-enabled > .oo-ui-toolGroup-tools > .oo-ui-tool > .oo-ui-tool-link,
.oo-ui-barToolGroup > .oo-ui-toolGroup-tools > .oo-ui-tool.oo-ui-widget-disabled > .oo-ui-tool-link {
display: inline !important;
} }

View File

@ -32,7 +32,7 @@
] ]
}, },
"skins.pivot.modernizr": { "skins.pivot.modernizr": {
"position": "top", "position": "bottom",
"scripts": [ "scripts": [
"assets/scripts/vendor/modernizr.js" "assets/scripts/vendor/modernizr.js"
] ]