Browse Source

Update bulk loader UI

ccheng 14 years ago
parent
commit
1e4982a1b1
2 changed files with 28 additions and 7 deletions
  1. 2 7
      theme_tripal/css/tripal_bulk_loader.css
  2. 26 0
      theme_tripal/js/tripal_bulk_loader.js

+ 2 - 7
theme_tripal/css/tripal_bulk_loader.css

@@ -1,8 +1,3 @@
-#tripal-bulk-loader-template-from-field {
-	float:left;
-	width:400px;
-}
-
-#tripal-bulk-loader-template-to-field {
-   width:600px;
+.tripal_bulk_loader_template_col {
+	width:100px;
 }

+ 26 - 0
theme_tripal/js/tripal_bulk_loader.js

@@ -0,0 +1,26 @@
+
+if (Drupal.jsEnabled) {
+   
+   $(document).ready(function(){
+
+   });
+   //------------------------------------------------------------
+   // Update the columns based on the chado table selection
+   function tripal_update_chado_columns(select, url){
+	   var link = url + "/admin/tripal/tripal_bulk_loader_template/add/chado_column/" + select.value;
+	   $.ajax({
+		   url: link,
+		   dataType: 'json',
+		   type: 'POST',
+		   success: function(data){
+			   var sel_col = $(select).parent().parent().next().children().children();
+			   sel_col.attr("length", 0);
+			   var options =  sel_col.attr('options');
+			   for (var key in data) {
+				   options [options.length] = new Option(data[key], key);
+			   }
+		   }
+	   });
+	   return false;
+   }
+}