Index: trunk/extensions/UsabilityInitiative/Vector/Modules/EditWarning/EditWarning.js |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | fallbackWindowOnBeforeUnload = window.onbeforeunload; |
15 | 15 | window.onbeforeunload = function() { |
16 | 16 | var fallbackResult = undefined; |
17 | | - // Check if someone already set on onbeforunload hook |
| 17 | + // Check if someone already set on onbeforeunload hook |
18 | 18 | if ( fallbackWindowOnBeforeUnload ) { |
19 | 19 | // Get the result of their onbeforeunload hook |
20 | 20 | fallbackResult = fallbackWindowOnBeforeUnload(); |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | fallbackWindowOnBeforeUnload = window.onbeforeunload; |
190 | 190 | window.onbeforeunload = function() { |
191 | 191 | var fallbackResult = undefined; |
192 | | - // Check if someone already set on onbeforunload hook |
| 192 | + // Check if someone already set on onbeforeunload hook |
193 | 193 | if ( fallbackWindowOnBeforeUnload ) { |
194 | 194 | // Get the result of their onbeforeunload hook |
195 | 195 | fallbackResult = fallbackWindowOnBeforeUnload(); |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 18 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 15 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 21 ), |
78 | | - array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 33 ), |
| 78 | + array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 34 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 191 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 64 ), |
— | — | @@ -89,10 +89,10 @@ |
90 | 90 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 1 ), |
91 | 91 | ), |
92 | 92 | 'combined' => array( |
93 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 413 ), |
| 93 | + array( 'src' => 'js/plugins.combined.js', 'version' => 414 ), |
94 | 94 | ), |
95 | 95 | 'minified' => array( |
96 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 413 ), |
| 96 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 414 ), |
97 | 97 | ), |
98 | 98 | ), |
99 | 99 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js |
— | — | @@ -91,7 +91,9 @@ |
92 | 92 | } else if ( document.selection && document.selection.createRange ) { |
93 | 93 | // IE |
94 | 94 | $(this).focus(); |
95 | | - context.fn.restoreStuffForIE(); |
| 95 | + if ( context ) { |
| 96 | + context.fn.restoreStuffForIE(); |
| 97 | + } |
96 | 98 | var selText = $(this).textSelection( 'getSelection' ); |
97 | 99 | var scrollTop = this.scrollTop; |
98 | 100 | var range = document.selection.createRange(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6500,7 +6500,9 @@ |
6501 | 6501 | } else if ( document.selection && document.selection.createRange ) { |
6502 | 6502 | // IE |
6503 | 6503 | $(this).focus(); |
6504 | | - context.fn.restoreStuffForIE(); |
| 6504 | + if ( context ) { |
| 6505 | + context.fn.restoreStuffForIE(); |
| 6506 | + } |
6505 | 6507 | var selText = $(this).textSelection( 'getSelection' ); |
6506 | 6508 | var scrollTop = this.scrollTop; |
6507 | 6509 | var range = document.selection.createRange(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -430,7 +430,8 @@ |
431 | 431 | this.value=this.value.substring(0,startPos)+options.pre+selText+options.post+ |
432 | 432 | this.value.substring(endPos,this.value.length);this.scrollTop=scrollTop;if(window.opera){options.pre=options.pre.replace(/\r?\n/g,"\r\n");selText=selText.replace(/\r?\n/g,"\r\n");options.post=options.post.replace(/\r?\n/g,"\r\n");} |
433 | 433 | if(isSample){this.selectionStart=startPos+options.pre.length;this.selectionEnd=startPos+options.pre.length+selText.length;}else{this.selectionStart=startPos+options.pre.length+selText.length+ |
434 | | -options.post.length;this.selectionEnd=this.selectionStart;}}else if(document.selection&&document.selection.createRange){$(this).focus();context.fn.restoreStuffForIE();var selText=$(this).textSelection('getSelection');var scrollTop=this.scrollTop;var range=document.selection.createRange();if(options.ownline&&range.moveStart){var range2=document.selection.createRange();range2.collapse();range2.moveStart('character',-1);if(range2.text!="\r"&&range2.text!="\n"&&range2.text!=""){options.pre="\n"+options.pre;} |
| 434 | +options.post.length;this.selectionEnd=this.selectionStart;}}else if(document.selection&&document.selection.createRange){$(this).focus();if(context){context.fn.restoreStuffForIE();} |
| 435 | +var selText=$(this).textSelection('getSelection');var scrollTop=this.scrollTop;var range=document.selection.createRange();if(options.ownline&&range.moveStart){var range2=document.selection.createRange();range2.collapse();range2.moveStart('character',-1);if(range2.text!="\r"&&range2.text!="\n"&&range2.text!=""){options.pre="\n"+options.pre;} |
435 | 436 | var range3=document.selection.createRange();range3.collapse(false);range3.moveEnd('character',1);if(range3.text!="\r"&&range3.text!="\n"&&range3.text!=""){options.post+="\n";}} |
436 | 437 | checkSelectedText();range.text=options.pre+selText+options.post;if(isSample&&range.moveStart){range.moveStart('character',-options.post.length-selText.length);range.moveEnd('character',-options.post.length);} |
437 | 438 | range.select();this.scrollTop=scrollTop;} |