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' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 114 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 115 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 47 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ), |
— | — | @@ -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' => 232 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 233 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 232 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 233 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -1170,16 +1170,16 @@ |
1171 | 1171 | |
1172 | 1172 | // Encapsulate the textarea with some containers for layout |
1173 | 1173 | context.$textarea |
| 1174 | + .after( |
| 1175 | + $( '<div></div>' ) |
| 1176 | + .addClass( 'wikiEditor-ui-loading' ) |
| 1177 | + .append( $( '<span>Loading</span>' ) |
| 1178 | + .css( 'marginTop', context.$textarea.height() / 2 ) ) ) |
1174 | 1179 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui' ) ) |
1175 | 1180 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
1176 | 1181 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
1177 | 1182 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-bottom' ) ) |
1178 | | - .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ) |
1179 | | - .after( |
1180 | | - $( '<div></div>' ) |
1181 | | - .addClass( 'wikiEditor-ui-loading' ) |
1182 | | - .append( $( '<span>Loading</span>' ) |
1183 | | - .css( 'marginTop', context.$textarea.height() / 2 ) ) ); |
| 1183 | + .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ); |
1184 | 1184 | // Get references to some of the newly created containers |
1185 | 1185 | context.$ui = context.$textarea.parent().parent().parent().parent().parent(); |
1186 | 1186 | context.$wikitext = context.$textarea.parent().parent().parent().parent(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7603,16 +7603,16 @@ |
7604 | 7604 | |
7605 | 7605 | // Encapsulate the textarea with some containers for layout |
7606 | 7606 | context.$textarea |
| 7607 | + .after( |
| 7608 | + $( '<div></div>' ) |
| 7609 | + .addClass( 'wikiEditor-ui-loading' ) |
| 7610 | + .append( $( '<span>Loading</span>' ) |
| 7611 | + .css( 'marginTop', context.$textarea.height() / 2 ) ) ) |
7607 | 7612 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui' ) ) |
7608 | 7613 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
7609 | 7614 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
7610 | 7615 | .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-bottom' ) ) |
7611 | | - .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ) |
7612 | | - .after( |
7613 | | - $( '<div></div>' ) |
7614 | | - .addClass( 'wikiEditor-ui-loading' ) |
7615 | | - .append( $( '<span>Loading</span>' ) |
7616 | | - .css( 'marginTop', context.$textarea.height() / 2 ) ) ); |
| 7616 | + .wrap( $( '<div></div>' ).addClass( 'wikiEditor-ui-text' ) ); |
7617 | 7617 | // Get references to some of the newly created containers |
7618 | 7618 | context.$ui = context.$textarea.parent().parent().parent().parent().parent(); |
7619 | 7619 | context.$wikitext = context.$textarea.parent().parent().parent().parent(); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -528,7 +528,7 @@ |
529 | 529 | pos=nextPos+(leavingP?1:0);if(t.node.nodeName=='#text'){lastTextNode=t.node;lastTextNodeDepth=t.depth;} |
530 | 530 | t=nextT;}},'saveSelection':function(){if(!$.browser.msie){return;} |
531 | 531 | context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
532 | | -context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};context.$textarea.wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text')).after($('<div></div>').addClass('wikiEditor-ui-loading').append($('<span>Loading</span>').css('marginTop',context.$textarea.height()/2)));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'tabindex':1,'src':wgScriptPath+'/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
| 532 | +context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};context.$textarea.after($('<div></div>').addClass('wikiEditor-ui-loading').append($('<span>Loading</span>').css('marginTop',context.$textarea.height()/2))).wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'tabindex':1,'src':wgScriptPath+'/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
533 | 533 | context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/&esc;/g,'&esc;esc;').replace(/\<p\>/g,'&esc;<p>').replace(/\<\/p\>/g,'&esc;</p>').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'&esc;<span class="wikiEditor-tab"></span>').replace(/ /g,'&esc;&nbsp;');if($.browser.msie){html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");}} |
534 | 534 | html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&nbsp;/g,' ').replace(/<p>/g,'<p>').replace(/<\/p>/g,'</p>').replace(/<p><\/p>/g,'<br>').replace(/&esc;&amp;nbsp;/g,'&nbsp;').replace(/&esc;&lt;p&gt;/g,'<p>').replace(/&esc;&lt;\/p&gt;/g,'</p>').replace(/&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"><\/span>').replace(/&esc;esc;/g,'&esc;');context.$content.html(html);context.oldHTML=html;context.history.push({'html':html});if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
535 | 535 | context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$('.wikiEditor-ui-loading').fadeOut('fast',function(){$(this).remove();});$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('paste',function(event){return context.fn.trigger('paste',event);}).bind('keyup paste mouseup cut encapsulateSelection',function(event){return context.fn.trigger('change',event);}).delayedBind(250,'keyup paste mouseup cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |