Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/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' => 26 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 76 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 77 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 25 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 45 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 11 ), |
— | — | @@ -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' => 188 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 189 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 188 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 189 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/Modules/Toolbar/Toolbar.i18n.php |
— | — | @@ -4154,6 +4154,7 @@ |
4155 | 4155 | |
4156 | 4156 | /** Basque (Euskara) |
4157 | 4157 | * @author An13sa |
| 4158 | + * @author Inorbez |
4158 | 4159 | * @author Kobazulo |
4159 | 4160 | * @author Theklan |
4160 | 4161 | */ |
— | — | @@ -4192,7 +4193,7 @@ |
4193 | 4194 | 'wikieditor-toolbar-tool-file-example' => 'Adibidea.jpg', |
4194 | 4195 | 'wikieditor-toolbar-tool-reference' => 'Erreferentzia', |
4195 | 4196 | 'wikieditor-toolbar-tool-reference-example' => 'Txertatu testu oina hemen', |
4196 | | - 'wikieditor-toolbar-tool-signature' => 'SInadura data eta orduarekin', |
| 4197 | + 'wikieditor-toolbar-tool-signature' => 'Sinadura data eta orduarekin', |
4197 | 4198 | 'wikieditor-toolbar-section-advanced' => 'Aurreratua', |
4198 | 4199 | 'wikieditor-toolbar-tool-heading' => 'Izenburua', |
4199 | 4200 | 'wikieditor-toolbar-tool-heading-1' => '1. Maila', |
— | — | @@ -7993,9 +7994,10 @@ |
7994 | 7995 | |
7995 | 7996 | /** Cornish (Kernowek) |
7996 | 7997 | * @author Kernoweger |
| 7998 | + * @author Kw-Moon |
7997 | 7999 | */ |
7998 | 8000 | $messages['kw'] = array( |
7999 | | - 'wikieditor-toolbar-tool-link-cancel' => 'Hedhy', |
| 8001 | + 'wikieditor-toolbar-tool-link-cancel' => 'Hedhi', |
8000 | 8002 | 'wikieditor-toolbar-help-page-discussion' => 'Dadhelva', |
8001 | 8003 | ); |
8002 | 8004 | |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.textSelection.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
8003 | 8005 | - |
8004 | 8006 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:61584-61604 |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.cookie.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
8005 | 8007 | - |
8006 | 8008 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:61584-61604 |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.js |
— | — | @@ -369,6 +369,8 @@ |
370 | 370 | .replace( / /g, " " ) // We inserted these to prevent IE from collapsing spaces |
371 | 371 | .replace( /\<p[^\>]*\>/gi, "\n" ) // IE uses </p><p> for user-inserted line breaks |
372 | 372 | .replace( /\<\/p[^\>]*\>/gi, "" ) |
| 373 | + .replace( /\<div[^\>]*\>/gi, "\n" ) // Webkit uses </div><div> for user-inserted line breaks |
| 374 | + .replace( /\<\/div[^\>]*\>/gi, "" ) |
373 | 375 | + '</pre>' ); |
374 | 376 | // Get rid of the noincludes when getting text |
375 | 377 | $pre.find( '.wikiEditor-noinclude' ).each( function() { $( this ).remove(); } ); |
— | — | @@ -920,7 +922,8 @@ |
921 | 923 | context.$content = $( context.$iframe[0].contentWindow.document.body ); |
922 | 924 | // If we just do "context.$content.text( context.$textarea.val() )", Internet Explorer will strip out the |
923 | 925 | // whitespace charcters, specifically "\n" - so we must manually encode the text and append it |
924 | | - var html = context.$textarea.val().replace( /\</g, '<' ).replace( /\>/g, '>' ); |
| 926 | + // TODO: Refactor this into a textToHtml() function |
| 927 | + var html = context.$textarea.val(); |
925 | 928 | // We must do some extra processing on IE to avoid dirty diffs, specifically IE will collapse leading spaces |
926 | 929 | if ( $.browser.msie ) { |
927 | 930 | // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
— | — | @@ -934,7 +937,14 @@ |
935 | 938 | } |
936 | 939 | html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
937 | 940 | } |
938 | | - context.$content.html( html.replace( /\r?\n/g, '<br />' ) ); |
| 941 | + // Use a dummy div to escape all entities |
| 942 | + // This'll also escape <br>, <span> and , so we unescape those after |
| 943 | + html = $( '<div />' ).text( html.replace( /\r?\n/g, '<br>' ) ).html() |
| 944 | + .replace( /&nbsp;/g, ' ' ) |
| 945 | + .replace( /<br>/g, '<br>' ) |
| 946 | + .replace( /<span class="wikiEditor-tab"><\/span>/g, '<span class="wikiEditor-tab"></span>' ); |
| 947 | + context.$content.html( html ); |
| 948 | + |
939 | 949 | // Reflect direction of parent frame into child |
940 | 950 | if ( $( 'body' ).is( '.rtl' ) ) { |
941 | 951 | context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.js |
— | — | @@ -6793,6 +6793,8 @@ |
6794 | 6794 | .replace( / /g, " " ) // We inserted these to prevent IE from collapsing spaces |
6795 | 6795 | .replace( /\<p[^\>]*\>/gi, "\n" ) // IE uses </p><p> for user-inserted line breaks |
6796 | 6796 | .replace( /\<\/p[^\>]*\>/gi, "" ) |
| 6797 | + .replace( /\<div[^\>]*\>/gi, "\n" ) // Webkit uses </p><p> for user-inserted line breaks |
| 6798 | + .replace( /\<\/div[^\>]*\>/gi, "" ) |
6797 | 6799 | + '</pre>' ); |
6798 | 6800 | // Get rid of the noincludes when getting text |
6799 | 6801 | $pre.find( '.wikiEditor-noinclude' ).each( function() { $( this ).remove(); } ); |
— | — | @@ -7344,7 +7346,8 @@ |
7345 | 7347 | context.$content = $( context.$iframe[0].contentWindow.document.body ); |
7346 | 7348 | // If we just do "context.$content.text( context.$textarea.val() )", Internet Explorer will strip out the |
7347 | 7349 | // whitespace charcters, specifically "\n" - so we must manually encode the text and append it |
7348 | | - var html = context.$textarea.val().replace( /\</g, '<' ).replace( /\>/g, '>' ); |
| 7350 | + // TODO: Refactor this into a textToHtml() function |
| 7351 | + var html = context.$textarea.val(); |
7349 | 7352 | // We must do some extra processing on IE to avoid dirty diffs, specifically IE will collapse leading spaces |
7350 | 7353 | if ( $.browser.msie ) { |
7351 | 7354 | // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
— | — | @@ -7358,7 +7361,14 @@ |
7359 | 7362 | } |
7360 | 7363 | html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
7361 | 7364 | } |
7362 | | - context.$content.html( html.replace( /\r?\n/g, '<br />' ) ); |
| 7365 | + // Use a dummy div to escape all entities |
| 7366 | + // This'll also escape <br>, <span> and , so we unescape those after |
| 7367 | + html = $( '<div />' ).text( html.replace( /\r?\n/g, '<br>' ) ).html() |
| 7368 | + .replace( /&nbsp;/g, ' ' ) |
| 7369 | + .replace( /<br>/g, '<br>' ) |
| 7370 | + .replace( /<span class="wikiEditor-tab"><\/span>/g, '<span class="wikiEditor-tab"></span>' ); |
| 7371 | + context.$content.html( html ); |
| 7372 | + |
7363 | 7373 | // Reflect direction of parent frame into child |
7364 | 7374 | if ( $( 'body' ).is( '.rtl' ) ) { |
7365 | 7375 | context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' ); |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.min.js |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | event.preventDefault();return false;}).text($.wikiEditor.autoMsg(options,'title'))).appendTo(context.$tabs);} |
451 | 451 | if(!context.$tabs.children().size()){addTab({'name':'wikitext','titleMsg':'wikieditor-wikitext-tab'});} |
452 | 452 | addTab(options);return $('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-'+options.name).hide().appendTo(context.$ui);},'htmlToText':function(html){var $pre=$('<pre>'+ |
453 | | -html.replace(/\r?\n/g,"").replace(/\<br[^\>]*\>/gi,"\n").replace(/ /g," ").replace(/\<p[^\>]*\>/gi,"\n").replace(/\<\/p[^\>]*\>/gi,"") |
| 453 | +html.replace(/\r?\n/g,"").replace(/\<br[^\>]*\>/gi,"\n").replace(/ /g," ").replace(/\<p[^\>]*\>/gi,"\n").replace(/\<\/p[^\>]*\>/gi,"").replace(/\<div[^\>]*\>/gi,"\n").replace(/\<\/div[^\>]*\>/gi,"") |
454 | 454 | +'</pre>');$pre.find('.wikiEditor-noinclude').each(function(){$(this).remove();});$pre.find('.wikiEditor-tab').each(function(){$(this).text("\t")});return $pre.text();},'getContents':function(){return context.fn.htmlToText(context.$content.html());},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();}else if(context.$iframe[0].contentWindow.document.selection){retval=context.$iframe[0].contentWindow.document.selection.createRange();} |
455 | 455 | if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(retval.toString){retval=retval.toString();} |
456 | 456 | return retval;},'encapsulateSelection':function(options){var selText=$(this).textSelection('getSelection');var selTextArr;var selectAfter=false;var pre=options.pre,post=options.post;if(!selText){selText=options.peri;selectAfter=true;}else if(options.replace){selText=options.peri;}else if(selText.charAt(selText.length-1)==' '){selText=selText.substring(0,selText.length-1);post+=' ';} |
— | — | @@ -494,9 +494,9 @@ |
495 | 495 | var nextPos=t.node.nodeName=='#text'?pos+t.node.nodeValue.length:pos+1;var nextT=t.next();var leavingP=t.inP&&nextT&&!nextT.inP;context.offsets[pos]={'node':t.node,'offset':0,'length':nextPos-pos+(leavingP?1:0),'depth':t.depth,'lastTextNode':lastTextNode,'lastTextNodeDepth':lastTextNodeDepth};if(leavingP){context.offsets[nextPos]={'node':t.node,'offset':nextPos-pos,'length':nextPos-pos+1,'depth':t.depth,'lastTextNode':lastTextNode,'lastTextNodeDepth':lastTextNodeDepth};} |
496 | 496 | pos=nextPos+(leavingP?1:0);if(t.node.nodeName=='#text'){lastTextNode=t.node;lastTextNodeDepth=t.depth;} |
497 | 497 | t=nextT;}}};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'));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,'src':wgScriptPath+'/extensions/UsabilityInitiative_alpha/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;}} |
498 | | -context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/\</g,'<').replace(/\>/g,'>');if($.browser.msie){if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");} |
| 498 | +context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val();if($.browser.msie){if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");} |
499 | 499 | html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');} |
500 | | -context.$content.html(html.replace(/\r?\n/g,'<br />'));if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
| 500 | +html=$('<div />').text(html.replace(/\r?\n/g,'<br>')).html().replace(/&nbsp;/g,' ').replace(/<br>/g,'<br>').replace(/<span class="wikiEditor-tab"><\/span>/g,'<span class="wikiEditor-tab"></span>');context.$content.html(html);if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
501 | 501 | context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('change',event);}).delayedBind(250,'keyup mouseup paste 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'));return context.fallbackWindowOnBeforeUnload?context.fallbackWindowOnBeforeUnload():null;}} |
502 | 502 | arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,typeof arguments[0]=='undefined'?{}:arguments[0]);}} |
503 | 503 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha |
___________________________________________________________________ |
Name: svn:mergeinfo |
504 | 504 | + /branches/REL1_15/phase3/extensions/UsabilityInitiative_alpha:51646 |
/trunk/extensions/UsabilityInitiative:61584-61604 |
/trunk/extensions/UsabilityInitiative_alpha:56207,56209,56296,56333,56355 |
/trunk/phase3/extensions/UsabilityInitiative_alpha:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |