r62055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62054‎ | r62055 | r62056 >
Date:00:44, 6 February 2010
Author:werdna
Status:deferred
Tags:
Comment:
For usability initiative: merge r62041, r62043
Modified paths:
  • /branches/wmf-deployment/extensions/UsabilityInitiative (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js (modified) (history)
  • /branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -72,20 +72,20 @@
7373 array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ),
7474 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ),
7575 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ),
76 - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 105 ),
 76+ array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 107 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 47 ),
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ),
80 - array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 79 ),
 80+ array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 80 ),
8181 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 10 ),
8282 array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 17 ),
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 222 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 225 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 222 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 225 ),
9090 ),
9191 ),
9292 );
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js
___________________________________________________________________
Name: svn:mergeinfo
9393 -
9494 + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js
___________________________________________________________________
Name: svn:mergeinfo
9595 -
9696 + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -45,7 +45,7 @@
4646 // Text selection bugs galore - this may be a different situation with the new iframe-based solution
4747 'opera': [['>=', 9.6]],
4848 // This should be checked again, but the usage of Safari 3.0 and lower is so small it's not a priority
49 - 'safari': [['>=', 3.1]]
 49+ 'safari': [['>=', 4]]
5050 },
5151 // Right-to-left languages
5252 'rtl': {
@@ -58,7 +58,7 @@
5959 // Text selection bugs galore - this may be a different situation with the new iframe-based solution
6060 'opera': [['>=', 9.6]],
6161 // This should be checked again, but the usage of Safari 3.0 and lower is so small it's not a priority
62 - 'safari': [['>=', 3.1]]
 62+ 'safari': [['>=', 4]]
6363 }
6464 },
6565 /**
@@ -448,11 +448,6 @@
449449 .replace( /\r?\n/g, "" ) // IE7 inserts newlines before block elements
450450 .replace( / /g, " " ) // We inserted these to prevent IE from collapsing spaces
451451 .replace( /\<br[^\>]*\>\<\/p\>/gi, '</p>' ) // Remove trailing <br> from <p>
452 - // Firefox ends up with one too many empty paragraphs, so this reduced consective strings of them by 1
453 - if ( $.browser.firefox ) {
454 - html = html.replace( /\<p[^\>]*\>\<\/p\>(\<p[^\>]*\>\<\/p\>)*/gi, '$1' );
455 - }
456 - html = html
457452 .replace( /\<\/p\>\s*\<p[^\>]*\>/gi, "\n" ) // Easy case for <p> conversion
458453 .replace( /\<br[^\>]*\>/gi, "\n" ) // <br> conversion
459454 .replace( /\<\/p\>(\n*)\<p[^\>]*\>/gi, "$1\n" );
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6478,7 +6478,7 @@
64796479 // Text selection bugs galore - this may be a different situation with the new iframe-based solution
64806480 'opera': [['>=', 9.6]],
64816481 // This should be checked again, but the usage of Safari 3.0 and lower is so small it's not a priority
6482 - 'safari': [['>=', 3.1]]
 6482+ 'safari': [['>=', 4]]
