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' => 89 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 90 ), |
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' => 202 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 203 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 202 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 203 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -402,8 +402,8 @@ |
403 | 403 | while ( t && t.node.nodeName != '#text' && t.node.nodeName != 'BR' && t.node.nodeName != 'P' ) { |
404 | 404 | t = t.next(); |
405 | 405 | } |
406 | | - if ( t && !t.inP && t.node.nodeName == '#text' && t.node.nodeValue[0] != '\n' |
407 | | - && t.node.nodeValue[0] != '\r' ) { |
| 406 | + if ( t && !t.inP && t.node.nodeName == '#text' && t.node.nodeValue.charAt( 0 ) != '\n' |
| 407 | + && t.node.nodeValue.charAt( 0 ) != '\r' ) { |
408 | 408 | text += "\n"; |
409 | 409 | } |
410 | 410 | $( this ).text( text ); |
— | — | @@ -412,9 +412,10 @@ |
413 | 413 | // IE aggressively collapses whitespace in .text() after having done DOM manipulation, |
414 | 414 | // but for some crazy reason this does work |
415 | 415 | if ( $.browser.msie ) { |
416 | | - $pre = $( '<pre>' + $pre.html() + '</pre>' ); |
| 416 | + return $( '<pre>' + $pre.html() + '</pre>' ).text().replace( /\r/g, '\n' ); |
| 417 | + } else { |
| 418 | + return $pre.text(); |
417 | 419 | } |
418 | | - return $pre.text(); |
419 | 420 | }, |
420 | 421 | |
421 | 422 | /* |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6826,8 +6826,8 @@ |
6827 | 6827 | while ( t && t.node.nodeName != '#text' && t.node.nodeName != 'BR' && t.node.nodeName != 'P' ) { |
6828 | 6828 | t = t.next(); |
6829 | 6829 | } |
6830 | | - if ( t && !t.inP && t.node.nodeName == '#text' && t.node.nodeValue[0] != '\n' |
6831 | | - && t.node.nodeValue[0] != '\r' ) { |
| 6830 | + if ( t && !t.inP && t.node.nodeName == '#text' && t.node.nodeValue.charAt( 0 ) != '\n' |
| 6831 | + && t.node.nodeValue.charAt( 0 ) != '\r' ) { |
6832 | 6832 | text += "\n"; |
6833 | 6833 | } |
6834 | 6834 | $( this ).text( text ); |
— | — | @@ -6836,9 +6836,10 @@ |
6837 | 6837 | // IE aggressively collapses whitespace in .text() after having done DOM manipulation, |
6838 | 6838 | // but for some crazy reason this does work |
6839 | 6839 | if ( $.browser.msie ) { |
6840 | | - $pre = $( '<pre>' + $pre.html() + '</pre>' ); |
| 6840 | + return $( '<pre>' + $pre.html() + '</pre>' ).text().replace( /\r/g, '\n' ); |
| 6841 | + } else { |
| 6842 | + return $pre.text(); |
6841 | 6843 | } |
6842 | | - return $pre.text(); |
6843 | 6844 | }, |
6844 | 6845 | |
6845 | 6846 | /* |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -453,9 +453,8 @@ |
454 | 454 | +'</pre>');$pre.find('.wikiEditor-noinclude').each(function(){$(this).remove();});$pre.find('.wikiEditor-tab').each(function(){$(this).text("\t")});$pre.find('br').each(function(){$(this).replaceWith("\n");});$pre.find('p').each(function(){if(this.previousSibling||this.parentNode!=$pre.get(0)){var text=$(this).text();var t=new context.fn.rawTraverser(this.firstChild,-10,this).prev();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.prev();} |
455 | 455 | if(t){text="\n"+text;} |
456 | 456 | t=new context.fn.rawTraverser(this.lastChild,-10,this).next();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.next();} |
457 | | -if(t&&!t.inP&&t.node.nodeName=='#text'&&t.node.nodeValue[0]!='\n'&&t.node.nodeValue[0]!='\r'){text+="\n";} |
458 | | -$(this).text(text);}});if($.browser.msie){$pre=$('<pre>'+$pre.html()+'</pre>');} |
459 | | -return $pre.text();},'getContents':function(){return context.fn.htmlToText(context.$content.html());},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();}else if(context.$iframe[0].contentWindow.document.selection){retval=context.$iframe[0].contentWindow.document.selection.createRange();} |
| 457 | +if(t&&!t.inP&&t.node.nodeName=='#text'&&t.node.nodeValue.charAt(0)!='\n'&&t.node.nodeValue.charAt(0)!='\r'){text+="\n";} |
| 458 | +$(this).text(text);}});if($.browser.msie){return $('<pre>'+$pre.html()+'</pre>').text().replace(/\r/g,'\n');}else{return $pre.text();}},'getContents':function(){return context.fn.htmlToText(context.$content.html());},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();}else if(context.$iframe[0].contentWindow.document.selection){retval=context.$iframe[0].contentWindow.document.selection.createRange();} |
460 | 459 | if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(retval.toString){retval=retval.toString();} |
461 | 460 | return retval;},'encapsulateSelection':function(options){var selText=$(this).textSelection('getSelection');var selTextArr;var selectAfter=false;var pre=options.pre,post=options.post;if(!selText){selText=options.peri;selectAfter=true;}else if(options.replace){selText=options.peri;}else if(selText.charAt(selText.length-1)==' '){selText=selText.substring(0,selText.length-1);post+=' ';} |
462 | 461 | if(options.splitlines){selTextArr=selText.split(/\n/);} |