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' => 83 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 84 ), |
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' => 196 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 197 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 196 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 197 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -462,7 +462,6 @@ |
463 | 463 | // We need to figure out if the cursor is at the start or end of a line |
464 | 464 | var atStart = false, atEnd = false; |
465 | 465 | var body = context.$content.get( 0 ); |
466 | | - console.log(range); |
467 | 466 | if ( range.startOffset == 0 ) { |
468 | 467 | // Start of a line |
469 | 468 | // FIXME: Not necessarily the case with syntax highlighting or |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6886,7 +6886,6 @@ |
6887 | 6887 | // We need to figure out if the cursor is at the start or end of a line |
6888 | 6888 | var atStart = false, atEnd = false; |
6889 | 6889 | var body = context.$content.get( 0 ); |
6890 | | - console.log(range); |
6891 | 6890 | if ( range.startOffset == 0 ) { |
6892 | 6891 | // Start of a line |
6893 | 6892 | // FIXME: Not necessarily the case with syntax highlighting or |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(retval.toString){retval=retval.toString();} |
458 | 458 | 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+=' ';} |
459 | 459 | if(options.splitlines){selTextArr=selText.split(/\n/);} |
460 | | -if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){var atStart=false,atEnd=false;var body=context.$content.get(0);console.log(range);if(range.startOffset==0){atStart=true;}else if(range.startContainer==body){var n=body.firstChild;for(var i=0;i<range.startOffset-1&&n;i++){n=n.nextSibling;} |
| 460 | +if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){var atStart=false,atEnd=false;var body=context.$content.get(0);if(range.startOffset==0){atStart=true;}else if(range.startContainer==body){var n=body.firstChild;for(var i=0;i<range.startOffset-1&&n;i++){n=n.nextSibling;} |
461 | 461 | if(n&&n.nodeName=='BR'){atStart=true;}else{atEnd=true;}}else if(range.startContainer.nodeName=='#text'&&range.startOffset==range.startContainer.nodeValue.length){atEnd=true;} |
462 | 462 | if(!atStart){pre="\n"+options.pre;} |
463 | 463 | if(!atEnd){post+="\n";}} |