Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 26 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 84 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 85 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 26 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 45 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 11 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 197 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 198 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 197 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 198 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -795,6 +795,42 @@ |
796 | 796 | } while ( p && p.firstChild ); |
797 | 797 | return p ? new context.fn.rawTraverser( p, nextDepth, nextInP ) : null; |
798 | 798 | }; |
| 799 | + this.prev = function() { |
| 800 | + var p = this.node; |
| 801 | + var prevDepth = this.depth; |
| 802 | + var prevInP = this.inP; |
| 803 | + while ( p && !p.previousSibling ) { |
| 804 | + p = p.parentNode; |
| 805 | + prevDepth--; |
| 806 | + if ( prevDepth == 0 ) { |
| 807 | + // We're back at the start node |
| 808 | + p = null; |
| 809 | + } |
| 810 | + if ( p && p.nodeName == "P" ) { |
| 811 | + prevInP = null; |
| 812 | + } |
| 813 | + } |
| 814 | + p = p ? p.previousSibling : null; |
| 815 | + if ( p && p.nodeName == "P" ) { |
| 816 | + prevInP = p; |
| 817 | + } |
| 818 | + do { |
| 819 | + // Filter nodes with the wikiEditor-noinclude class |
| 820 | + // Don't use $( p ).hasClass( 'wikiEditor-noinclude' ) because |
| 821 | + // $() is slow in a tight loop |
| 822 | + while ( p && ( ' ' + p.className + ' ' ).indexOf( ' wikiEditor-noinclude ' ) != -1 ) { |
| 823 | + p = p.previousSibling; |
| 824 | + } |
| 825 | + if ( p && p.lastChild ) { |
| 826 | + p = p.lastChild; |
| 827 | + prevDepth++; |
| 828 | + if ( p.nodeName == "P" ) { |
| 829 | + prevInP = p; |
| 830 | + } |
| 831 | + } |
| 832 | + } while ( p && p.lastChild ); |
| 833 | + return p ? new context.fn.rawTraverser( p, prevDepth, prevInP ) : null; |
| 834 | + }; |
799 | 835 | }, |
800 | 836 | /** |
801 | 837 | * Get an object used to traverse the leaf nodes in the iframe DOM. This traversal skips leaf nodes |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7219,6 +7219,42 @@ |
7220 | 7220 | } while ( p && p.firstChild ); |
7221 | 7221 | return p ? new context.fn.rawTraverser( p, nextDepth, nextInP ) : null; |
7222 | 7222 | }; |
| 7223 | + this.prev = function() { |
| 7224 | + var p = this.node; |
| 7225 | + var prevDepth = this.depth; |
| 7226 | + var prevInP = this.inP; |
| 7227 | + while ( p && !p.previousSibling ) { |
| 7228 | + p = p.parentNode; |
| 7229 | + prevDepth--; |
| 7230 | + if ( prevDepth == 0 ) { |
| 7231 | + // We're back at the start node |
| 7232 | + p = null; |
| 7233 | + } |
| 7234 | + if ( p && p.nodeName == "P" ) { |
| 7235 | + prevInP = null; |
| 7236 | + } |
| 7237 | + } |
| 7238 | + p = p ? p.previousSibling : null; |
| 7239 | + if ( p && p.nodeName == "P" ) { |
| 7240 | + prevInP = p; |
| 7241 | + } |
| 7242 | + do { |
| 7243 | + // Filter nodes with the wikiEditor-noinclude class |
| 7244 | + // Don't use $( p ).hasClass( 'wikiEditor-noinclude' ) because |
| 7245 | + // $() is slow in a tight loop |
| 7246 | + while ( p && ( ' ' + p.className + ' ' ).indexOf( ' wikiEditor-noinclude ' ) != -1 ) { |
| 7247 | + p = p.previousSibling; |
| 7248 | + } |
| 7249 | + if ( p && p.lastChild ) { |
| 7250 | + p = p.lastChild; |
| 7251 | + prevDepth++; |
| 7252 | + if ( p.nodeName == "P" ) { |
| 7253 | + prevInP = p; |
| 7254 | + } |
| 7255 | + } |
| 7256 | + } while ( p && p.lastChild ); |
| 7257 | + return p ? new context.fn.rawTraverser( p, prevDepth, prevInP ) : null; |
| 7258 | + }; |
7223 | 7259 | }, |
7224 | 7260 | /** |
7225 | 7261 | * Get an object used to traverse the leaf nodes in the iframe DOM. This traversal skips leaf nodes |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -490,7 +490,11 @@ |
491 | 491 | if(p&&p.nodeName=="P"){nextInP=null;}} |
492 | 492 | p=p?p.nextSibling:null;if(p&&p.nodeName=="P"){nextInP=p;} |
493 | 493 | do{while(p&&(' '+p.className+' ').indexOf(' wikiEditor-noinclude ')!=-1){p=p.nextSibling;} |
494 | | -if(p&&p.firstChild){p=p.firstChild;nextDepth++;if(p.nodeName=="P"){nextInP=p;}}}while(p&&p.firstChild);return p?new context.fn.rawTraverser(p,nextDepth,nextInP):null;};},'traverser':function(start){var node=start.jquery?start.get(0):start;var depth=0;var inP=node.nodeName=="P"?node:null;do{while(node&&(' '+node.className+' ').indexOf(' wikiEditor-noinclude ')!=-1){node=node.nextSibling;} |
| 494 | +if(p&&p.firstChild){p=p.firstChild;nextDepth++;if(p.nodeName=="P"){nextInP=p;}}}while(p&&p.firstChild);return p?new context.fn.rawTraverser(p,nextDepth,nextInP):null;};this.prev=function(){var p=this.node;var prevDepth=this.depth;var prevInP=this.inP;while(p&&!p.previousSibling){p=p.parentNode;prevDepth--;if(prevDepth==0){p=null;} |
| 495 | +if(p&&p.nodeName=="P"){prevInP=null;}} |
| 496 | +p=p?p.previousSibling:null;if(p&&p.nodeName=="P"){prevInP=p;} |
| 497 | +do{while(p&&(' '+p.className+' ').indexOf(' wikiEditor-noinclude ')!=-1){p=p.previousSibling;} |
| 498 | +if(p&&p.lastChild){p=p.lastChild;prevDepth++;if(p.nodeName=="P"){prevInP=p;}}}while(p&&p.lastChild);return p?new context.fn.rawTraverser(p,prevDepth,prevInP):null;};},'traverser':function(start){var node=start.jquery?start.get(0):start;var depth=0;var inP=node.nodeName=="P"?node:null;do{while(node&&(' '+node.className+' ').indexOf(' wikiEditor-noinclude ')!=-1){node=node.nextSibling;} |
495 | 499 | if(node&&node.firstChild){node=node.firstChild;depth++;if(node.nodeName=="P"){inP=node;}}}while(node&&node.firstChild);return new context.fn.rawTraverser(node,depth,inP);},'getOffset':function(offset){if(!context.offsets){context.fn.refreshOffsets();} |
496 | 500 | if(offset in context.offsets){return context.offsets[offset];} |
497 | 501 | var lowerBound=-1;for(var o in context.offsets){if(o>offset){break;} |