Plugin Directory

Changeset 1187993


Ignore:
Timestamp:
06/26/2015 08:13:36 AM (11 years ago)
Author:
mmtechmaster
Message:

Release of version 1.1.2
========================

Location:
militant-moderates-css-parent-selector-mmps
Files:
8 added
5 edited

Legend:

Unmodified
Added
Removed
  • militant-moderates-css-parent-selector-mmps

    • Property svn:global-ignores set to
      mmParentSelector.dev.js
  • militant-moderates-css-parent-selector-mmps/trunk/js/mmParentSelector.js

    r1187616 r1187993  
    2929jQuery(document).ready(function( $ ) {
    3030
    31     var k = 0, i, j,
     31    var evidx = 0, k = 0, i, j,
    3232
    3333     // Class that's added to every styled element
    34     CLASS = 'MMPS',
     34    CLASS = 'mmPpSsPrEfIx',
    3535
    3636    eventMap = {
    37 //      active: 'mousedown mouseup',
    38         changed: 'change',
    39         checked: 'click',
    40 //      click: 'click',
    41         focus: 'focus blur',
    42         hover: 'mouseover mouseout',
    43 //      mousedown: 'mousedown',
    44 //      mouseout: 'mouseout',
    45 //      mouseover: 'mouseover',
    46 //      mouseup: 'mouseup',
    47         selected: 'change',
     37        active: 'focusin',
     38        focus: 'focusin',
     39        hover: 'mouseenter',
    4840    },
    4941
    5042    pairedEventMap = {
    51         mousedown: 'mouseup mouseout'
    52     },
    53 
    54     singleEventMap = {
    55         mouseup: 'mouseout'
     43        mousedown: 'mouseup mouseout mouseleave',
     44        focusin: 'focusout',
     45        keydown: 'keyup',
     46        mouseenter: 'mouseleave',
     47        mouseover: 'mouseleave',
    5648    },
    5749
    5850    stateMap = {
    5951        active: ':active',
    60 //      checked: ':checked',
    6152        disabled: ':disabled',
    6253        empty: ':empty',
     
    6455        first_child: ':first-child',
    6556        first_of_type: ':first-of-type',
    66 //      focus: ':focus',
    67 //      hover: ':hover',
    6857        in_range: ':in-range',
    6958        invalid: ':invalid',
     59        lang: ':lang',
    7060        last_child: ':last-child',
    7161        last_of_type: ':last-of-type',
    7262        link: ':link',
     63        not: ':not',
     64        nth_child: ':nth-child',
     65        nth_last_child: ':nth-last-child',
     66        nth_last_of_type: ':nth-last-of-type',
     67        nth_of_type: ':nth-of-type',
    7368        only_of_type: ':only-of-type',
    7469        only_child: ':only-child',
     
    8378    },
    8479
    85     stateParamMap = {
    86         lang: ':lang(#)',                           // **SPECIAL
    87         not: ':not(#)',                             // **SPECIAL
    88         nth_child: ':nth-child(#)',                 // **SPECIAL
    89         nth_last_child: ':nth-last-child(#)',       // **SPECIAL
    90         nth_last_of_type: ':nth-last-of-type(#)',   // **SPECIAL
    91         nth_of_type: ':nth-of-type(#)'              // **SPECIAL
    92     },
    93 
    9480    pseudoElements = {
    9581        after: '::after',
     
    169155                        // Build Child Selector - Same as Selector but without '!'
    170156                        childSelector = selector.replace(/!/g, '').replace('::', ':');
    171                         // Remove ALL Parent Pseudo Classes and Pseudo Elements from Child Selector
     157                        // Remove ALL Parent Pseudo Classes and Pseudo Elements
    172158                        $(pseudoParents).each(function(x) {
    173159                            childSelector = childSelector.replace( ':' + this, '' );
     
    185171                        if (childElements.length > 1) {
    186172                            var qDOM;
    187                            
     173
    188174                            do {
    189175                                qDOM = false;           // clear our flag
     
    194180                                catch(err) {
    195181                                    var ep = ':' + $.trim(err.toString().match( /[\w\-]+$/i ));
    196                                     var epp = childSelector.lastIndexOf( ep );
    197                                     if ( epp >= 0 ) {
    198                                         childSelector = childSelector.replace( ep, '' );
     182                                    if ( childSelector.lastIndexOf( ep ) >= 0 ) {
     183                                        childSelector = childSelector.replace(new RegExp( ep, 'g' ), '' );
    199184                                        qDOM = true;
    200185                                    }
     
    231216                                            subject = subject.prev();
    232217                                        }
    233                                         if ( subject ) {
    234                                         } else {
    235                                         }
    236218                                        break;
    237219                                    default:
     
    240222                                    }
    241223
    242                                     if (subject) {
    243                                     }
    244224                                } while (subject && n != parent && (n = $.trim(tmpNodes.pop())));
     225
    245226
    246227                                // If we successfully walked up the DOM tree and found the right parent...
    247228                                if (subject) {
    248229                                    var id = CLASS + k++,
    249                                     ptNormState,
     230
     231                                    mmpsAddNamespace = function(eType) {
     232                                        return eType.split(/[ ]+/).join('.e' + id + ' ') + '.e' + id;
     233                                    },
     234
    250235                                    toggleFn = function(e) {
     236                                        var eid = 'E#' + evidx++;
    251237                                        if (e) {
    252                                             // if we have an attach type event then build a reverse handler
    253                                             if (pairedEventMap[e.type]) {
    254                                                 e.data.subject.on(pairedEventMap[e.type], function(oe) {
    255                                                     e.data.subject.toggleClass(e.data.id);
    256                                                     e.data.subject.off(pairedEventMap[e.type]);
     238                                            // if this is a paired event then build a reverse handler
     239                                            if ( pairedEventMap[e.type] ) {
     240                                                $(e.currentTarget).one( mmpsAddNamespace( pairedEventMap[e.type] ), function(oe) {
     241                                                    // Make sure all paired event handlers are turned off, not just the one that fired
     242                                                    $(oe.currentTarget).off( mmpsAddNamespace( pairedEventMap[e.type] ) );
     243                                                    // Then toggle the Class on the Subject element
     244                                                    $(e.data.subject).toggleClass(e.data.id);
    257245                                                });
    258246                                            }
    259                                             if (singleEventMap[e.type]) {
    260                                                 e.data.subject.off(singleEventMap[e.type]);
    261                                             }
    262247                                        }
    263248
    264249                                        // Toggle our special Class in the final subject element
    265                                         e.data.subject.toggleClass(e.data.id);
    266                                     };
    267 
    268                                     checkStateFn = function(e) {
    269                                         if ( $(e.target).is( e.data.eState ) ) {
    270                                             // Target Element has this State, so apply our Class to the Subject
    271                                             if (! ($(subject).hasClass(id)) ) {
    272                                                 $(subject).toggleClass(id);
    273                                             }
    274                                         } else if ( $(subject).hasClass(id) ) {
    275                                             // Target Element does not currently have the state so Clear on Subject if set
    276                                             $(subject).toggleClass(id);
    277                                         }
    278 //                                      e.stopPropogation();
     250                                        $(e.data.subject).toggleClass(e.data.id);
    279251                                    };
    280252
     
    285257                                    var qClass = false;
    286258
    287                                     // test if Parent has a Pseudo Class or Element
    288                                     if (pseudoParents.length) {
    289                                         $(pseudoParents).each(function(pidx) {
    290                                             var ppNorm = this.replace(/\-/g, '_');
    291                                             if (pseudoElements[ ppNorm ]) {
    292                                                 parsedSelectors += pseudoElements[ ppNorm ];
    293                                                 qClass = true;      // apply class later .. maybe
     259                                    // Loops through the Pseudo Parents and apply those that are needed
     260                                    $(pseudoParents).each(function() {
     261                                        var ppNorm = this.replace(/\-/g, '_');
     262                                        if (pseudoElements[ ppNorm ]) {
     263                                            parsedSelectors += pseudoElements[ ppNorm ];
     264                                            qClass = true;      // apply class later .. maybe
     265                                        } else {
     266                                            // it's one of the other Pseudo Classes :hover :click etc.
     267                                            // Build a handler for the specified Pseudo Class
     268                                            $(subject).on( mmpsAddNamespace( eventMap[ this ] || this ), { id: id, subject: $(subject) }, toggleFn );
     269                                        }
     270                                    });
     271
     272                                    if ( pseudoTargets.length ) {
     273                                        var orgChild = $(this);
     274
     275                                        $(pseudoTargets).each(function() {
     276                                            // Process each Target Pseudo Class or Pseudo Element modifier
     277                                            var pt = this.split(/(?:\(|\))/g);
     278                                            var ptNorm = pt[0].replace(/\-/g, '_');
     279                                            var ptParam = stateMap[ ptNorm ] + ( pt[1] ? '(' + pt[1] + ')' : '' );
     280
     281                                            if ( pseudoElements[ ptNorm ] ) {
     282                                                // It's a Pseudo Element ::after, ::before, etc.
     283                                                // Ignored on the Target element; we're working on the Subject
     284                                            } else if ( eventMap[ this ] ) {
     285                                                // It's one of the special Event Pseudo Classes :hover :checked :focus
     286                                                // An event-based Pseudo Class - Build a handler for the Event
     287                                                $(orgChild).on( mmpsAddNamespace( eventMap[ this ] ), { id: id, subject: $(subject) }, toggleFn );
     288                                                // Do not apply Class to the subject - Event will apply it
     289                                                qClass = false;
     290                                            } else if ( stateMap[ ptNorm ] ) {
     291                                                // A normal or special Parameterized Pseudo Class State
     292                                                qClass = true;
    294293                                            } else {
    295                                                 // it's one of the other Pseudo Classes :hover :click etc.
    296                                                 // Build a handler for the specified Pseudo Class
    297                                                 $(subject).on( eventMap[ this ] || this, { id: id, subject: $(subject) }, toggleFn );
     294                                                // An unknown Pseudo Class - DEFAULT is to build a handler for it
     295                                                $(orgChild).on( mmpsAddNamespace( this.toString() ), { id: id, subject: $(subject) }, toggleFn );
     296                                                qClass = false;
    298297                                            }
    299298                                        });
    300                                     }
    301 
    302                                     if (pseudoTargets.length) {
    303                                         var orgChild = $(this);
    304 
    305                                         $(pseudoTargets).each(function(tidx) {
    306                                             // Target has a Pseudo Class or Pseudo Element modifier
    307                                             var ptNorm = this.replace(/\-/g, '_');
    308 
    309                                             var ptParam = null;
    310                                             if ( /\(/.test(this) ) {
    311                                                 // A special case Pseudo Class with a parameter
    312                                                 var pcname = this.split(/(?:\(|\))/g);
    313                                                 pcname[0] = pcname[0].replace( /\-/g, '_' );
    314 
    315                                                 if ( stateParamMap[ pcname[0] ] ) {
    316                                                     ptParam = stateParamMap[ pcname[0] ].replace(/\#/, pcname[1]);
    317                                                 }
    318                                             }
    319 
    320                                             if ( pseudoElements[ ptNorm ] ) {
    321                                                 // It's a Pseudo Element ::after, ::before, etc.
    322                                                 // Ignored on the Target element
    323                                             } else if ( eventMap[ this ] ) {
    324                                                 // It's one of the special Event Pseudo Classes :hover :checked :focus
    325                                                 // Do not apply Class to the subject - Event will apply it
    326                                                 qClass = false;
    327                                                 // An event-based Pseudo Class - Build a handler for the Event
    328                                                 $(orgChild).on( eventMap[ this ], { id: id, subject: $(subject) }, toggleFn );
    329                                             } else if ( stateMap[ ptNorm ] ) {
    330                                                 // One of the Pseudo Class States
    331                                                 ptNormState = stateMap[ ptNorm ];
    332 
    333                                                 // Hook an event handler for changes in the Target
    334                                                 $(orgChild).on( 'click load visibilitychange', { eState: ptNormState }, checkStateFn );
    335 
    336                                                 if ( $(orgChild).is( ptNormState ) ) {
    337                                                     // The State is already set on the Target; force the class on the Subject
    338                                                     qClass = true;
    339                                                 } else {
    340                                                     // Target Element does not currently have the state so Clear on Subject if set
    341                                                     qClass = false;
    342                                                 }
    343                                             } else if ( ptParam ) {
    344                                                 if ( $(orgChild).is( ptParam ) ) {
    345                                                     // Target Element has this State, so apply our Class to the Subject
    346                                                     qClass = true;
    347                                                 }
    348                                             } else {
    349                                                 qClass = false;
    350                                                 // An unknown Pseudo Class - DEFAULT is to build a handler for the it
    351                                                 $(orgChild).on( this.toString(), { id: id, subject: $(subject) }, toggleFn );
    352                                             }
    353                                         });
    354                                     } else if (! pseudoParents.length) {
    355                                         // Simple Target with no Pseudo crap
     299                                    } else if (! pseudoParents.length ) {
    356300                                        qClass = true;
    357301                                    }
    358302
     303                                    // if qClass is set then we need to set the new Custom class 'id' on the Subject element
    359304                                    if (qClass) {
    360305                                        $(subject).toggleClass(id);
     
    409354
    410355        stateMap = {
    411 //          checked: ':checked',
    412356            disabled: ':disabled',
    413357            empty: ':empty',
     
    437381        }
    438382    });
     383
    439384});
  • militant-moderates-css-parent-selector-mmps/trunk/js/mmParentSelector.min.js

    r1186554 r1187993  
    11
    2 jQuery(document).ready(function($){var k=0,i,j,CLASS='MMPS',eventMap={changed:'change',checked:'click',focus:'focus blur',hover:'mouseover mouseout',selected:'change',},pairedEventMap={mousedown:'mouseup mouseout'},singleEventMap={mouseup:'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',last_child:':last-child',last_of_type:':last-of-type',link:':link',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'},stateParamMap={lang:':lang(#)',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(#)'},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:'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++)
    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);}
    6 catch(err){var ep=':'+$.trim(err.toString().match(/[\w\-]+$/i));var epp=childSelector.lastIndexOf(ep);if(epp>=0){childSelector=childSelector.replace(ep,'');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 if(subject){}else{}
    8 break;default:subject=subject.closest(n);break;}
    9 if(subject){}}while(subject&&n!=parent&&(n=$.trim(tmpNodes.pop())));if(subject){var id=CLASS+k++,ptNormState,toggleFn=function(e){if(e){if(pairedEventMap[e.type]){e.data.subject.on(pairedEventMap[e.type],function(oe){e.data.subject.toggleClass(e.data.id);e.data.subject.off(pairedEventMap[e.type]);});}
    10 if(singleEventMap[e.type]){e.data.subject.off(singleEventMap[e.type]);}}
    11 e.data.subject.toggleClass(e.data.id);};checkStateFn=function(e){if($(e.target).is(e.data.eState)){if(!($(subject).hasClass(id))){$(subject).toggleClass(id);}}else if($(subject).hasClass(id)){$(subject).toggleClass(id);}};idx&&(parsedSelectors.length)&&(parsedSelectors+=",");parsedSelectors+='.'+id;var qClass=false;if(pseudoParents.length){$(pseudoParents).each(function(pidx){var ppNorm=this.replace(/\-/g,'_');if(pseudoElements[ppNorm]){parsedSelectors+=pseudoElements[ppNorm];qClass=true;}else{$(subject).on(eventMap[this]||this,{id:id,subject:$(subject)},toggleFn);}});}
    12 if(pseudoTargets.length){var orgChild=$(this);$(pseudoTargets).each(function(tidx){var ptNorm=this.replace(/\-/g,'_');var ptParam=null;if(/\(/.test(this)){var pcname=this.split(/(?:\(|\))/g);pcname[0]=pcname[0].replace(/\-/g,'_');if(stateParamMap[pcname[0]]){ptParam=stateParamMap[pcname[0]].replace(/\#/,pcname[1]);}}
    13 if(pseudoElements[ptNorm]){}else if(eventMap[this]){qClass=false;$(orgChild).on(eventMap[this],{id:id,subject:$(subject)},toggleFn);}else if(stateMap[ptNorm]){ptNormState=stateMap[ptNorm];$(orgChild).on('click load visibilitychange',{eState:ptNormState},checkStateFn);if($(orgChild).is(ptNormState)){qClass=true;}else{qClass=false;}}else if(ptParam){if($(orgChild).is(ptParam)){qClass=true;}}else{qClass=false;$(orgChild).on(this.toString(),{id:id,subject:$(subject)},toggleFn);}});}else if(!pseudoParents.length){qClass=true;}
     6catch(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();}
     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]),function(oe){$(oe.currentTarget).off(mmpsAddNamespace(pairedEventMap[e.type]));$(e.data.subject).toggleClass(e.data.id);});}}
     8$(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;}
    149if(qClass){$(subject).toggleClass(id);}}});}}else{child=$(selector);if(child.length)parsedSelectors+=selector;}}
    1510if(parsedSelectors.length){parsedSelectors+=' '+declarations;parsed+=parsedSelectors+"\n";}}
  • militant-moderates-css-parent-selector-mmps/trunk/mmParentSelector.php

    r1187616 r1187993  
    2828*/
    2929
     30if (!defined('ABSPATH')) die ('No direct access allowed');
     31
    3032/*
    3133 * Define constant that controls which version of the JavaScript is loaded
     
    4345    // pure CSS rules. Depends on jQuery.
    4446   
    45     if ( MMPS_SCRIPT_DEV == 2 ) {
     47    // If DEBUG mode is selected and the current user has capability to activate plugins ..
     48    // AND the .dev.js full debug version is available then ...
     49    if ( MMPS_SCRIPT_DEV == 2 && current_user_can( 'activate_plugins' ) &&
     50                file_exists( plugin_dir_path( __FILE__ ) . 'js/mmParentSelector.dev.js' ) ) {
    4651        // the .dev.js version is the working copy with full debugging included
    4752        // it is NOT included in the standard distribution, so protect against attempts to use it
     53        wp_enqueue_script( 'mmps_js', plugins_url( 'js/mmParentSelector.dev.js', __FILE__ ), array( 'jquery' ) );
    4854
    49         if ( file_exists( plugin_dir_path( __FILE__ ) . 'js/mmParentSelector.dev.js' ) ) {
    50             wp_enqueue_script( 'mmps_js', plugins_url( 'js/mmParentSelector.dev.js', __FILE__ ), array( 'jquery' ) );
    51 
    52         } else {
    53             wp_enqueue_script( 'mmps_js', plugins_url( 'js/mmParentSelector.js', __FILE__ ), array( 'jquery' ) );
    54         }
    55 
    56     } elseif ( MMPS_SCRIPT_DEV == 0 ) {
     55    } elseif ( MMPS_SCRIPT_DEV != 1 ) {
     56        // Either in full DEBUG mode but not allowed (not an admin) or FULL version NOT specified explicitly ...
    5757        // the .min.js version is stripped of all debugging code and minified
    5858        wp_enqueue_script( 'mmps_js', plugins_url( 'js/mmParentSelector.min.js', __FILE__ ), array( 'jquery' ) );
  • militant-moderates-css-parent-selector-mmps/trunk/readme.txt

    r1187219 r1187993  
    55Requires at least: 4.0.0
    66Tested up to: 4.2.2
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434
    3535== Changelog ==
    36 = 1.1.2 (in development) =
    37 * Changes in progress
     36= 1.1.2 =
     37* 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.
     38* Smoothing and sanding in various places, especially around debugging code that results in inefficiencies
     39* Added all the Event Types specified at **[W3 UI Events](http://www.w3.org/TR/DOM-Level-3-Events/#event-types-list)**
     40* Added unique Namespace to all event handlers; prevents crosstalk and inadvertant event handler removal
     41* Further obfuscated the MMPS "Class Prefix" used to generate unique Class Names
    3842
    3943= 1.1.1 =
Note: See TracChangeset for help on using the changeset viewer.