Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

WebGUI.php

Go to the documentation of this file.
00001 <?
00002 
00003 /***************************************************************************
00004  *   Copyright (C) 2005 by Ferenc Veres   *
00005  *   lion@netngine.hu   *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 include('WebBackend.php');
00023 
00024 $backend = new WebBackend();
00025 $backend->EventHandler();
00026 
00027 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00028 <html>
00029 <head>
00030 <title>TranslationMemory</title>
00031 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
00032 <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
00033 <script type="text/javascript" src="diff.js"></script>
00034 </head>
00035 <body>
00036 <form action="WebGUI.php" method="post" name="__Form" id="__Form">
00037 <input type="hidden" name="__Event" value="" id="__Event" />
00038 
00039 <!-- backend variables -->
00040 <input type="hidden" name="xStringID" value="<? echo $backend->xStringID ?>" id="xStringID" />
00041 <input type="hidden" name="xProjectID" value="<? echo $backend->xProjectID ?>" id="xProjectID" />
00042 <input type="hidden" name="xOldLocaleID" value="<? echo $backend->xOldLocaleID ?>" id="xOldLocaleID" />
00043 
00044 <input type="hidden" name="xStringStack" value="<? echo $backend->xStringStack ?>" id="xStringStack" />
00045 <input type="hidden" name="xBrowserHelper" value="<? echo $backend->xBrowserHelper ?>" id="xBrowserHelper" />
00046 <input type="hidden" name="xDelStringID" value="0" id="xDelStringID" />
00047 
00048 <!-- client side variables -->
00049 <input type="hidden" name="htmlEditorChanged" value="0" id="htmlEditorChanged" />
00050 <input type="hidden" name="htmlOriginalString" value="<?
00051         if(!empty($backend->LocatedString))
00052         {
00053                 echo FixQuot($backend->LocatedString->GetOriginal());
00054         }
00055         ?>" id="htmlOriginalString"/>
00056 
00057 <table class="layout">
00058 <tr><td valign="top" class="projecttree">
00059 
00060         <!-- *** PROJECT TREE *** -->
00061 
00062 <?
00063         if(!empty($backend->LocatedProjects))
00064         {
00065                 // Display project path down from root to current in nested LI-st.
00066                 for($i = count($backend->LocatedProjects)-1; $i >= 0; $i--)
00067                 {
00068                         echo "<ul class=\"projecttree\">\n<li><a href=\"javascript:__TriggerEvent('setproject', true, 'xProjectID','". $backend->LocatedProjects[$i]->GetID()."')\">";
00069                         echo $backend->LocatedProjects[$i]->GetName();
00070                         echo "</a>";
00071                         
00072                         // Dead project?
00073                         if($backend->RootLastSeen > $backend->LocatedProjects[$i]->GetLastSeen())
00074                         {
00075                                 echo " +";
00076                         }
00077                 }
00078 
00079                 // Any childprojects in the iterator? List them!
00080                 if($backend->ChildProjects->valid())
00081                 {
00082                         echo "<ul class=\"projecttree\">\n";
00083                         foreach($backend->ChildProjects as $project)
00084                         {
00085                                 echo("<li><a href=\"javascript:__TriggerEvent('setproject', true, 'xProjectID','". $project->GetID()."')\">");
00086                                 echo($project->GetName());
00087                                 echo("</a>");
00088                                 
00089                                 // Dead project?
00090                                 if($backend->RootLastSeen > $project->GetLastSeen())
00091                                 {
00092                                         echo " +++";
00093                                 }
00094                                 
00095                                 echo("</li>\n");
00096                         }
00097                         echo "</ul>";
00098                         
00099                 }
00100                 for($i = count($backend->LocatedProjects)-1; $i >= 0; $i--)
00101                 {
00102                         echo "</li>\n</ul>\n";
00103                 }
00104         }
00105 ?>
00106 </td>
00107 
00108 <td valign="top">
00109 
00110         <!-- *** ONE STRING EDITOR *** -->
00111 
00112 <?
00113         // Show one string details if it was a locate event
00114         if(!empty($backend->LocatedString))
00115         {
00116                 ?>
00117                 <h1>Translation string editor area</h1>
00118 
00119                 <?
00120                 $stringIsDead = ($backend->RootLastSeen > $backend->LocatedString->GetLastSeen());
00121                 if($stringIsDead)
00122                 {
00123                         // Open a dark gray area
00124                         echo("<div class=\"located-dead\">");
00125                 }
00126                 ?>
00127                 <table class="located">
00128                 <tr><th>Project Path</th>
00129                 <td><? 
00130         
00131                 // Display project path
00132                 if(!empty($backend->LocatedProjects))
00133                 {
00134                         for($i = count($backend->LocatedProjects)-1; $i >= 0; $i--)
00135                         {
00136                                 // HARDCODE: XARAYA Warning
00137                                 $style = "";
00138                                 if($i == 0 && $backend->LocatedProjects[$i]->GetName() == "fuzzy.xml")
00139                                 {
00140                                         $style = "style=\"font-size: 25px\"";
00141                                 }
00142 
00143                                 // Display project path entries
00144                                 echo "<a $style href=\"javascript:__TriggerEvent('setproject', true, 'xProjectID','". $backend->LocatedProjects[$i]->GetID()."')\">";
00145                                 echo $backend->LocatedProjects[$i]->GetName();
00146                                 echo "</a>";
00147                                 if($i != 0)
00148                                 {
00149                                         echo " -&gt; ";
00150                                 }
00151                         }
00152                 }
00153                 ?></td></tr>
00154                 <tr><th>Original</th>
00155                 <td><? echo FixQuot($backend->LocatedString->GetOriginal()) ?></td></tr>
00156                 <tr><th><u>E</u>dit translation</th>
00157                 <td><?
00158                         $disableField = ($stringIsDead ? "disabled=\"disabled\"" : "");
00159                         // Long or short input fields for editing
00160                         if(strlen($backend->LocatedString->GetOriginal()) < 100)
00161                         {
00162                                 echo "<input class=\"editshort\" type=\"text\" accesskey=\"e\" name=\"txtEditString_".$backend->xBrowserHelper."\" id=\"txtEditString_".$backend->xBrowserHelper."\" value=\"";
00163                                 echo FixQuot($backend->LocatedString->GetTranslation());
00164                                 echo "\" onchange=\"editorChanged();\" tabindex=\"1\" $disableField/>";
00165                         }
00166                         else
00167                         {
00168                                 echo "<textarea class=\"editlong\" cols=\"80\" rows=\"8\" accesskey=\"e\" name=\"txtEditString_".$backend->xBrowserHelper."\" id=\"txtEditString_".$backend->xBrowserHelper."\" onchange=\"editorChanged();\" tabindex=\"1\" $disableField>";
00169                                 echo FixQuot($backend->LocatedString->GetTranslation());
00170                                 echo "</textarea>";
00171                         }
00172                 ?>
00173                 </td></tr>
00174                 </table>
00175                 <?
00176                 // Enable/disable various buttons
00177                 $saveDisabled = "class=\"button-disabled\" disabled=\"disabled\"";
00178                 $saveEnabled = "class=\"button\"";
00179                 if($stringIsDead)
00180                 {
00181                         // Close dark gray area
00182                         echo("</div>");
00183 
00184                         $saveType = $saveDisabled;
00185                         $saveTypePop = $saveDisabled;
00186                 }
00187                 else
00188                 {
00189                         $saveType = $saveEnabled;
00190                         $saveTypePop = $saveEnabled;
00191                         
00192                         // If no stack disable pop one alone
00193                         if($backend->xStringStack == "")
00194                         {
00195                                 $saveTypePop = $saveDisabled;
00196                         }
00197                 }
00198                 ?>
00199                 <input <? echo $saveType; ?> type="button" onclick="__TriggerEvent('savenext', false);" value="Save + Next" tabindex="2" />
00200                 <button <? echo $saveType; ?> type="button" onclick="__TriggerEvent('savenextmissing', false);" tabindex="3" accesskey="s"><u>S</u>ave + Next missing</button>
00201                 <button <? echo $saveTypePop; ?> type="button" onclick="__TriggerEvent('savepopstack', false);" tabindex="3" accesskey="p" id="btnSavePopStack">Save + <u>p</u>op</button>
00202                 <input <? echo $saveType; ?> type="button" onclick="__TriggerEvent('save', false);" value="Save" tabindex="4" />
00203                 <!-- input class="button" type="button" onclick="__TriggerEvent('previous');" value="Previous" />
00204                 <input class="button" type="button" onclick="__TriggerEvent('previoumissing');" value="Previous missing" / -->
00205                 <input class="button" type="button" onclick="__TriggerEvent('next', true);" value="Next" tabindex="5" />
00206                 <button class="button" type="button" onclick="__TriggerEvent('nextmissing', true);" tabindex="6" accesskey="n"><u>N</u>ext missing</button> Stack:
00207                 <input class="codebutton" type="button" onclick="pushToStack('<? echo($backend->LocatedString->GetStringID()); ?>');" value="push" tabindex="7" />
00208                 <input class="codebutton" type="button" onclick="popFromStack();" value="pop" tabindex="8" />
00209                 <span id="plhStackView"></span>
00210                 <br/>
00211                 <?
00212                 }
00213 
00214 if(!empty($backend->CurrentStrings))
00215 {
00216         ?>
00217         
00218         <!-- *** CURRENT PROJECT'S STRINGS *** -->
00219 
00220         <p><a href="javascript:toggleStrings()" accesskey="t"><span class="underunder">t</span>oggle strings</a></p>
00221         <div id="divStrings">
00222         <h1>Strings in the currently selected project</h1>
00223         <?
00224 
00225         $addHeader = true;
00226         foreach($backend->CurrentStrings as $str)
00227         {
00228                 // Draw header if not done yet
00229                 if($addHeader)
00230                 {
00231                         ?>
00232                         <table class="strings">
00233                         <tr><th>Original string</th>
00234                         <th>Translated string</th>
00235                         <th>Action</th></tr>
00236                         <?
00237                         $addHeader = false;
00238                 }
00239                 if(!empty($backend->LocatedString) && $backend->LocatedString->GetStringID() == $str->GetStringID())
00240                 {
00241                         echo("<tr class=\"selected\">");
00242                 }
00243                 else
00244                 {
00245                         echo("<tr>");
00246                 }
00247                 
00248                 echo("<td class=\"string-original\">".FixQuot($str->GetOriginal())."</td>");
00249                 echo("<td class=\"string-translation\">".FixQuot($str->GetTranslation())."</td>");
00250                 echo("<td><a href=\"javascript:__TriggerEvent('editstring', true, 'xStringID','".$str->GetStringID()."');\">Edit</a>");
00251                 
00252                 // Dead string?
00253                 if($backend->RootLastSeen > $str->GetLastSeen())
00254                 {
00255                         echo " +++ ";
00256                         echo("<a href=\"javascript:if(confirm('Are you sure to delete from Translation Memory?')) { __TriggerEvent('deletestring', true, 'xDelStringID', '".$str->GetStringID()."'); }\">Del</a>");
00257                 }
00258 
00259                 echo("</td>");
00260                 echo("</tr>\n");
00261         }
00262         if($addHeader)
00263         {
00264                 // So strings for this project: "next" buttons only
00265                 ?>
00266                 <p>There are no strings in the current project.</p>
00267                 Find strings: <input class="button" type="button" onclick="__TriggerEvent('next', true);" value="Next" />
00268                 <button class="button" type="button" onclick="__TriggerEvent('nextmissing', true);" accesskey="n"><u>N</u>ext missing</button>
00269                 <?
00270         }
00271         else
00272         {
00273                 echo("</table>");
00274         }
00275         ?></div><?
00276 }
00277 $sel = " selected=\"selected\"";
00278 ?>      <h1>Search</h1><a name="searchresults"></a>
00279 
00280         <!-- *** CUSTOM SEARCH BOX *** -->
00281 
00282 <p>
00283 <select name="ddlSearchType" id="ddlSearchType">
00284 <option value="0"<? echo ($backend->ddlSearchType == 0 ? $sel : ""); ?>>Word index</option>
00285 <option value="1"<? echo ($backend->ddlSearchType == 1 ? $sel : ""); ?>>Part in original</option>
00286 <option value="2"<? echo ($backend->ddlSearchType == 2 ? $sel : ""); ?>>Part in translation</option>
00287 </select>
00288 <a href="javascript:clearFindText();">clear></a>
00289 <input type="text"  size="35" id="txtFindText" name="txtFindText" value="<? echo FixQuot( $backend->txtFindText); ?>">
00290 <input class="button" type="button" value="Find" onclick="__TriggerEvent('find', true);"/>
00291 <!-- input class="button" type="button" value="Original"/--></p>
00292 
00293 
00294         <!-- *** SEARCH RESULTS *** -->
00295 
00296 
00297 <?
00298 // Show search results if there is any!
00299 if(!empty($backend->Translations))
00300 {
00301         $accessKey = 1;
00302         ?>
00303         <table class="guesses">
00304         <tr><th>Match</th>
00305         <th>Original string</th>
00306         <?
00307         if(!empty($backend->LocatedString))
00308         {
00309                 echo("<th>alt</th>");
00310         }
00311         ?>
00312         <th>Translated string (take by click)</th>
00313         <th>Action</th></tr><?
00314 
00315         foreach($backend->Translations as $id => $tr)
00316         {
00317                 foreach($tr["strings"] as $key => $str)
00318                 {
00319                         // Selected color or normal table row
00320                         if(!empty($backend->LocatedString) && $backend->LocatedString->GetStringID() == $str->GetStringID())
00321                         {
00322                                 echo("<tr class=\"selected\">");
00323                         }
00324                         else
00325                         {
00326                                 echo("<tr>");
00327                         }
00328 
00329                         // Percent column
00330                         echo("<td class=\"guess-percent\">");
00331                         if($backend->ddlSearchType == 0)
00332                         {
00333                                 // Exact match? (Not only 100%, word index match, but same string.)
00334                                 if(!empty($backend->LocatedString) && $backend->LocatedString->GetOriginal() == $str->GetOriginal()) {
00335                                         echo("<b>identical</b>");
00336                                 }
00337                                 else
00338                                 {
00339                                         echo($tr["percent"]."%");
00340                                         echo(" <a id=\"diffLink_".$str->GetStringID()."\" href=\"javascript:diffToOriginal(".$str->GetStringID().");\">(?)</a>");
00341                                 }
00342                         }
00343                         echo("</td>");
00344 
00345                         // String columns
00346                         echo("<td id=\"original_".$str->GetStringID()."\" class=\"guess-original\">".FixQuot($str->GetOriginal())."</td>");
00347                         
00348                         // Add "Take string" link if editing one, no link otherwise
00349                         if(!empty($backend->LocatedString))
00350                         {
00351                                 // Accesskey 1-9
00352                                 echo("<td class=\"guess-accesskey\">");
00353                                 if($accessKey < 10)
00354                                 {
00355                                         echo("<a accesskey=\"$accessKey\" href=\"javascript:takeTranslation(".$str->GetStringID().");\"><span class=\"underunder\">$accessKey</span></a>");
00356                                         $accessKey++;
00357                                 }
00358                                 echo("</td>");
00359 
00360                                 // Translation with take link
00361                                 echo("<td class=\"guess-translated\">");
00362                                 echo("<a id=\"results_".$str->GetStringID()."\" href=\"javascript:takeTranslation(".$str->GetStringID().");\">".FixQuot($str->GetTranslation())."</a>");
00363                                 echo("</td>");
00364                         }
00365                         else
00366                         {
00367                                 // Not pickable translation
00368                                 echo("<td class=\"guess-translated\">");
00369                                 echo(FixQuot($str->GetTranslation()));
00370                                 echo("</td>");
00371                         }
00372                         
00373                         echo("<td class=\"guess-action\">");
00374 
00375                         // Edit link (for dead strings too, to identify them)
00376                         echo("<a href=\"javascript:__TriggerEvent('editstring', true, 'xStringID', '".$str->GetStringID()."');\">Edit</a>");
00377                         
00378                         // Dead string?
00379                         if($backend->RootLastSeen > $str->GetLastSeen())
00380                         {
00381                                 // Plus sign and Del link
00382                                 echo " +++ ";
00383                                 echo("<a href=\"javascript:if(confirm('Are you sure to delete from Translation Memory?')) { __TriggerEvent('deletestring', true, 'xDelStringID', '".$str->GetStringID()."'); }\">Del</a>");
00384                         }
00385                         else
00386                         {
00387                                 // Not dead, "push" to stack link
00388                                 echo(" | <a href=\"javascript:pushToStack('".$str->GetStringID()."');\">push</a>");
00389                         }
00390                         echo("</td></tr>\n");
00391                 }
00392         }
00393         ?></table><?
00394         if($backend->ddlSearchType != 0)
00395         {
00396                 echo("Displayed ".count($backend->Translations)." results.<br/>");
00397         }
00398 }
00399 ?>
00400 
00401         <!-- *** SEARCH REFRESH CONTROLS *** -->
00402 
00403 <select name="ddlFindPercent">
00404 <?
00405 foreach(array(30,40,50,60,70,80,90) as $percent)
00406 {
00407         $sel = "";
00408         if($backend->ddlFindPercent == $percent)
00409         {
00410                 $sel = " selected=\"selected\"";
00411         }
00412         echo "<option value=\"$percent\"$sel>&gt; $percent%</option>";
00413 }
00414 ?>
00415 </select>
00416 (<input type="checkbox"> Ignore dead strings)
00417 <input type="button" value="Refresh" class="button" onclick="__TriggerEvent('find', true);"/><br/>
00418 
00419 </td>
00420 
00421 </tr>
00422 </table>
00423 <div class="localeswitch">
00424 <?
00425         echo "<select name=\"ddlLocaleID\">\n";
00426         foreach(TranslationProject::$LocaleIDCache as $name => $id)
00427         {
00428                 $sel = "";
00429                 if($backend->ddlLocaleID == $id)
00430                 {
00431                         $sel = " selected=\"selected\"";
00432                 }
00433                 echo "<option value=\"$id\"$sel>$name</option>\n";
00434         }
00435         echo "</select>\n";
00436 ?>
00437 <input type="button" value="Switch Locale" class="button" onclick="__TriggerEvent('setlocale', true);"/> |
00438 
00439 <? if($CONFIG['enable_web_export']) { ?>
00440 <input type="button" value="Export language pack" class="button" onclick="__TriggerEvent('exportpack', true);"/> |
00441 <? } ?>
00442 
00443 <a href="http://xartm.xaraya.hu">Homepage</a> | (c) 2006 Ferenc 'Lion/Kempelen' Veres
00444 </div>
00445 </form>
00446 
00447 <script type="text/javascript">
00448 
00449 /* EVENT SYSTEM FUNCTIONS */
00450 
00451 // Clear eventhandler
00452 document.getElementById('__Event').value = ''; 
00453 document.getElementById('__Form').onsubmit = __FormSubmit(); 
00454 
00455 // Set default Event for plain submit
00456 function __FormSubmit()
00457 {
00458         if(document.getElementById('__Event').value == '')
00459         {
00460                 document.getElementById('__Event').value = 'find';
00461         }
00462 }
00463 // Trigger the specified event, fill hidden variables with name,value pairs from variable args list.
00464 function __TriggerEvent(event, confirmEvent, args)
00465 {
00466         // If field changed, confirm wanted, and not confirmed: cancel operation
00467         if(document.getElementById('htmlEditorChanged').value == "1" &&
00468                 confirmEvent &&
00469                 !confirm("Discard current editing?"))
00470         {
00471                 return;
00472         }
00473 
00474         // Copy custom arguments to object values (the only supported method)
00475         for(i=2;i<arguments.length;i+=2)
00476         {
00477                 document.getElementById(arguments[i]).value = arguments[i+1];
00478         }
00479         document.getElementById('__Event').value = event;
00480         document.getElementById('__Form').submit();
00481 }
00482 
00483 /* CUSTOM FUNCTIONS */
00484 
00485 // Copy a translation from the search results to current editor
00486 function takeTranslation(stringID)
00487 {
00488         translation = document.getElementById('results_' + stringID).innerHTML;
00489         
00490         // Fix some entities and such
00491         translation = fixHtmlTags(translation);
00492 
00493         document.getElementById('txtEditString_<? echo $backend->xBrowserHelper ?>').value = translation;
00494         editorChanged();
00495 }
00496 
00497 // Fix some entities and such things when picking string from TD contents
00498 function fixHtmlTags(str)
00499 {
00500         str = str.replace(/\n/g, " ");
00501         str = str.replace(/\&gt;/g, ">");
00502         str = str.replace(/\&lt;/g, "<");
00503         str = str.replace(/\&amp;/g, "&");
00504         
00505         return str;
00506 }
00507 
00508 // Show or hide the strings table.
00509 function toggleStrings()
00510 {
00511         if(document.getElementById('divStrings').style.display == 'none')
00512         {
00513                 document.getElementById('divStrings').style.display = 'block';
00514         }
00515         else
00516         {
00517                 document.getElementById('divStrings').style.display = 'none';
00518         }
00519 }
00520 
00521 // Push current string id to the stack for later editing
00522 function pushToStack(stringID)
00523 {
00524         stackVar = document.getElementById('xStringStack');
00525         stackVar.value += "," + stringID;
00526         //alert("String pushed to stack: " + stackVar.value.substr(1, stackVar.value.length));
00527 
00528         // Update the stack number list view
00529         showStack();
00530 
00531         // Enable the save+pop button
00532         btnSavePop = document.getElementById('btnSavePopStack');
00533         btnSavePop.disabled = false;
00534         btnSavePop.className = "button";
00535 }
00536 
00537 // Pop the latest string ID from the stack for editing now
00538 function popFromStack()
00539 {
00540         stringVar = document.getElementById('xStringID');
00541         stackVar = document.getElementById('xStringStack');
00542         
00543         if(stackVar.value.length == 0)
00544         {
00545                 alert("String stack is emtpy.");
00546                 return;
00547         }
00548 
00549         // Take two parts with regexp
00550         rx = new RegExp('^\(.*\),\([0-9]+\)$');
00551         if(confirm("Take " + stackVar.value.replace(rx, "$2") + " out from stack and edit?"))
00552         {
00553                 __TriggerEvent('editstring', true, 'xStringID', stackVar.value.replace(rx, "$2"), 'xStringStack', stackVar.value.replace(rx, "$1"));
00554         }
00555 }
00556 
00557 // Display stack info next to the buttons
00558 function showStack()
00559 {
00560         // Get stack, remove last comma, add spaces for linebreaking
00561         stackVar = document.getElementById('xStringStack');
00562         stackString = stackVar.value.substr(1, stackVar.value.length);
00563         stackString = stackString.replace(/,/g,", ");
00564 
00565         // Display it
00566         stackView = document.getElementById('plhStackView');
00567         stackView.innerHTML = stackString;
00568 }
00569 <?
00570 // Print showStack javascript if we have the stringeditor fields
00571 if(!empty($backend->LocatedString))
00572 {
00573         echo("showStack();");
00574 }
00575 ?>
00576 
00577 // Called when user types in some translation, to confirm losing it.
00578 function editorChanged()
00579 {
00580         document.getElementById('htmlEditorChanged').value = "1";
00581 }
00582 
00583 // Clear the search box
00584 function clearFindText()
00585 {
00586         document.getElementById('txtFindText').value = "";
00587 }
00588 
00589 // Show DIFF-erences to the original string from a picked one
00590 function diffToOriginal(stringID)
00591 {
00592         // Compare to this
00593         testedString = fixHtmlTags(document.getElementById('original_' + stringID).innerHTML);
00594 
00595         // This is the original (if found while displaying search results!)
00596         masterString = document.getElementById('htmlOriginalString').value;
00597         if(masterString == "")
00598         {
00599                 alert("There is no current string selected to comapre to.");
00600                 return;
00601         }
00602 
00603         document.getElementById('original_' + stringID).innerHTML = StringDiff(masterString, testedString);
00604         document.getElementById('diffLink_' + stringID).innerHTML = "";
00605 }
00606 
00607 </script>
00608 
00609 </body>
00610 </html>

Generated on Sat Apr 22 16:49:54 2006 for XarayaTranslationMemory by  doxygen 1.4.4