64836483 },
64846484 // Right-to-left languages
64856485 'rtl': {
@@ -6491,7 +6491,7 @@
64926492 // Text selection bugs galore - this may be a different situation with the new iframe-based solution
64936493 'opera': [['>=', 9.6]],
64946494 // This should be checked again, but the usage of Safari 3.0 and lower is so small it's not a priority
6495 - 'safari': [['>=', 3.1]]
 6495+ 'safari': [['>=', 4]]
64966496 }
64976497 },
64986498 /**
@@ -6881,11 +6881,6 @@
68826882 .replace( /\r?\n/g, "" ) // IE7 inserts newlines before block elements
68836883 .replace( /&nbsp;/g, " " ) // We inserted these to prevent IE from collapsing spaces
68846884 .replace( /\<br[^\>]*\>\<\/p\>/gi, '</p>' ) // Remove trailing <br> from <p>
6885 - // Firefox ends up with one too many empty paragraphs, so this reduced consective strings of them by 1
6886 - if ( $.browser.firefox ) {
6887 - html = html.replace( /\<p[^\>]*\>\<\/p\>(\<p[^\>]*\>\<\/p\>)*/gi, '$1' );
6888 - }
6889 - html = html
68906885 .replace( /\<\/p\>\s*\<p[^\>]*\>/gi, "\n" ) // Easy case for <p> conversion
68916886 .replace( /\<br[^\>]*\>/gi, "\n" ) // <br> conversion
68926887 .replace( /\<\/p\>(\n*)\<p[^\>]*\>/gi, "$1\n" );
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -436,7 +436,7 @@
437437 options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;}
438438 var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;var needSave=false;if(hasIframe&&context.savedSelection!==null){context.fn.restoreSelection();needSave=true;}
439439 retval=(hasIframe?context.fn:fn)[command].call(this,options);if(hasIframe&&needSave){context.fn.saveSelection();}
440 -return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(){if(typeof $.wikiEditor.supported!='undefined'){return $.wikiEditor.supported;}
 440+return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(){if(typeof $.wikiEditor.supported!='undefined'){return $.wikiEditor.supported;}
441441 if(!($.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return $.wikiEditor.supported=true;}
442442 var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return $.wikiEditor.supported=false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return $.wikiEditor.supported=false;}}}
443443 return $.wikiEditor.supported=true;},'autoMsg':function(object,property){if(typeof property=='object'){for(var i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}}
@@ -456,9 +456,7 @@
457457 event.preventDefault();return false;}).text($.wikiEditor.autoMsg(options,'title'))).appendTo(context.$tabs);}
458458 if(!context.$tabs.children().size()){addTab({'name':'wikitext','titleMsg':'wikieditor-wikitext-tab'});}
459459 addTab(options);return $('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-'+options.name).hide().appendTo(context.$ui);},'htmlToText':function(html){if(html in context.htmlToTextMap){return context.htmlToTextMap[html];}
460 -var origHTML=html;html=html.replace(/\r?\n/g,"").replace(/&nbsp;/g," ").replace(/\<br[^\>]*\>\<\/p\>/gi,'</p>')
461 -if($.browser.firefox){html=html.replace(/\<p[^\>]*\>\<\/p\>(\<p[^\>]*\>\<\/p\>)*/gi,'$1');}
462 -html=html.replace(/\<\/p\>\s*\<p[^\>]*\>/gi,"\n").replace(/\<br[^\>]*\>/gi,"\n").replace(/\<\/p\>(\n*)\<p[^\>]*\>/gi,"$1\n");var leading=html.match(/^\s*/)[0];var trailing=html.match(/\s*$/)[0];html=html.substr(leading.length,html.length-leading.length-trailing.length);var $pre=$('<pre>'+html+'</pre>');$pre.find('.wikiEditor-noinclude').each(function(){$(this).remove();});$pre.find('.wikiEditor-tab').each(function(){$(this).text("\t");});$pre.find('br').each(function(){$(this).replaceWith("\n");});$pre.find('p').each(function(){var text=$(this).text();var t=new context.fn.rawTraverser(this.firstChild,0,this,$pre.get(0)).prev();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.prev();}
 460+var origHTML=html;html=html.replace(/\r?\n/g,"").replace(/&nbsp;/g," ").replace(/\<br[^\>]*\>\<\/p\>/gi,'</p>').replace(/\<\/p\>\s*\<p[^\>]*\>/gi,"\n").replace(/\<br[^\>]*\>/gi,"\n").replace(/\<\/p\>(\n*)\<p[^\>]*\>/gi,"$1\n");var leading=html.match(/^\s*/)[0];var trailing=html.match(/\s*$/)[0];html=html.substr(leading.length,html.length-leading.length-trailing.length);var $pre=$('<pre>'+html+'</pre>');$pre.find('.wikiEditor-noinclude').each(function(){$(this).remove();});$pre.find('.wikiEditor-tab').each(function(){$(this).text("\t");});$pre.find('br').each(function(){$(this).replaceWith("\n");});$pre.find('p').each(function(){var text=$(this).text();var t=new context.fn.rawTraverser(this.firstChild,0,this,$pre.get(0)).prev();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.prev();}
463461 if(t){text="\n"+text;}
464462 t=new context.fn.rawTraverser(this.lastChild,0,this,$pre.get(0)).next();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.next();}
465463 if(t&&!t.inP&&t.node.nodeName=='#text'&&t.node.nodeValue.charAt(0)!='\n'&&t.node.nodeValue.charAt(0)!='\r'){text+="\n";}
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative
___________________________________________________________________
Name: svn:mergeinfo
466464 + /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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62041Removed some of the paragraph collapsing that I thought was needed based on m...tparscal18:56, 5 February 2010
r62043Dropped support for Safari 3 for now, until problems therein and be solved.tparscal19:25, 5 February 2010

Status & tagging log