Plugin Directory

Changeset 1188234


Ignore:
Timestamp:
06/26/2015 03:05:57 PM (11 years ago)
Author:
mmtechmaster
Message:

Release version 1.1.3
=====================

  • Fixed issue that caused wrong Class to be removed at the end of a Paired Event: mouseover/mouseout for example
Location:
militant-moderates-css-parent-selector-mmps
Files:
8 added
5 edited

Legend:

Unmodified
Added
Removed
  • militant-moderates-css-parent-selector-mmps/trunk/css/mmParentSelector.css

    r1187616 r1188234  
    11/**
    22 * @package militant-moderates-css-parent-selector-mmps
    3  * @version 1.1.2
     3 * @version 1.1.3
    44 */
    55/*
     
    77Plugin URI: http://www.militantmoderates.org/mmps-quick-start/
    88Description: Adds CSS "Parent Selector" support to your Theme. Apply your CSS Style to Parent/Sibling elements not just the Selected element.
    9 Version: 1.1.2
     9Version: 1.1.3
    1010Author: MM Techmaster
    1111Author URI: https://profiles.wordpress.org/mmtechmaster
  • militant-moderates-css-parent-selector-mmps/trunk/js/mmParentSelector.js

    r1187993 r1188234  
    11/**
    22 * @package militant-moderates-css-parent-selector-mmps
    3  * @version 1.1.2
     3 * @version 1.1.3
    44 */
    55/*
     
    77Plugin URI: http://www.militantmoderates.org/mmps-quick-start/
    88Description: Adds CSS "Parent Selector" support to your Theme. Apply your CSS Style to Parent/Sibling elements not just the Selected element.
    9 Version: 1.1.2
     9Version: 1.1.3
    1010Author: MM Techmaster
    1111Author URI: https://profiles.wordpress.org/mmtechmaster
     
    3737        active: 'focusin',
    3838        focus: 'focusin',
    39         hover: 'mouseenter',
     39        hover: 'mouseover',
    4040    },
    4141
     
    4545        keydown: 'keyup',
    4646        mouseenter: 'mouseleave',
    47         mouseover: 'mouseleave',
     47        mouseover: 'mouseout',
    4848    },
    4949
     
    238238                                            // if this is a paired event then build a reverse handler
    239239                                            if ( pairedEventMap[e.type] ) {
    240                                                 $(e.currentTarget).one( mmpsAddNamespace( pairedEventMap[e.type] ), function(oe) {
     240                                                $(e.currentTarget).one( mmpsAddNamespace( pairedEventMap[e.type] ), { id: e.data.id, subject: $(e.data.subject) }, function(oe) {
    241241                                                    // Make sure all paired event handlers are turned off, not just the one that fired
    242242                                                    $(oe.currentTarget).off( mmpsAddNamespace( pairedEventMap[e.type] ) );
    243243                                                    // Then toggle the Class on the Subject element
    244                                                     $(e.data.subject).toggleClass(e.data.id);
     244                                                    $(oe.data.subject).toggleClass(oe.data.id);
    245245                                                });
    246246                                            }
  • militant-moderates-css-parent-selector-mmps/trunk/js/mmParentSelector.min.js

    r1187993 r1188234  
    11
    2 jQuery(document).ready(function($){var evidx=0,k=0,i,j,CLASS='mmPpSsPrEfIx',eventMap={active:'focusin',focus:'focusin',hover:'mouseenter',},pairedEventMap={mousedown:'mouseup mouseout mouseleave',focusin:'focusout',keydown:'keyup',mouseenter:'mouseleave',mouseover:'mouseleave',},stateMap={active:':active',disabled:':disabled',empty:':empty',enabled:':enabled',first_child:':first-child',first_of_type:':first-of-type',in_range:':in-range',invalid:':invalid',lang:':lang',last_child:':last-child',last_of_type:':last-of-type',link:':link',not:':not',nth_child:':nth-child',nth_last_child:':nth-last-child',nth_last_of_type:':nth-last-of-type',nth_of_type:':nth-of-type',only_of_type:':only-of-type',only_child:':only-child',optional:':optional',out_of_range:':out-of-range',read_only:':read-only',read_write:':read-write',required:':required',target:':target',valid:':valid',visited:':visited'},pseudoElements={after:'::after',before:'::before',first_letter:'::first-letter',first_line:'::first-line',selection:'::selection'},parsed,parsedSelectors,matches,selectors,selector,parent,target,child,pseudoTargets,declarations,pseudoParent,pseudoParents,childSelector,childElements,REGEX=new RegExp((function(aryRegExp){var ret='';for(var i=0;i<aryRegExp.length;i++)
     2jQuery(document).ready(function($){var evidx=0,k=0,i,j,CLASS='mmPpSsPrEfIx',eventMap={active:'focusin',focus:'focusin',hover:'mouseover',},pairedEventMap={mousedown:'mouseup mouseout mouseleave',focusin:'focusout',keydown:'keyup',mouseenter:'mouseleave',mouseover:'mouseout',},stateMap={active:':active',disabled:':disabled',empty:':empty',enabled:':enabled',first_child:':first-child',first_of_type:':first-of-type',in_range:':in-range',invalid:':invalid',lang:':lang',last_child:':last-child',last_of_type:':last-of-type',link:':link',not:':not',nth_child:':nth-child',nth_last_child:':nth-last-child',nth_last_of_type:':nth-last-of-type',nth_of_type:':nth-of-type',only_of_type:':only-of-type',only_child:':only-child',optional:':optional',out_of_range:':out-of-range',read_only:':read-only',read_write:':read-write',required:':required',target:':target',valid:':valid',visited:':visited'},pseudoElements={after:'::after',before:'::before',first_letter:'::first-letter',first_line:'::first-line',selection:'::selection'},parsed,parsedSelectors,matches,selectors,selector,parent,target,child,pseudoTargets,declarations,pseudoParent,pseudoParents,childSelector,childElements,REGEX=new RegExp((function(aryRegExp){var ret='';for(var i=0;i<aryRegExp.length;i++)
    33ret+=aryRegExp[i].source;return ret;})([/[\w\s\/\.\-\:\=\[\]\(\)\~\+\|\,\*\'\"\^$#>]*(?=!)/,/[\w\s\/\.\-\:\=\[\]\(\)\~\+\|\,\*\'\"\^$#>!]*\{{1}/,/[^\}]+\}{1}/]),"gi");parse=function(sRawCSS){sRawCSS=sRawCSS.replace(/(\/\*([\s\S]*?)\*\/)/gm,'');if(matches=sRawCSS.match(REGEX)){parsed='';for(i=-1;++i<matches.length;){style=$.trim(matches[i]);selectors=$.trim(style.split('{')[0]).split(',');declarations='{'+style.split(/\{|\}/)[1].replace(/^\s+|\s+$[\t\n\r]*/g,'')+'}';if(declarations==='{}'){continue;}
    44if(!/;}$/.test(declarations))
    55declarations=declarations.replace(/}/g,';}');declarations=declarations.replace(/;/g,' !important;');parsedSelectors='';for(j=-1;++j<selectors.length;){selector=$.trim(selectors[j]);(parsedSelectors.length)&&(parsedSelectors+=",");if(/!/.test(selector)){var splitsel=selector.split('!');var splitp=splitsel[0].split(/[>~+\s]+/).reverse()[0].split(/[\:]+/);parent=$.trim(splitp[0]);pseudoParents=splitp.slice(1);var splitt=splitsel[1].split(/[>~+\s]+/).reverse()[0].split(/[\:]+/);target=$.trim(splitt[0])||[]._;pseudoTargets=splitt.slice(1);childSelector=selector.replace(/!/g,'').replace('::',':');$(pseudoParents).each(function(x){childSelector=childSelector.replace(':'+this,'');});$(pseudoTargets).each(function(x){if(eventMap[this])childSelector=childSelector.replace(':'+this,'');});childElements=childSelector.match(/([\>\+\~]|(\:not\()?((\w[\-\w]*|\*)|[\.\#]\w[\-\w]*|\:{1,2}\w[\-\w\(\)]*|\[[^\]]*\])+\)?\!?)/gi);if(childElements.length>1){var qDOM;do{qDOM=false;try{child=$(childSelector);}
    66catch(err){var ep=':'+$.trim(err.toString().match(/[\w\-]+$/i));if(childSelector.lastIndexOf(ep)>=0){childSelector=childSelector.replace(new RegExp(ep,'g'),'');qDOM=true;}}}while(qDOM);child.each(function(idx){var subject=$(this);var tmpNodes=childElements.slice(0,-1);;var n=$.trim(tmpNodes.pop());do{switch(n){case'>':n=$.trim(tmpNodes.pop());case'*':subject=subject.parent(n);break;case'+':n=$.trim(tmpNodes.pop());subject=subject.prev(n);break;case'~':n=$.trim(tmpNodes.pop());subject=subject.prev();while(subject&&!subject.is(n)){subject=subject.prev();}
    7 break;default:subject=subject.closest(n);break;}}while(subject&&n!=parent&&(n=$.trim(tmpNodes.pop())));if(subject){var id=CLASS+k++,mmpsAddNamespace=function(eType){return eType.split(/[ ]+/).join('.e'+id+' ')+'.e'+id;},toggleFn=function(e){var eid='E#'+evidx++;if(e){if(pairedEventMap[e.type]){$(e.currentTarget).one(mmpsAddNamespace(pairedEventMap[e.type]),function(oe){$(oe.currentTarget).off(mmpsAddNamespace(pairedEventMap[e.type]));$(e.data.subject).toggleClass(e.data.id);});}}
     7break;default:subject=subject.closest(n);break;}}while(subject&&n!=parent&&(n=$.trim(tmpNodes.pop())));if(subject){var id=CLASS+k++,mmpsAddNamespace=function(eType){return eType.split(/[ ]+/).join('.e'+id+' ')+'.e'+id;},toggleFn=function(e){var eid='E#'+evidx++;if(e){if(pairedEventMap[e.type]){$(e.currentTarget).one(mmpsAddNamespace(pairedEventMap[e.type]),{id:e.data.id,subject:$(e.data.subject)},function(oe){$(oe.currentTarget).off(mmpsAddNamespace(pairedEventMap[e.type]));$(oe.data.subject).toggleClass(oe.data.id);});}}
    88$(e.data.subject).toggleClass(e.data.id);};idx&&(parsedSelectors.length)&&(parsedSelectors+=",");parsedSelectors+='.'+id;var qClass=false;$(pseudoParents).each(function(){var ppNorm=this.replace(/\-/g,'_');if(pseudoElements[ppNorm]){parsedSelectors+=pseudoElements[ppNorm];qClass=true;}else{$(subject).on(mmpsAddNamespace(eventMap[this]||this),{id:id,subject:$(subject)},toggleFn);}});if(pseudoTargets.length){var orgChild=$(this);$(pseudoTargets).each(function(){var pt=this.split(/(?:\(|\))/g);var ptNorm=pt[0].replace(/\-/g,'_');var ptParam=stateMap[ptNorm]+(pt[1]?'('+pt[1]+')':'');if(pseudoElements[ptNorm]){}else if(eventMap[this]){$(orgChild).on(mmpsAddNamespace(eventMap[this]),{id:id,subject:$(subject)},toggleFn);qClass=false;}else if(stateMap[ptNorm]){qClass=true;}else{$(orgChild).on(mmpsAddNamespace(this.toString()),{id:id,subject:$(subject)},toggleFn);qClass=false;}});}else if(!pseudoParents.length){qClass=true;}
    99if(qClass){$(subject).toggleClass(id);}}});}}else{child=$(selector);if(child.length)parsedSelectors+=selector;}}
  • militant-moderates-css-parent-selector-mmps/trunk/mmParentSelector.php

    r1187993 r1188234  
    22/**
    33 * @package militant-moderates-css-parent-selector-mmps
    4  * @version 1.1.2
     4 * @version 1.1.3
    55 */
    66/*
     
    88Plugin URI: http://www.militantmoderates.org/mmps-quick-start/
    99Description: Adds CSS "Parent Selector" support to your Theme. Apply your CSS Style to Parent/Sibling elements not just the Selected element.
    10 Version: 1.1.2
     10Version: 1.1.3
    1111Author: MM Techmaster
    1212Author URI: https://profiles.wordpress.org/mmtechmaster
  • militant-moderates-css-parent-selector-mmps/trunk/readme.txt

    r1187993 r1188234  
    55Requires at least: 4.0.0
    66Tested up to: 4.2.2
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434
    3535== Changelog ==
     36= 1.1.3 =
     37* Fixed issue that caused wrong Class to be removed at the end of a Paired Event: mouseover/mouseout for example
     38
    3639= 1.1.2 =
    3740* Protected development version JavaScript against execution by anyone other than a site Admin - This is only an issue on the development platform where visitors to the main site might encounter errors from code in development.
Note: See TracChangeset for help on using the changeset viewer.