Index: branches/wmf-deployment/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' => 107 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 111 ), |
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' => 225 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 229 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 225 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 229 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/OptIn |
___________________________________________________________________ |
Name: svn:mergeinfo |
93 | 93 | - /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646 |
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62140 |
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
94 | 94 | + /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646 |
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62140,62143,62146 |
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
95 | 95 | - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043 |
96 | 96 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62143,62146 |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
97 | 97 | - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043 |
98 | 98 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62143,62146 |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -1188,25 +1188,26 @@ |
1189 | 1189 | // If we just do "context.$content.text( context.$textarea.val() )", Internet Explorer will strip out the |
1190 | 1190 | // whitespace charcters, specifically "\n" - so we must manually encode the text and append it |
1191 | 1191 | // TODO: Refactor this into a textToHtml() function |
1192 | | - // Because we're gonna insert instances of <br>, and <span class="wikiEditor-tab"></span>, |
1193 | | - // we have to escape existing instances first. This'll cause them to be double-escaped, which we |
1194 | | - // fix later on |
1195 | 1192 | var html = context.$textarea.val() |
1196 | | - .replace( / /g, '&nbsp;' ) |
1197 | | - .replace( /\<br\>/g, '<br>' ) |
1198 | | - .replace( /\<span class="wikiEditor-tab"\>\<\/span\>/g, '<span class="wikiEditor-tab"></span>' ); |
| 1193 | + // We're gonna use &esc; as an escape sequence |
| 1194 | + .replace( /&esc;/g, '&esc;esc;' ) |
| 1195 | + // Escape existing uses of <p>, </p>, and <span class="wikiEditor-tab"></span> |
| 1196 | + .replace( /\<p\>/g, '&esc;<p>' ) |
| 1197 | + .replace (/\<\/p\>/g, '&esc;</p>' ) |
| 1198 | + .replace( /\<span class="wikiEditor-tab"\>\<\/span\>/g, '&esc;<span class="wikiEditor-tab"></span>' ) |
| 1199 | + .replace( / /g, '&esc;&nbsp;' ); |
1199 | 1200 | // We must do some extra processing on IE to avoid dirty diffs, specifically IE will collapse leading spaces |
| 1201 | + // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
1200 | 1202 | if ( $.browser.msie ) { |
1201 | | - // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
| 1203 | + html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
1202 | 1204 | if ( $.browser.versionNumber <= 7 ) { |
1203 | 1205 | // Replace all spaces matching - IE <= 7 needs this because of its overzealous |
1204 | | - // whitespace collapsing; |
| 1206 | + // whitespace collapsing |
1205 | 1207 | html = html.replace( / /g, " " ); |
1206 | 1208 | } else { |
1207 | 1209 | // IE8 is happy if we just convert the first leading space to |
1208 | 1210 | html = html.replace( /(^|\n) /g, "$1 " ); |
1209 | 1211 | } |
1210 | | - html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
1211 | 1212 | } |
1212 | 1213 | // Use a dummy div to escape all entities |
1213 | 1214 | // This'll also escape <br>, <span> and , so we unescape those after |
— | — | @@ -1218,10 +1219,12 @@ |
1219 | 1220 | .replace( /<\/p>/g, '</p>' ) |
1220 | 1221 | // Empty p tags should just be br tags |
1221 | 1222 | .replace( /<p><\/p>/g, '<br>' ) |
1222 | | - .replace( /<span class="wikiEditor-tab"><\/span>/g, '<span class="wikiEditor-tab"></span>' ) |
1223 | | - .replace( /&amp;nbsp;/g, '&nbsp;' ) |
1224 | | - .replace( /&lt;br&gt;/g, '<br>' ) |
1225 | | - .replace( /&lt;span class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g, '<span class="wikiEditor-tab"></span>' ); |
| 1223 | + // Unescape &esc; stuff |
| 1224 | + .replace( /&esc;&amp;nbsp;/g, '&nbsp;' ) |
| 1225 | + .replace( /&esc;&lt;p&gt;/g, '<p>' ) |
| 1226 | + .replace( /&esc;&lt;\/p&gt;/g, '</p>' ) |
| 1227 | + .replace( /&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g, '<span class="wikiEditor-tab"><\/span>' ) |
| 1228 | + .replace( /&esc;esc;/g, '&esc;' ); |
1226 | 1229 | context.$content.html( html ); |
1227 | 1230 | context.oldHTML = html; |
1228 | 1231 | // FIXME: This needs to be merged somehow with the oldHTML thing |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7621,25 +7621,26 @@ |
7622 | 7622 | // If we just do "context.$content.text( context.$textarea.val() )", Internet Explorer will strip out the |
7623 | 7623 | // whitespace charcters, specifically "\n" - so we must manually encode the text and append it |
7624 | 7624 | // TODO: Refactor this into a textToHtml() function |
7625 | | - // Because we're gonna insert instances of <br>, and <span class="wikiEditor-tab"></span>, |
7626 | | - // we have to escape existing instances first. This'll cause them to be double-escaped, which we |
7627 | | - // fix later on |
7628 | 7625 | var html = context.$textarea.val() |
7629 | | - .replace( / /g, '&nbsp;' ) |
7630 | | - .replace( /\<br\>/g, '<br>' ) |
7631 | | - .replace( /\<span class="wikiEditor-tab"\>\<\/span\>/g, '<span class="wikiEditor-tab"></span>' ); |
| 7626 | + // We're gonna use &esc; as an escape sequence |
| 7627 | + .replace( /&esc;/g, '&esc;esc;' ) |
| 7628 | + // Escape existing uses of <p>, </p>, and <span class="wikiEditor-tab"></span> |
| 7629 | + .replace( /\<p\>/g, '&esc;<p>' ) |
| 7630 | + .replace (/\<\/p\>/g, '&esc;</p>' ) |
| 7631 | + .replace( /\<span class="wikiEditor-tab"\>\<\/span\>/g, '&esc;<span class="wikiEditor-tab"></span>' ) |
| 7632 | + .replace( / /g, '&esc;&nbsp;' ); |
7632 | 7633 | // We must do some extra processing on IE to avoid dirty diffs, specifically IE will collapse leading spaces |
| 7634 | + // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
7633 | 7635 | if ( $.browser.msie ) { |
7634 | | - // Browser sniffing is not ideal, but executing this code on a non-broken browser doesn't cause harm |
| 7636 | + html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
7635 | 7637 | if ( $.browser.versionNumber <= 7 ) { |
7636 | 7638 | // Replace all spaces matching - IE <= 7 needs this because of its overzealous |
7637 | | - // whitespace collapsing; |
| 7639 | + // whitespace collapsing |
7638 | 7640 | html = html.replace( / /g, " " ); |
7639 | 7641 | } else { |
7640 | 7642 | // IE8 is happy if we just convert the first leading space to |
7641 | 7643 | html = html.replace( /(^|\n) /g, "$1 " ); |
7642 | 7644 | } |
7643 | | - html = html.replace( /\t/g, '<span class="wikiEditor-tab"></span>' ); |
7644 | 7645 | } |
7645 | 7646 | // Use a dummy div to escape all entities |
7646 | 7647 | // This'll also escape <br>, <span> and , so we unescape those after |
— | — | @@ -7651,10 +7652,12 @@ |
7652 | 7653 | .replace( /<\/p>/g, '</p>' ) |
7653 | 7654 | // Empty p tags should just be br tags |
7654 | 7655 | .replace( /<p><\/p>/g, '<br>' ) |
7655 | | - .replace( /<span class="wikiEditor-tab"><\/span>/g, '<span class="wikiEditor-tab"></span>' ) |
7656 | | - .replace( /&amp;nbsp;/g, '&nbsp;' ) |
7657 | | - .replace( /&lt;br&gt;/g, '<br>' ) |
7658 | | - .replace( /&lt;span class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g, '<span class="wikiEditor-tab"></span>' ); |
| 7656 | + // Unescape &esc; stuff |
| 7657 | + .replace( /&esc;&amp;nbsp;/g, '&nbsp;' ) |
| 7658 | + .replace( /&esc;&lt;p&gt;/g, '<p>' ) |
| 7659 | + .replace( /&esc;&lt;\/p&gt;/g, '</p>' ) |
| 7660 | + .replace( /&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g, '<span class="wikiEditor-tab"><\/span>' ) |
| 7661 | + .replace( /&esc;esc;/g, '&esc;' ); |
7659 | 7662 | context.$content.html( html ); |
7660 | 7663 | context.oldHTML = html; |
7661 | 7664 | // FIXME: This needs to be merged somehow with the oldHTML thing |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -520,9 +520,8 @@ |
521 | 521 | t=nextT;}},'saveSelection':function(){if(!$.browser.msie){return;} |
522 | 522 | context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
523 | 523 | 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'));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/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;}} |
524 | | -context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/ /g,'&nbsp;').replace(/\<br\>/g,'<br>').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'<span class="wikiEditor-tab"></span>');if($.browser.msie){if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");} |
525 | | -html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');} |
526 | | -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(/<span class="wikiEditor-tab"><\/span>/g,'<span class="wikiEditor-tab"></span>').replace(/&amp;nbsp;/g,'&nbsp;').replace(/&lt;br&gt;/g,'<br>').replace(/&lt;span class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"></span>');context.$content.html(html);context.oldHTML=html;context.history.push({'html':html});if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
| 524 | +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 ");}} |
| 525 | +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');} |
527 | 526 | context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('keyup mouseup paste cut encapsulateSelection',function(event){return 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'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |
528 | 527 | var args=$.makeArray(arguments);if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}} |
529 | 528 | 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 |
___________________________________________________________________ |
Name: svn:mergeinfo |
530 | 529 | - /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646 |
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043 |
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
531 | 530 | + /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646 |
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62143,62146 |
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |