From f586bf4c5cf11aba557d5477f0a744c19c4aab86 Mon Sep 17 00:00:00 2001 From: Tom Hutchison Date: Mon, 11 Mar 2019 21:08:46 -0400 Subject: [PATCH] Rolling in all changes see CHANGELOG.md for list of fixes and improvements --- .travis.yml | 4 +-- CHANGELOG.md | 9 ++++++ Pivot.skin.php | 33 +++++++++++---------- assets/scripts/vendor/jquery.cookie.js | 8 ----- assets/scripts/vendor/jquery.js | 26 ---------------- assets/stylesheets/pivot.css | 41 ++++++++++++++++++-------- skin.json | 6 ++-- 7 files changed, 59 insertions(+), 68 deletions(-) delete mode 100644 assets/scripts/vendor/jquery.cookie.js delete mode 100644 assets/scripts/vendor/jquery.js diff --git a/.travis.yml b/.travis.yml index 828b58c..c49d483 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: php php: - 7 - - 5.6 - - hhvm + - 7.1 + - 7.2 - nightly sudo: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5c687..f824701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## Version 2.1.0 + +* [bug fix, compatibility] Replace wfRunHooks with Hooks::run PR #74 issue #75 +* [bug fix, enhancement] Always adds the server name to the h1 tag issue #76 SEO related +* [CSS] Search Input alignment fix +* [CSS] Improvements and fixes after issue #76 was fixed +* [bug-fix, compatibility] Code loading changes, $out->addModuleScripts() to $out->addModules() issue #78 +* [compatibility] Removal of fastclick.js as mobile browsers now deal with touch delay automatically + ## Version 2.0.0 * [bug fix] Addressed serveral W3C validation errors with HTML output. diff --git a/Pivot.skin.php b/Pivot.skin.php index 06127a4..a33899c 100644 --- a/Pivot.skin.php +++ b/Pivot.skin.php @@ -10,15 +10,6 @@ class SkinPivot extends SkinTemplate { public $skinname = 'pivot', $stylename = 'pivot', $template = 'pivotTemplate', $useHeadElement = true; - - public function initPage(OutputPage $out) { - parent::initPage($out); - global $wgLocalStylePath; - - $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; - $out->addMeta('viewport', $viewport_meta); - $out->addModuleScripts('skins.pivot.js'); - } public function setupSkinUserCss(OutputPage $out) { parent::setupSkinUserCss($out); @@ -44,10 +35,22 @@ class SkinPivot extends SkinTemplate { $wgPivotFeatures[$fgOption] = $fgOptionValue; } } - $out->addModuleStyles('skins.pivot.styles'); + if ( $wgPivotFeatures['preloadFontAwesome'] ) { $out->addHeadItem('font', ''); } + + $out->addModuleStyles('skins.pivot.styles'); + + } + + public function initPage(OutputPage $out) { + global $wgLocalStylePath; + parent::initPage($out); + + $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; + $out->addMeta('viewport', $viewport_meta); + $out->addModules('skins.pivot.js'); } } @@ -91,21 +94,21 @@ class pivotTemplate extends BaseTemplate { "; ?> "; ?> @@ -210,7 +213,7 @@ class pivotTemplate extends BaseTemplate { $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); ?>

-

+

diff --git a/assets/scripts/vendor/jquery.cookie.js b/assets/scripts/vendor/jquery.cookie.js deleted file mode 100644 index 9abcdec..0000000 --- a/assets/scripts/vendor/jquery.cookie.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * jQuery Cookie Plugin v1.4.1 - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2013 Klaus Hartl - * Released under the MIT license - */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); diff --git a/assets/scripts/vendor/jquery.js b/assets/scripts/vendor/jquery.js deleted file mode 100644 index 2b5b0b6..0000000 --- a/assets/scripts/vendor/jquery.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * jQuery JavaScript Library v2.1.4 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-04-28T16:01Z - */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("