r61669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61668‎ | r61669 | r61670 >
Date:17:22, 29 January 2010
Author:adam
Status:ok
Tags:
Comment:
Removing the console.log() call introduced in r61637
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -72,7 +72,7 @@
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' => 26 ),
76 - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 83 ),
 76+ array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 84 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 26 ),
7878 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 45 ),
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 11 ),
@@ -82,10 +82,10 @@
8383 array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ),
8484 ),
8585 'combined' => array(
86 - array( 'src' => 'js/plugins.combined.js', 'version' => 196 ),
 86+ array( 'src' => 'js/plugins.combined.js', 'version' => 197 ),
8787 ),
8888 'minified' => array(
89 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 196 ),
 89+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 197 ),
9090 ),
9191 ),
9292 );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -462,7 +462,6 @@
463463 // We need to figure out if the cursor is at the start or end of a line
464464 var atStart = false, atEnd = false;
465465 var body = context.$content.get( 0 );
466 - console.log(range);
467466 if ( range.startOffset == 0 ) {
468467 // Start of a line
469468 // FIXME: Not necessarily the case with syntax highlighting or
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6886,7 +6886,6 @@
68876887 // We need to figure out if the cursor is at the start or end of a line
68886888 var atStart = false, atEnd = false;
68896889 var body = context.$content.get( 0 );
6890 - console.log(range);
68916890 if ( range.startOffset == 0 ) {
68926891 // Start of a line
68936892 // FIXME: Not necessarily the case with syntax highlighting or
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -456,7 +456,7 @@
457457 if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(retval.toString){retval=retval.toString();}
458458 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+=' ';}
459459 if(options.splitlines){selTextArr=selText.split(/\n/);}
460 -if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){var atStart=false,atEnd=false;var body=context.$content.get(0);console.log(range);if(range.startOffset==0){atStart=true;}else if(range.startContainer==body){var n=body.firstChild;for(var i=0;i<range.startOffset-1&&n;i++){n=n.nextSibling;}
 460+if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){var atStart=false,atEnd=false;var body=context.$content.get(0);if(range.startOffset==0){atStart=true;}else if(range.startContainer==body){var n=body.firstChild;for(var i=0;i<range.startOffset-1&&n;i++){n=n.nextSibling;}
461461 if(n&&n.nodeName=='BR'){atStart=true;}else{atEnd=true;}}else if(range.startContainer.nodeName=='#text'&&range.startOffset==range.startContainer.nodeValue.length){atEnd=true;}
462462 if(!atStart){pre="\n"+options.pre;}
463463 if(!atEnd){post+="\n";}}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61637UsabilityInitiative: Rewrite the Firefox branch of ownline handling to be mor...catrope16:00, 28 January 2010

Status & tagging log