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' => 118 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 119 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 48 ), |
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' => 236 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 237 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 236 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 237 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | ); |
30 | 30 | static $messages = array( |
31 | 31 | 'wikieditor-wikitext-tab', |
| 32 | + 'wikieditor-loading', |
32 | 33 | ); |
33 | 34 | static $modules = array( |
34 | 35 | 'global' => array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.i18n.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | 'wikieditor' => 'Advanced wikitext editing interface', |
17 | 17 | 'wikieditor-desc' => 'Provides an extendable wikitext editing interface and many feature-providing modules', |
18 | 18 | 'wikieditor-wikitext-tab' => 'Wikitext', |
| 19 | + 'wikieditor-loading' => 'Loading', |
19 | 20 | ); |
20 | 21 | |
21 | 22 | /** Message documentation (Message documentation) |
— | — | @@ -26,6 +27,7 @@ |
27 | 28 | |
28 | 29 | I guess that 'feature-providing modules' means the same as 'modules providing features'.", |
29 | 30 | 'wikieditor-wikitext-tab' => 'Caption of the tab containing the edit box', |
| 31 | + 'wikieditor-loading' => 'Explanatory text for the temporary cover placed over the wikiediort while it\'s being assembled', |
30 | 32 | ); |
31 | 33 | |
32 | 34 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -1223,14 +1223,15 @@ |
1224 | 1224 | * as a response to the "resize" event. |
1225 | 1225 | */ |
1226 | 1226 | |
| 1227 | + // Assemble a temporary div to place over the wikiEditor while it's being constructed |
| 1228 | + var $loader = $( '<div></div>' ) |
| 1229 | + .addClass( 'wikiEditor-ui-loading' ) |
| 1230 | + .append( $( '<span>' + mw.usability.getMsg( 'wikieditor-loading' ) + '</span>' ) |
| 1231 | + .css( 'marginTop', context.$textarea.height() / 2 ) ); |
1227 | 1232 | // Encapsulate the textarea with some containers for layout |
1228 | 1233 | context.$textarea |
1229 | | - .after( |
1230 | | - $( '<div></div>' ) |
1231 | | - .addClass( 'wikiEditor-ui-loading' ) |
1232 | | - .append( $( '<span>Loading</span>' ) |
1233 | | - .css( 'marginTop', context.$textarea.height() / 2 ) ) ) |
1234 | | - .add( '.wikiEditor-ui-loading' ) |
| 1234 | + .after( $loader ) |
| 1235 | + .add( $loader ) |
1235 | 1236 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui' ) ) |
1236 | 1237 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
1237 | 1238 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7656,14 +7656,15 @@ |
7657 | 7657 | * as a response to the "resize" event. |
7658 | 7658 | */ |
7659 | 7659 | |
| 7660 | + // Assemble a temporary div to place over the wikiEditor while it's being constructed |
| 7661 | + var $loader = $( '<div></div>' ) |
| 7662 | + .addClass( 'wikiEditor-ui-loading' ) |
| 7663 | + .append( $( '<span>' + mw.usability.getMsg( 'wikieditor-loading' ) + '</span>' ) |
| 7664 | + .css( 'marginTop', context.$textarea.height() / 2 ) ); |
7660 | 7665 | // Encapsulate the textarea with some containers for layout |
7661 | 7666 | context.$textarea |
7662 | | - .after( |
7663 | | - $( '<div></div>' ) |
7664 | | - .addClass( 'wikiEditor-ui-loading' ) |
7665 | | - .append( $( '<span>Loading</span>' ) |
7666 | | - .css( 'marginTop', context.$textarea.height() / 2 ) ) ) |
7667 | | - .add( '.wikiEditor-ui-loading' ) |
| 7667 | + .after( $loader ) |
| 7668 | + .add( $loader ) |
7668 | 7669 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui' ) ) |
7669 | 7670 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui-view wikiEditor-ui-view-wikitext' ) ) |
7670 | 7671 | .wrapAll( $( '<div></div>' ).addClass( 'wikiEditor-ui-left' ) ) |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -534,7 +534,7 @@ |
535 | 535 | pos=nextPos+(leavingP?1:0);if(t.node.nodeName=='#text'){lastTextNode=t.node;lastTextNodeDepth=t.depth;} |
536 | 536 | t=nextT;}},'saveSelection':function(){if(!$.browser.msie){return;} |
537 | 537 | context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
538 | | -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))).add('.wikiEditor-ui-loading').wrapAll($('<div></div>').addClass('wikiEditor-ui')).wrapAll($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrapAll($('<div></div>').addClass('wikiEditor-ui-left')).wrapAll($('<div></div>').addClass('wikiEditor-ui-bottom')).wrapAll($('<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;}} |
| 538 | +context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};var $loader=$('<div></div>').addClass('wikiEditor-ui-loading').append($('<span>'+mw.usability.getMsg('wikieditor-loading')+'</span>').css('marginTop',context.$textarea.height()/2));context.$textarea.after($loader).add($loader).wrapAll($('<div></div>').addClass('wikiEditor-ui')).wrapAll($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrapAll($('<div></div>').addClass('wikiEditor-ui-left')).wrapAll($('<div></div>').addClass('wikiEditor-ui-bottom')).wrapAll($('<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;}} |
539 | 539 | 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 ");}} |
540 | 540 | 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');} |
541 | 541 | 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();}};} |