Author: david
Date: Tue Sep  1 11:06:25 2009
New Revision: 3138

Log:
hard-code values for related term type drop-down menu in javascript for adding 
new related term row. Fixes issue #868.

Modified:
   trunk/apps/qubit/modules/term/templates/_termNameAutoComplete.php

Modified: trunk/apps/qubit/modules/term/templates/_termNameAutoComplete.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/_termNameAutoComplete.php   Tue Sep 
 1 09:58:10 2009        (r3137)
+++ trunk/apps/qubit/modules/term/templates/_termNameAutoComplete.php   Tue Sep 
 1 11:06:25 2009        (r3138)
@@ -17,6 +17,7 @@
 
 <script language="javascript">
 //<!CDATA[
+  var termRelationOptions =  new Array('use for', 'use', 'related term');
 
   // Setup data source 
   var termDatasource = new YAHOO.util.XHRDataSource('<?php echo 
url_for(array('module' => 'term', 'action' => 'list')) ?>');
@@ -68,10 +69,10 @@
     acRowHtml    += '<td>'; 
     acRowHtml    += '<select name="related_term_type[new' + newRtCount + ']">';
 
-    var termRelationOptions = $('select[name="related_term_type[new0]"] 
option');
-    termRelationOptions.each(function(i) {
-      acRowHtml  += '<option value="' + this.value + '">' + this.value + 
'</option>';
-    }); 
+    for (var i=0; i < termRelationOptions.length; i++)
+    {
+      acRowHtml  += '<option value="' + termRelationOptions[i] + '">' + 
termRelationOptions[i] + '</option>';
+    }; 
 
     acRowHtml    += '</select>';
     acRowHtml    += '</td>';

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to