From 237fcc81bcd82c95a9d43e27446c47f73c244202 Mon Sep 17 00:00:00 2001 From: Tom Hutchison Date: Wed, 29 Mar 2017 11:39:45 -0400 Subject: [PATCH] Fixes for Visual Editor to Work --- Pivot.skin.php | 2 ++ assets/scripts/pivot.js | 10 ++++++---- assets/stylesheets/pivot.css | 11 +++++++++++ skin.json | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Pivot.skin.php b/Pivot.skin.php index 55373f2..150b22a 100644 --- a/Pivot.skin.php +++ b/Pivot.skin.php @@ -210,6 +210,7 @@ class pivotTemplate extends BaseTemplate { $newtitle = str_replace($namespace.':', '', $pagetitle); $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); ?>

+

@@ -232,6 +233,7 @@ class pivotTemplate extends BaseTemplate { ?>
+
html('catlinks'); ?>
diff --git a/assets/scripts/pivot.js b/assets/scripts/pivot.js index 88a3e12..00c6948 100644 --- a/assets/scripts/pivot.js +++ b/assets/scripts/pivot.js @@ -17,8 +17,6 @@ jQuery(document).ready(function() { // Append font-awesome icons jQuery('[id^=ca-nstab] a').prepend('
') jQuery('li#ca-talk a').prepend('
') - jQuery('li#ca-edit a').prepend('
') - jQuery('li#ca-viewsource a').prepend('
') jQuery('li#ca-form_edit a').prepend('
') jQuery('li#ca-history a').prepend('
') jQuery('li#ca-delete a').prepend('
') @@ -68,7 +66,11 @@ if ( jQuery( '#ca-addsection' ).length ) { // Turn categories into labels 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('
') + jQuery('li#ca-viewsource a').prepend('
') + jQuery('li#ca-edit a').prepend('
') }); \ No newline at end of file diff --git a/assets/stylesheets/pivot.css b/assets/stylesheets/pivot.css index c4e2990..4caee72 100644 --- a/assets/stylesheets/pivot.css +++ b/assets/stylesheets/pivot.css @@ -1143,4 +1143,15 @@ ul[class*="block-grid"] { /* background of buttions adhere to #p-cactions*/ .wikiEditor-ui-buttons { 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; } diff --git a/skin.json b/skin.json index 76f9b7e..fcd7adb 100644 --- a/skin.json +++ b/skin.json @@ -32,7 +32,7 @@ ] }, "skins.pivot.modernizr": { - "position": "top", + "position": "bottom", "scripts": [ "assets/scripts/vendor/modernizr.js" ]