r83162 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83161‎ | r83162 | r83163 >
Date:19:34, 3 March 2011
Author:kipcool
Status:deferred
Tags:
Comment:
removed urlFieldChanged
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/suggest.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -662,7 +662,7 @@
663663 $linkEditor = new LinkEditor( $o->link, new SimplePermissionController( true ), true );
664664 else {
665665 $linkEditor = new RecordTableCellEditor( $o->link );
666 - $linkEditor->addEditor( new ShortTextEditor( $o->linkURL, new SimplePermissionController( true ), true, "urlFieldChanged(this);" ) );
 666+ $linkEditor->addEditor( new ShortTextEditor( $o->linkURL, new SimplePermissionController( true ), true ) );
667667 $linkEditor->addEditor( new ShortTextEditor( $o->linkLabel, new SimplePermissionController( true ), true ) );
668668 }
669669
Index: trunk/extensions/Wikidata/OmegaWiki/suggest.js
@@ -773,22 +773,6 @@
774774 return value;
775775 }
776776
777 -function urlFieldChanged(urlField) {
778 - var labelField = document.getElementById(stripSuffix(urlField.id, "url") + "label");
779 - var url = urlField.value;
780 -
781 - if (startsWith(url, "http://www.ncbi.nlm.nih.gov") ) {
782 - pubMedIdRec = ExtractText( url, "TermToSearch=", 0, "&ordinalpos", 0 );
783 - if ( pubMedIdRec != null ){
784 - labelField.value = getPubMedTitle(pubMedIdRec[1]);
785 - }
786 - }
787 - else if ( IsNumeric( url ) ){
788 - labelField.value = getPubMedTitle(trim(url));
789 - urlField.value = "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=ShowDetailView&TermToSearch=" + trim(url) + "&ordinalpos=1&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum";
790 - }
791 -}
792 -
793777 // Knewco specific Javascript
794778
795779 function GetOffset( text, Pattern, inclusive ){

Status & tagging log