Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
86 | 86 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
87 | 87 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 22 ), |
88 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 43 ), |
| 88 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 44 ), |
89 | 89 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 12 ), |
90 | 90 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 40 ), |
91 | 91 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 10 ), |
— | — | @@ -94,10 +94,10 @@ |
95 | 95 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 1 ), |
96 | 96 | ), |
97 | 97 | 'combined' => array( |
98 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 139 ), |
| 98 | + array( 'src' => 'js/plugins.combined.js', 'version' => 140 ), |
99 | 99 | ), |
100 | 100 | 'minified' => array( |
101 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 139 ), |
| 101 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 140 ), |
102 | 102 | ), |
103 | 103 | ), |
104 | 104 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -555,13 +555,12 @@ |
556 | 556 | */ |
557 | 557 | 'scrollToTop': function( $element, force ) { |
558 | 558 | var html = context.$content.closest( 'html' ), |
559 | | - body = context.$content.closest( 'body' ); |
| 559 | + body = context.$content.closest( 'body' ), |
| 560 | + parent = $( 'html' ); |
560 | 561 | var y = $element.offset().top - context.$content.offset().top; |
561 | | - if ( force || y < html.scrollTop() || y < body.scrollTop() |
562 | | - || y > html.scrollTop() + context.$iframe.height() |
563 | | - || y > body.scrollTop() + context.$iframe.height() ) { |
| 562 | + y = parent.scrollTop() > 0 ? y + html.scrollTop() - parent.scrollTop() : y; |
| 563 | + if ( force || y < html.scrollTop() || y > html.scrollTop() + context.$iframe.height() ) { |
564 | 564 | html.scrollTop( y ); |
565 | | - body.scrollTop( y ); |
566 | 565 | } |
567 | 566 | $element.trigger( 'scrollToTop' ); |
568 | 567 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6922,13 +6922,12 @@ |
6923 | 6923 | */ |
6924 | 6924 | 'scrollToTop': function( $element, force ) { |
6925 | 6925 | var html = context.$content.closest( 'html' ), |
6926 | | - body = context.$content.closest( 'body' ); |
| 6926 | + body = context.$content.closest( 'body' ), |
| 6927 | + parent = $( 'html' ); |
6927 | 6928 | var y = $element.offset().top - context.$content.offset().top; |
6928 | | - if ( force || y < html.scrollTop() || y < body.scrollTop() |
6929 | | - || y > html.scrollTop() + context.$iframe.height() |
6930 | | - || y > body.scrollTop() + context.$iframe.height() ) { |
| 6929 | + y = parent.scrollTop() > 0 ? y + html.scrollTop() - parent.scrollTop() : y; |
| 6930 | + if ( force || y < html.scrollTop() || y > html.scrollTop() + context.$iframe.height() ) { |
6931 | 6931 | html.scrollTop( y ); |
6932 | | - body.scrollTop( y ); |
6933 | 6932 | } |
6934 | 6933 | $element.trigger( 'scrollToTop' ); |
6935 | 6934 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | if(lastNode){context.fn.scrollToTop(lastNode);}}else if(context.$iframe[0].contentWindow.document.selection){} |
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.selection){var range=document.selection.createRange();range.moveToElementText(sc);range.moveStart('character',options.start);var range2=document.selection.createRange();range2.moveToElementText(ec);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');var y=$element.offset().top-context.$content.offset().top;if(force||y<html.scrollTop()||y<body.scrollTop()||y>html.scrollTop()+context.$iframe.height()||y>body.scrollTop()+context.$iframe.height()){html.scrollTop(y);body.scrollTop(y);} |
| 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.selection){var range=document.selection.createRange();range.moveToElementText(sc);range.moveStart('character',options.start);var range2=document.selection.createRange();range2.moveToElementText(ec);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') |
459 | 459 | selector='*';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;} |