Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | array( |
155 | 155 | 'src' => 'js/plugins/jquery.wikiEditor.js', |
156 | 156 | 'class' => 'j.wikiEditor', |
157 | | - 'version' => 50 |
| 157 | + 'version' => 51 |
158 | 158 | ), |
159 | 159 | array( |
160 | 160 | 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', |
— | — | @@ -191,10 +191,10 @@ |
192 | 192 | 'version' => 1 ), |
193 | 193 | ), |
194 | 194 | 'combined' => array( |
195 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 151 ), |
| 195 | + array( 'src' => 'js/plugins.combined.js', 'version' => 152 ), |
196 | 196 | ), |
197 | 197 | 'minified' => array( |
198 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 151 ), |
| 198 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 152 ), |
199 | 199 | ), |
200 | 200 | ), |
201 | 201 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -525,7 +525,7 @@ |
526 | 526 | while ( ec.firstChild && ec.nodeName != '#text' ) { |
527 | 527 | ec = ec.firstChild; |
528 | 528 | } |
529 | | - var range = document.createRange(); |
| 529 | + var range = context.$iframe[0].contentWindow.document.createRange(); |
530 | 530 | range.setStart( sc, options.start ); |
531 | 531 | range.setEnd( ec, options.end ); |
532 | 532 | sel.removeAllRanges(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6887,7 +6887,7 @@ |
6888 | 6888 | while ( ec.firstChild && ec.nodeName != '#text' ) { |
6889 | 6889 | ec = ec.firstChild; |
6890 | 6890 | } |
6891 | | - var range = document.createRange(); |
| 6891 | + var range = context.$iframe[0].contentWindow.document.createRange(); |
6892 | 6892 | range.setStart( sc, options.start ); |
6893 | 6893 | range.setEnd( ec, options.end ); |
6894 | 6894 | sel.removeAllRanges(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | range.pasteHTML((pre+selText+post).replace(/\</g,'<').replace(/>/g,'>').replace(/\r?\n/g,'<br />'));} |
455 | 455 | context.$content.trigger('encapsulateSelection',[pre,options.peri,post,options.ownline,options.replace]);return context.$textarea;},'getCaretPosition':function(options){},'setSelection':function(options){var sc=options.startContainer,ec=options.endContainer;sc=sc.jquery?sc[0]:sc;ec=ec.jquery?ec[0]:ec;if(context.$iframe[0].contentWindow.getSelection){var sel=context.$iframe[0].contentWindow.getSelection();while(sc.firstChild&&sc.nodeName!='#text'){sc=sc.firstChild;} |
456 | 456 | while(ec.firstChild&&ec.nodeName!='#text'){ec=ec.firstChild;} |
457 | | -var range=document.createRange();range.setStart(sc,options.start);range.setEnd(ec,options.end);sel.removeAllRanges();sel.addRange(range);context.$iframe[0].contentWindow.focus();}else if(context.$iframe[0].contentWindow.document.body.createTextRange){var range=context.$iframe[0].contentWindow.document.body.createTextRange();range.moveToElementText(sc);range.moveStart('character',options.start);var range2=context.$iframe[0].contentWindow.document.body.createTextRange();range2.moveToElementText(ec);range2.collapse();range2.moveEnd('character',options.end);range.setEndPoint('EndToEnd',range2);range.select();}},'scrollToCaretPosition':function(options){},'scrollToTop':function($element,force){var html=context.$content.closest('html'),body=context.$content.closest('body'),parent=$('html');var y=$element.offset().top-context.$content.offset().top;y=parent.scrollTop()>0?y+html.scrollTop()-parent.scrollTop():y;if(force||y<html.scrollTop()||y>html.scrollTop()+context.$iframe.height()){html.scrollTop(y);} |
| 457 | +var range=context.$iframe[0].contentWindow.document.createRange();range.setStart(sc,options.start);range.setEnd(ec,options.end);sel.removeAllRanges();sel.addRange(range);context.$iframe[0].contentWindow.focus();}else if(context.$iframe[0].contentWindow.document.body.createTextRange){var range=context.$iframe[0].contentWindow.document.body.createTextRange();range.moveToElementText(sc);range.moveStart('character',options.start);var range2=context.$iframe[0].contentWindow.document.body.createTextRange();range2.moveToElementText(ec);range2.collapse();range2.moveEnd('character',options.end);range.setEndPoint('EndToEnd',range2);range.select();}},'scrollToCaretPosition':function(options){},'scrollToTop':function($element,force){var html=context.$content.closest('html'),body=context.$content.closest('body'),parent=$('html');var y=$element.offset().top-context.$content.offset().top;y=parent.scrollTop()>0?y+html.scrollTop()-parent.scrollTop():y;if(force||y<html.scrollTop()||y>html.scrollTop()+context.$iframe.height()){html.scrollTop(y);} |
458 | 458 | $element.trigger('scrollToTop');},'beforeSelection':function(selector,strict){if(typeof selector=='undefined'){selector='*';} |
459 | 459 | var e;if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);e=range.startContainer;}else if(context.$iframe[0].contentWindow.document.selection){return $([]);} |
460 | 460 | if(e.nodeName!='#text'){var newE=e.firstChild;for(var i=0;i<range.startOffset-1&&newE;i++){newE=newE.nextSibling;} |