Browse Source

to fix themes/subtheme issue: Revert ""branching out" to tripal module only repo"

This reverts commit c88fde163bb7be18cc80a06d03b9c23e7e415535.
alexgl 13 năm trước cách đây
mục cha
commit
e880a46c55
100 tập tin đã thay đổi với 8639 bổ sung0 xóa
  1. 33 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/css/tripal_analysis_blast.css
  2. 183 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/js/tripal_analysis_blast.js
  3. 100 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/node-chado_analysis_blast.tpl.php
  4. 78 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_base.tpl.php
  5. 123 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_report.tpl.php
  6. 53 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_teaser.tpl.php
  7. 10 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast_theme.info
  8. 111 0
      theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_feature/tripal_feature_blast_results.tpl.php
  9. 17 0
      theme/tripal_subthemes/tripal_analysis_go_theme/css/tripal_analysis_go.css
  10. 52 0
      theme/tripal_subthemes/tripal_analysis_go_theme/js/tripal_analysis_go.js
  11. 10 0
      theme/tripal_subthemes/tripal_analysis_go_theme/tripal_analysis_go_theme
  12. 35 0
      theme/tripal_subthemes/tripal_analysis_go_theme/tripal_feature/tripal_feature_go_terms.tpl.php
  13. 35 0
      theme/tripal_subthemes/tripal_analysis_go_theme/tripal_organism/tripal_organism_go_summary.tpl.php
  14. 44 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/css/tripal_analysis_interpro.css
  15. 29 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/js/tripal_analysis_interpro.js
  16. 100 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/node-chado_analysis_interpro.tpl.php
  17. 56 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro/tripal_analysis_interpro_base.tpl.php
  18. 53 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro/tripal_analysis_interpro_teaser.tpl.php
  19. 10 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro_theme.info
  20. 121 0
      theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_feature/tripal_feature_interpro_results.tpl.php
  21. 46 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/css/tripal_analysis_kegg.css
  22. 162 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/js/tripal_analysis_kegg.js
  23. 101 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/node-chado_analysis_kegg.tpl.php
  24. 53 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_base.tpl.php
  25. 11 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_report.tpl.php
  26. 53 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_teaser.tpl.php
  27. 10 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg_theme.info
  28. 46 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_feature/tripal_feature_kegg_terms.tpl.php
  29. 22 0
      theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_organism/tripal_organism_kegg_summary.tpl.php
  30. 16 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/css/tripal_analysis_unigene.css
  31. 103 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/node-chado_analysis_unigene.tpl.php
  32. 86 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene/tripal_analysis_unigene_base.tpl.php
  33. 53 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene/tripal_analysis_unigene_teaser.tpl.php
  34. 10 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene_theme.info
  35. 61 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_feature/tripal_feature_unigenes.tpl.php
  36. 52 0
      theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_organism/tripal_organism_unigenes.tpl.php
  37. 60 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/node-tripal_bulk_loader.tpl.php
  38. 83 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_add_template_field_form.tpl.php
  39. 83 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_edit_template_field_form.tpl.php
  40. 73 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_modify_template_base_form.tpl.php
  41. 69 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_template.tpl.php
  42. 7 0
      theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader_theme.info
  43. 177 0
      theme/tripal_subthemes/tripal_gbrowse_theme/node-tripal_gbrowse.tpl.php
  44. 48 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_database_details.tpl.php
  45. 45 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_details.tpl.php
  46. 28 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_gbrowse_instance.tpl.php
  47. 42 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_loaded_sources.tpl.php
  48. 34 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_teaser.tpl.php
  49. 7 0
      theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse_theme.info
  50. 22 0
      theme/tripal_subthemes/tripal_genetic_theme/tripal_feature_genotypes.tpl.php
  51. 7 0
      theme/tripal_subthemes/tripal_genetic_theme/tripal_genetic_theme.info
  52. 73 0
      theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_feature-genotype_experiments.tpl.php
  53. 7 0
      theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_natural_diversity_theme.info
  54. 80 0
      theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_stock-genotype_experiments.tpl.php
  55. 13 0
      theme/tripal_subthemes/tripal_pub_theme/node-tripal_pub.tpl.php
  56. 7 0
      theme/tripal_subthemes/tripal_pub_theme/tripal_pub_theme.info
  57. 40 0
      theme/tripal_subthemes/tripal_search_unigene_theme/css/tripal_search_unigene.css
  58. 20 0
      theme/tripal_subthemes/tripal_search_unigene_theme/js/tripal_search_unigene.js
  59. 10 0
      theme/tripal_subthemes/tripal_search_unigene_theme/tripal_search_unigene_theme.info
  60. 195 0
      theme/tripal_subthemes/tripal_search_unigene_theme/views-exposed-form--unigene_search.tpl.php
  61. 221 0
      theme/tripal_subthemes/tripal_search_unigene_theme/views-view-table--unigene_search.tpl.php
  62. 165 0
      theme/tripal_theme_core/css/tripal.css
  63. 3 0
      theme/tripal_theme_core/css/tripal_bulk_loader.css
  64. 35 0
      theme/tripal_theme_core/css/tripal_cv.css
  65. 0 0
      theme/tripal_theme_core/css/tripal_db.css
  66. 76 0
      theme/tripal_theme_core/css/tripal_feature.css
  67. 31 0
      theme/tripal_theme_core/css/tripal_organism.css
  68. BIN
      theme/tripal_theme_core/images/ajax-loader.gif
  69. BIN
      theme/tripal_theme_core/images/arrow_d.png
  70. BIN
      theme/tripal_theme_core/images/arrow_r.png
  71. BIN
      theme/tripal_theme_core/images/icon_link.png
  72. BIN
      theme/tripal_theme_core/images/kegg.gif
  73. BIN
      theme/tripal_theme_core/js/jgcharts-0.97.zip
  74. 17 0
      theme/tripal_theme_core/js/jgcharts/.project
  75. 3 0
      theme/tripal_theme_core/js/jgcharts/.settings/org.eclipse.core.resources.prefs
  76. 413 0
      theme/tripal_theme_core/js/jgcharts/doc/custom.html
  77. 495 0
      theme/tripal_theme_core/js/jgcharts/doc/dashboard.html
  78. 591 0
      theme/tripal_theme_core/js/jgcharts/doc/index.html
  79. 30 0
      theme/tripal_theme_core/js/jgcharts/doc/json/delpiero.json
  80. 1 0
      theme/tripal_theme_core/js/jgcharts/include/css/_id.css
  81. 20 0
      theme/tripal_theme_core/js/jgcharts/include/css/_top.css
  82. 28 0
      theme/tripal_theme_core/js/jgcharts/include/css/demo.css
  83. 8 0
      theme/tripal_theme_core/js/jgcharts/include/css/reset.css
  84. 2004 0
      theme/tripal_theme_core/js/jgcharts/include/demo/index.html
  85. 588 0
      theme/tripal_theme_core/js/jgcharts/include/gui/index.html
  86. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/_marker.png
  87. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/colorpicker_select.gif
  88. 43 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/farbtastic.css
  89. 329 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/farbtastic.js
  90. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/mask.png
  91. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/wheel.png
  92. 11 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-1.2.6.min.js
  93. 22 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-ui-personalized-1.6rc2.min.js
  94. 8 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-ui-personalized-1.6rc6.min.js
  95. 129 0
      theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery.metadata.js
  96. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bhg.png
  97. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bhs.png
  98. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bvg.png
  99. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bvs.png
  100. BIN
      theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/fillall.png

+ 33 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/css/tripal_analysis_blast.css

@@ -0,0 +1,33 @@
+#tripal_analysis_blast-table {
+   width: 100%;
+	overflow:auto;
+}
+#tripal_analysis_blast-table td {
+  text-align: left;
+}
+#tripal_analysis_blast-table .tripal-table-even-row {
+   border-top: 0px solid #CCCCCC;
+   border-bottom: 0px solid #CCCCCC;
+}
+#tripal_analysis_blast-table .tripal-table-odd-row {
+   border-top: 0px solid #CCCCCC;
+   border-bottom: 0px solid #CCCCCC;
+}
+#tripal_analysis_blast-table .tripal_analysis_blast-result-first-row {
+   border-top: 1px solid #CCCCCC;
+}
+#tripal_analysis_blast-table .tripal_analysis_blast-result-last-row {
+   border-bottom: 1px solid #CCCCCC;
+}
+
+.tripal_analysis_blast-info-hsp-desc {
+	background-color: #FFFFFF;
+	border:0px solid #CCC5AE;
+	display:none;
+	overflow:auto;
+   width: 100%;
+}
+.tripal_analysis_blast-info-hsp-desc pre{
+	background-color: #FFFFFF;
+   border:none;
+}

+ 183 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/js/tripal_analysis_blast.js

@@ -0,0 +1,183 @@
+
+if (Drupal.jsEnabled) {
+   
+   $(document).ready(function(){
+	   // If Anlaysis admin page is shown, get the settings for selected database
+	   if ($("#edit-blastdb")[0]) {
+		   tripal_update_regex($("#edit-blastdb")[0]);
+		   tripal_set_genbank_style();
+	   }
+      // hide the alignment information on the blast results box
+      $(".tripal_analysis_blast-info-hsp-desc").hide();
+
+   });
+  
+   //------------------------------------------------------------
+   // Update the blast results based on the user selection
+   function tripal_update_blast(link,db_id){
+      tripal_startAjax();
+      $.ajax({
+         url: link.href,
+         dataType: 'json',
+         type: 'POST',
+         success: function(data){         
+            $("#blast_db_" + db_id).html(data.update);
+            $(".tripal_analysis_blast-info-hsp-desc").hide();
+            tripal_stopAjax();
+         }
+      });
+      return false;
+   }
+
+   //------------------------------------------------------------
+   // Update the blast results based on the user selection
+   function tripal_blast_toggle_alignment(analysis_id,hit_id){
+      var alignment_box = $("#tripal_analysis_blast-info-hsp-desc-"+analysis_id+"-"+hit_id);
+      var toggle_img = $("#tripal_analysis_blast-info-toggle-image-"+analysis_id+"-"+hit_id);
+	   var icon_url = toggle_img.attr("src");
+
+
+      if (alignment_box.is(':visible')) {
+         alignment_box.fadeOut('fast');
+	      var changed_icon_url = icon_url.replace(/arrow_d.png/,"arrow_r.png");
+	      toggle_img.attr("src", changed_icon_url);
+	   } else {
+         var width = alignment_box.parent().width();
+         alignment_box.css("width", width+'px');
+         alignment_box.fadeIn('slow');
+	      var icon_url = icon_url.replace(/arrow_r.png/,"arrow_d.png");
+	      toggle_img.attr("src", icon_url);
+	   }
+      return false;
+   }
+   
+   //------------------------------------------------------------
+   // Update regular expression for selected database
+   function tripal_update_regex(options){
+	   // Get the dbname from DOM
+	   var index = options.selectedIndex;
+	   var dbid = options[index].value;
+
+	   // Form the link for the following ajax call	   
+      var baseurl = tripal_get_base_url();
+      var link = baseurl + '/tripal_blast_regex/' + dbid;
+	   
+	   // Make ajax call to retrieve regular expressions
+	   $.ajax( {
+			url : link,
+			dataType : 'json',
+			type : 'POST',
+			success : tripal_set_parser,
+		});
+	}
+   
+   // Set parser for the admin page
+   function tripal_set_parser(data) {
+	   // Set title if it exists
+	   if (data.name) {
+			$("#edit-displayname").val(data.name);
+	   } else {
+			$("#edit-displayname").val("");
+	   }
+		
+	   // If genbank_style is TRUE, check the Genbank style box, clear all regular expressions, and disable
+	   // the text fields
+	   if (data.genbank_style == 1) {
+		   $("#edit-gb-style-parser").attr("checked", true);
+		   $("#edit-hit-id").val("");
+		   $("#edit-hit-def").val("");
+		   $("#edit-hit-accession").val("");
+		
+	   // Otherwise, uncheck the Genbank style box and set the regular expressions
+	   } else {
+			$("#edit-gb-style-parser").attr("checked", false);
+			if (data.reg1) {
+				$("#edit-hit-id").val(data.reg1);			
+			// Show default hit-id parser if it's not set
+			} else {
+				$("#edit-hit-id").val("^(.*?)\s.*$");
+			}
+			if (data.reg2) {
+				$("#edit-hit-def").val(data.reg2);
+			// Show default hit-def parser if it's not set
+			} else {
+				$("#edit-hit-def").val("^.*?\s(.*)$");
+			}
+			if (data.reg3) {
+				$("#edit-hit-accession").val(data.reg3);			
+			// Show default hit-accession parser if it's not set
+			} else {
+				$("#edit-hit-accession").val("^(.*?)\s.*$");
+			}
+		}
+		tripal_set_genbank_style();  
+   }
+   // ------------------------------------------------------------
+   // Use genbank style parser. Hide regular expression text feilds
+   function tripal_set_genbank_style (){
+	  // Disable regular expressions if genbank style parser is used (checked)
+	  if ($("#edit-gb-style-parser").is(":checked")) {
+		  $("#edit-hit-id-wrapper > label").css("color", "grey");
+		  $("#edit-hit-def-wrapper > label").css("color", "grey");
+		  $("#edit-hit-accession-wrapper > label").css("color", "grey");
+		  $("#edit-hit-id").attr('disabled', 'disabled');
+		  $("#edit-hit-def").attr('disabled', 'disabled');
+		  $("#edit-hit-accession").attr('disabled', 'disabled');
+	  } else {
+		  $("#edit-hit-id-wrapper > label").css("color", "black");
+		  $("#edit-hit-def-wrapper > label").css("color", "black");
+		  $("#edit-hit-accession-wrapper > label").css("color", "black");
+		  $("#edit-hit-id").removeAttr('disabled');
+		  $("#edit-hit-def").removeAttr('disabled');
+		  $("#edit-hit-accession").removeAttr('disabled');
+	  }
+   }
+   // -------------------------------------------------------------
+   // Function that toggles the blast droppable subbox content
+   function tripal_set_blast_subbox(db_id){
+	  
+	  $('.blast-hit-arrow-icon').hover(
+	     function() {
+	        $(this).css("cursor", "pointer");
+	     },
+	     function() {
+	        $(this).css("cursor", "pointer");
+	     }
+	  );
+     $('.blast-hit-arrow-icon').click(function() {
+	        
+     });
+   }
+   
+   	//------------------------------------------------------------
+	// Update the blast best hit report for selected page and sorting
+	function tripal_update_best_hit_report(obj, analysis_id, sort, descending, per_page){
+		var page = obj.selectedIndex + 1;
+		var baseurl = location.href.substring(0,location.href.lastIndexOf('/tripal_blast_report/'));
+		var link = baseurl + '/tripal_blast_report/' + analysis_id + "/" + page + "/" + sort + "/" + descending + "/" + per_page;
+
+		tripal_startAjax();
+		$.ajax({
+			url: link,
+			dataType: 'html',
+			type: 'POST',
+			success: function(data){
+				var d = document.createElement('div');
+				d.innerHTML = data;
+				var divs = d.getElementsByTagName("div");
+				for (var i = 0; i < divs.length; i ++) {
+					if (divs[i].getAttribute('id') == 'blast-hits-report') {	
+						var report_table = document.getElementById('blast-hits-report');
+						report_table.innerHTML = divs[i].innerHTML;
+						var table_breport = document.getElementById('tripal_blast_report_table');
+						var sel = document.getElementById('tripal_blast_report_page_selector');
+						sel.options[page - 1].selected = true;
+						tripal_stopAjax();
+					}
+				}
+			}
+		});
+		
+		return false;
+	}
+}

+ 100 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/node-chado_analysis_blast.tpl.php

@@ -0,0 +1,100 @@
+<?php
+// Purpose: This template provides the layout of the organism node (page)
+//   using the same templates used for the various feature content blocks.
+//
+// To Customize the Featture Node Page:
+//   - This Template: customize basic layout and which elements are included
+//   - Using Panels: Override the node page using Panels3 and place the blocks
+//       of content as you please. This method requires no programming. See
+//       the Tripal User Guide for more details
+//   - Block Templates: customize the content/layout of each block of stock 
+//       content. These templates are found in the tripal_stock subdirectory
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes including nid, type, title, taxonomy. It also includes stock
+//       specific fields such as stock_name, uniquename, stock_type, synonyms,
+//       properties, db_references, object_relationships, subject_relationships,
+//       organism, etc.
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($variables,TRUE).'</pre>';
+drupal_add_css('./tripal-node-templates.css');
+
+$node = $variables['node'];
+$organism = $variables['node']->organism;
+?>
+
+<?php if ($teaser) { 
+  include('tripal_analysis_blast/tripal_analysis_blast_teaser.tpl.php'); 
+} else { ?>
+
+<script type="text/javascript">
+if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+      // hide all tripal info boxes at the start
+      $(".tripal-info-box").hide();
+ 
+      // iterate through all of the info boxes and add their titles
+      // to the table of contents
+      $(".tripal-info-box-title").each(function(){
+        var parent = $(this).parent();
+        var id = $(parent).attr('id');
+        var title = $(this).text();
+        $('#tripal_analysis_blast_toc_list').append('<li><a href="#'+id+'" class="tripal_analysis_blast_toc_item">'+title+'</a></li>');
+      });
+
+      // when a title in the table of contents is clicked, then
+      // show the corresponding item in the details box
+      $(".tripal_analysis_blast_toc_item").click(function(){
+         $(".tripal-info-box").hide();
+         href = $(this).attr('href');
+         $(href).fadeIn('slow');
+         // we want to make sure our table of contents and the details
+         // box stay the same height
+         $("#tripal_analysis_blast_toc").height($(href).parent().height());
+         return false;
+      }); 
+
+      // we want the base details to show up when the page is first shown 
+      // unless the user specified a specific block
+      var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
+      if(block == null){
+         block = window.location.href.match(/[\?|\&]block=(.+)/)
+      }
+      if(block != null){
+         $("#tripal_analysis_blast-"+block[1]+"-box").show();
+      } else {
+         $("#tripal_analysis_blast-base-box").show();
+      }
+
+      $("#tripal_analysis_blast_toc").height($("#tripal_analysis_blast-base-box").parent().height());
+      
+   });
+}
+</script>
+
+
+<div id="tripal_analysis_blast_details" class="tripal_details">
+
+   <!-- Basic Details Theme -->
+   <?php include('tripal_analysis_blast/tripal_analysis_blast_base.tpl.php'); ?>
+
+   <?php print $content ?>
+</div>
+
+<!-- Table of contents -->
+<div id="tripal_analysis_blast_toc" class="tripal_toc">
+   <div id="tripal_analysis_blast_toc_title" class="tripal_toc_title">Resources</i></div>
+   <span id="tripal_analysis_blast_toc_desc" class="tripal_toc_desc"></span>
+   <ul id="tripal_analysis_blast_toc_list" class="tripal_toc_list">
+
+   </ul>
+</div>
+
+<?php } ?>

+ 78 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_base.tpl.php

@@ -0,0 +1,78 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+// get the blast data 
+$blast = $node->analysis->tripal_analysis_blast;
+
+//dpm($analysis);
+
+?>
+<div id="tripal_analysis_blast-base-box" class="tripal_analysis_blast-info-box tripal-info-box">
+  <div class="tripal_analysis_blast-info-box-title tripal-info-box-title">Blast Analysis Details</div>
+  <div class="tripal_analysis_blast-info-box-desc tripal-info-box-desc"></div>
+   <table id="tripal_analysis_blast-table-base" class="tripal_analysis_blast-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr> 
+      <tr class="tripal_analysis_blast-table-even-row tripal-table-odd-row">
+        <th nowrap>Database</th>
+        <td><?php print $blast->db->name ?></td>
+      </tr> 
+      <tr class="tripal_analysis_blast-table-even-row tripal-table-even-row">
+        <th nowrap>Blast Arguments</th>
+        <td><?php print $blast->blastparameters ?></td>
+      </tr>  
+      <tr class="tripal_analysis_blast-table-odd-row tripal-table-odd-row">
+        <th>Report</th>
+        <td>
+        	<?php 
+        		if ($analysis->blast_report) {					
+        			print "<a href=$analysis->blast_report>View the best hit report</a>";
+        		} else {
+        			print "not available";
+        		}
+        	?>
+        	</td>
+      </tr>       	                                
+   </table>   
+</div>

+ 123 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_report.tpl.php

@@ -0,0 +1,123 @@
+<?php
+$report  = $variables['report_object'];
+$hits = $report->hits;
+?>
+
+<style type="text/css">
+#tripal_blast_report_current_page {
+	float: right;
+	margin-bottom: 5px;
+	margin-right: 20px;
+}
+#tripal_blast_report_pager {
+	float: right;
+	margin-bottom: 10px;
+	margin-right: 20px;
+}
+#tripal_blast_report_per_page {
+	float: left;
+	margin-bottom: 10px;
+}
+</style>
+
+<div id="tripal_ajaxLoading" style="display:none">
+	<div id="loadingText">Loading...</div>
+	<img src="<?php print url("sites/all/themes/theme_tripal/images/ajax-loader.gif") ?>">
+</div>
+
+<div id="blast-hits-report">
+	<strong>Analysis Date: </strong><?php print $report->time?> (<a href=<?php print $report->url ?>><?php print $report->name ?></a>)<br>
+	There are <strong><?php print $report->counter ?></strong> records. 
+	<div id=tripal_blast_report_current_page>page <strong><?php print $report->currentpage ?></strong> of <strong><?php print $report->no_page ?></strong>
+	</div>
+	
+	<table id="tripal_analysi_blast-report-table" class="tripal_analysis_blast-table tripal-table tripal-table-horz">
+		<tr class="tripal_analysis_blast-table-odd-row tripal-table-odd-row">
+			<th nowrap><?php if ($report->sort == 0) {print $report->symbol;} ?>
+				<a href=<?php print $report->byQuery ?>>Query</a>
+			</th>
+			<th nowrap><?php if ($report->sort == 1) {print $report->symbol;} ?>
+				<a href=<?php print $report->byMatchName ?>>Match Name</a>
+			</th>
+			<th nowrap><?php if ($report->sort == 2) {print $report->symbol;} ?>
+				<a href=<?php print $report->byDescription ?>>Description</a>
+			</th>
+			<th nowrap><?php if ($report->sort == 3) {print $report->symbol;} ?>
+				<a href=<?php print $report->byEvalue ?>>E-value</a>
+			</th>
+			<th nowrap><?php if ($report->sort == 4) {print $report->symbol;} ?>
+				<a href=<?php print $report->byIdentity ?>>%Identity</a>
+			</th>
+			<th nowrap><?php if ($report->sort == 5) {print $report->symbol;} ?>
+				<a href=<?php print $report->byLength ?>>Length</a>
+			</th>
+		</tr>
+		
+		<?php foreach($hits AS $hit) {?>
+		<tr class="<?php print $hit->class ?>">
+		                           <td nowrap><a href=<?php print $hit->q_url ?>><?php print $hit->query ?></a></td>
+		                           <td nowrap><a href=<?php print $hit->urlprefix.$hit->match ?> target=_blank><?php print $hit->match ?></td>
+		                           <td><?php print $hit->desc ?></td>
+		                           <td nowrap><?php print $hit->evalue ?></td>
+		                           <td nowrap><?php print $hit->identity ?></td>
+		                           <td nowrap><?php print $hit->length ?></td>
+		                         </tr>
+		<?php } ?>	
+			
+	</table>
+			<div id="tripal_blast_report_per_page">Show	
+				<?php 
+				$per_page = $report->per_page;
+				$path = $report->path;
+				if ($per_page == 10) {?>
+					<strong>10</strong> | 
+				<?php } else { 
+					$url_path = url($path."10");
+				?>	
+					<a href=<?php print $url_path ?>>10</a> | 
+				<?php } 
+				if ($per_page == 20) {
+				?>
+					<strong>20</strong> | 
+				<?php } else {
+					$url_path = url($path."20");
+				?>
+					<a href=<?php print $url_path ?>>20</a> | 
+				<?php } 
+				if ($per_page == 50) {
+				?>
+					<strong>50</strong> | 
+				<?php } else {
+					$url_path = url($path."50");
+				?>
+					<a href=<?php print $url_path ?>>50</a> | 
+				<?php }
+				if ($per_page == 100) {
+				?>
+					<strong>100</strong> | 
+				<?php } else {
+					$url_path = url($path."100");
+				?>
+					<a href=<?php print $url_path ?>>100</a> | 
+				<?php }
+				if ($per_page == 200) {
+				?>
+					<strong>200</strong> | 
+				<?php } else {
+					$url_path = url($path."200");
+				?>
+			   	<a href=<?php print $url_path ?>>200</a>
+				<?php } ?>
+				
+				records per page
+		</div>
+		<div id=tripal_blast_report_pager>page
+			<select id=tripal_blast_report_page_selector onChange="tripal_update_best_hit_report(this, <?php print $report->analysis_id ?>,<?php print $report->sort ?>, <?php print $report->descending ?>, <?php print $report->per_page ?>)">
+			<?php  for ($i = 1; $i <= $report->no_page; $i ++) { ?>
+				<option value=<?php print $i ?>><?php print $i ?></option>
+			<?php } ?>	                           
+			</select>
+		</div>
+</div>
+			
+	

+ 53 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast/tripal_analysis_blast_teaser.tpl.php

@@ -0,0 +1,53 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+
+?>
+<div id="tripal_analysis-base-box" class="tripal_analysis-info-box tripal-info-box">
+  <div class="tripal_analysis-info-box-title tripal-info-box-title">Details</div>
+   <table id="tripal_analysis-table-base" class="tripal_analysis-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>             	                                
+   </table>   
+</div>

+ 10 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_analysis_blast_theme.info

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: Blast Analysis
+description = A tripal subtheme for tripal analysis blast module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_analysis_blast.css
+
+scripts[] = js/tripal_analysis_blast.js

+ 111 - 0
theme/tripal_subthemes/tripal_analysis_blast_theme/tripal_feature/tripal_feature_blast_results.tpl.php

@@ -0,0 +1,111 @@
+<?php
+$feature  = $variables['node']->feature;
+$blast_results_list = $feature->tripal_analysis_blast->blast_results_list;
+
+?>
+<div id="tripal_ajaxLoading" style="display:none">
+	<div id="loadingText">Loading...</div>
+	<img src="sites/all/themes/theme_tripal/images/ajax-loader.gif">
+</div>
+
+<?php 
+if(count($blast_results_list) > 0){
+   foreach ($blast_results_list as $blast_result) {
+	  $hits_array = $blast_result->hits_array;
+	  $db = $blast_result->db;
+     $analysis = $blast_result->analysis;
+?>
+<div id="blast_db_<?php print $db->db_id ?>">
+<div id="tripal_analysis_blast-results-<?php print "$db->db_id" ?>-box" class="tripal_analysis_blast-box tripal-info-box">
+	<div class="tripal-info-box-title tripal_analysis_blast-info-box-title"><?php if ($db->displayname) {print $db->displayname;} else {print $db->name . "Homologs";} ?></div>
+	<div class="tripal-info-box-desc tripal_analysis_blast-info-box-desc">
+	<strong>Analysis Date: </strong><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted) . " (<a href=".url("node/$analysis->nid").">$analysis->name</a>)"?><br>
+	<!--Query: <?php print "$blast_result->xml_tag"?><br>-->
+	
+	<?php 
+   if($blast_result->max != 10){    
+      $url = url("tripal_top_blast/$feature->feature_id/$db->db_id/10");
+		?><span><a onclick="return tripal_update_blast(this,<?php print $db->db_id?>)" href="<?php print $url ?>">Show Best 10 Hits</a></span><?php
+	} else { 
+		?><span>Best 10 Hits Shown</span><?php
+	} 
+	
+	if($blast_result->number_hits <= 10){ 
+	} 
+   else if ($blast_result->max != 25) { 
+  	   $url = url("tripal_top_blast/$feature->feature_id/$db->db_id/25"); 	
+		?><span> | <a onclick="return tripal_update_blast(this,<?php print"$db->db_id"?>)" href="<?php print $url ?>">Show Best 25 Hits</a></span><?php
+	}else {
+		?><span> | Best 25 Hits Shown</span><?php
+	} 
+	
+	if($blast_result->number_hits <= 25){
+	} 
+   else if ($blast_result->max != 0) {
+	   $url = url("tripal_top_blast/$feature->feature_id/$db->db_id/all"); 		
+		?><span> | <a onclick="return tripal_update_blast(this, <?php print $db->db_id ?>)" href="<?php print $url ?>">Show All Hits</a> </span><?php
+	} else {
+		?><span> | All Hits Shown</span><?php
+	} 
+   ?>
+	<br><br><span>Click a description for more details</span>
+   </div>
+	<table id="tripal_analysis_blast-table" class="tripal-table tripal-table-horz tripal_analysis_blast-table">
+		<tr>
+         <th>&nbsp;</th>
+			<th nowrap>Match Name</th>
+			<th nowrap>E value</th>
+			<th nowrap>Identity</th>
+			<th nowrap>Description</th>
+		</tr>
+		
+		<?php 
+      $i = 0; 
+      if(sizeof($hits_array)==0){?>
+        <tr>
+          <td colspan="5">    
+            <div class="tripal-no-results">There are no matches against <?php print $db->name?> for this <?php print $feature->type_id->name?>.</div> 
+          </td>
+        </tr><?php
+      }
+		foreach($hits_array AS $hit) { 
+         $class = 'tripal-table-odd-row tripal_analysis_blast-table-odd-row';
+         if($i % 2 == 0 ){
+            $class = 'tripal-table-even-row tripal_analysis_blast-table-odd-row';
+         }?>
+         <tr class="<?php print $class ?> tripal_analysis_blast-result-first-row">
+            <td><?php print $i+1 ?>.</td>
+		      <?php if ($hit['hit_url']) { ?>
+			      <td><a href="<?php print $hit['hit_url']?>" target="_blank"><?php print $hit['hit_name']?></a></td>
+		      <?php } else {?>
+			      <td><?php print $hit['hit_name'] ?></td>
+		      <?php } ?>
+			   <td nowrap><?php print $hit['best_evalue']?></td>
+			   <td nowrap><?php  print $hit['percent_identity']?></td>
+			   <td><?php print $hit['description']?></td>
+		   </tr>
+	      <tr class="<?php print $class ?>">
+		      <td colspan=5>
+			      <a class="blast-hit-arrow-icon" onclick="return tripal_blast_toggle_alignment(<?php print $analysis->analysis_id ?>,<?php print $i?>)"><img id="tripal_analysis_blast-info-toggle-image-<?php print $analysis->analysis_id ?>-<?php print $i?>" src=<?php print $hit['arrowr_url']?> align="top"> View Alignment</a>
+			      <div class="tripal_analysis_blast-info-hsp-title"></div>
+		      </td>
+	      </tr>
+	      <tr class="<?php print $class ?> tripal_analysis_blast-result-last-row">
+		      <td colspan=5>
+		      <?php 
+		      $hsps_array = $hit['hsp'];
+		      foreach ($hsps_array AS $hsp) { ?>
+			      <div class="tripal_analysis_blast-info-hsp-desc" id="tripal_analysis_blast-info-hsp-desc-<?php print $analysis->analysis_id ?>-<?php print $i?>">
+				      &nbsp;HSP <?php  print $hsp['hsp_num'] ?>
+				      <pre>Score: <?php print $hsp['bit_score'] ?> bits (<?php print $hsp['score'] ?>), Expect = <?php print $hsp['evalue'] ?><br>Identity = <?php print sprintf("%d/%d (%.2f%%)", $hsp['identity'], $hsp['align_len'], $hsp['identity']/$hsp['align_len']*100) ?>, Postives = <?php print sprintf("%d/%d (%.2f%%)", $hsp['positive'], $hsp['align_len'], $hsp['positive']/$hsp['align_len']*100)?>, Query Frame = <?php print $hsp['query_frame']?></a><br><br></a>Query: <?php print sprintf("%4d", $hsp['query_from'])?> <?php print $hsp['qseq'] ?> <?php print sprintf("%d", $hsp['query_to']); ?><br>            <?php print $hsp['midline'] ?><br>Sbjct: <?php print sprintf("%4d", $hsp['hit_from']) ?> <?php print $hsp['hseq']?> <?php print sprintf("%d",$hsp['hit_to']) ?></pre><br>
+			      </div>
+		      <?php } ?>
+		      </td>
+	      </tr>		
+         <?php $i++;
+	   } ?>
+	</table>
+</div>
+</div>
+  <?php } ?>
+<?php } ?>

+ 17 - 0
theme/tripal_subthemes/tripal_analysis_go_theme/css/tripal_analysis_go.css

@@ -0,0 +1,17 @@
+
+.tripal_go-info-box, .tripal_go_summary-info-box {
+   margin-top: 10px;
+   margin-left: 0px;
+   margin-right: 0px;
+   margin-bottom: 0px;
+   padding-top: 0px;
+   padding-left: 0px;
+   padding-bottom: 0px;
+   padding-right: 0px;
+   border-collapse: collapse;
+   z-index: 10;
+}
+
+.tripal_go_summary-info-box .tripal_cv_tree {
+   border-collapse: separate;
+}

+ 52 - 0
theme/tripal_subthemes/tripal_analysis_go_theme/js/tripal_analysis_go.js

@@ -0,0 +1,52 @@
+
+
+if (Drupal.jsEnabled) {
+
+
+   $(document).ready(function() {
+       // Select default GO analysis when available
+       var selectbox = $('#edit-tripal-analysis-go-select');
+       if(selectbox.length > 0){ 
+    	   var option = document.getElementById("analysis_id_for_go_report");
+    	   if (option) {
+    		   var options = document.getElementsByTagName('option');
+    		   var index = 0;
+    		   for (index = 0; index < options.length; index ++) {
+    			   if (options[index].value == option.value) {
+    				   break;
+    			   }
+    		   }
+    		   selectbox[0].selectedIndex = index;
+    		   tripal_analysis_go_org_charts(option.value);
+    	// Otherwise, show the first option by default
+    	   } else {
+    		   selectbox[0].selectedIndex = 1;
+    		   tripal_analysis_go_org_charts(selectbox.val());
+    	   }
+       }
+   });
+
+
+   function tripal_analysis_go_org_charts(item){
+      if(!item){
+         $("#tripal_analysis_go_org_charts").html('');
+         return false;
+      }
+      // Form the link for the following ajax call 
+      baseurl = tripal_get_base_url();      
+      var link = baseurl + '?q=tripal_analysis_go_org_charts/' + item;
+      tripal_startAjax();
+      $.ajax({
+           url: link,
+           dataType: 'json',
+           type: 'POST',
+           success: function(data){
+             $("#tripal_analysis_go_org_charts").html(data[0]);
+             tripal_cv_init_chart();
+             tripal_cv_init_tree();
+             tripal_stopAjax();
+           }
+      });
+      return false;
+   }
+}

+ 10 - 0
theme/tripal_subthemes/tripal_analysis_go_theme/tripal_analysis_go_theme

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: GO Analysis
+description = A tripal subtheme for tripal analysis go module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_analysis_go.css
+
+scripts[] = js/tripal_analysis_go.js

+ 35 - 0
theme/tripal_subthemes/tripal_analysis_go_theme/tripal_feature/tripal_feature_go_terms.tpl.php

@@ -0,0 +1,35 @@
+<?php
+$feature = $variables['node']->feature;
+$terms = $feature->tripal_analysis_go->terms;
+?>
+<div id="tripal_feature-go_terms-box" class="tripal_feature-info-box tripal-info-box">
+  <div class="tripal_feature-info-box-title tripal-info-box-title">GO Assignments</div>
+  <div class="tripal_feature-info-box-desc tripal-info-box-desc">This <?php print $feature->type_id->name ?> is annotated with the following GO terms.</div>
+  <?php if(count($terms) > 0){ ?>
+  <table id="tripal_feature-go_terms-table" class="tripal_feature-table tripal-table tripal-table-horz">
+    <tr>
+      <th>Category</th>
+      <th>Term Accession</th>
+      <th>Term Name</th>
+    </tr>
+    <?php
+    $i = 0; 
+    foreach ($terms as $term){
+      $class = 'tripal_feature-table-odd-row tripal-table-odd-row';
+      if($i % 2 == 0 ){
+         $class = 'tripal_feature-table-odd-row tripal-table-even-row';
+      }
+      ?>
+      <tr class="<?php print $class ?>">
+        <td><?php print $term->cvname ?></td>
+        <td>GO:<?php print $term->accession?></td>
+        <td><span title="<?php print $term->definition ?>"><?php print $term->goterm ?></span></td>
+      </tr>
+      <?php
+      $i++;  
+    } ?>
+  </table>
+  <?php } else { ?>
+    <div class="tripal-no-results">There are no GO terms for this feature</div> 
+  <?php }?>
+</div>

+ 35 - 0
theme/tripal_subthemes/tripal_analysis_go_theme/tripal_organism/tripal_organism_go_summary.tpl.php

@@ -0,0 +1,35 @@
+<?php
+  $organism = $node->organism;
+  $form = $organism->tripal_analysis_go->select_form['form'];
+  $has_results = $organism->tripal_analysis_go->select_form['has_results'];
+?>
+<div id="tripal_organism-go_summary-box" class="tripal_organism-info-box tripal-info-box">
+  <div  class="tripal_organism-info-box-title tripal-info-box-title">GO Analysis Reports</div>
+  <?php 
+     if($has_results){
+        print $form;
+     } else {
+       ?><div class="tripal-no-results">
+           There are no GO reports available
+           <?php if(user_access('access administration pages')){ ?>
+              <p><br>Administrators, to view a GO report you must:
+              <ul>
+                 <li>load GO assignments and associate them to features and a corresponding analysis</li>
+                 <li>Set the <a href="<?php print url('admin/tripal/tripal_cv/cvtermpath');?>">cvtermpath</a> for the 'biological process', 'molecular_function' and 'cellular_component' vocabularies.</li>
+                 <li>Populate the <a href="<?php print url('admin/tripal/tripal_mviews');?>">go_count_analysis</a> materialized view</li>
+              </ul> </p>
+           <?php }?>
+         </div><?php
+     }
+  ?>
+  <div id="tripal_analysis_go_org_charts"></div>    
+  <div id="tripal_cv_cvterm_info_box">
+      <a href="#" onclick="$('#tripal_cv_cvterm_info_box').hide()" style="float: right">Close [X]</a>
+      <div>Term Information</div>
+      <div id="tripal_cv_cvterm_info"></div>
+   </div>
+   <div id="tripal_ajaxLoading" style="display:none">
+     <div id="loadingText">Loading...</div>
+   </div>
+</div>
+

+ 44 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/css/tripal_analysis_interpro.css

@@ -0,0 +1,44 @@
+
+.tripal_interpro-info-box {
+   margin-top: 10px;
+   margin-left: 0px;
+   margin-right: 0px;
+   margin-bottom: 0px;
+   padding-top: 0px;
+   padding-left: 0px;
+   padding-bottom: 0px;
+   padding-right: 0px;
+   border-collapse: collapse;
+   z-index: 10;
+}
+
+.tripal_interpro_results_table {
+   margin-left: auto;
+   margin-right: auto;
+}
+
+.tripal_interpro_results_table tbody {
+    border-top: none;
+}
+
+.tripal_interpro_results_table tbody tr td table{
+   background: #FFFFFF;
+}
+
+.tripal_interpro_results_table tbody tr td table tr{
+   background: #FFFFFF;
+}
+
+.tripal_interpro_results_table tbody tr td table tr td{
+   background: #FFFFFF;
+}
+/* feature node sepcific template */
+.tripal_feature_interpro-results-table {
+   padding-top: 10px;
+   padding-bottom: 10px;
+}
+.tripal_feature-interpro_results_subtitle{
+   padding-top: 10px;
+   padding-bottom: 10px;
+   font-weight: bold;
+}

+ 29 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/js/tripal_analysis_interpro.js

@@ -0,0 +1,29 @@
+if (Drupal.jsEnabled) {
+   
+   $(document).ready(function(){
+	   var fontcolor = $(".interpro_results_table tbody tr td table tbody tr td b a").parent().prev().css('color');
+	   // Disable the hyperlink for sequences in the interpro box
+	   $(".tripal_interpro_results_table tbody tr td table tbody tr td b a").removeAttr('href');
+	   $(".tripal_interpro_results_table tbody tr td table tbody tr td b a").css('font-weight','normal');
+	   $(".tripal_interpro_results_table tbody tr td table tbody tr td b a").css('text-decoration','none');
+	   $(".tripal_interpro_results_table tbody tr td table tbody tr td b a").css('color',fontcolor);
+	   
+	   // Allow selection of "Load GO term to the database" only when the submitting job to parse
+	   // html output is enabled
+	   isSubmittingJob ();
+   });
+   
+   // Disable parse GO checkbox if no interpro job is submitted
+   function isSubmittingJob () {
+	   if ($('#edit-interprojob').is(":checked")) {
+		   var fontcolor = $("#edit-parsego").parent().parent().prev().children().css('color');
+		   $("#edit-parsego").attr('disabled', false);
+		   $("#edit-parsego-wrapper").css("color", fontcolor);
+		   
+	   } else {
+		   $("#edit-parsego").attr('checked', false);
+		   $("#edit-parsego").attr('disabled', true);
+		   $("#edit-parsego-wrapper").css("color", "grey");
+	   }
+   }
+}

+ 100 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/node-chado_analysis_interpro.tpl.php

@@ -0,0 +1,100 @@
+<?php
+// Purpose: This template provides the layout of the organism node (page)
+//   using the same templates used for the various feature content blocks.
+//
+// To Customize the Featture Node Page:
+//   - This Template: customize basic layout and which elements are included
+//   - Using Panels: Override the node page using Panels3 and place the blocks
+//       of content as you please. This method requires no programming. See
+//       the Tripal User Guide for more details
+//   - Block Templates: customize the content/layout of each block of stock 
+//       content. These templates are found in the tripal_stock subdirectory
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes including nid, type, title, taxonomy. It also includes stock
+//       specific fields such as stock_name, uniquename, stock_type, synonyms,
+//       properties, db_references, object_relationships, subject_relationships,
+//       organism, etc.
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($variables,TRUE).'</pre>';
+drupal_add_css('./tripal-node-templates.css');
+
+$node = $variables['node'];
+$organism = $variables['node']->organism;
+?>
+
+<?php if ($teaser) { 
+  include('tripal_analysis_interpro/tripal_analysis_interpro_teaser.tpl.php'); 
+} else { ?>
+
+<script type="text/javascript">
+if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+      // hide all tripal info boxes at the start
+      $(".tripal-info-box").hide();
+ 
+      // iterate through all of the info boxes and add their titles
+      // to the table of contents
+      $(".tripal-info-box-title").each(function(){
+        var parent = $(this).parent();
+        var id = $(parent).attr('id');
+        var title = $(this).text();
+        $('#tripal_analysis_interpro_toc_list').append('<li><a href="#'+id+'" class="tripal_analysis_interpro_toc_item">'+title+'</a></li>');
+      });
+
+      // when a title in the table of contents is clicked, then
+      // show the corresponding item in the details box
+      $(".tripal_analysis_interpro_toc_item").click(function(){
+         $(".tripal-info-box").hide();
+         href = $(this).attr('href');
+         $(href).fadeIn('slow');
+         // we want to make sure our table of contents and the details
+         // box stay the same height
+         $("#tripal_analysis_interpro_toc").height($(href).parent().height());
+         return false;
+      }); 
+
+      // we want the base details to show up when the page is first shown 
+      // unless the user specified a specific block
+      var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
+      if(block == null){
+         block = window.location.href.match(/[\?|\&]block=(.+)/)
+      }
+      if(block != null){
+         $("#tripal_analysis_interpro-"+block[1]+"-box").show();
+      } else {
+         $("#tripal_analysis_interpro-base-box").show();
+      }
+
+      $("#tripal_analysis_interpro_toc").height($("#tripal_analysis_interpro-base-box").parent().height());
+      
+   });
+}
+</script>
+
+
+<div id="tripal_analysis_interpro_details" class="tripal_details">
+
+   <!-- Basic Details Theme -->
+   <?php include('tripal_analysis_interpro/tripal_analysis_interpro_base.tpl.php'); ?>
+
+   <?php print $content ?>
+</div>
+
+<!-- Table of contents -->
+<div id="tripal_analysis_interpro_toc" class="tripal_toc">
+   <div id="tripal_analysis_interpro_toc_title" class="tripal_toc_title">Resources</i></div>
+   <span id="tripal_analysis_interpro_toc_desc" class="tripal_toc_desc"></span>
+   <ul id="tripal_analysis_interpro_toc_list" class="tripal_toc_list">
+
+   </ul>
+</div>
+
+<?php } ?>

+ 56 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro/tripal_analysis_interpro_base.tpl.php

@@ -0,0 +1,56 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+$interpro = $node->analysis->tripal_analysis_interpro;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+?>
+<div id="tripal_analysis_interpro-base-box" class="tripal_analysis_interpro-info-box tripal-info-box">
+  <div class="tripal_analysis_interpro-info-box-title tripal-info-box-title">Details</div>
+   <table id="tripal_analysis_interpro-table-base" class="tripal_analysis_interpro-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis_interpro-table-even-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis_interpro-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis_interpro-table-even-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis_interpro-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis_interpro-table-even-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>      
+      <tr class="tripal_analysis_interpro-table-odd-row tripal-table-odd-row">
+        <th nowrap>InterProScan Arguments</th>
+        <td><?php print $interpro->interproparameters ?></td>
+      </tr>        	                                
+   </table>   
+</div>

+ 53 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro/tripal_analysis_interpro_teaser.tpl.php

@@ -0,0 +1,53 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+
+?>
+<div id="tripal_analysis-base-box" class="tripal_analysis-info-box tripal-info-box">
+  <div class="tripal_analysis-info-box-title tripal-info-box-title">Details</div>
+   <table id="tripal_analysis-table-base" class="tripal_analysis-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>             	                                
+   </table>   
+</div>

+ 10 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_analysis_interpro_theme.info

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: Interpro Analysis
+description = A tripal subtheme for tripal analysis interpro module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_analysis_interpro.css
+
+scripts[] = js/tripal_analysis_interpro.js

+ 121 - 0
theme/tripal_subthemes/tripal_analysis_interpro_theme/tripal_feature/tripal_feature_interpro_results.tpl.php

@@ -0,0 +1,121 @@
+<?php
+$feature  = $variables['node']->feature;
+$results = $feature->tripal_analysis_interpro->results->xml;
+$resultsHTML = $feature->tripal_analysis_interpro->results->html;
+
+if(count($results) > 0){ 
+   $i = 0;
+   foreach($results as $analysis_id => $analysisprops){ 
+     $analysis = $analysisprops['analysis'];
+     $protein_ORFs = $analysisprops['protein_ORFs']; 
+     $terms = $analysisprops['allterms']; 
+     ?>
+     <div id="tripal_feature-interpro_results_<?php print $i?>-box" class="tripal_analysis_interpro-box tripal-info-box">
+        <div class="tripal_feature-info-box-title tripal-info-box-title">InterPro Report <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></div>
+        <div class="tripal_feature-info-box-desc tripal-info-box-desc"><?php 
+            if($analysis->nid){ ?>
+               Analysis name: <a href="<?php print url('node/'.$analysis->nid) ?>"><?php print $analysis->name?></a><?php
+            } else { ?>
+               Analysis name: <?php print $analysis->name;
+            } ?><br>
+            Date Performed: <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?>
+        </div>
+
+     <div class="tripal_feature-interpro_results_subtitle">Summary of Annotated IPR terms</div>
+     <table id="tripal_feature-interpro_summary-<?php $i ?>-table" class="tripal_analysis_interpro-summary-table tripal-table tripal-table-horz">
+      <tr>
+        <th>Term</td>
+        <th>Name</td>
+      </tr>
+     <?php 
+     $j=0;
+     foreach($terms as $term){ 
+       $ipr_id = $term[0];
+       $ipr_name = $term[1];
+       $class = 'tripal_feature-table-odd-row tripal-table-odd-row';
+       if($j % 2 == 0 ){
+         $class = 'tripal_feature-table-even-row tripal-table-even-row';
+       }?>
+       <tr class="<?php print $class ?>">
+         <td><?php print $ipr_id ?></td>
+         <td><?php print $ipr_name ?></td>         
+       </tr>
+       <?php
+       $j++;
+     } ?>
+     </table>
+     <br><br>
+     <div class="tripal_feature-interpro_results_subtitle">Analysis Details</div>
+     <table id="tripal_feature-interpro_results-<?php $i ?>-table" class="tripal-table tripal_feature_interpro-results-table tripal-table-horz" style="border-top: 0px; border-bottom: 0px">
+     <?php
+     foreach($protein_ORFs as $orf){  
+        $terms = $orf['terms'];
+        $orf = $orf['orf'];  
+        ?>
+        <?php foreach($terms as $term){ 
+          $matches = $term['matches'];
+          $ipr_id = $term['ipr_id'];
+          $ipr_name = $term['ipr_name'];
+          $ipr_type = $term['ipr_type']; ?>          
+            <tr>
+              <td colspan="4" style="padding-left: 0px">ORF: <?php print $orf['orf_id'] ?>, Length: <?php print $orf['orf_length'] ?> <br>
+                              IPR Term: <?php print "$ipr_id $ipr_name ($ipr_type)"; ?></th>
+            </tr>
+            <tr style="border-top: solid 1px;">
+              <th>Method</th>
+              <th>Identifier</th>
+              <th>Description</th>
+              <th>Matches<sup>*</sup></th>
+            </tr>
+            <?php $j = 0; 
+            foreach ($matches as $match){
+               $match_id = $match['match_id'];
+               $match_name = $match['match_name'];
+               $match_dbname = $match['match_dbname'];
+
+
+               $class = 'tripal_feature-table-odd-row tripal-table-odd-row';
+               if($j % 2 == 0 ){
+                  $class = 'tripal_feature-table-even-row tripal-table-even-row';
+               }?>
+               <tr class="<?php print $class ?>">
+                 <td><?php print $match_dbname ?></td>
+                 <td><?php print $match_id ?></td>
+                 <td><?php print $match_name ?></td>
+                 <td nowrap><?php
+                    $locations = $match['locations'];
+                    foreach($locations as $location){
+                      print $location['match_score']." [".$location['match_start']."-".$location['match_end']."] " . $location['match_status'] ."<br>";
+                      #$match_evidence =  $location['match_evidence'];
+                    } ?>
+                 </td>
+               </tr>
+               <?php
+               $j++;  
+            } // end foreach matches ?>
+            <tr><td colspan="4"><sup>* score [start-end] status</sup></td></tr> <?php
+        } // end foreach terms
+        $i++;
+     } // end foreach orfs ?>
+     </table>
+     </div> <?php
+   } // end for each analysis 
+} // end if
+if($resultsHTML){  ?>
+   <div id="tripal_feature-interpro_results_<?php print $i?>-box" class="tripal_analysis_interpro-box tripal-info-box">
+     <div class="tripal_feature-info-box-title tripal-info-box-title">InterPro Report <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></div>
+     <div class="tripal_feature-info-box-desc tripal-info-box-desc"><?php 
+         if($analysis->nid){ ?>
+            Analysis name: <a href="<?php print url('node/'.$analysis->nid) ?>"><?php print $analysis->name?></a><?php
+         } else { ?>
+            Analysis name: <?php print $analysis->name;
+         } ?><br>
+         Date Performed: <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?>
+     </div>
+
+   <div class="tripal_feature-interpro_results_subtitle">Summary of Annotated IPR terms</div> <?php 
+   print $resultsHTML;?>
+   </div> <?php
+}
+?>
+

+ 46 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/css/tripal_analysis_kegg.css

@@ -0,0 +1,46 @@
+/*
+ Copyright 2009 Clemson University
+*/
+
+.tripal_kegg-info-box, .tripal_kegg_summary-info-box {
+   margin-top: 10px;
+   margin-left: 0px;
+   margin-right: 0px;
+   margin-bottom: 0px;
+   padding-top: 0px;
+   padding-left: 0px;
+   padding-bottom: 0px;
+   padding-right: 0px;
+   border-collapse: collapse;
+   z-index: 10;
+}
+
+.tripal_kegg_brite_terms {
+   line-height: 170%;
+   text-align: left;
+}
+
+#tripal_kegg_brite_hierarchy {
+   border-collapse: separate;
+}
+
+#tripal_kegg_brite_links {
+   background-image:url("../images/kegg.gif");
+   background-repeat: no-repeat;
+   padding-left:20px;
+}
+
+#tripal_kegg_feature_links {
+   background-image:none;
+   background-repeat: no-repeat;
+   padding:0px 0px 0px 0px;
+}
+
+.tripal_kegg_results_table #tripal_kegg_brite_links {
+   padding: 0px 0px 0px 22px;
+}
+
+#tripal_kegg_brite_results {
+   height: 600px;
+   overflow: auto;   
+}

+ 162 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/js/tripal_analysis_kegg.js

@@ -0,0 +1,162 @@
+
+
+if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+
+       // Select default KEGG analysis when available
+       var selectbox = $('#edit-tripal-analysis-kegg-select');
+       if(selectbox.length > 0){ 
+    	   var option = document.getElementById("analysis_id_for_kegg_report");
+    	   if (option) {
+    		   var options = document.getElementsByTagName('option');
+    		   var index = 0;
+    		   for (index = 0; index < options.length; index ++) {
+    			   if (options[index].value == option.value) {
+    				   break;
+    			   }
+    		   }
+    		   selectbox[0].selectedIndex = index;
+    		   var baseurl = tripal_get_base_url();
+    		   tripal_analysis_kegg_org_report(option.value, baseurl);
+    		// Otherwise, show the first option by default
+    	   } else {
+    		   selectbox[0].selectedIndex = 1;
+    		   selectbox.change();
+    	   }
+       }
+
+   });
+
+   //------------------------------------------------------------
+   function tripal_analysis_kegg_org_report(item,baseurl,themedir){
+      if(!item){
+         $("#tripal_analysis_kegg_org_report").html('');
+         return false;
+      }
+      // Form the link for the following ajax call  
+      var link = baseurl + "/";
+      if(!isClean){
+         link += "?q=";
+      }
+      link += 'tripal_analysis_kegg_org_report/' + item;
+
+      tripal_startAjax();
+      $.ajax({
+           url: link,
+           dataType: 'json',
+           type: 'POST',
+           success: function(data){
+             $("#tripal_analysis_kegg_org_report").html(data[0]);
+             $(".tripal_kegg_brite_tree").attr("id", function(){
+                init_kegg_tree($(this).attr("id"));    
+             });
+             tripal_stopAjax();
+           }
+      });
+      return false;
+   }
+   
+   //------------------------------------------------------------
+   // Update the BRITE hierarchy based on the user selection
+   function tripal_update_brite(link,type_id){
+      tripal_startAjax();
+      $.ajax({
+         url: link.href,
+         dataType: 'json',
+         type: 'POST',
+         success: function(data){
+            $("#tripal_kegg_brite_hierarchy").html(data.update);
+            $("#tripal_kegg_brite_header").html(data.brite_term);
+            tripal_stopAjax();
+            init_kegg_tree(data.id);
+         }
+      });
+      return false;
+   }
+
+   //------------------------------------------------------------
+   // This function initializes a KEGG term tree
+   function init_kegg_tree(id){
+
+      // Form the link for the following ajax call
+      var theme_path = baseurl + '/' + themedir + "/js/jsTree/source/themes/";
+	   
+      $("#" + id).tree ({
+	    data    : {
+	        type    : "predefined", // ENUM [json, xml_flat, xml_nested, predefined]
+	        method  : "GET",        // HOW TO REQUEST FILES
+	        async   : false,        // BOOL - async loading onopen
+	        async_data : function (NODE) { return { id : $(NODE).attr("id") || 0 } }, // PARAMETERS PASSED TO SERVER
+	        url     : false,        // FALSE or STRING - url to document to be used (async or not)
+	        json    : false,        // FALSE or OBJECT if type is JSON and async is false - the tree dump as json
+	        xml     : false         // FALSE or STRING
+	    },
+        ui      : {
+           dots        : true,     // BOOL - dots or no dots
+           rtl         : false,    // BOOL - is the tree right-to-left
+           animation   : 0,        // INT - duration of open/close animations in miliseconds
+           hover_mode  : true,     // SHOULD get_* functions chage focus or change hovered item
+           scroll_spd  : 4,
+           theme_path  : theme_path,    // Path to themes
+           theme_name  : "classic",// Name of theme
+        },
+
+        rules   : {
+           multiple    : false,    // FALSE | CTRL | ON - multiple selection off/ with or without holding Ctrl
+           metadata    : false,    // FALSE or STRING - attribute name (use metadata plugin)
+           type_attr   : "rel",    // STRING attribute name (where is the type stored if no metadata)
+           multitree   : false,    // BOOL - is drag n drop between trees allowed
+           createat    : "bottom", // STRING (top or bottom) new nodes get inserted at top or bottom
+           use_inline  : false,    // CHECK FOR INLINE RULES - REQUIRES METADATA
+           clickable   : "all",    // which node types can the user select | default - all
+           renameable  : false,    // which node types can the user select | default - all
+           deletable   : false,    // which node types can the user delete | default - all
+           creatable   : false,    // which node types can the user create in | default - all
+           draggable   : "none",   // which node types can the user move | default - none | "all"
+           dragrules   : "all",    // what move operations between nodes are allowed | default - none | "all"
+           drag_copy   : false,    // FALSE | CTRL | ON - drag to copy off/ with or without holding Ctrl
+           droppable   : [],
+           drag_button : "left"
+        },
+
+        callback    : {             // various callbacks to attach custom logic to
+           // before focus  - should return true | false
+           beforechange: function(NODE,TREE_OBJ) { return true },
+           beforeopen  : function(NODE,TREE_OBJ) { return true },
+           beforeclose : function(NODE,TREE_OBJ) { return true },
+           // before move   - should return true | false
+           beforemove  : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true }, 
+           // before create - should return true | false
+           beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true }, 
+           // before rename - should return true | false
+           beforerename: function(NODE,LANG,TREE_OBJ) { return true }, 
+           // before delete - should return true | false
+           beforedelete: function(NODE,TREE_OBJ) { return true }, 
+
+           onJSONdata  : function(DATA,TREE_OBJ) { return DATA; },
+           onselect    : function(NODE,TREE_OBJ) {        	   
+               window.onerror = function(){return true;};
+        	   throw 'exit';
+        	},                  // node selected
+           ondeselect  : function(NODE,TREE_OBJ) { },                  // node deselected
+           onchange    : function(NODE,TREE_OBJ) { },                  // focus changed
+           onrename    : function(NODE,LANG,TREE_OBJ,RB) { },              // node renamed ISNEW - TRUE|FALSE, current language
+           onmove      : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // move completed (TYPE is BELOW|ABOVE|INSIDE)
+           oncopy      : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // copy completed (TYPE is BELOW|ABOVE|INSIDE)
+           oncreate    : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // node created, parent node (TYPE is createat)
+           ondelete    : function(NODE, TREE_OBJ,RB) { },                  // node deleted
+           onopen      : function(NODE, TREE_OBJ) { },                 // node opened
+           onopen_all  : function(TREE_OBJ) { },                       // all nodes opened
+           onclose     : function(NODE, TREE_OBJ) { },                 // node closed
+           error       : function(TEXT, TREE_OBJ) { },                 // error occured
+           // double click on node - defaults to open/close & select
+           ondblclk    : function(NODE, TREE_OBJ) { TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE); },
+           // right click - to prevent use: EV.preventDefault(); EV.stopPropagation(); return false
+           onrgtclk    : function(NODE, TREE_OBJ, EV) { },
+           onload      : function(TREE_OBJ) { },
+           onfocus     : function(TREE_OBJ) { },
+           ondrop      : function(NODE,REF_NODE,TYPE,TREE_OBJ) {}
+        }
+      });
+   }
+}

+ 101 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/node-chado_analysis_kegg.tpl.php

@@ -0,0 +1,101 @@
+<?php
+// Purpose: This template provides the layout of the organism node (page)
+//   using the same templates used for the various feature content blocks.
+//
+// To Customize the Featture Node Page:
+//   - This Template: customize basic layout and which elements are included
+//   - Using Panels: Override the node page using Panels3 and place the blocks
+//       of content as you please. This method requires no programming. See
+//       the Tripal User Guide for more details
+//   - Block Templates: customize the content/layout of each block of stock 
+//       content. These templates are found in the tripal_stock subdirectory
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes including nid, type, title, taxonomy. It also includes stock
+//       specific fields such as stock_name, uniquename, stock_type, synonyms,
+//       properties, db_references, object_relationships, subject_relationships,
+//       organism, etc.
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($variables,TRUE).'</pre>';
+drupal_add_css('./tripal-node-templates.css');
+$node = $variables['node'];
+$organism = $variables['node']->organism;
+?>
+
+<?php if ($teaser) { 
+  include('tripal_analysis_kegg/tripal_analysis_kegg_teaser.tpl.php'); 
+} else { ?>
+
+<script type="text/javascript">
+if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+      // hide all tripal info boxes at the start
+      $(".tripal-info-box").hide();
+ 
+      // iterate through all of the info boxes and add their titles
+      // to the table of contents
+      $(".tripal-info-box-title").each(function(){
+        var parent = $(this).parent();
+        var id = $(parent).attr('id');
+        var title = $(this).text();
+        $('#tripal_analysis_kegg_toc_list').append('<li><a href="#'+id+'" class="tripal_analysis_kegg_toc_item">'+title+'</a></li>');
+      });
+
+      // when a title in the table of contents is clicked, then
+      // show the corresponding item in the details box
+      $(".tripal_analysis_kegg_toc_item").click(function(){
+         $(".tripal-info-box").hide();
+         href = $(this).attr('href');
+         $(href).fadeIn('slow');
+         // we want to make sure our table of contents and the details
+         // box stay the same height
+         $("#tripal_analysis_kegg_toc").height($(href).parent().height());
+         return false;
+      }); 
+
+      // we want the base details to show up when the page is first shown 
+      // unless the user specified a specific block
+      var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
+      if(block == null){
+         block = window.location.href.match(/[\?|\&]block=(.+)/)
+      }
+      if(block != null){
+         $("#tripal_analysis_kegg-"+block[1]+"-box").show();
+      } else {
+         $("#tripal_analysis_kegg-base-box").show();
+      }
+      
+      // make the height of the table of contents match the height of the details box
+      $("#tripal_analysis_kegg_toc").height($("#tripal_analysis_kegg-base-box").parent().height());
+      
+   });
+}
+</script>
+
+
+<div id="tripal_analysis_kegg_details" class="tripal_details">
+
+   <!-- Basic Details Theme -->
+   <?php include('tripal_analysis_kegg/tripal_analysis_kegg_base.tpl.php'); ?>
+   <?php include('tripal_analysis_kegg/tripal_analysis_kegg_report.tpl.php'); ?>
+
+   <?php print $content ?>
+</div>
+
+<!-- Table of contents -->
+<div id="tripal_analysis_kegg_toc" class="tripal_toc">
+   <div id="tripal_analysis_kegg_toc_title" class="tripal_toc_title">Resources</i></div>
+   <span id="tripal_analysis_kegg_toc_desc" class="tripal_toc_desc"></span>
+   <ul id="tripal_analysis_kegg_toc_list" class="tripal_toc_list">
+
+   </ul>
+</div>
+
+<?php } ?>

+ 53 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_base.tpl.php

@@ -0,0 +1,53 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+
+?>
+<div id="tripal_analysis_kegg-base-box" class="tripal_analysis_kegg-info-box tripal-info-box">
+  <div class="tripal_analysis_kegg-info-box-title tripal-info-box-title">KEGG Analysis Details</div>
+   <table id="tripal_analysis_kegg-table-base" class="tripal_analysis_kegg-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis_kegg-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis_kegg-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis_kegg-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis_kegg-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis_kegg-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>             	                                
+   </table>   
+</div>

+ 11 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_report.tpl.php

@@ -0,0 +1,11 @@
+<?php
+$analysis = $node->analysis;
+$report = $analysis->tripal_analysis_kegg->kegg_report;
+//dpm($analysis);
+?>
+
+<div id="tripal_analysis_kegg-report-box" class="tripal_analysis_kegg-box tripal-info-box">
+  <div class="tripal_analysis_kegg-info-box-title tripal-info-box-title">KEGG Report</div>
+  <div class="tripal_analysis_kegg-info-box-desc tripal-info-box-desc"><?php print $analysis->name ?></div>
+  <?php print $report ?>
+</div>

+ 53 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg/tripal_analysis_kegg_teaser.tpl.php

@@ -0,0 +1,53 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+
+?>
+<div id="tripal_analysis-base-box" class="tripal_analysis-info-box tripal-info-box">
+  <div class="tripal_analysis-info-box-title tripal-info-box-title">Details</div>
+   <table id="tripal_analysis-table-base" class="tripal_analysis-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>             	                                
+   </table>   
+</div>

+ 10 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_analysis_kegg_theme.info

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: Kegg Analysis
+description = A tripal subtheme for tripal analysis kegg module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_analysis_kegg.css
+
+scripts[] = js/tripal_analysis_kegg.js

+ 46 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_feature/tripal_feature_kegg_terms.tpl.php

@@ -0,0 +1,46 @@
+<?php
+
+$feature  = $variables['node']->feature;
+$results = $feature->tripal_analysis_kegg->results;
+
+if($feature->cvname != 'gene' and count($results) > 0){ 
+   $i = 0;
+   foreach($results as $analysis_id => $analysisprops){ 
+     $analysis = $analysisprops['analysis'];
+     $terms = $analysisprops['terms']; 
+     ?>
+     <div id="tripal_feature-kegg_results_<?php print $i?>-box" class="tripal_analysis_kegg-box tripal-info-box">
+        <div class="tripal_feature-info-box-title tripal-info-box-title">KEGG Report <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></div>
+        <div class="tripal_feature-info-box-desc tripal-info-box-desc"><?php 
+            if($analysis->nid){ ?>
+               Analysis name: <a href="<?php print url('node/'.$analysis->nid) ?>"><?php print $analysis->name?></a><?php
+            } else { ?>
+               Analysis name: <?php print $analysis->name;
+            } ?><br>
+            Date Performed: <?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?>
+        </div>
+
+     <div class="tripal_feature-kegg_results_subtitle">Annotated Terms</div>
+     <table id="tripal_feature-kegg_summary-<?php $i ?>-table" class="tripal_analysis_kegg-summary-table tripal-table tripal-table-horz">
+     <?php 
+     $j=0;
+     foreach($terms as $term){ 
+       $ipr_id = $term[0];
+       $ipr_name = $term[1];
+       $class = 'tripal_feature-table-odd-row tripal-table-odd-row';
+       if($j % 2 == 0 ){
+         $class = 'tripal_feature-table-even-row tripal-table-even-row';
+       }?>
+       <tr class="<?php print $class ?>">
+         <td><?php print $term ?></td>
+       </tr>
+       <?php
+       $j++;
+     } ?>
+     </table>     
+     </div> <?php
+     $i++;
+   } // end for each analysis 
+} // end if
+?>
+

+ 22 - 0
theme/tripal_subthemes/tripal_analysis_kegg_theme/tripal_organism/tripal_organism_kegg_summary.tpl.php

@@ -0,0 +1,22 @@
+<?php
+  $organism = $node->organism;
+  $form = $organism->tripal_analysis_kegg->select_form['form'];
+  $has_results = $organism->tripal_analysis_kegg->select_form['has_results'];
+?>
+<div id="tripal_organism-kegg_summary-box" class="tripal_organism-info-box tripal-info-box">
+  <div  class="tripal_organism-info-box-title tripal-info-box-title">KEGG Analysis Reports</div>
+  <?php 
+     if($has_results){
+        print $form;
+     } else {
+       ?><div class="tripal-no-results">There are no KEGG reports available</div><?php
+     }
+  ?>
+   <div id="tripal_analysis_kegg_org_report"></div>
+   <div id="tripal_ajaxLoading" style="display:none">
+     <div id="loadingText">Loading...</div>
+   </div>   
+</div>
+
+
+

+ 16 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/css/tripal_analysis_unigene.css

@@ -0,0 +1,16 @@
+/*
+ Copyright 2009 Clemson University
+*/
+
+.tripal_unigene-info-box {
+   margin-top: 10px;
+   margin-left: 0px;
+   margin-right: 0px;
+   margin-bottom: 0px;
+   padding-top: 0px;
+   padding-left: 0px;
+   padding-bottom: 0px;
+   padding-right: 0px;
+   border-collapse: collapse;
+   z-index: 10;
+}

+ 103 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/node-chado_analysis_unigene.tpl.php

@@ -0,0 +1,103 @@
+<?php
+// Purpose: This template provides the layout of the organism node (page)
+//   using the same templates used for the various feature content blocks.
+//
+// To Customize the Featture Node Page:
+//   - This Template: customize basic layout and which elements are included
+//   - Using Panels: Override the node page using Panels3 and place the blocks
+//       of content as you please. This method requires no programming. See
+//       the Tripal User Guide for more details
+//   - Block Templates: customize the content/layout of each block of stock 
+//       content. These templates are found in the tripal_stock subdirectory
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes including nid, type, title, taxonomy. It also includes stock
+//       specific fields such as stock_name, uniquename, stock_type, synonyms,
+//       properties, db_references, object_relationships, subject_relationships,
+//       organism, etc.
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+// print '<pre>'.print_r($node,TRUE).'</pre>';
+drupal_add_css('./tripal-node-templates.css');
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+$unigene_name = $analysis->tripal_analysis_unigene->unigene_name;
+
+//dpm($analysis);
+
+// get the unigene name from the properties list
+
+
+?>
+
+<?php if ($teaser) { 
+  include('tripal_analysis_unigene/tripal_analysis_unigene_teaser.tpl.php'); 
+} else { ?>
+
+<script type="text/javascript">
+if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+      // hide all tripal info boxes at the start
+      $(".tripal-info-box").hide();
+ 
+      // iterate through all of the info boxes and add their titles
+      // to the table of contents
+      $(".tripal-info-box-title").each(function(){
+        var parent = $(this).parent();
+        var id = $(parent).attr('id');
+        var title = $(this).text();
+        $('#tripal_analysis_unigene_toc_list').append('<li><a href="#'+id+'" class="tripal_analysis_unigene_toc_item">'+title+'</a></li>');
+      });
+
+      // when a title in the table of contents is clicked, then
+      // show the corresponding item in the details box
+      $(".tripal_analysis_unigene_toc_item").click(function(){
+         $(".tripal-info-box").hide();
+         href = $(this).attr('href');
+         $(href).fadeIn('slow');
+         // we want to make sure our table of contents and the details
+         // box stay the same height
+         $("#tripal_analysis_unigene_toc").height($(href).parent().height());
+         return false;
+      }); 
+
+      // we want the base details to show up when the page is first shown 
+      // unless the user specified a specific block
+      var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
+      if(block == null){
+         block = window.location.href.match(/[\?|\&]block=(.+)/)
+      }
+      if(block != null){
+         $("#tripal_analysis_unigene-"+block[1]+"-box").show();
+      } else {
+         $("#tripal_analysis_unigene-base-box").show();
+      }
+      $("#tripal_analysis_unigene_toc").height($("#tripal_analysis_unigene-base-box").parent().height());
+   });
+}
+</script>
+
+<div id="tripal_analysis_unigene_details" class="tripal_details">
+
+   <!-- Basic Details Theme -->
+   <?php include('tripal_analysis_unigene/tripal_analysis_unigene_base.tpl.php'); ?>
+
+   <?php print $content ?>
+</div>
+
+<!-- Table of contents -->
+<div id="tripal_analysis_unigene_toc" class="tripal_toc">
+   <div id="tripal_analysis_unigene_toc_title" class="tripal_toc_title">Resources</div>
+   <span id="tripal_analysis_unigene_toc_desc" class="tripal_toc_desc"></span>
+   <ul id="tripal_analysis_unigene_toc_list" class="tripal_toc_list">
+
+   </ul>
+</div>
+
+<?php } ?>

+ 86 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene/tripal_analysis_unigene_base.tpl.php

@@ -0,0 +1,86 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+$unigene = $node->analysis->tripal_analysis_unigene;
+//dpm($node);
+
+?>
+<div id="tripal_analysis_unigene-base-box" class="tripal_analysis_unigene-info-box tripal-info-box">
+  <div class="tripal_analysis_unigene-info-box-title tripal-info-box-title">Unigene Details</div>
+  <div class="tripal_analysis_unigene-info-box-desc tripal-info-box-desc"></div>
+   <table id="tripal_analysis_unigene-table-base" class="tripal_analysis_unigene-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis_unigene-table-even-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis_unigene-table-odd-row tripal-table-odd-row">
+        <th>Unigene Name</th>
+        <td><?php print $unigene->unigene_name; ?></td>
+      </tr>
+      <tr class="tripal_analysis_unigene-table-even-row tripal-table-even-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis_unigene-table-odd-row tripal-table-odd-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis_unigene-table-even-row tripal-table-even-row">
+        <th nowrap>Date constructed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis_unigene-table-odd-row tripal-table-odd-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr> 
+      <tr class="tripal_analysis_unigene-table-even-row tripal-table-even-row">
+        <th nowrap>Stats</th>
+        <td>
+             <?php if($unigene->num_reads){print "Number of reads: $unigene->num_reads<br>";} ?>
+             <?php if($unigene->num_clusters){print "Number of clusters: $unigene->num_clusters<br>";} ?>
+             <?php if($unigene->num_contigs){print "Number of contigs: $unigene->num_contigs<br>";} ?>
+             <?php if($unigene->num_singlets){print "Number of singlets: $unigene->num_singlets<br>";} ?>
+        </td>
+      </tr>  
+      <tr class="tripal_analysis_unigene-table-odd-row tripal-table-odd-row">
+        <th>Organisms</th>
+        <td><?php 
+            if($unigene->organisms and is_array($unigene->organisms)){
+               foreach($unigene->organisms as $organism){
+                  if($organism->nid){
+                     print "<i><a href=\"".url("node/$organism->nid")."\">$organism->genus $organism->species</i></a><br>";
+                  } else {
+                     print "<i>$organism->genus $organism->species</i><br>";
+                  }
+               }
+            } else {
+                // add message here with instructions for administrators to make this work.
+            }
+            ?>
+        </td>
+      </tr>       	                                
+   </table>   
+</div>

+ 53 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene/tripal_analysis_unigene_teaser.tpl.php

@@ -0,0 +1,53 @@
+<?php
+$node = $variables['node'];
+$analysis = $variables['node']->analysis;
+
+// the description is a text field so we want to expand that
+$analysis = tripal_core_expand_chado_vars($analysis,'field','analysis.description');
+
+
+?>
+<div id="tripal_analysis-base-box" class="tripal_analysis-info-box tripal-info-box">
+  <div class="tripal_analysis-info-box-title tripal-info-box-title">Details</div>
+   <table id="tripal_analysis-table-base" class="tripal_analysis-table tripal-table tripal-table-vert">
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th>Analysis Name</th>
+        <td><?php print $analysis->name; ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Software</th>
+        <td><?php 
+          print $analysis->program; 
+          if($analysis->programversion){
+             print " (" . $analysis->programversion . ")"; 
+          }
+          if($analysis->algorithm){
+             print ". " . $analysis->algorithm; 
+          }
+          ?>
+        </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Source</th>
+        <td><?php 
+          if($analysis->sourceuri){
+             print "<a href=\"$analysis->sourceuri\">$analysis->sourcename</a>"; 
+          } else {
+             print $analysis->sourcename; 
+          }
+          if($analysis->sourceversion){
+             print " (" . $analysis->sourceversion . ")"; 
+          }
+          ?>
+          </td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-odd-row">
+        <th nowrap>Date performed</th>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$analysis->timeexecuted); ?></td>
+      </tr>
+      <tr class="tripal_analysis-table-odd-row tripal-table-even-row">
+        <th nowrap>Description</th>
+        <td><?php print $analysis->description; ?></td>
+      </tr>             	                                
+   </table>   
+</div>

+ 10 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_analysis_unigene_theme.info

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: Unigene Analysis
+description = A tripal subtheme for tripal analysis unigene module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_analysis_unigene.css
+
+scripts[] = js/tripal_analysis_unigene.js

+ 61 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_feature/tripal_feature_unigenes.tpl.php

@@ -0,0 +1,61 @@
+<?php
+$node = $variables['node'];
+$feature = $node->feature;
+$unigenes = $feature->tripal_analysis_unigene->unigenes;
+
+// if this feature has a unigene then we want to show the box
+if($unigenes){
+  //dpm($unigenes);
+?>
+<div id="tripal_feature-unigenes-box" class="tripal_feature-info-box tripal-info-box">
+  <div class="tripal_feature-info-box-title tripal-info-box-title">Unigenes</div>
+  <div class="tripal_feature-info-box-desc tripal-info-box-desc">This <?php print $feature->type_id->name ?> is part of the following unigenes:</div>
+  <?php if(count($unigenes) > 0){ ?>
+  <table id="tripal_feature-unigenes-table" class="tripal_feature-table tripal-table tripal-table-horz">
+    <tr>
+      <th>Unigene Name</th>
+      <th>Analysis Name</th>
+      <th>Sequence type in Unigene</th>
+    </tr>
+    <?php
+    $i = 0; 
+    foreach ($unigenes as $unigene){
+      $class = 'tripal-table-odd-row';
+      if($i % 2 == 0 ){
+         $class = 'tripal-table-even-row';
+      }
+      ?>
+      <tr class="<?php print $class ?>">
+        <td><?php 
+           if($unigene->nid){
+              print "<a href=\"".url("node/$unigene->nid")."\">$unigene->unigene_name</a>";
+           } else {
+              print $unigene->unigene_name;
+           }?>
+        </td>
+        <td><?php 
+           if($analysis->nid){
+              print "<a href=\"".url("node/$analysis->nid")."\">$analysis->name</a>";
+           } else {
+              print $analysis->name;
+           }?>
+        </td>
+        <td nowrap><?php 
+           if($unigene->singlet){
+              print "Singlet";
+           } else {
+              print $feature->type_id->name;
+           }?>
+        </td>
+      </tr>
+      <?php
+      $i++;  
+    } ?>
+  </table>
+  <?php } else { ?>
+    <div class="tripal-no-results">There are no unigenes for this feature</div> 
+  <?php }?>
+</div>
+<?php 
+}
+?>

+ 52 - 0
theme/tripal_subthemes/tripal_analysis_unigene_theme/tripal_organism/tripal_organism_unigenes.tpl.php

@@ -0,0 +1,52 @@
+<?php
+$node = $variables['node'];
+$organism = $node->organism;
+$unigenes = $organism->tripal_analysis_unigene->unigenes;
+
+//dpm($unigenes);
+?>
+<div id="tripal_organism-unigenes-box" class="tripal_feature-info-box tripal-info-box">
+  <div class="tripal_feature-info-box-title tripal-info-box-title">Unigenes</div>
+  <div class="tripal_feature-info-box-desc tripal-info-box-desc">Below is a list of unigenes available for <i><?php print $organism->genus ?> <?php print $organism->species ?></i>. Click the unigene name for further details.</div>
+  <?php if(count($unigenes) > 0){ ?>
+  <table id="tripal_organism-unigenes-table" class="tripal_feature-table tripal-table tripal-table-horz">
+    <tr>
+      <th>Unigene Name</th>
+      <th>Analysis Name</th>
+      <th>Date Constructed</th>
+      <th>Stats</th>
+    </tr>
+    <?php
+    $i = 0; 
+    foreach ($unigenes as $unigene){
+      $class = 'tripal-table-odd-row';
+      if($i % 2 == 0 ){
+         $class = 'tripal-table-even-row';
+      }
+      ?>
+      <tr class="<?php print $class ?>">
+        <td>
+           <?php 
+           if($unigene->nid){
+              print "<a href=\"".url("node/$unigene->nid")."\">$unigene->unigene_name</a>";
+           } else {
+              print $unigene->unigene_name;
+           }?>
+        </td>
+        <td><?php print $unigene->name; ?></td>
+        <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$unigene->timeexecuted); ?></td>
+        <td nowrap>
+             <?php if($unigene->num_reads){print "Reads: $unigene->num_reads<br>";} ?>
+             <?php if($unigene->num_clusters){print "Clusters: $unigene->num_clusters<br>";} ?>
+             <?php if($unigene->num_contigs){print "Contigs: $unigene->num_contigs<br>";} ?>
+             <?php if($unigene->num_singlets){print "Singlets: $unigene->num_singlets<br>";} ?>
+        </td>
+      </tr>
+      <?php
+      $i++;  
+    } ?>
+  </table>
+  <?php } else { ?>
+    <div class="tripal-no-results">There are no unigenes for this organism</div> 
+  <?php }?>
+</div>

+ 60 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/node-tripal_bulk_loader.tpl.php

@@ -0,0 +1,60 @@
+
+<div id="tripal_bulk_loader-base-box" class="tripal_bulk_loader-info-box tripal-info-box">
+  <div class="tripal_bulk_loader-info-box-title tripal-info-box-title">
+  	<?php if ($teaser) { print l($node->title, 'node/'.$node->nid); } ?>
+  </div>
+  <div class="tripal_bulk_loader-info-box-desc tripal-info-box-desc"></div>
+  
+	<table id="tripal_bulk_loader-base-table" class="tripal_bulk_loader-table tripal-table tripal-table-vert">
+		<tr class="tripal_bulk_loader-table-odd-row tripal-table-odd-row">
+			<th>Job Name</th>
+			<td><?php print $node->loader_name;?></td>
+		</tr>
+		<tr class="tripal_bulk_loader-table-even-row tripal-table-even-row">
+			<th>Submitted By</th>
+			<td><span class="author"><?php print theme('username', $node); ?></span></td>
+		</tr>
+		<tr class="tripal_bulk_loader-table-odd-row tripal-table-odd-row">
+			<th>Job Creation Date</th>
+			<td><?php print format_date($node->created, 'custom', "F j, Y, g:i a"); ?></td>
+		</tr>		
+		<tr class="tripal_bulk_loader-table-even-row tripal-table-even-row">
+			<th>Last Updated</th>
+			<td><?php print format_date($node->changed, 'custom', "F j, Y, g:i a"); ?></td>
+		</tr>	
+		<tr class="tripal_bulk_loader-table-odd-row tripal-table-odd-row">
+			<th>Template Name</th>
+			<td><?php print $node->template->name; ?></td>
+		</tr>
+		<tr class="tripal_bulk_loader-table-even-row tripal-table-even-row">
+			<th>Data File</th>
+			<td><?php print $node->file;?></td>
+		</tr>
+		<tr class="tripal_bulk_loader-table-odd-row tripal-table-odd-row">
+			<th>Job Status</th>
+			<td><?php print $node->job_status;?></td>
+		</tr>
+	</table>  
+</div>
+
+<?php if (!$teaser) { ?>
+	<?php print drupal_get_form('tripal_bulk_loader_add_loader_job_form', $node); ?>
+
+  <?php if ($node->inserted_records) { 
+    print '<h3>Loading Summary</h3>';
+    $rows = array();
+    $total = 0;
+    foreach ($node->inserted_records as $r) {
+      $row = array();
+      $row[] = $r->table_inserted_into;
+      $row[] = $r->num_inserted;
+      $rows[] = $row;
+      $total = $total + $r->num_inserted;
+    }
+    $rows[] = array('<b>TOTAL</b>','<b>'.$total.'</b>');
+    print theme_table(array('Chado Table', 'Number of Records Inserted'), $rows);
+  } ?>
+  <br>
+  
+	<?php print theme('tripal_bulk_loader_template', $node->template->template_id); ?>
+<?php } ?>

+ 83 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_add_template_field_form.tpl.php

@@ -0,0 +1,83 @@
+
+<?php print $form['add_fields']['#prefix']; ?>
+<fieldset><legend> <?php print $form['add_fields']['#title']; ?> </legend>
+<?php
+  print drupal_render($form['template_name']);
+
+  // Foreach element in the form fieldset 'add_fields'
+  foreach ($form['add_fields'] as $key => $form_array) {
+    if (preg_match('/^#/',$key)) { continue; }
+    
+    // We only care about the additional fieldset
+    if (preg_match('/additional/', $key)) {
+      //print fieldset
+      if ($form_array['#collapsible']) { $class[] = 'collapsible'; }
+      if ($form_array['#collapsed']) { $class[] = 'collapsed'; }
+      if (sizeof($class)) { $class = ' class="'.implode(' ',$class).'"'; }
+      print '<fieldset'.$class.'><legend>'.$form_array['#title'].'</legend>';
+      
+      // Foreach element in the 'additional' fieldset
+      foreach ($form_array as $key => $sub_form_array) {
+        if (preg_match('/^#/',$key)) { continue; }
+        
+        // We only care about the 'regex_transform' fieldset
+        if (preg_match('/regex_transform/', $key)) {
+          
+          // print fieldset
+          if ($sub_form_array['#collapsible']) { $class[] = 'collapsible'; }
+          if ($sub_form_array['#collapsed']) { $class[] = 'collapsed'; }
+          if (sizeof($class)) { $class = ' class="'.implode(' ',$class).'"'; }
+          print '<fieldset'.$class.'><legend>'.$sub_form_array['#title'].'</legend>';
+          
+          // print description
+          print drupal_render($sub_form_array['regex_description']);
+          
+          // Render Draggable Table
+          drupal_add_tabledrag('draggable-table', 'order', 'sibling', 'transform-reorder');
+          $header = array('Match Pattern', 'Replacement Pattern', 'Order', '');
+          $rows = array();
+          foreach ($sub_form_array['regex-data'] as $key => $element) {
+            if (preg_match('/^#/',$key)) { continue; }
+            $element['new_index']['#attributes']['class'] = 'transform-reorder';
+            
+            $row = array();
+            $row[] = drupal_render($element['pattern']);
+            $row[] = drupal_render($element['replace']);
+            $row[] = drupal_render($element['new_index']) . drupal_render($element['id']);
+            $row[] = drupal_render($element['submit-delete']);
+            $rows[] = array('data' => $row, 'class' => 'draggable');
+          }
+          
+          print theme('table', $header, $rows, array('id' => 'draggable-table'));          
+          
+          // render remaining elements
+          foreach ($sub_form_array as $key => $s2_form_array) {
+            if (preg_match('/^#/',$key)) { continue; }
+            if (!preg_match('/regex-data/', $key)) {
+              print drupal_render($s2_form_array);
+            }
+          }
+          
+          print '</fieldset>';
+          
+        } else {
+          // render other elements  in additional fieldset
+          print drupal_render($sub_form_array);
+        }
+      }
+      print '</fieldset>';
+    } else {
+      // render other elements in add_fields fieldset
+      print drupal_render($form_array);
+    }
+  }
+  unset($form['add_fields']);
+?>
+
+</fieldset>
+</div>
+
+<?php
+  //Render remaining -Needed to submit
+  print drupal_render($form);
+?>

+ 83 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_edit_template_field_form.tpl.php

@@ -0,0 +1,83 @@
+
+<?php print $form['edit_fields']['#prefix']; ?>
+<fieldset><legend> <?php print $form['edit_fields']['#title']; ?> </legend>
+<?php
+  print drupal_render($form['template_name']);
+
+  // Foreach element in the form fieldset 'edit_fields'
+  foreach ($form['edit_fields'] as $key => $form_array) {
+    if (preg_match('/^#/',$key)) { continue; }
+    
+    // We only care about the additional fieldset
+    if (preg_match('/additional/', $key)) {
+      //print fieldset
+      if ($form_array['#collapsible']) { $class[] = 'collapsible'; }
+      if ($form_array['#collapsed']) { $class[] = 'collapsed'; }
+      if (sizeof($class)) { $class = ' class="'.implode(' ',$class).'"'; }
+      print '<fieldset'.$class.'><legend>'.$form_array['#title'].'</legend>';
+      
+      // Foreach element in the 'additional' fieldset
+      foreach ($form_array as $key => $sub_form_array) {
+        if (preg_match('/^#/',$key)) { continue; }
+        
+        // We only care about the 'regex_transform' fieldset
+        if (preg_match('/regex_transform/', $key)) {
+          
+          // print fieldset
+          if ($sub_form_array['#collapsible']) { $class[] = 'collapsible'; }
+          if ($sub_form_array['#collapsed']) { $class[] = 'collapsed'; }
+          if (sizeof($class)) { $class = ' class="'.implode(' ',$class).'"'; }
+          print '<fieldset'.$class.'><legend>'.$sub_form_array['#title'].'</legend>';
+          
+          // print description
+          print drupal_render($sub_form_array['regex_description']);
+          
+          // Render Draggable Table
+          drupal_add_tabledrag('draggable-table', 'order', 'sibling', 'transform-reorder');
+          $header = array('Match Pattern', 'Replacement Pattern', 'Order', '');
+          $rows = array();
+          foreach ($sub_form_array['regex-data'] as $key => $element) {
+            if (preg_match('/^#/',$key)) { continue; }
+            $element['new_index']['#attributes']['class'] = 'transform-reorder';
+            
+            $row = array();
+            $row[] = drupal_render($element['pattern']);
+            $row[] = drupal_render($element['replace']);
+            $row[] = drupal_render($element['new_index']) . drupal_render($element['id']);
+            $row[] = drupal_render($element['submit-delete']);
+            $rows[] = array('data' => $row, 'class' => 'draggable');
+          }
+          
+          print theme('table', $header, $rows, array('id' => 'draggable-table'));          
+          
+          // render remaining elements
+          foreach ($sub_form_array as $key => $s2_form_array) {
+            if (preg_match('/^#/',$key)) { continue; }
+            if (!preg_match('/regex-data/', $key)) {
+              print drupal_render($s2_form_array);
+            }
+          }
+          
+          print '</fieldset>';
+          
+        } else {
+          // render other elements  in additional fieldset
+          print drupal_render($sub_form_array);
+        }
+      }
+      print '</fieldset>';
+    } else {
+      // render other elements in edit_fields fieldset
+      print drupal_render($form_array);
+    }
+  }
+  unset($form['edit_fields']);
+?>
+
+</fieldset>
+</div>
+
+<?php
+  //Render remaining -Needed to submit
+  print drupal_render($form);
+?>

+ 73 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_modify_template_base_form.tpl.php

@@ -0,0 +1,73 @@
+
+<div id="tripal-bulk-loader-fields">
+<?php print drupal_render($form['template_name']); ?>
+
+<!-- For each table display details in a draggable table -->
+<?php if (!$form['records']['no_records']['#value']) { ?>
+  <fieldset><legend><?php print $form['records']['#title']; ?></legend>
+  <?php 
+    print drupal_render($form['records']['description']);
+    
+    // generate table
+    drupal_add_tabledrag('draggable-table', 'order', 'sibling', 'records-reorder');
+    $header = array('Record Name', 'Chado Table', 'Action', 'Order', '');
+    $rows = array();
+    foreach (element_children($form['records']['records-data']) as $key) {
+      $element = &$form['records']['records-data'][$key];
+      $element['new_priority']['#attributes']['class'] = 'records-reorder';
+      
+      $row = array();
+      $row[] = drupal_render($element['title']);
+      $row[] = drupal_render($element['chado_table']);
+      $row[] = drupal_render($element['mode']);
+      $row[] = drupal_render($element['new_priority']) . drupal_render($element['id']);
+      $row[] = drupal_render($element['submit-edit_record']) . '<br>' . drupal_render($element['submit-duplicate_record']) . '<br>' . drupal_render($element['submit-add_field']);
+      $rows[] = array('data' => $row, 'class' => 'draggable');
+    }
+    
+print theme('table', $header, $rows, array('id' => 'draggable-table', 'width' => '100%'));
+    
+    // Render submit
+    print drupal_render($form['records']['submit-new_record']);
+    print drupal_render($form['records']['submit-reorder']);
+    unset($form['records']);
+  ?>
+  </fieldset>
+<?php } ?>
+
+<!-- For each field display details plus edit/delete buttons-->
+<?php if ($form['fields']['total_fields']['#value'] > 0) { ?>
+  <fieldset><legend><?php print $form['fields']['#title']; ?></legend>
+
+  <?php 
+    // generate table
+  $header = array('','Record Name', 'Field Name', 'Chado Table', 'Chado Field', 'Worksheet', 'Column', 'Constant Value', 'Foreign Record');
+    $rows = array();
+    foreach ($form['fields']['fields-data'] as $key => $element) {
+      if (preg_match('/^#/', $key)) { continue; }
+      
+      $row = array();
+      $row[] = drupal_render($element['edit_submit']) . '<br>' . drupal_render($element['delete_submit']);
+      $row[] = drupal_render($element['record_id']);
+      $row[] = drupal_render($element['field_name']);
+      $row[] = drupal_render($element['chado_table_name']);
+      $row[] = drupal_render($element['chado_field_name']);
+      $row[] = drupal_render($element['sheet_name']);
+      $row[] = drupal_render($element['column_num']);
+      $row[] = drupal_render($element['constant_value']);
+      $row[] = drupal_render($element['foreign_record_id']);
+      
+      $rows[] = $row;
+    }
+print theme('table', $header, $rows, array('style'=>'table-layout: fixed; width: 100%'));
+    
+    // Render other elements
+    print drupal_render($form['fields']['add_field']);
+    unset($form['fields']);
+  ?>
+  </fieldset>
+<?php } ?>
+
+<!-- Display Rest of form -->
+<?php print drupal_render($form); ?>
+</div>

+ 69 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader/tripal_bulk_loader_template.tpl.php

@@ -0,0 +1,69 @@
+<?php
+	$fields = array();
+	$constants = array();
+	foreach ($template->template_array as $priority => $table_array) {
+		if (!is_array($table_array)) {
+			continue;
+		}
+		
+		$table = $table_array['table'];
+		$record = $table_array['record_id'];
+		foreach ($table_array['fields'] as $field) {
+			if (preg_match('/table field/', $field['type'])) {
+				$field['table'] = $table;
+				$field['record'] = $record;
+				$sheet = $field['spreadsheet sheet'];
+				$column = $field['spreadsheet column'];
+				$fields[$sheet.'-'.$column][] = $field;
+			} elseif ($field['type'] == 'constant') {
+				$field['table'] = $table;
+				$field['record'] = $record;
+				$constants[] = $field;
+			}
+		}
+	}
+?>
+
+<div id="tripal_bulk_loader-base-box" class="tripal_bulk_loader-info-box tripal-info-box">
+  <div class="tripal_bulk_loader-info-box-title tripal-info-box-title">Template Description</div>
+  <div class="tripal_bulk_loader-info-box-desc tripal-info-box-desc"></div>
+
+<?php if (sizeof($constants)) { ?>  
+  <table id="tripal_bulk_loader-template_constant-table" class="tripal_bulk_loader-table tripal-table tripal-table-vert">
+  <caption><b>Constants</b> -These values are applied to all records in the Spreadsheet</caption>
+    <tr><th rowspan="2">Record Name</th><th rowspan="2">Field Name</th><th rowspan="2">Value</th><th colspan="2">Chado Database</th></tr>
+    <tr><th>Table</th><th>Field</th></tr>
+    <?php $row = 'even' ?>
+    <?php foreach ($constants as $field) {?>
+      <tr class="tripal_bulk_loader-table-<?php print $row; ?>-row tripal-table-<?php print $row; ?>-row">
+				<td><?php print $field['record'];?></td>
+        <td><?php print $field['title'];?></td>
+        <td><?php print $field['constant value']; ?></td>
+        <td><?php print $field['table'];?></td>
+        <td><?php print $field['field'];?></td>	
+      </tr>
+      <?php $row = ($row == 'odd') ? 'even':'odd' ; ?>
+    <?php } ?>
+  </table>
+  
+<?php } if (sizeof($fields)) { ?>  
+  <table id="tripal_bulk_loader-template_fields-table" class="tripal_bulk_loader-table tripal-table tripal-table-vert">
+  <caption><b>Fields</b> -Below is a mapping between Spreadsheet columns and the Chado Database</caption>
+  <tr><th rowspan="2">Record Name</th><th rowspan="2">Field Name</th><th colspan="2">Spreadsheet</th><th colspan="2">Chado Datbase</th></tr>
+  <tr><th>Worksheet</th><th>Column</th><th>Table</th><th>Field</th></tr>
+  <?php $row = 'even' ?>
+  <?php foreach ($fields as $column) {?>
+    <?php foreach ($column as $field) {?>
+    <tr class="tripal_bulk_loader-table-<?php print $row; ?>-row tripal-table-<?php print $row; ?>-row">
+    	<td><?php print $field['record'];?></td>
+      <td><?php print $field['title'];?></td>
+      <td><?php print $field['spreadsheet sheet']; ?></td>
+      <td><?php print $field['spreadsheet column'];?></td>
+      <td><?php print $field['table'];?></td>
+      <td><?php print $field['field'];?></td>
+    <tr>
+    <?php $row = ($row == 'odd') ? 'even':'odd' ; ?>
+  <?php }} ?>
+  </table>
+<?php } ?>
+</div>

+ 7 - 0
theme/tripal_subthemes/tripal_bulk_loader_theme/tripal_bulk_loader_theme.info

@@ -0,0 +1,7 @@
+name = Tripal Subtheme: Bulk Loader
+description = A tripal subtheme for tripal bulk loader
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+

+ 177 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/node-tripal_gbrowse.tpl.php

@@ -0,0 +1,177 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Purpose: This template provides the layout of the Tripal GBrowse Instances node (page)
+//   using the same templates used for the various Tripal GBrowse blocks. An I-Frame is 
+//	 included to show the representation of the GBrowse instance(including tracks). Along with 
+//	 the I-Frame, a link to open a external I-Frame in a new window is supplied
+//
+// To Customize the Stock Node Page:
+//   - This Template: customize basic layout and which elements are included
+//   - Using Panels: Override the node page using Panels3 and place the blocks
+//       of content as you please. This method requires no programming. See
+//       the Tripal User Guide for more details
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes and it also includes Tripal GBrowse specific fields.
+//
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+ drupal_add_css('./tripal-node-templates.css');
+?>
+
+<?php if ($teaser) { 
+  
+  include('tripal_gbrowse/tripal_gbrowse_teaser.tpl.php');
+} else { ?>
+	  
+<script type="text/javascript">
+ if (Drupal.jsEnabled) {
+   $(document).ready(function() {
+      // hide all tripal info boxes at the start
+      $(".tripal-info-box").hide();
+ 
+      // iterate through all of the info boxes and add their titles
+      // to the table of contents
+      $(".tripal-info-box-title").each(function(){
+        var parent = $(this).parent();
+        var id = $(parent).attr('id');
+        var title = $(this).text();
+        $('#tripal_gbrowse_toc_list').append('<li><a href="#'+id+'" class="tripal_gbrowse_toc_item">'+title+'</a></li>');
+      });
+
+      // when a title in the table of contents is clicked, then
+      // show corresponding item in details box
+      $(".tripal_gbrowse_toc_item").click(function(){
+         $(".tripal-info-box").hide();
+         href = $(this).attr('href');
+         $(href).fadeIn('slow');
+         // make sure table of contents and the details
+         // box stay the same height
+         $("#tripal_gbrowse_toc").height($(href).parent().height());
+         return false;
+      }); 
+
+      // base details show up when the page is first shown 
+      // unless the user specified a specific block
+      var block = window.location.href.match(/\?block=.*/);
+      if(block != null){
+         block_title = block.toString().replace(/\?block=/g,'');
+         $("#tripal_gbrowse-"+block_title+"-box").show();
+      } else {
+         $("#tripal_gbrowse-base-box").show();
+      }
+
+      $("#tripal_gbrowse_toc").height($("#tripal_gbrowse-base-box").parent().height());
+   });
+}
+</script>
+
+<style type="text/css">
+  /* these styles are specific for this template and is not included 
+     in the main CSS files for the theme as it is anticipated that the
+     elements on this page may not be used for other customizations */
+  #tripal_gbrowse_toc {
+     float: left;
+     width: 20%;
+     background-color: #EEEEEE;
+     -moz-border-radius: 15px;
+     border-radius: 15px;
+     -moz-box-shadow: 3px 3px 4px #888888;
+	  -webkit-box-shadow: 3px 3px 4px #888888;
+	  box-shadow: 3px 3px 4px #888888;
+     padding: 20px;
+     min-height: 200px;
+     border-style:solid;
+     border-width:1px;
+  }
+  #tripal_gbrowse_toc ul {
+    margin-left: 0px;
+    margin-top: 5px;
+    padding-left: 15px;
+  }
+  #tripal_gbrowse_toc_title {
+     font-size: 1.5em;
+  }
+  #tripal_gbrowse_toc_desc {
+    font-style: italic;
+  }
+  #tripal_gbrowse_details {
+     float: left;
+     width: 70%;
+     background-color: #FFFFFF;
+     -moz-border-radius: 15px;
+     border-radius: 15px;
+     -moz-box-shadow: 3px 3px 4px #888888;
+	  -webkit-box-shadow: 3px 3px 4px #888888;
+	  box-shadow: 3px 3px 4px #888888;
+     padding: 20px;
+     min-height: 200px;
+     margin-right: 10px;
+     border-style:solid;
+     border-width:1px;
+  }
+  #tripal_gbrowse-base-box img {
+    float: left;
+    margin-bottom: 10px;
+  }
+  #tripal_gbrowse-table-base {
+    float: left;
+    width: 400px;
+    margin-left: 10px;
+    margin-bottom: 10px;
+  }
+  #tripal_gbrowse_addtional_content {
+		clear:both;
+  	width: 100%;
+  }
+</style>
+
+<div id ="tripal_gbrowse_content">
+<div id="tripal_gbrowse_details" class="tripal_details"><h2>
+
+   <!-- Basic Details Theme -->
+   <?php include('tripal_gbrowse/tripal_gbrowse_details.tpl.php'); ?>
+
+   <!-- GBrowse Details -->
+   <?php 
+   global $account;
+   if(user_access('access database-related details',$account)){
+     include('tripal_gbrowse/tripal_gbrowse_database_details.tpl.php'); 
+	 }?>
+   <?php print $content ?>
+   
+    <!-- GBrowse Loaded Sources -->
+   <?php 
+     include('tripal_gbrowse/tripal_gbrowse_loaded_sources.tpl.php');
+     ?>
+   <?php print $content ?>
+ 
+</div>
+
+<!-- Table of contents -->
+<div id="tripal_gbrowse_toc" class="tripal_toc">
+   <div id="tripal_gbrowse_toc_title" class="tripal_toc_title">Resources</div>
+   <span id="tripal_gbrowse_toc_desc" class="tripal_toc_desc"></span>
+   <ul id="tripal_gbrowse_toc_list" class="tripal_toc_list">
+
+   </ul>
+</div>
+</div>
+
+<!--- I-Frame Code Section --->
+<div id="tripal_gbrowse_addtional_content">
+
+	<!--- Include for file that makes the I-Frame and external window possible --->
+ <?php include('tripal_gbrowse/tripal_gbrowse_gbrowse_instance.tpl.php'); ?>
+
+</div>
+<?php } ?>

+ 48 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_database_details.tpl.php

@@ -0,0 +1,48 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Purpose: Provide layout and content for the GBrowse database details. This
+//   includes database related fields in the tripal_gbrowse_instances table.
+//
+// Note: This template controls the layout/content for the default tripal_gbrowse node
+//   template (node-tripal_grbowse.tpl.php) and the Database Details Block
+//
+// Variables Available:
+//   - $node: a standard object which contains includes GBrowse Databse specific fields such as  
+//			 database_name, database_user, user_password, etc.
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?>  
+
+<?php
+
+$gbrowse = $node->gbrowse;
+
+?>
+<div id="tripal_gbrowse-database-box" class="tripal_gbrowse-info-box tripal-info-box">
+  <div class="tripal_gbrowse-info-box-title tripal-info-box-title"> Data Base Details</div>
+  <div class="tripal_gbrowse-info-box-desc tripal-info-box-desc"></div>
+
+   <?php //if the gbrowse is deleted/removed issue a warning
+   if(strcmp($gbrowse->is_obsolete,'t')==0){ 
+   ?>
+      <div class="tripal_gbrowse-obsolete">This GBrowse Instance is obsolete or has been deleted/removed</div>
+   <?php }?>
+   <table id="tripal_gbrowse-base-table" class="tripal_gbrowse-table tripal-table tripal-table-vert">
+      <tr class="tripal_gbrowse-table-even-row tripal-table-even-row">
+        <th>Data Base Name</th>
+        <td><?php print $node->gbrowse->database_name; ?></td>
+      </tr>
+      <tr class="tripal_gbrowse-table-odd-row tripal-table-odd-row">
+        <th nowrap>Database User Name</th>
+        <td><?php print $node->gbrowse->database_user; ?></td>
+      </tr>
+      <tr class="tripal_gbrowse-table-even-row tripal-table-even-row">
+        <th>User Password</th>
+        <td><?php print $node->gbrowse->user_password; ?></td>
+      </tr>     	                                
+   </table>
+</div>

+ 45 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_details.tpl.php

@@ -0,0 +1,45 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan 
+//
+// Purpose: Provide layout and content for the GBrowse database details. This
+//   includes databse user specific fields in the tripal_gbrowse_instances table.
+//
+// Note: This template controls the layout/content for the default tripal_gbrowse node
+//   template (node-tripal_grbowse.tpl.php) and the Database Details Block
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes. It also includes GBrowse specific fields such as gbrowse_name, 
+//			 database_link, config_file.
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?> 
+
+
+<?php $gbrowse = $node->gbrowse; ?>
+
+<div id="tripal_gbrowse-base-box" class="tripal_gbrowse-info-box tripal-info-box">
+  <div class="tripal_gbrowse-info-box-title tripal-info-box-title"> GBrowse Details</div>
+  <div class="tripal_gbrowse-info-box-desc tripal-info-box-desc"></div>
+
+   <?php if(strcmp($gbrowse->is_obsolete,'t')==0){ ?>
+      <div class="tripal_gbrowse-obsolete">This GBrowse Instance is obsolete or has been deleted/removed</div>
+   <?php }?>
+   <table id="tripal_gbrowse-base-table" class="tripal_gbrowse-table tripal-table tripal-table-vert">
+      <tr class="tripal_gbrowse-table-even-row tripal-table-even-row">
+        <th>GBrowse Instance</th>
+        <td><?php print $node->gbrowse->gbrowse_name; ?></td>
+      </tr>
+      <tr class="tripal_gbrowse-table-odd-row tripal-table-odd-row">
+        <th nowrap>GBrowse Instance Link</th>
+        <td><?php print $node->gbrowse->gbrowse_link; ?></td>
+      </tr>
+      <tr class="tripal_gbrowse-table-even-row tripal-table-even-row">
+        <th>Configuration File</th>
+        <td><?php print $node->gbrowse->config_file; ?></td>
+      </tr>     	                                
+   </table>
+</div>

+ 28 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_gbrowse_instance.tpl.php

@@ -0,0 +1,28 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Purpose: Provide a in window I-Frame that displays the GBrowse instance. As well,
+// a link to open the GBrowse instance in a external window is provided. If the window can not be
+// opened a warning is issued
+//   
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes. Here it is utilized for accessing the link to a specific GBrowse instance.
+//
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?>
+
+<br />
+<h3><a href="<?php print $node->gbrowse->gbrowse_link; ?>" target="_blank">Open GBrowse Instance in new Window</a></h3>
+<br />
+
+<iframe src="<?php print $node->gbrowse->gbrowse_link; ?>" width="100%" height="800">
+  <p>Your browser does not support iframes.</p>
+</iframe>

+ 42 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_loaded_sources.tpl.php

@@ -0,0 +1,42 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Variables Available:
+//   - $node: a standard object which contains includes GBrowse Databse specific fields such as  
+//			 database_name, database_user, user_password, etc.
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?>  
+
+<?php
+
+$gbrowse = $node->gbrowse;
+$node->sources = tripal_gbrowse_getloaded_sources($node->gbrowse);
+
+?>
+<div id="tripal_gbrowse-source-box" class="tripal_gbrowse-info-box tripal-info-box">
+  <div class="tripal_gbrowse-info-box-title tripal-info-box-title"> Loaded Sources</div>
+  <div class="tripal_gbrowse-info-box-desc tripal-info-box-desc">A source can be either a library or analysis or any other grouping of features.</div>
+
+   <?php //if the gbrowse is deleted/removed issue a warning
+   if(strcmp($gbrowse->is_obsolete,'t')==0){ 
+   ?>
+      <div class="tripal_gbrowse-obsolete">This GBrowse Library is obsolete or has been deleted/removed</div>
+   <?php }?>
+   <table id="tripal_gbrowse-base-table" class="tripal_gbrowse-table tripal-table tripal-table-vert">
+   <tr><th>Name</th></tr>
+   
+   
+   <?php 
+   if(!empty($node->sources)){
+   	foreach($node->sources as $key => $source){
+   ?>
+      <tr class="tripal_gbrowse-table-even-row tripal-table-even-row">
+        <td><?php print $source; ?></td>
+      </tr>
+		<?php }} //end of foreach library & end of if statement ?>  	                                
+   </table>
+</div>

+ 34 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse/tripal_gbrowse_teaser.tpl.php

@@ -0,0 +1,34 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Purpose: Provide layout and content for the Tripal Gbrowse details.Represents
+// what the user will see if the there is no information in the node
+//
+// Variables Available:
+//   - $node: a standard object which contains all the fields associated with
+//       nodes including nid, gbrowse_id.
+//   NOTE: For a full listing of fields available in the node object the
+//       print_r $node line below or install the Drupal Devel module which 
+//       provides an extra tab at the top of the node page labelled Devel
+?>
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?>
+
+<div id="tripal_gbrowse-base-box" class="tripal_gbrowse-info-box tripal-info-box">
+  <div class="tripal_gbrowse-info-box-title tripal-info-box-title">
+  
+  	<!-- Title -->  	
+    <?php print l($node->gbrowse->gbrowse_name, 'node/'.$node->nid); ?>
+
+		
+  </div>
+  <div class="tripal_gbrowse-info-box-desc tripal-info-box-desc"></div>
+
+<p>This is a representation of a created GBrowse instance.<p>
+<?php print l('See More Details', 'node/'.$node->nid); ?>
+
+ 
+</div>

+ 7 - 0
theme/tripal_subthemes/tripal_gbrowse_theme/tripal_gbrowse_theme.info

@@ -0,0 +1,7 @@
+name = Tripal Subtheme: Gbrowse
+description = A tripal subtheme for tripal gbrowse module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+

+ 22 - 0
theme/tripal_subthemes/tripal_genetic_theme/tripal_feature_genotypes.tpl.php

@@ -0,0 +1,22 @@
+
+<?php
+$feature = $variables['node']->feature;
+$genotypes = $variables['tripal_feature']['genotypes'];
+?>
+
+<?php if(count($genotypes) > 0){ ?>
+<div id="tripal_feature-genotypes-box" class="tripal_feature-info-box tripal-info-box">
+  <div class="tripal_feature-info-box-title tripal-info-box-title">Genotypes</div>
+  <div class="tripal_feature-info-box-desc tripal-info-box-desc">
+    Genotypes of this <?php print $feature->type_id->name; ?> in various germplasm
+  </div>
+  <ul>
+    <?php foreach ($genotypes as $g) { 
+        $genotype = $g->description;
+        if (preg_match('/insufficient sequence/',$genotype)) { $genotype = "<font colour='grey'>".$genotype.'</font>'; }
+    ?>
+      <li><?php print $genotype; ?></li>
+    <?php } ?>
+  </ul>
+</div>
+<?php } ?>

+ 7 - 0
theme/tripal_subthemes/tripal_genetic_theme/tripal_genetic_theme.info

@@ -0,0 +1,7 @@
+name = Tripal Subtheme: Genetic Theme
+description = A tripal subtheme for tripal genetic theme
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+

+ 73 - 0
theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_feature-genotype_experiments.tpl.php

@@ -0,0 +1,73 @@
+
+<?php
+  $num_results_per_page = 25;
+  $feature = $variables['node']->feature;
+  
+  // get all genotypes associatated with the current feature
+  $query = "SELECT * FROM genotype WHERE genotype_id IN (SELECT genotype_id FROM feature_genotype WHERE feature_id=%d)";
+  $resource = db_query($query, $feature->feature_id);
+  $genotypes = array();
+  while( $r = db_fetch_array($resource)) {
+    $genotypes[$r['genotype_id']] = $r;
+  }
+  
+  if (!empty($genotypes)) {
+    // SELECT all nd_experiments where type=genotype and experiment is connected to the current feature
+    $query = "SELECT nd_experiment_id, genotype_id FROM nd_experiment_genotype "
+      ."WHERE genotype_id IN (%s) "
+      ."ORDER BY nd_experiment_id";
+    $resource = pager_query($query, $num_results_per_page, 0, NULL, implode(',',array_keys($genotypes)));
+    $results = array();
+    while ($r = db_fetch_object($resource)) {
+    
+      // Get the stock associated with each experiment
+      $query2 = "SELECT s.* FROM stock s "
+        ."WHERE s.stock_id IN (SELECT stock_id FROM nd_experiment_stock WHERE nd_experiment_id=%d)";
+      $stock = db_fetch_array(db_query($query2, $r->nd_experiment_id));
+      
+      $item = array(
+        'nd_experiment' => array(
+          'nd_experiment_id' => $r->nd_experiment_id
+        ),
+        'genotype' =>  $genotypes[$r->genotype_id],
+        'stock' => $stock,
+      );
+      
+      // Get the nid associated with the feature (used for linking)
+      $query3 = "SELECT nid FROM chado_stock WHERE stock_id=%d";
+      $nid = db_fetch_object(db_query($query3,$stock['stock_id']));
+      $item['stock']['nid'] = $nid->nid;
+      
+      $results[$r->nd_experiment_id] = $item;
+    }
+  }
+?>
+
+<?php if(count($results) > 0){ ?>
+<div id="tripal_feature-genotype_experiments-box" class="tripal_feature-info-box tripal-info-box">
+  <div class="tripal_feature-info-box-title tripal-info-box-title">Genotype Experiments</div>
+  <div class="tripal_feature-info-box-desc tripal-info-box-desc">
+    Genotypes of this <?php print $feature->type_id->name; ?> in various germplasm
+  </div>
+  <table>
+    <tr><th>Germplasm Assayed</th><th>Genotype Observed</th></tr>
+    <?php foreach ($results as $r) { 
+        $genotype = $r['genotype']['description'];
+        if (preg_match('/insufficient/',$genotype)) { $genotype = "<font color='grey'>".$genotype.'</font>'; }
+        $stock_name = $r['stock']['name'];
+        if ($r['stock']['nid']) {
+          $stock_link = 'node/'.$r['stock']['nid'];
+          $stock = l($stock_name, $stock_link);
+        } else {
+          $stock = $stock_name;
+        }
+    ?>
+      <tr><td><?php print $stock; ?></td><td><?php print $genotype; ?></td></tr>
+    <?php } ?>
+  </table>
+  <?php 
+   print theme('pager', array(), $num_results_per_page, 0, array('block'=>'genotype_experiments'), 5); 
+  ?>
+</div>
+<?php } ?>
+

+ 7 - 0
theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_natural_diversity_theme.info

@@ -0,0 +1,7 @@
+name = Tripal Subtheme: Natural Diversity Theme
+description = A tripal subtheme for tripal natural diversity module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+

+ 80 - 0
theme/tripal_subthemes/tripal_natural_diversity_theme/tripal_stock-genotype_experiments.tpl.php

@@ -0,0 +1,80 @@
+
+<?php
+  $num_results_per_page = 25;
+  
+  // SELECT all nd_experiments where type=genotype and experiment is connected to the current stock
+  $query = "SELECT nd_experiment_id FROM nd_experiment "
+    ."WHERE nd_experiment_id IN (SELECT nd_experiment_id FROM nd_experiment_stock WHERE stock_id=%d) "
+      ."AND type_id IN (SELECT cvterm_id FROM cvterm WHERE name='genotype') "
+    ."ORDER BY nd_experiment_id";
+  $resource = pager_query($query, $num_results_per_page, 0, NULL, $node->stock->stock_id);
+  $results = array();
+  while ($r = db_fetch_object($resource)) {
+
+    // Get the genotype & feature associated with each experiment
+    $query2 = "SELECT g.*, f.uniquename as feature_uniquename, f.name as feature_name, f.feature_id FROM genotype g "
+      ."LEFT JOIN feature_genotype fg ON fg.genotype_id=g.genotype_id "
+      ."LEFT JOIN feature f ON fg.feature_id=f.feature_id "
+      ."WHERE g.genotype_id IN (SELECT genotype_id FROM nd_experiment_genotype WHERE nd_experiment_id=%d)";
+    $genotype_feature = db_fetch_object(db_query($query2, $r->nd_experiment_id));
+
+    $item = array(
+      'nd_experiment' => array(
+        'nd_experiment_id' => $r->nd_experiment_id
+      ),
+      'genotype' => array(
+        'genotype_id' => $genotype_feature->genotype_id,
+        'uniquename' => $genotype_feature->uniquename,
+        'description' => $genotype_feature->description,
+      ),
+      'feature' => array(
+        'feature_id' => $genotype_feature->feature_id,
+        'uniquename' => $genotype_feature->feature_uniquename,
+        'name' => $genotype_feature->feature_name,
+      ),
+    );
+    
+    // Get the nid associated with the feature (used for linking)
+    $query3 = "SELECT nid FROM chado_feature WHERE feature_id=%d";
+    $nid = db_fetch_object(db_query($query3,$genotype_feature->feature_id));
+    $item['feature']['nid'] = $nid->nid;
+    
+    $results[$r->nd_experiment_id] = $item;
+  }
+?>
+
+<?php if (!empty($results)) { ?>
+  <div id="tripal_stock-genotype_experiments-box" class="tripal_stock-info-box tripal-info-box">
+    <div class="tripal_stock-info-box-title tripal-info-box-title">Genotype Experiments</div>
+    <div class="tripal_stock-info-box-desc tripal-info-box-desc"></div>
+    <table>
+      <tr><th>Marker Assayed</th><th>Genotype Observed</th></tr>
+      <?php
+        foreach ($results as $r) {
+          // genotype
+          $genotype = $r['genotype']['description'];
+          if (preg_match('/insufficient/',$genotype)) { 
+            $genotype = "<font color='grey'>".$genotype.'</font>'; 
+          }
+          
+          // feature name
+          if ($r['feature']['name']) {
+            $marker_name = $r['feature']['name'];
+          } else {
+            $marker_name = $r['feature']['uniquename'];
+          }
+          
+          // add link if feature sync'd
+          if ($r['feature']['nid']) {
+            $marker_link = 'node/'.$r['feature']['nid'];
+            $marker = l($marker_name, $marker_link);
+          } else {
+            $marker = $marker_name;
+          }
+      ?>
+      <tr><td><?php print $marker; ?></td><td><?php print $genotype; ?></td></tr>
+      <?php } ?>
+    </table>
+    <?php print theme('pager', array(), $num_results_per_page, 0, array('block'=>'genotype_experiments'), 5); ?>
+  </div>
+<?php } ?>

+ 13 - 0
theme/tripal_subthemes/tripal_pub_theme/node-tripal_pub.tpl.php

@@ -0,0 +1,13 @@
+<?php
+// Developed by: Chad N.A Krilow at The University of Saskatchewan
+//
+// Purpose: This template provides the layout of the Tripal Pub node (page)
+//   using the same templates used for the various Tripal blocks. 
+?> 
+
+<?php
+ //uncomment this line to see a full listing of the fields avail. to $node
+ //print '<pre>'.print_r($node,TRUE).'</pre>';
+?>
+
+

+ 7 - 0
theme/tripal_subthemes/tripal_pub_theme/tripal_pub_theme.info

@@ -0,0 +1,7 @@
+name = Tripal Subtheme: Pub Theme
+description = A tripal subtheme for tripal pub module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+

+ 40 - 0
theme/tripal_subthemes/tripal_search_unigene_theme/css/tripal_search_unigene.css

@@ -0,0 +1,40 @@
+.tripal_search_unigene-views-exposed-form {
+	margin: 10px;
+	padding:10px;
+	background: #FFFFFF;
+	border: 1px solid #CCCCCC;
+}
+
+.tripal-search-unigene-exposed-widget {
+	clear:both;
+	padding: 5px;
+}
+
+.tripal-search-unigene-form-labels {
+	float:left;
+}
+
+.tripal_search_unigene-views-operator {
+	float:left;
+	clear:none;
+	margin-left: 5px;
+}
+
+.tripal_search_unigene-views-widget {
+	float:left;
+	clear:none;
+	margin-left: 5px;
+}
+
+.tripal_search_unigene-table {
+	margin-left: 10px;
+}
+ 
+ .tripal-search-unigene-exposed-widgets-fields legend{
+   color:green;
+ }
+ 
+ #tripal_search_unigene-result-top:hover {
+   text-decoration: none;
+   color:#292929;
+ }

+ 20 - 0
theme/tripal_subthemes/tripal_search_unigene_theme/js/tripal_search_unigene.js

@@ -0,0 +1,20 @@
+//
+// Copyright 2009 Clemson University
+//
+
+if (Drupal.jsEnabled) {
+
+   $(document).ready(function(){
+
+		// Move to the result top
+		var result_top = document.getElementById('tripal_search_unigene-result-top');
+		if (result_top) {	
+			 var target_offset = $("#tripal_search_unigene-result-top").offset();
+			 var target_top = target_offset.top;
+			 if (navigator.userAgent.indexOf('MSIE 8.0') !=-1) 	{
+				target_top -= 60;	
+			}
+			$('html, body').animate({scrollTop: target_top}, 1000);
+		}
+   });
+}

+ 10 - 0
theme/tripal_subthemes/tripal_search_unigene_theme/tripal_search_unigene_theme.info

@@ -0,0 +1,10 @@
+name = Tripal Subtheme: Unigene Search Theme
+description = A tripal subtheme for tripal search unigene module
+version = 6.x-0.3.1b
+core = 6.x
+engine = phptemplate
+base theme = tripal
+
+stylesheets[all][] = css/tripal_search_unigene.css
+
+scripts[] = js/tripal_analysis_search_unigene.js

+ 195 - 0
theme/tripal_subthemes/tripal_search_unigene_theme/views-exposed-form--unigene_search.tpl.php

@@ -0,0 +1,195 @@
+<?php
+// $Id: views-exposed-form.tpl.php,v 1.4.4.1 2009/11/18 20:37:58 merlinofchaos Exp $
+/**
+ * @file views-exposed-form.tpl.php
+ *
+ * This template handles the layout of the views exposed filter form.
+ *
+ * Variables available:
+ * - $widgets: An array of exposed form widgets. Each widget contains:
+ * - $widget->label: The visible label to print. May be optional.
+ * - $widget->operator: The operator for the widget. May be optional.
+ * - $widget->widget: The widget itself.
+ * - $button: The submit button for the form.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php if (!empty($q)): ?>
+  <?php
+    // This ensures that, if clean URLs are off, the 'q' is added first so that
+    // it shows up first in the URL.
+    print $q;
+
+  ?>
+<?php endif;     //dsm($widgets);?>
+<div class="tripal_search_unigene-views-exposed-form views-exposed-form">
+  <div class="views-exposed-widgets clear-block">
+    
+    <?php 
+    	$feature_type_id =  $widgets['filter-feature_type']; 
+    	$orgnism_common_name =  $widgets['filter-organism_common_name'];
+    	$analysis_name =  $widgets['filter-unigene'];
+    	$feature_name =  $widgets['filter-feature_name'];
+    	$feature_seqlen =  $widgets['filter-feature_seqlen'];
+    	$cvterm_name =  $widgets['filter-go_term'];
+    	$blast_value =  $widgets['filter-blast_value'];
+    	$interpro_value =  $widgets['filter-interpro_value'];
+    	$kegg_value =  $widgets['filter-kegg_value'];
+    ?>
+    
+    <div id="tripal-search-unigene-exposed-widgets">
+    <div> Search ESTs or unigene contigs by name, assembly, sequence type, length, or their putative function. <br><br></div>
+			<fieldset class="tripal-search-unigene-exposed-widgets-fields">
+				<legend>Search by Name</legend>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $orgnism_common_name->id; ?>"><?php print $orgnism_common_name->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($orgnism_common_name->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $orgnism_common_name->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+					<?php print $orgnism_common_name->widget; ?>
+					</div>
+				</div>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $feature_name->id; ?>"><?php print $feature_name->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($feature_name->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $feature_name->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+						<?php print $feature_name->widget; ?>
+					</div>
+				</div>
+			</fieldset>
+
+			<fieldset class="tripal-search-unigene-exposed-widgets-fields">
+				<legend>Search by Assembly</legend>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $feature_type_id->id; ?>"><?php print $feature_type_id->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($feature_type_id->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $feature_type_id->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+					<?php print $feature_type_id->widget; ?>
+					</div>
+				</div>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $analysis_name->id; ?>"><?php print $analysis_name->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($analysis_name->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $analysis_name->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+						<?php print $analysis_name->widget; ?>
+					</div>
+				</div>
+			</fieldset>
+
+			<fieldset class="tripal-search-unigene-exposed-widgets-fields">
+				<legend>Search by Sequence</legend>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $feature_seqlen->id; ?>"><?php print $feature_seqlen->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($feature_seqlen->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $feature_seqlen->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+					<?php print $feature_seqlen->widget; ?>
+					</div>
+				</div>
+			</fieldset>
+
+			<fieldset class="tripal-search-unigene-exposed-widgets-fields">
+				<legend>Search by Putative Function</legend>
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $cvterm_name->id; ?>"><?php print $cvterm_name->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($cvterm_name->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $cvterm_name->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+					<?php print $cvterm_name->widget; ?>
+					</div>
+				</div>
+
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $blast_value->id; ?>"><?php print $blast_value->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($blast_value->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $blast_value->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+						<?php print $blast_value->widget; ?>
+					</div>
+				</div>
+				
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $kegg_value->id; ?>"><?php print $kegg_value->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($kegg_value->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $kegg_value->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+						<?php print $kegg_value->widget; ?>
+					</div>
+				</div>
+				
+				<div class="tripal-search-unigene-exposed-widget">
+					<div class="tripal-search-unigene-form-labels">
+						<label for="<?php print $interpro_value->id; ?>"><?php print $interpro_value->label; ?>
+						</label>
+					</div>
+					<?php if (!empty($interpro_value->operator)): ?>
+					<div class="tripal_search_unigene-views-operator">
+					<?php print $interpro_value->operator; ?>
+					</div>
+					<?php endif; ?>
+					<div class="tripal_search_unigene-views-widget">
+						<?php print $interpro_value->widget; ?>
+					</div>
+				</div>
+			</fieldset>
+
+		</div>
+    
+    <div class="tripal-search-unigene-exposed-widget">
+    	<input TYPE="Button" value="Reset" onClick="window.location = '<?php global $base_url; print "$base_url/est_search"?>';">
+      <?php $button = preg_replace("'Apply'", "Search", $button); print $button ?>
+    </div>
+  </div>
+</div>

+ 221 - 0
theme/tripal_subthemes/tripal_search_unigene_theme/views-view-table--unigene_search.tpl.php

@@ -0,0 +1,221 @@
+<?php
+// $Id: views-view-table.tpl.php,v 1.8 2009/01/28 00:43:43 merlinofchaos Exp $
+/**
+ * @file views-view-table.tpl.php
+ * Template to display a view as a table.
+ *
+ * - $title : The title of this group of rows.  May be empty.
+ * - $header: An array of header labels keyed by field id.
+ * - $fields: An array of CSS IDs to use for each field id.
+ * - $class: A class or classes to apply to the table, based on settings.
+ * - $row_classes: An array of classes to apply to each row, indexed by row
+ *   number. This matches the index in $rows.
+ * - $rows: An array of row items. Each row is an array of content.
+ *   $rows are keyed by row number, fields within rows are keyed by field ID.
+ * @ingroup views_templates
+ */
+?>
+
+<?php
+$total = $view->total_rows;
+$query = $view->build_info['query'];
+$pager = $view->pager;
+$limit = $pager ['items_per_page'];
+$offset = $pager ['current_page'] * $limit;
+$args = $view->build_info['query_args'];
+global $base_url;
+?>
+
+<a id="tripal_search_unigene-result-top" name="search_results">
+&nbsp;&nbsp;&nbsp;Your search produced <b><?php print $total ?></b> results<br>
+<i>&nbsp;&nbsp;&nbsp;Note: To get complete annotation for a sequence, click on the sequence name.</i>
+</a>
+<table class="tripal_search_unigene-table <?php print $class; ?> tripal-table-horz">
+  <?php if (!empty($title)) : ?>
+    <caption><?php print $title; ?></caption>
+  <?php endif; ?>
+  <thead>
+    <tr class="tripal_search_unigene-table-header tripal-table-header">
+      <?php foreach ($header as $field => $label): ?>
+        <th class="views-field views-field-<?php print $fields[$field]; ?>">
+          <?php print $label; ?>
+        </th>
+      <?php endforeach; ?>
+    </tr>
+  </thead>
+  <tbody>
+    <?php foreach ($rows as $count => $row): 
+    			$rowclass = "";
+    			if ($count % 2 != 0) {
+    				$rowclass = "tripal_search_unigene-table-even-row tripal-table-even-row";
+    			} else {
+    				$rowclass = "tripal_search_unigene-table-odd-row tripal-table-odd-row";
+    			}
+    ?>
+      <tr class="<?php print $rowclass?> <?php print implode(' ', $row_classes[$count]); ?>">
+        <?php foreach ($row as $field => $content): ?>
+          <td class="views-field views-field-<?php print $fields[$field]; ?>">
+            <?php print $content; ?>
+          </td>
+        <?php endforeach; ?>
+      </tr>
+    <?php endforeach; ?>
+  </tbody>
+</table>
+
+<?php /* if ($count != 0) {
+	// Generate Excel files
+	// set parameters for excel file
+	$param_excel= array();
+	global $user;
+	$dir = file_directory_path().'/tripal/tripal_search_unigene/'.session_id();
+	if (!file_exists($dir)) {
+		mkdir ($dir, 0777);
+	}
+	$file =session_id().'/unigene_search_result.xls';
+	
+	$param_excel['sheet_name']		= 'unigene_search';
+	$path = "/tripal/tripal_search_unigene/$file";
+	$param_excel['filename']		= file_directory_path().$path;
+	$path_url =url("sites/default/files/tripal/tripal_search_unigene/$file");
+	# set SQL
+	$sql = "$query LIMIT $limit OFFSET $offset";
+	# create heades
+	$col_chr = 'A';
+	$headers = array();
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 20, 'type' => 'hyperlink', 'field' => 'unigene_for_search_feature_name', 'heading' => 'Feature name');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 10, 'type' => 'text', 'field' => 'unigene_for_search_organism_common_name', 'heading' => 'Organism');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 10, 'type' => 'text', 'field' => 'unigene_for_search_feature_seqlen', 'heading' => 'Length');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 10, 'type' => 'text', 'field' => 'unigene_for_search_feature_type', 'heading' => 'Type');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 20, 'type' => 'text', 'field' => 'unigene_for_search_go_term', 'heading' => 'GO term');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 20, 'type' => 'text', 'field' => 'unigene_for_search_blast_value', 'heading' => 'Blast');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 20, 'type' => 'text', 'field' => 'unigene_for_search_kegg_value', 'heading' => 'KEGG');
+	$headers[$col_chr++] = array('align' => 'left', 'width' => 20, 'type' => 'text', 'field' => 'unigene_for_search_interpro_value', 'heading' => 'Interpro');
+	
+	# populate data
+	$result = chado_query($sql, $args);
+	$data = array();
+	while ($row = db_fetch_array($result)) {
+		$data[] = array ('unigene_for_search_feature_name' => $row['unigene_for_search_feature_name'],
+									 'hyperlink_unigene_for_search_feature_name' => "$base_url/ID".$row['unigene_for_search_feature_id'],
+									 'unigene_for_search_organism_common_name' => $row['unigene_for_search_organism_common_name'],
+									 'unigene_for_search_feature_seqlen' => $row['unigene_for_search_feature_seqlen'],
+									 'unigene_for_search_feature_type' => $row['unigene_for_search_feature_type'],
+									 'unigene_for_search_go_term' => $row['unigene_for_search_go_term'],
+									 'unigene_for_search_blast_value' => $row['unigene_for_search_blast_value'],
+									 'unigene_for_search_kegg_value' => $row['unigene_for_search_kegg_value'],
+									 'unigene_for_search_interpro_value' => $row['unigene_for_search_interpro_value']
+									 );
+	}
+	# add headers and data
+	$param_excel['contents']['sheet']['headers']= $headers;
+	$param_excel['contents']['sheet']['data']= $data;
+	# generate excel
+	ml_generate_excel($param_excel);
+	print "&nbsp;&nbsp;&nbsp;<a href=\"$path_url\">Download as Excel file</a>";
+	
+}
+*/?>
+
+<?php 
+# ----------------------------------------- #
+# [UD] ml_generate_excel
+# ----------------------------------------- #
+function ml_generate_excel ($param_excel) {
+	# get and update parameters
+	$writer		= ($param_excel['version'] == '2007') ? 'Excel2007' : 'Excel5';
+	$link_clr	= (empty($param_excel['link_clr'])) ? '0000FF' : $param_excel['link_clr'];
+	$filename	= $param_excel['filename'];
+	if (!preg_match("/(xls|xlsx)$/", $filename)) {
+		$filename = ($param_excel['version'] == '2007') ? $filename.'.xlsx' : $filename.'.xls';
+	}
+	/*********************************************/
+	# create an excel file
+	/*********************************************/
+	# create new PHPExcel object
+	$excel = new PHPExcel();
+	# Set properties
+	$excel->getProperties()->setCreator("Main Lab");
+	$excel->getProperties()->setLastModifiedBy("Main Lab");
+	$excel->getProperties()->setTitle("Office 2007 XLSX Document");
+	$excel->getProperties()->setSubject("");
+	$excel->getProperties()->setKeywords("");
+	$excel->getProperties()->setCategory("");
+	$excel->getProperties()->setDescription("");
+	# set default styles
+	$excel->getDefaultStyle()->getFont()->setName('Times New Roman');
+	$excel->getDefaultStyle()->getFont()->setSize(11);
+	# create worksheets
+	$sheet_no= 0;
+	foreach ($param_excel['contents'] as $sheet_name => $sheet) {
+		if ($sheet_no != 0) {
+			# add a new worksheet
+			$excel->createSheet();
+		}	
+		# set active sheet
+		$excel->setActiveSheetIndex($sheet_no);		
+		# get current worksheet
+		$worksheet = $excel->getActiveSheet();	
+		# set title for this sheet
+		$worksheet->setTitle($sheet_name);
+		# get headers
+		$headers= $param_excel['contents'][$sheet_name]['headers'];
+		# set style and headings for headers
+		foreach ($headers as $col_chr => $prop) {
+			# set alignment for column
+			$align= PHPExcel_Style_Alignment::HORIZONTAL_LEFT;
+			if ($prop['align'] == 'right') {
+				$align= PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;
+			}
+			else if ($prop['align'] == 'center') {
+				$align= PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
+			}
+			$worksheet->getStyle($col_chr.'1')->getAlignment()->setHorizontal($align);		
+			# set width
+			$worksheet->getColumnDimension($col_chr)->setWidth($prop['width']);
+			$worksheet->getStyle($col_chr.'1')->getFont()->setBold(true);
+			$worksheet->getStyle($col_chr.'1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
+			$worksheet->getStyle($col_chr.'1')->getFill()->getStartColor()->setARGB('FFCDCDCD');
+			$worksheet->setCellValue($col_chr.'1', $prop['heading']);
+		}		
+		# add data to current worksheet
+		foreach ($param_excel['contents'][$sheet_name]['data'] as $idx => $row) {
+			foreach ($headers as $col_chr => $prop) {
+				$loc= $col_chr.($idx+2);
+				# set alignment for cell
+				$align= PHPExcel_Style_Alignment::HORIZONTAL_LEFT;
+				if ($prop['align'] == 'right') {
+					$align= PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;
+				}
+				else if ($prop['align'] == 'center') {
+					$align= PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
+				}
+				$worksheet->getStyle($loc)->getAlignment()->setHorizontal($align);
+				
+				if (!empty($row[$prop['field']])) {
+					# set cell value
+					if ($prop['type'] == 'text') {
+						$worksheet->setCellValue($loc, $row[$prop['field']]);
+					}
+					else if ($prop['type'] == 'hyperlink') {
+						$worksheet->setCellValue($loc, $row[$prop['field']]);
+						if ($row['hyperlink_'.$prop['field']]) {
+							# add underline
+							$worksheet->getStyle($loc)->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
+							# set link color
+							$worksheet->getStyle($loc)->getFont()->getColor()->setRGB($link_clr);		
+							# set URL
+							$worksheet->getCell($loc)->getHyperlink()->setUrl($row['hyperlink_'.$prop['field']]);
+						}
+					}
+				}
+			}
+		}
+		$sheet_no++;
+	}	
+		# create excel file
+ 		$excel->setActiveSheetIndex(0);
+ 		$objWriter = PHPExcel_IOFactory::createWriter($excel, $writer);
+ 		$objWriter->save($filename);
+}
+?>

+ 165 - 0
theme/tripal_theme_core/css/tripal.css

@@ -0,0 +1,165 @@
+.tripal-info-box {
+   width: 100%;
+   padding-bottom: 10px;
+}
+.tripal-table {
+   width: 100%; 
+}
+.tripal-table th, 
+.tripal-table td {
+   vertical-align:text-top;
+   padding-left: 10px;
+   padding-right: 10px;
+   padding-top: 5px;
+   padding-bottom: 5px;
+}
+.tripal-table-horz {
+   border-top: 2px solid #999999;
+   border-bottom: 2px solid #999999; 
+}
+
+/* settings for vertical tables (headers across left-side) */
+table.tripal-table-vert .tripal-table-even-row th {
+   background-color: #EEEEEE;
+   font-weight: none;
+   text-align: right;
+}
+table.tripal-table-vert .tripal-table-odd-row th {
+   background-color: #FFFFFF;
+   text-align: right;
+}
+table.tripal-table-vert .tripal-table-even-row {
+   background-color: #EEEEEE;
+   border-top: 1px solid #CCCCCC;
+   border-bottom: 1px solid #CCCCCC;
+}
+table.tripal-table-vert .tripal-table-odd-row {
+   background-color: #FFFFFF;
+   border-top: 1px solid #CCCCCC;
+   border-bottom: 1px solid #CCCCCC;
+}
+/* settings for horizontal tables (headers across top) */
+table.tripal-table-horz th {
+   background-color: #EEEEFF;
+   font-weight: none;
+   text-align: left;
+}
+table.tripal-table-horz .tripal-table-even-row {
+   background-color: #FFFFFF;
+   font-weight: none;
+   text-align: left;
+   border-top: 1px solid #CCCCCC;
+   border-bottom: 1px solid #CCCCCC;
+}
+table.tripal-table-horz .tripal-table-odd-row {
+   background-color: #EEEEEE;
+   text-align: left;
+   border-top: 1px solid #CCCCCC;
+   border-bottom: 1px solid #CCCCCC;
+}
+
+.tripal-info-box-title {
+  font-size: 1.5em;
+  padding-bottom: 15px;
+
+}
+.tripal-info-box-desc {
+  padding-bottom: 15px;
+}
+/* hide the title when inside of a block on a panel */
+.pane-block .tripal-info-box-title {
+   visibility: hidden;
+   padding: 0;
+   margin: 0;
+   height: 0px;
+}
+
+/* Ajax loader */
+#tripal_ajaxLoading {
+   position: fixed;
+   top: 40%;
+   left: 40%;
+   padding: 15px;
+   border: 1px solid #000000;
+   background-color: #EEEEEE;
+   opacity: 0.75;
+   -moz-opacity: 0.75;
+   z-index: 10;
+}
+
+#tripal_ajaxLoading #loadingText {
+   font-weight: bold;
+   font-size: 1.5em;
+   color: #000000;
+}
+
+/* Restrict the list of checkboxes in a 300px window */
+.form-checkboxes {
+   height: auto;
+   max-height: 300px;
+   overflow: auto;
+}
+
+/* no results message */
+.tripal-no-results {
+   font-style: italic;
+   padding: 10px;
+   background-color: #FFEEEE;
+}
+
+.tripal_toc {
+  float: left;
+  width: 20%;
+  background-color: #EEEEEE;
+
+  -moz-border-radius: 15px;
+  -webkit-border-radius: 15px;
+  -khtml-border-radius: 15px;
+  border-radius: 15px;
+
+  -moz-box-shadow: 3px 3px 4px #888888;
+  -webkit-box-shadow: 3px 3px 4px #888888;
+  box-shadow: 3px 3px 4px #888888;
+
+
+
+  padding: 20px;
+  min-height: 500px;
+  border-style:solid;
+  border-width:1px;
+}
+.tripal_toc ul {
+ margin-left: 0px;
+ margin-top: 5px;
+ padding-left: 15px;
+}
+.tripal_toc_title {
+  font-size: 1.5em;
+  line-height: 110%;
+  padding-bottom: 10px;
+}
+.tripal_toc_desc {
+ /*font-style: italic; */
+}
+.tripal_details {
+  float: left;
+  width: 69%;
+  background-color: #FFFFFF;
+
+  -moz-border-radius: 15px;
+  -webkit-border-radius: 15px;
+  -khtml-border-radius: 15px;
+  border-radius: 15px;
+
+  -moz-box-shadow: 3px 3px 4px #888888;
+  -webkit-box-shadow: 3px 3px 4px #888888;
+  box-shadow: 3px 3px 4px #888888;
+  padding: 20px;
+  min-height: 500px;
+  margin-right: 10px;
+  margin-bottom: 10px;
+  border-style:solid;
+  border-width:1px;
+  
+  overflow:auto;
+}

+ 3 - 0
theme/tripal_theme_core/css/tripal_bulk_loader.css

@@ -0,0 +1,3 @@
+.tripal_bulk_loader_template_col {
+	width:100px;
+}

+ 35 - 0
theme/tripal_theme_core/css/tripal_cv.css

@@ -0,0 +1,35 @@
+/*
+ Copyright 2009 Clemson University
+*/
+
+.treeview .placeholder {
+	background: url(images/ajax-loader.gif) 0 0 no-repeat;
+	height: 16px;
+	width: 16px;
+	display: block;
+}
+
+#tripal_cv_cvterm_info_box {
+   position: absolute;
+   top: 0%; left: 30%;
+   padding:10px;
+   width:650px;
+   display: none;
+   border: 1px solid #000000;
+   background-color: #EFEFEF;
+   opacity: 0.90;
+   -moz-opacity: 0.90;
+   z-index: 10;
+   -webkit-border-radius: 5px;
+   -moz-border-radius: 5px;
+   border-radius: 5px;
+   color: #000000;
+}
+
+#tripal_cv_cvterm_info_box h3 {
+   border-bottom: 1px solid #AAAAAA;
+}
+
+#tripal_cv_cvterm_info {
+   color: #000000;
+}

+ 0 - 0
theme/tripal_theme_core/css/tripal_db.css


+ 76 - 0
theme/tripal_theme_core/css/tripal_feature.css

@@ -0,0 +1,76 @@
+#tripal_feature-featureloc_sequence,
+#tripal_feature-sequence-residues {
+  /*height: 500px;*/
+  /*overflow: scroll;*/
+  background-color: #FFFFFF;
+  font-family: monospace;
+}
+
+div#tripal_feature-featureloc_sequence-legend {
+   padding: 10px;
+   margin: 10px;
+}
+/* styles for cvterm types in sequences */
+div#tripal_feature-featureloc_sequence-legend span {
+   margin: 5px;
+   padding: 10px;
+}
+span.tripal_feature-featureloc_sequence-five_prime_UTR {
+   background-color: #99FF99;
+}
+
+span.tripal_feature-featureloc_sequence-three_prime_UTR {
+   background-color: #FF9999;
+}
+
+span.tripal_feature-featureloc_sequence-CDS {
+   background-color: #FFFF99;
+}
+
+span.tripal_feature-featureloc_sequence-mRNA {
+   background-color: #FFFF99;
+}
+
+span.tripal_feature-featureloc_sequence-exon {
+   background-color: #9999FF;
+}
+
+span.tripal_feature-featureloc_sequence-intron {
+   background-color: #FFFFFF;
+}
+/* information tables on the feature pages */
+table.tripal_feature-relationships-subject-table th {
+   background-color: #EEEEEE;
+   text-align: left;
+}
+table.tripal_feature-relationships-object-table th {
+   background-color: #EEEEEE;
+   text-align: left;
+}
+table.tripal_feature-locations-table th {
+   background-color: #EEEEEE;
+   text-align: left;
+}
+table.tripal_feature-references-table th {
+   background-color: #EEEEEE;
+   text-align: left;
+
+}
+/* feature relationship edit form */
+#tripal-feature-edit-ALL-relationships-form .form-item,
+#tripal-feature-edit-ALL-db-references-form .form-item {
+   float: left;
+   margin: 0 10px 0 0;
+   
+}
+#tripal-feature-edit-ALL-db-references-form .form-submit {
+   float: none;
+   display: block;
+}
+.tripal_feature-obsolete {
+   color: red;
+   font-weight: bold;
+   font-style: italic;
+   padding-bottom: 15px; 
+   text-align: center;
+}

+ 31 - 0
theme/tripal_theme_core/css/tripal_organism.css

@@ -0,0 +1,31 @@
+
+#tripal_organism-image-box {
+   float: left;
+   margin-left: 10px;
+   margin-bottom: 10px;
+   margin-right: 10px;
+   width: auto;
+}
+#tripal_organism-image-box img {
+   max-height: 200px;
+}
+
+#tripal_organism-base-box {
+   float: left;
+}
+#tripal_organism-description-box {
+   clear: left;
+   width: auto;
+}
+
+#tripal_organism-base-box img {
+ float: left;
+ margin-bottom: 10px;
+}
+#tripal_organism-table-base {
+ float: left;
+ width: 330px;
+ margin-left: 10px;
+ margin-bottom: 10px;
+}
+

BIN
theme/tripal_theme_core/images/ajax-loader.gif


BIN
theme/tripal_theme_core/images/arrow_d.png


BIN
theme/tripal_theme_core/images/arrow_r.png


BIN
theme/tripal_theme_core/images/icon_link.png


BIN
theme/tripal_theme_core/images/kegg.gif


BIN
theme/tripal_theme_core/js/jgcharts-0.97.zip


+ 17 - 0
theme/tripal_theme_core/js/jgcharts/.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jgcharts</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>net.sourceforge.phpeclipse.parserbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>net.sourceforge.phpeclipse.phpnature</nature>
+	</natures>
+</projectDescription>

+ 3 - 0
theme/tripal_theme_core/js/jgcharts/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,3 @@
+#Thu Feb 19 13:56:42 CET 2009
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

+ 413 - 0
theme/tripal_theme_core/js/jgcharts/doc/custom.html

@@ -0,0 +1,413 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="refresh" content="0; url=../include/demo/">
+    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+    <title>jgcharts - jQuery Google Charts</title>
+    <meta http-equiv="Content-Language" content="en-us" />
+    <meta name="author" content="Massimiliano Balestrieri" />
+    <script type="text/javascript" src="../lib/jquery/jquery-1.2.6.min.js"></script>
+    <script type="text/javascript" src="../lib/farbtastic/farbtastic.js"></script>
+    <link rel="stylesheet" href="../lib/farbtastic/farbtastic.css" type="text/css" />
+    <script type="text/javascript" src="../lib/metadata/jquery.metadata.pack.js"></script>
+    <script type="text/javascript" src="../lib/sugar-arrays.js"></script>
+    <script type="text/javascript" src="../lib/iterators.js"></script>
+    <script type="text/javascript" src="../lib/jquery.tablelib.js"></script>
+    <script type="text/javascript" src="../jgcharts.js"></script>
+    <script type="text/javascript" src="../plugins/table/jgtable.js"></script>
+    <script type="text/javascript"><!--
+        jQuery(document).ready(function(){
+            var json = jQuery.getJSON(
+                "json/delpiero.json",
+	            //wait json data
+	            function(json){
+	                var data_custom = [];
+	                for(var x= 0;x< jQuery("#table-9").find("tbody > tr").size();x++){
+		                data_custom.push(jQuery.map( jQuery("#table-9").find("tbody > tr:eq(" + x + ") > td"),
+	                               function(td,index){
+                                        if(index % 11 == 1 || index % 11 == 2){
+                                            if(parseInt(jQuery(td).text()))
+                                                return parseInt(jQuery(td).text());
+                                            else
+                                                return 0;
+                                        } 
+                                   }
+	                    ));
+	                    
+	                }
+	                var axis_custom = jQuery.map( jQuery("#table-9").find("tbody > tr > th.custom"),
+                               function(th) { return jQuery(th).text(); }
+                    );
+                    var legend_custom = ["presenze", "gol"];
+                    
+                    json.axis_labels = axis_custom;
+                    json.data = data_custom;
+                    json.legend = legend_custom;
+                    
+                    
+		            jQuery(".jgtable-json").jgtable(json);
+		            
+		            var data_custom = [];
+                    for(var x= 0;x< jQuery("#table-9").find("tbody > tr").size();x++){
+                        data_custom.push(jQuery.map( jQuery("#table-9").find("tbody > tr:eq(" + x + ") > td"),
+                                   function(td,index){
+                                        if(index % 11 == 9 || index % 11 == 10){
+                                            if(parseInt(jQuery(td).text()))
+                                                return parseInt(jQuery(td).text());
+                                            else
+                                                return 0;
+                                        } 
+                                   }
+                        ));
+                        
+                    }
+                    json.data = data_custom;
+                    json.title = 'Gol e presenze totali';
+                    
+		            jQuery(".jgtable-json").jgtable(json);
+		            jQuery(".example h1").click(function(){
+		                jQuery(this).parent().find("div, table").toggle();
+		            });
+		            //.trigger("click");
+	        });
+            
+        });
+    --></script>
+    <style type="text/css">
+        body{font-family:Trebuchet MS,Arial,FreeSans,sans-serif;}
+        .example h1{border:1px dashed #000;padding:3px;}
+        table {width:100%}
+        table tbody tr td,table tbody tr th,table thead tr th,table tfoot tr th
+        {text-align:left;font-weight:normal;font-size:80%;border:1px dashed #000; padding:3px; margin:1px}
+    </style>
+</head>
+<body>
+<h1>JQuery Google Charts 0.91 - Examples (<a href="dashboard.html">try dashboard for write metadata</a>)</h1>
+<div class="example">
+<h1>Example Custom - Alessandro Del Piero</h1>
+<table id="table-9" class="jgtable-json">
+  <thead>
+    <tr>
+    <th colspan="2">Cronologia</th>
+    <th colspan="2">Campionato</th>
+    <th colspan="2">Coppe di Lega<small><sup>*</sup></small></th>
+    <th colspan="2">Coppe Europee<small><sup>**</sup></small></th>
+    <th colspan="2">Coppe Internazionali<small><sup>***</sup></small></th>
+    <th colspan="2">Totale</th>
+  </tr>
+  <tr>
+    <th>Stagione - Squadra</th>
+    <th>Serie</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+  </tr>
+  </thead>
+  <tfoot>
+    <tr>
+        <th colspan="2">Totale</th>
+        <th>417</th>
+        <th>176</th>
+        <th>51</th>
+        <th>22</th>
+        <th>105</th>
+        <th>43</th>
+        <th>1</th>
+        
+        <th>1</th>
+        <th>574</th>
+        <th>242</th>
+    </tr>
+    </tfoot>
+  <tbody>
+  
+  <tr>
+	<th class="custom">1991-92 - Padova</th>
+	
+	<td>B</td>
+	<td>4</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>4</td>
+	<td>-</td>
+	</tr>
+	<tr>
+	<th class="custom">1992-93 - Juventus</th>
+	<td>B</td>
+	<td>10</td>
+	<td>1</td>
+	
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>10</td>
+	<td>1</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">1993-94 - Juventus</th>
+	<td>A</td>
+	<td>11</td>
+	<td>5</td>
+	<td>1</td>
+	<td>-</td>
+	<td>2</td>
+	
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>14</td>
+	<td>5</td>
+	</tr>
+	<tr>
+	<th class="custom">1994-95 - Juventus</th>
+	
+	<td>A</td>
+	<td>29</td>
+	<td>8</td>
+	<td>10</td>
+	<td>1</td>
+	<td>11</td>
+	<td>1</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>50</td>
+	<td>10</td>
+	</tr>
+	<tr>
+	<th class="custom">1995-96 - Juventus</th>
+	<td>A</td>
+	<td>29</td>
+	<td>6</td>
+	
+	<td>3</td>
+	<td>1</td>
+	<td>11</td>
+	<td>6</td>
+	<td>-</td>
+	<td>-</td>
+	<td>43</td>
+	<td>13</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">1996-97 - Juventus</th>
+	<td>A</td>
+	<td>22</td>
+	<td>8</td>
+	<td>4</td>
+	<td>-</td>
+	<td>8</td>
+	
+	<td>6</td>
+	<td>1</td>
+	<td>1</td>
+	<td>35</td>
+	<td>15</td>
+	</tr>
+	<tr>
+	<th class="custom">1997-98 - Juventus</th>
+	
+	<td>A</td>
+	<td>32</td>
+	<td>21</td>
+	<td>5</td>
+	<td>1</td>
+	<td>10</td>
+	<td>10</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>47</td>
+	<td>32</td>
+	</tr>
+	<tr>
+	<th class="custom">1998-99 - Juventus</th>
+	<td>A</td>
+	<td>8</td>
+	<td>2</td>
+	
+	<td>2</td>
+	<td>1</td>
+	<td>4</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>14</td>
+	<td>3</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">1999-00 - Juventus</th>
+	<td>A</td>
+	<td>34</td>
+	<td>9</td>
+	<td>2</td>
+	<td>1</td>
+	<td>9</td>
+	
+	<td>2</td>
+	<td>-</td>
+	<td>-</td>
+	<td>45</td>
+	<td>12</td>
+	</tr>
+	<tr>
+	<th class="custom">2000-01 - Juventus</th>
+	
+	<td>A</td>
+	<td>25</td>
+	<td>9</td>
+	<td>2</td>
+	<td>-</td>
+	<td>6</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>33</td>
+	<td>9</td>
+	</tr>
+	<tr>
+	<th class="custom">2001-02 - Juventus</th>
+	<td>A</td>
+	<td>32</td>
+	<td>16</td>
+	
+	<td>4</td>
+	<td>1</td>
+	<td>10</td>
+	<td>4</td>
+	<td>-</td>
+	<td>-</td>
+	<td>46</td>
+	<td>21</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">2002-03 - Juventus</th>
+	<td>A</td>
+	<td>24</td>
+	<td>16</td>
+	<td>1</td>
+	<td>2</td>
+	<td>13</td>
+	
+	<td>5</td>
+	<td>-</td>
+	<td>-</td>
+	<td>38</td>
+	<td>23</td>
+	</tr>
+	<tr>
+	<th class="custom">2003-04 - Juventus</th>
+	
+	<td>A</td>
+	<td>22</td>
+	<td>8</td>
+	<td>5</td>
+	<td>3</td>
+	<td>4</td>
+	<td>3</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>31</td>
+	<td>14</td>
+	</tr>
+	<tr>
+	<th class="custom">2004-05 - Juventus</th>
+	<td>A</td>
+	<td>30</td>
+	<td>14</td>
+	
+	<td>1</td>
+	<td>-</td>
+	<td>10</td>
+	<td>3</td>
+	<td>-</td>
+	<td>-</td>
+	<td>41</td>
+	<td>17</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">2005-06 - Juventus</th>
+    <td>A</td>
+	<td>33</td>
+	<td>12</td>
+	<td>5</td>
+	<td>5</td>
+	<td>7</td>
+	
+	<td>3</td>
+	<td>-</td>
+	<td>-</td>
+	<td>45</td>
+	<td>20</td>
+	</tr>
+	<tr>
+	<th class="custom">2006-07 - Juventus</th>
+    
+	<td>B</td>
+	<td>35</td>
+	<td>20</td>
+	<td>2</td>
+	<td>3</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	
+	<td>37</td>
+	<td>23</td>
+	</tr>
+	
+	<tr>
+	<th class="custom">2007-08 - Juventus</th>
+    <td>A</td>
+	<td>37</td>
+	<td>21</td>
+	
+	<td>4</td>
+	<td>3</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>-</td>
+	<td>41</td>
+	<td>24</td>
+	</tr>
+	
+	
+	</tbody>
+	
+</table>
+</div>
+
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+<script type="text/javascript">
+_uacct = "UA-258871-1";
+urchinTracker();
+</script>
+
+</body>
+</html>    

+ 495 - 0
theme/tripal_theme_core/js/jgcharts/doc/dashboard.html

@@ -0,0 +1,495 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+<head>
+    <title>jgcharts - jQuery Google Charts</title>
+    <meta http-equiv="refresh" content="0; url=../include/demo/">
+    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+    <meta http-equiv="Content-Language" content="en-us" />
+    <meta name="author" content="Massimiliano Balestrieri" />
+    <script type="text/javascript" src="../lib/jquery-1.2.5.pack.js"></script>
+    <script type="text/javascript" src="../lib/farbtastic/farbtastic.js"></script>
+    <link rel="stylesheet" href="../lib/farbtastic/farbtastic.css" type="text/css" />
+    <script type="text/javascript" src="../lib/sugar-arrays.js"></script>
+    <script type="text/javascript" src="../lib/iterators.js"></script>
+    <script type="text/javascript" src="../lib/jquery.tablelib.js"></script>
+    <script type="text/javascript" src="../jgcharts.js"></script>
+    <script type="text/javascript" src="../plugins/dashboard/jgdash.js"></script>
+    <script type="text/javascript"><!--
+        jQuery(document).ready(function(){
+            jQuery("#dash").jgdash({
+                    target  : "#target", 
+                    debug   : "#debug",
+                    url     : "../plugins/dashboard/",
+                    sources : ["table-0","table-1","table-2","table-3","table-4"] 
+            });
+        });
+    --></script>
+    <style type="text/css">
+        table tbody tr td,table tbody tr th,table thead tr th
+        {font-size:80%;border:1px dashed #000; padding:3px; margin:1px}
+    </style>
+</head>
+<body>
+<div id="test"></div>
+<div id="target"></div>
+<div id="debug"></div>
+<div id="dash"></div>
+
+<div>
+http://www.istat.it/dati/dataset/20080429_00/
+
+Tavola 1        
+Indici dei prezzi alla produzione dei prodotti industriali venduti sul mercato interno.
+Raggruppamento Principale di Industrie: Energia - Serie storica 2003-2008
+</div>
+<table id="table-0">
+<thead>
+<tr>
+    <th></th>
+    <th class="serie">CA</th>
+    <th class="serie">DF</th>
+</tr>
+</thead>
+<tbody>
+   <tr>
+    <th class="serie">01-03</th>
+    <td>105.7</td>
+    <td>97.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-03</th>
+    <td>108.1</td>
+    <td>101.6</td>
+  </tr>
+  <tr>
+    <th class="serie">03-03</th>
+    <td>110.7</td>
+    <td>102.9</td>
+  </tr>
+  
+  <tr>
+    <th class="serie">04-03</th>
+    <td>111.0</td>
+    <td>93.7</td>
+  </tr>
+  <tr>
+    <th class="serie">05-03</th>
+    <td>110.0</td>
+    <td>89.8</td>
+  </tr>
+  <tr>
+    <th class="serie">06-03</th>
+    <td>109.0</td>
+    <td>90.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-03</th>
+    <td>107.5</td>
+    <td>93.0</td>
+  </tr>
+  <tr>
+    <th class="serie">08-03</th>
+    <td>106.1</td>
+    <td>94.5</td>
+  </tr>
+  <tr>
+    <th class="serie">09-03</th>
+    <td>104.3</td>
+    <td>91.9</td>
+  </tr>
+  <tr>
+    <th class="serie">10-03</th>
+    <td>102.0</td>
+    <td>93.9</td>
+  </tr>
+  <tr>
+    <th class="serie">11-03</th>
+    <td>102.8</td>
+    <td>93.6</td>
+  </tr>
+  <tr>
+    <th class="serie">12-03</th>
+    <td>103.8</td>
+    <td>92.6</td>
+  </tr>
+  
+  <tr>
+    <th class="serie">01-04</th>
+    <td>102.9</td>
+    <td>94.0</td>
+  </tr>
+  <tr>
+    <th class="serie">02-04</th>
+    <td>102.1</td>
+    <td>92.7</td>
+  </tr>
+  <tr>
+    <th class="serie">03-04</th>
+    <td>100.6</td>
+    <td>96.0</td>
+  </tr>
+  
+ <tr>
+    <th class="serie">04-04</th>
+    <td>101.7</td>
+    <td>97.9</td>
+  </tr>
+  <tr>
+    <th class="serie">05-04</th>
+    <td>101.8</td>
+    <td>105.0</td>
+  </tr>
+  <tr>
+    <th class="serie">06-04</th>
+    <td>103.3</td>
+    <td>104.1</td>
+  </tr>
+  <tr>
+    <th class="serie">07-04</th>
+    <td>104.0</td>
+    <td>105.1</td>
+  </tr>
+  <tr>
+    <th class="serie">08-04</th>
+    <td>103.7</td>
+    <td>108.1</td>
+  </tr>
+  <tr>
+    <th class="serie">09-04</th>
+    <td>108.4</td>
+    <td>108.4</td>
+  </tr>
+  <tr>
+    <th class="serie">10-04</th>
+    <td>109.4</td>
+    <td>113.8</td>
+  </tr>
+  <tr>
+    <th class="serie">11-04</th>
+    <td>112.0</td>
+    <td>109.1</td>
+  </tr>
+  <tr>
+    <th class="serie">12-04</th>
+    <td>112.6</td>
+    <td>106.3</td>
+  </tr>
+  <tr>
+    <th class="serie">01-05</th>
+    <td>115.5</td>
+    <td>106.7</td>
+  </tr>
+  <tr>
+    <th class="serie">02-05</th>
+    <td>115.7</td>
+    <td>108.8</td>
+  </tr>
+  <tr>
+    <th class="serie">03-05</th>
+    <td>114.7</td>
+    <td>118.8</td>
+  </tr>
+  <tr>
+    <th class="serie">04-05</th>
+    <td>115.9</td>
+    <td>120.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-05</th>
+    <td>116.2</td>
+    <td>115.9</td>
+  </tr>
+  <tr>
+    <th class="serie">06-05</th>
+    <td>118.0</td>
+    <td>124.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-05</th>
+    <td>123.3</td>
+    <td>126.5</td>
+  </tr>
+  <tr>
+    <th class="serie">08-05</th>
+    <td>127.6</td>
+    <td>131.6</td>
+  </tr>
+  <tr>
+    <th class="serie">09-05</th>
+    <td>130.3</td>
+    <td>134.0</td>
+  </tr>
+  <tr>
+    <th class="serie">10-05</th>
+    <td>135.5</td>
+    <td>135.7</td>
+  </tr>
+  <tr>
+    <th class="serie">11-05</th>
+    <td>138.2</td>
+    <td>126.4</td>
+  </tr>
+  <tr>
+    <th class="serie">12-05</th>
+    <td>139.6</td>
+    <td>127.4</td>
+  </tr>
+  <tr>
+    <th class="serie">01-06</th>
+    <td>145.1</td>
+    <td>131.0</td>
+  </tr>
+  <tr>
+    <th class="serie">02-06</th>
+    <td>146.4</td>
+    <td>129.9</td>
+  </tr>
+  <tr>
+    <th class="serie">03-06</th>
+    <td>147.1</td>
+    <td>133.7</td>
+  </tr>
+  <tr>
+    <th class="serie">04-06</th>
+    <td>149.0</td>
+    <td>138.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-06</th>
+    <td>150.3</td>
+    <td>141.0</td>
+  </tr>
+  <tr>
+    <th class="serie">06-06</th>
+    <td>151.3</td>
+    <td>139.3</td>
+  </tr>
+  <tr>
+    <th class="serie">07-06</th>
+    <td>153.4</td>
+    <td>145.3</td>
+  </tr>
+  <tr>
+    <th class="serie">08-06</th>
+    <td>152.7</td>
+    <td>142.9</td>
+  </tr>
+  <tr>
+    <th class="serie">09-06</th>
+    <td>152.9</td>
+    <td>129.2</td>
+  </tr>
+  <tr>
+    <th class="serie">10-06</th>
+    <td>152.2</td>
+    <td>126.0</td>
+  </tr>
+  <tr>
+    <th class="serie">11-06</th>
+    <td>151.9</td>
+    <td>124.8</td>
+  </tr>
+  <tr>
+    <th class="serie">12-06</th>
+    <td>150.1</td>
+    <td>125.9</td>
+  </tr>
+  <tr>
+    <th class="serie">01-07</th>
+    <td>148.2</td>
+    <td>118.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-07</th>
+    <td>145.3</td>
+    <td>122.9</td>
+  </tr>
+  <tr>
+    <th class="serie">03-07</th>
+    <td>142.9</td>
+    <td>127.7</td>
+  </tr>
+  <tr>
+    <th class="serie">04-07</th>
+    <td>142.6</td>
+    <td>134.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-07</th>
+    <td>144.0</td>
+    <td>138.5</td>
+  </tr>
+  <tr>
+    <th class="serie">06-07</th>
+    <td>145.5</td>
+    <td>138.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-07</th>
+    <td>147.2</td>
+    <td>141.8</td>
+  </tr>
+  <tr>
+    <th class="serie">08-07</th>
+    <td>150.0</td>
+    <td>139.2</td>
+  </tr>
+  <tr>
+    <th class="serie">09-07</th>
+    <td>153.8</td>
+    <td>145.6</td>
+  </tr>
+  <tr>
+    <th class="serie">10-07</th>
+    <td>155.4</td>
+    <td>147.6</td>
+  </tr>
+  <tr>
+    <th class="serie">11-07</th>
+    <td>157.0</td>
+    <td>157.9</td>
+  </tr>
+  <tr>
+    <th class="serie">12-07</th>
+    <td>158.4</td>
+    <td>156.2</td>
+  </tr>
+  <tr>
+    <th class="serie">01-08</th>
+    <td>162.8</td>
+    <td>153.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-08</th>
+    <td>162.8</td>
+    <td>158.6</td>
+  </tr>
+  <tr>
+    <th class="serie">03-08</th>
+    <td>164.7</td>
+    <td>166.3</td>
+  </tr>
+  <tr>
+    <th class="serie">04-08</th>
+    <td>168.5</td>
+    <td>165.8</td>
+  </tr>
+</tbody>
+</table>
+<table id="table-1">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+<table id="table-2">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>73</td>
+        <td>40</td>
+        <td>423</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>63</td>
+        <td>30</td>
+        <td>-40</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>2</td>
+        <td>4</td>
+        <td>0</td>
+    </tr>
+  </tbody>
+</table>
+
+<table id="table-3">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 4</th>
+        <th class="serie">Data 5</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>40</td>
+        <td>30</td>
+    </tr>
+    <tr>
+        <th class="serie">2000</th>
+        <td>30</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+
+<table id="table-4">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 4</th>
+        <th class="serie">Data 5</th>
+        <th class="serie">Data 6</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>40</td>
+        <td>30</td>
+        <td>20</td>
+    </tr>
+    <tr>
+        <th class="serie">2000</th>
+        <td>30</td>
+        <td>40</td>
+        <td>30</td>
+    </tr>
+  </tbody>
+</table>
+
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+<script type="text/javascript">
+_uacct = "UA-258871-1";
+urchinTracker();
+</script>
+
+</body>
+</html>    

+ 591 - 0
theme/tripal_theme_core/js/jgcharts/doc/index.html

@@ -0,0 +1,591 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+    <title>jgcharts - jQuery Google Charts</title>
+    <meta http-equiv="refresh" content="0; url=../include/demo/">
+    <meta http-equiv="Content-Language" content="en-us" />
+    <meta name="author" content="Massimiliano Balestrieri" />
+    <script type="text/javascript" src="../lib/jquery/jquery-1.3.1.min.js"></script>
+    <script type="text/javascript" src="../lib/farbtastic/farbtastic.js"></script>
+    <link rel="stylesheet" href="../lib/farbtastic/farbtastic.css" type="text/css" />
+    <script type="text/javascript" src="../lib/metadata/jquery.metadata.pack.js"></script>
+    <script type="text/javascript" src="../lib/sugar-arrays.js"></script>
+    <script type="text/javascript" src="../lib/iterators.js"></script>
+    <script type="text/javascript" src="../lib/jquery.tablelib.js"></script>
+    <script type="text/javascript" src="../jgcharts.pack.js"></script>
+    <script type="text/javascript" src="../plugins/table/jgtable.pack.js"></script>
+    <script type="text/javascript"><!--
+        jQuery(document).ready(function(){
+            jQuery(".jgtable").jgtable();
+            jQuery(".example h1").click(function(){
+                jQuery(this).parent().find("div, table").toggle();
+            })
+            .trigger("click");
+            
+            
+        });
+    --></script>
+    <style type="text/css">
+        body{font-family:Trebuchet MS,Arial,FreeSans,sans-serif;}
+        .example h1{border:1px dashed #000;padding:3px;}
+        table {width:100%}
+        table tbody tr td,table tbody tr th,table thead tr th
+        {text-align:left;font-weight:normal;font-size:80%;border:1px dashed #000; padding:3px; margin:1px}
+    </style>
+</head>
+<body>
+<h1>JQuery Google Charts 0.91 - Examples (<a href="dashboard.html">try dashboard for write metadata</a>)</h1>
+<div class="example">
+<h1>Example 1</h1>
+<table id="table-0" class="jgtable {size:'650x450',type:'lc',axis_step:10,title:false,title_color:'000000',title_size:10,bar_width:30,bar_spacing:1,fillarea:true,fillbottom:true,filltop:true,colors:['FFFF00','FFCC00','99CC00'],lines:[[1,1,0],[1,1,0],[1,1,0]],bg:false,bg_type:'solid',bg_angle:90,bg_offset:false,bg_width:20,bg_trasparency:false,chbg:false,chbg_type:'solid',chbg_angle:90,chbg_offset:false,chbg_width:20,chbg_trasparency:false,grid:false,grid_x:10,grid_y:10,grid_line:10,grid_blank:10}">
+<thead>
+<tr>
+    <th></th>
+    <th class="serie">CA</th>
+    <th class="serie">DF</th>
+</tr>
+</thead>
+<tbody>
+   <tr>
+    <th class="serie">01-03</th>
+    <td>105.7</td>
+    <td>97.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-03</th>
+    <td>108.1</td>
+    <td>101.6</td>
+  </tr>
+  <tr>
+    <th class="serie">03-03</th>
+    <td>110.7</td>
+    <td>102.9</td>
+  </tr>
+  
+  <tr>
+    <th class="serie">04-03</th>
+    <td>111.0</td>
+    <td>93.7</td>
+  </tr>
+  <tr>
+    <th class="serie">05-03</th>
+    <td>110.0</td>
+    <td>89.8</td>
+  </tr>
+  <tr>
+    <th class="serie">06-03</th>
+    <td>109.0</td>
+    <td>90.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-03</th>
+    <td>107.5</td>
+    <td>93.0</td>
+  </tr>
+  <tr>
+    <th class="serie">08-03</th>
+    <td>106.1</td>
+    <td>94.5</td>
+  </tr>
+  <tr>
+    <th class="serie">09-03</th>
+    <td>104.3</td>
+    <td>91.9</td>
+  </tr>
+  <tr>
+    <th class="serie">10-03</th>
+    <td>102.0</td>
+    <td>93.9</td>
+  </tr>
+  <tr>
+    <th class="serie">11-03</th>
+    <td>102.8</td>
+    <td>93.6</td>
+  </tr>
+  <tr>
+    <th class="serie">12-03</th>
+    <td>103.8</td>
+    <td>92.6</td>
+  </tr>
+  
+  <tr>
+    <th class="serie">01-04</th>
+    <td>102.9</td>
+    <td>94.0</td>
+  </tr>
+  <tr>
+    <th class="serie">02-04</th>
+    <td>102.1</td>
+    <td>92.7</td>
+  </tr>
+  <tr>
+    <th class="serie">03-04</th>
+    <td>100.6</td>
+    <td>96.0</td>
+  </tr>
+  
+ <tr>
+    <th class="serie">04-04</th>
+    <td>101.7</td>
+    <td>97.9</td>
+  </tr>
+  <tr>
+    <th class="serie">05-04</th>
+    <td>101.8</td>
+    <td>105.0</td>
+  </tr>
+  <tr>
+    <th class="serie">06-04</th>
+    <td>103.3</td>
+    <td>104.1</td>
+  </tr>
+  <tr>
+    <th class="serie">07-04</th>
+    <td>104.0</td>
+    <td>105.1</td>
+  </tr>
+  <tr>
+    <th class="serie">08-04</th>
+    <td>103.7</td>
+    <td>108.1</td>
+  </tr>
+  <tr>
+    <th class="serie">09-04</th>
+    <td>108.4</td>
+    <td>108.4</td>
+  </tr>
+  <tr>
+    <th class="serie">10-04</th>
+    <td>109.4</td>
+    <td>113.8</td>
+  </tr>
+  <tr>
+    <th class="serie">11-04</th>
+    <td>112.0</td>
+    <td>109.1</td>
+  </tr>
+  <tr>
+    <th class="serie">12-04</th>
+    <td>112.6</td>
+    <td>106.3</td>
+  </tr>
+  <tr>
+    <th class="serie">01-05</th>
+    <td>115.5</td>
+    <td>106.7</td>
+  </tr>
+  <tr>
+    <th class="serie">02-05</th>
+    <td>115.7</td>
+    <td>108.8</td>
+  </tr>
+  <tr>
+    <th class="serie">03-05</th>
+    <td>114.7</td>
+    <td>118.8</td>
+  </tr>
+  <tr>
+    <th class="serie">04-05</th>
+    <td>115.9</td>
+    <td>120.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-05</th>
+    <td>116.2</td>
+    <td>115.9</td>
+  </tr>
+  <tr>
+    <th class="serie">06-05</th>
+    <td>118.0</td>
+    <td>124.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-05</th>
+    <td>123.3</td>
+    <td>126.5</td>
+  </tr>
+  <tr>
+    <th class="serie">08-05</th>
+    <td>127.6</td>
+    <td>131.6</td>
+  </tr>
+  <tr>
+    <th class="serie">09-05</th>
+    <td>130.3</td>
+    <td>134.0</td>
+  </tr>
+  <tr>
+    <th class="serie">10-05</th>
+    <td>135.5</td>
+    <td>135.7</td>
+  </tr>
+  <tr>
+    <th class="serie">11-05</th>
+    <td>138.2</td>
+    <td>126.4</td>
+  </tr>
+  <tr>
+    <th class="serie">12-05</th>
+    <td>139.6</td>
+    <td>127.4</td>
+  </tr>
+  <tr>
+    <th class="serie">01-06</th>
+    <td>145.1</td>
+    <td>131.0</td>
+  </tr>
+  <tr>
+    <th class="serie">02-06</th>
+    <td>146.4</td>
+    <td>129.9</td>
+  </tr>
+  <tr>
+    <th class="serie">03-06</th>
+    <td>147.1</td>
+    <td>133.7</td>
+  </tr>
+  <tr>
+    <th class="serie">04-06</th>
+    <td>149.0</td>
+    <td>138.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-06</th>
+    <td>150.3</td>
+    <td>141.0</td>
+  </tr>
+  <tr>
+    <th class="serie">06-06</th>
+    <td>151.3</td>
+    <td>139.3</td>
+  </tr>
+  <tr>
+    <th class="serie">07-06</th>
+    <td>153.4</td>
+    <td>145.3</td>
+  </tr>
+  <tr>
+    <th class="serie">08-06</th>
+    <td>152.7</td>
+    <td>142.9</td>
+  </tr>
+  <tr>
+    <th class="serie">09-06</th>
+    <td>152.9</td>
+    <td>129.2</td>
+  </tr>
+  <tr>
+    <th class="serie">10-06</th>
+    <td>152.2</td>
+    <td>126.0</td>
+  </tr>
+  <tr>
+    <th class="serie">11-06</th>
+    <td>151.9</td>
+    <td>124.8</td>
+  </tr>
+  <tr>
+    <th class="serie">12-06</th>
+    <td>150.1</td>
+    <td>125.9</td>
+  </tr>
+  <tr>
+    <th class="serie">01-07</th>
+    <td>148.2</td>
+    <td>118.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-07</th>
+    <td>145.3</td>
+    <td>122.9</td>
+  </tr>
+  <tr>
+    <th class="serie">03-07</th>
+    <td>142.9</td>
+    <td>127.7</td>
+  </tr>
+  <tr>
+    <th class="serie">04-07</th>
+    <td>142.6</td>
+    <td>134.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-07</th>
+    <td>144.0</td>
+    <td>138.5</td>
+  </tr>
+  <tr>
+    <th class="serie">06-07</th>
+    <td>145.5</td>
+    <td>138.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-07</th>
+    <td>147.2</td>
+    <td>141.8</td>
+  </tr>
+  <tr>
+    <th class="serie">08-07</th>
+    <td>150.0</td>
+    <td>139.2</td>
+  </tr>
+  <tr>
+    <th class="serie">09-07</th>
+    <td>153.8</td>
+    <td>145.6</td>
+  </tr>
+  <tr>
+    <th class="serie">10-07</th>
+    <td>155.4</td>
+    <td>147.6</td>
+  </tr>
+  <tr>
+    <th class="serie">11-07</th>
+    <td>157.0</td>
+    <td>157.9</td>
+  </tr>
+  <tr>
+    <th class="serie">12-07</th>
+    <td>158.4</td>
+    <td>156.2</td>
+  </tr>
+  <tr>
+    <th class="serie">01-08</th>
+    <td>162.8</td>
+    <td>153.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-08</th>
+    <td>162.8</td>
+    <td>158.6</td>
+  </tr>
+  <tr>
+    <th class="serie">03-08</th>
+    <td>164.7</td>
+    <td>166.3</td>
+  </tr>
+  <tr>
+    <th class="serie">04-08</th>
+    <td>168.5</td>
+    <td>165.8</td>
+  </tr>
+</tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 2</h1>
+<table id="table-1" class="jgtable {size:'650x350',type:'bhg',axis_step:1,title:'Example 2',title_color:'000000',title_size:16,bar_width:30,bar_spacing:2,fillarea:true,fillbottom:true,filltop:false,colors:['5131c9','FFCC00','da1b1b'],lines:[[1,1,0],[1,1,0],[1,1,0]],bg:'FFFFFF',bg_type:'gradient',bg_angle:90,bg_offset:'6d6969',bg_width:20,bg_trasparency:false,chbg:'FFFFFF',chbg_type:'solid',chbg_angle:90,chbg_offset:'f8fdbf',chbg_width:10,chbg_trasparency:false,grid:true,grid_x:7,grid_y:10,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 3</h1>
+<table id="table-2" class="jgtable {size:'400x500',type:'bvg',axis_step:1,title:'Example 3',title_color:'c81e3d',title_size:16,bar_width:30,bar_spacing:2,fillarea:true,fillbottom:true,filltop:false,colors:['1aa22f','FFCC00','da1b1b'],lines:[[1,1,0],[1,1,0],[1,1,0]],bg:'FFFFFF',bg_type:'stripes',bg_angle:90,bg_offset:'b7b4b4',bg_width:10,bg_trasparency:false,chbg:'000000',chbg_type:'solid',chbg_angle:90,chbg_offset:'f8fdbf',chbg_width:10,chbg_trasparency:false,grid:false,grid_x:7,grid_y:10,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 4</h1>
+<table id="table-3" class="jgtable {size:'700x350',type:'p3',axis_step:1,title:'Example 4',title_color:'28179b',title_size:16,bar_width:30,bar_spacing:2,fillarea:true,fillbottom:true,filltop:false,colors:['a21a9c','FFCC00','da1b1b'],lines:[[1,1,0],[1,1,0],[1,1,0]],bg:'FFFFFF',bg_type:'gradient',bg_angle:90,bg_offset:'b7b4b4',bg_width:10,bg_trasparency:false,chbg:'f7f7f7',chbg_type:'gradient',chbg_angle:90,chbg_offset:'e81711',chbg_width:10,chbg_trasparency:false,grid:false,grid_x:7,grid_y:10,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 4</th>
+        <th class="serie">Data 5</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>40</td>
+        <td>30</td>
+    </tr>
+    <tr>
+        <th class="serie">2000</th>
+        <td>30</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 5</h1>
+<table id="table-4" class="jgtable {size:'450x350',type:'p',axis_step:1,title:'Example 5',title_color:'28179b',title_size:16,bar_width:30,bar_spacing:2,fillarea:true,fillbottom:true,filltop:false,colors:['a21a9c','FFCC00','da1b1b'],lines:[[1,1,0],[1,1,0],[1,1,0]],bg:'FFFFFF',bg_type:'gradient',bg_angle:90,bg_offset:'b7b4b4',bg_width:10,bg_trasparency:false,chbg:'f7f7f7',chbg_type:'gradient',chbg_angle:90,chbg_offset:'e81711',chbg_width:10,chbg_trasparency:false,grid:false,grid_x:7,grid_y:10,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 4</th>
+        <th class="serie">Data 5</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>40</td>
+        <td>30</td>
+    </tr>
+    <tr>
+        <th class="serie">2000</th>
+        <td>30</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 6</h1>
+<table id="table-5" class="jgtable {size:'650x450',type:'lc',axis_step:1,title:false,title_color:'FFFFFF',title_size:10,bar_width:30,bar_spacing:1,fillarea:false,fillbottom:true,filltop:true,colors:['f04242','FFCC00','99CC00'],lines:[[12,9,7],[14,9,7],[13,9,7]],bg:'dca0ee',bg_type:'solid',bg_angle:90,bg_offset:'FFFFFF',bg_width:20,bg_trasparency:false,chbg:'FFFFFF',chbg_type:'solid',chbg_angle:90,chbg_offset:'FFFFFF',chbg_width:20,chbg_trasparency:false,grid:true,grid_x:3,grid_y:3,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 7</h1>
+<table id="table-6" class="jgtable {size:'650x450',type:'bhs',axis_step:1,title:false,title_color:'FFFFFF',title_size:10,bar_width:90,bar_spacing:11,fillarea:false,fillbottom:true,filltop:true,colors:['f04242','FFCC00','99CC00'],lines:[[12,9,7],[14,9,7],[13,9,7]],bg:'dca0ee',bg_type:'gradient',bg_angle:40,bg_offset:'FFFFFF',bg_width:20,bg_trasparency:false,chbg:'bfbfbf',chbg_type:'stripes',chbg_angle:0,chbg_offset:'f5f5f5',chbg_width:10,chbg_trasparency:false,grid:false,grid_x:3,grid_y:3,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="example">
+<h1>Example 8</h1>
+<table id="table-7" class="jgtable {size:'650x450',type:'bvs',axis_step:1,title:false,title_color:'FFFFFF',title_size:10,bar_width:90,bar_spacing:11,fillarea:false,fillbottom:true,filltop:true,colors:['f04242','FFCC00','99CC00'],lines:[[12,9,7],[14,9,7],[13,9,7]],bg:'dca0ee',bg_type:'gradient',bg_angle:40,bg_offset:'FFFFFF',bg_width:20,bg_trasparency:false,chbg:'bfbfbf',chbg_type:'stripes',chbg_angle:0,chbg_offset:'f5f5f5',chbg_width:10,chbg_trasparency:false,grid:false,grid_x:3,grid_y:3,grid_line:0,grid_blank:0}">
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+
+</body>
+</html>    

+ 30 - 0
theme/tripal_theme_core/js/jgcharts/doc/json/delpiero.json

@@ -0,0 +1,30 @@
+{size:'450x600',
+type:'bhg',
+axis_step:1,
+title:'Gol e presenze in campionato',
+title_color:'000000',
+title_size:16,
+bar_width:10,
+bar_spacing:0,
+fillarea:true,
+fillbottom:true,
+filltop:true,
+colors:['5131c9','da1b1b'],
+lines:[[1,1,0],[1,1,0],[1,1,0]],
+bg:false,
+bg_type:'solid',
+bg_angle:90,
+bg_offset:false,
+bg_width:20,
+bg_trasparency:false,
+chbg:false,
+chbg_type:'solid',
+chbg_angle:90,
+chbg_offset:false,
+chbg_width:20,
+chbg_trasparency:false,
+grid:false,
+grid_x:10,
+grid_y:10,
+grid_line:10,
+grid_blank:10}

+ 1 - 0
theme/tripal_theme_core/js/jgcharts/include/css/_id.css

@@ -0,0 +1 @@
+#yslider-code div.yslider-viewer {overflow-y:auto;}

+ 20 - 0
theme/tripal_theme_core/js/jgcharts/include/css/_top.css

@@ -0,0 +1,20 @@
+html, body{
+    margin:0px;
+    font-family:'Lucida Grande',Verdana,Arial,Sans-Serif;
+    font-size:1.1em;
+    font-size-adjust:none;
+    font-style:normal;
+    font-variant:normal;
+    font-weight:normal;
+    line-height:1.5em;
+    font-size:12px;
+    background:#000;
+}
+#top *{padding:0px;margin:0px;text-align:left;}
+#top{width:100%;min-height:29px;background-color:#efebe7;border-bottom:1px solid white;position:relative;padding-top:1px;}
+#logo{margin-left:20px;margin-top:5px;font-weight:bold;}
+#multidesktop{position:absolute;right:0px;top:0px;border:1px solid #aa9c8f;margin-top:1px;}
+.seldesktop{height:25px;width:35px;background:#efebe7;float:left;margin-left:1px;border-left:1px solid #e1dbd5;border-right:1px solid #cec6bd;position:relative;}
+.seldesktop-on{background:#dea040;border-right:1px solid #e2b167;border-left:1px solid #dea040;}
+.seldesktop a{display:block;height:100%;width:100%;}
+a{text-decoration:none;}

+ 28 - 0
theme/tripal_theme_core/js/jgcharts/include/css/demo.css

@@ -0,0 +1,28 @@
+html, body{
+    margin:0px;
+    font-family:'Lucida Grande',Verdana,Arial,Sans-Serif;
+    font-size:1.1em;
+    font-size-adjust:none;
+    font-style:normal;
+    font-variant:normal;
+    font-weight:normal;
+    line-height:1.5em;
+    font-size:12px;
+    background:#000;
+    width:100%;
+}
+a{text-decoration:none;}
+img{border:0px;}
+h3{}
+
+.start_hide{display:none;}
+
+
+.icone_dx{display:block;margin:auto;}
+.text_icone_dx{color:white;margin-bottom:10px;display:block;}
+#icone_destra{position:absolute;right:30px;top:30px;text-align:center;width:60px;}
+      
+.icone_sx{display:block;margin:auto;}
+.text_icone_sx{color:white;margin-bottom:10px;display:block;}
+#icone_sinistra{position:absolute;left:20px;top:30px;text-align:center;width:60px;} 
+

+ 8 - 0
theme/tripal_theme_core/js/jgcharts/include/css/reset.css

@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.1
+*/
+h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;} em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}p,fieldset,table,pre{margin-bottom:1em;}input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}
+

+ 2004 - 0
theme/tripal_theme_core/js/jgcharts/include/demo/index.html

@@ -0,0 +1,2004 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+    <title>jQuery Google Charts 1.0 - Demo Site</title>
+    <meta http-equiv="Content-Language" content="en-us" />
+    <meta name="author" content="Massimiliano Balestrieri" />
+    <link rel="stylesheet" type="text/css" href="../../include/css/reset.css" />
+    <link rel="stylesheet" type="text/css" href="../../include/css/demo.css" />
+    <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
+    <!--script src="../../include/js/lib/ycodaslider-2.0.rc2/lib/jquery-easing-1.3.pack.js" type="text/javascript"></script>
+    <script src="../../include/js/lib/ycodaslider-2.0.rc2/lib/jquery.history_remote.fixed.pack.js" type="text/javascript"></script>
+    <script src="../../include/js/lib/ycodaslider-2.0.rc2/lib/chili/jquery.chili-2.2.js" type="text/javascript"></script>
+    <script src="../../include/js/lib/ycodaslider-2.0.rc2/ycodaslider-2.0.pack.js" type="text/javascript"></script>
+    <script src="../../include/js/lib/ycodaslider-2.0.rc2/plugins/code-ycodaslider-2.0.pack.js" type="text/javascript"></script-->
+    <script src="../../include/js/lib/ycodaslider-3.0/ycodaslider-3.0.min.js" type="text/javascript"></script>
+    
+    
+    <script src="../../lib/chili/jquery.chili-2.2.js" type="text/javascript"></script>
+    
+    <script src="../../lib/metadata/jquery.metadata.min.js" type="text/javascript"></script>
+    <script src="../../lib/janalytics/janalytics.js" type="text/javascript"></script>
+    <!--todo pack -->
+    <script src="../../jgcharts.pack.js" type="text/javascript"></script>
+    <script src="../../plugins/jgtable/jgtable.pack.js" type="text/javascript"></script>
+    <script src="../../include/js/start-1.0.js" type="text/javascript"></script>
+</head>    
+<body>
+<div id="icone_sinistra">
+    <!-- home -->
+    <a href="#" class="handle h-docs tracking {label : '/jgcharts/home'}"><img class="icone_sx" alt="docs" src="../../include/icons/home.png" /></a>
+    <a href="#" class="handle h-docs text_icone_sx tracking {label : '/jgcharts/home'}">Home</a>
+    <!-- table -->
+    <a href="#" class="handle h-table tracking {label : '/jgcharts/table'}"><img class="icone_sx" alt="table" src="../../include/icons/frame.png" /></a>
+    <a href="#" class="handle h-table text_icone_sx tracking {label : '/jgcharts/table'}">Table</a>
+    <!-- gui -->
+    <a href="../gui/" class="blank tracking {label : '/jgcharts/jggui'}"><img class="icone_sx" alt="gui" src="../../include/icons/important.png" /></a>
+    <a href="../gui/" class="blank text_icone_sx tracking {label : '/jgcharts/jggui'}">Gui *ALPHA</a>
+</div>
+<div id="icone_destra">
+    <!-- docs -->
+    <a href="#" class="handle h-docs tracking {label : '/jgcharts/docs'}"><img class="icone_sx" alt="docs" src="../../include/icons/abc.png" /></a>
+    <a href="#" class="handle h-docs text_icone_sx tracking {label : '/jgcharts/docs'}">Docs</a>
+    <!-- code -->
+    <a href="#" class="handle h-code tracking {label : '/jgcharts/code'}"><img class="icone_sx" alt="docs" src="../../include/icons/code.png" /></a>
+    <a href="#" class="handle h-code text_icone_sx tracking {label : '/jgcharts/code'}">Code</a>
+    <!-- download -->
+    <a href="../../jgcharts-0.96.zip" class="tracking {label : '/jgcharts/download'}"><img class="icone_sx" alt="Download" src="../../include/icons/download.png" /></a>
+    <a href="../../jgcharts-0.96.zip" class="text_icone_sx tracking {label : '/jgcharts/download'}">Download</a>
+</div>
+
+<div id="yslider-docs" class="ycodaslider">
+    <div class="yslider-panelwrapper" title="jGCharts 1.0">
+        <h3>jQuery Google Charts 1.0</h3>
+        <p>
+        Copyright (c) 2008 Massimiliano Balestrieri<br />
+        Examples and docs at: http://maxb.net/blog/<br />
+        Licensed GPL licenses:<br />
+        http://www.gnu.org/licenses/gpl.html<br />
+        </p>
+        <blockquote>
+        <p>
+        
+        </p>
+        </blockquote>
+        <p>
+        </p>
+        <h4>Basic usage:</h4>
+        <div class="code javascript"><!--var api = new jGCharts.Api();
+jQuery('<img>')
+.attr('src', api.make({data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]]}))
+.appendTo("#bar1");--></div>
+        <h4>Html:</h4>
+        <div class="code html"><!--<div id="bar1"></div>--></div>
+        <h4>Basic scripts (use packed version in production):</h4>
+        <div class="code html"><!--<script src="jquery-1.3.1.min.js" type="text/javascript"></script>
+<script src="jgcharts.js" type="text/javascript"></script>--></div>
+    </div>
+
+    <!-- panel -->
+    <div class="yslider-panelwrapper" title="Bar">
+        
+        <h4>Basic Bar</h4>
+        <div class="code javascript"><!--//1 ) api
+var api = new jGCharts.Api();        
+
+//2) options
+var opt = {
+    data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]]//mandatory 
+};//set options 
+
+//3) append Img (with jQuery)
+jQuery('<img>')
+.attr('src', api.make(opt))//options 
+.appendTo("#bar1");--></div>
+        
+        <div id="bar1"></div>
+        
+    </div>
+
+    
+    <!-- bar options -->
+
+
+    <div class="yslider-panelwrapper" title="Bar Options">
+        
+        <h4>Schema</h4>
+        <div class="code javascript"><!--//1 ) api
+var api = new jGCharts.Api();        
+//2) options
+var opt = {};//set options 
+//3) append img
+jQuery('<img>')
+.attr('src', api.make(opt))//options 
+.appendTo("#chart_container");
+--></div>
+        <h3>Options</h3>
+        <h4>Chart Dimension</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+size : '400x400'//default 300x200 (width x height) - maximum size 300,000 pixels
+}--></div>
+        <div id="bar2"></div>
+                
+        <h4>Direction</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+type : 'bhg'//default bvg
+}--></div>
+        <div id="bar3"></div>
+        
+        <h4>Legend and axis labels</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+axis_labels : ['2008','2007','2006'], //default 0,1,2 etc...
+legend : ['serie1', 'serie2', 'serie3'] //default none
+}--></div>
+        <div id="bar4"></div>
+        
+        <h4>Dimensions and spacing</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+bar_width : 10, //default 20
+bar_spacing : 10 //default 1
+}--></div>
+        <div id="bar5"></div>
+        
+        <h4>Colors</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+colors : ['4b9b41','81419b','41599b']
+}--></div>
+        <div id="bar6"></div>
+        
+        <h4>Background - solid</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+bg   : 'e0e0e0'//default false
+//bg_trasparency : 50 - default false - also chbg_trasparency
+}--></div>
+        <div id="bar7"></div>
+
+        <h4>Background - gradient</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+bg        : 'FFFFFF',//default false
+bg_offset : '000000',
+bg_angle  : '45',//default 90   
+bg_type   : 'gradient' //default solid
+}--></div>
+        <div id="bar8"></div>
+        
+        <h4>Background - stripes</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+bg        : 'FFFFFF',//default false
+bg_offset : 'e0e0e0',
+bg_angle  : '0',//default 90   
+bg_type   : 'stripes', //default solid
+bg_width  : '10'//default 10 - min 10
+}--></div>
+        <div id="bar9"></div>
+        
+        <h4>Chart Area Background (like bg)</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+chbg        : 'FFFFFF',//default false
+chbg_offset : '4b9b41',
+chbg_angle  : '45',//default 90   
+chbg_type   : 'gradient' //default solid
+}--></div>
+        <div id="bar10"></div>
+        
+        
+        
+        <h4>Title</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+title       : 'Bar Chart', //default false
+title_color : 'a98147',
+title_size  : 20 //default 10
+}--></div>
+        <div id="bar11"></div>
+        
+        <h4>Grid</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+grid        : true, //default false
+grid_x      : 5,    //default 10
+grid_y      : 5,    //default 10
+grid_line   : 5,   //default 10
+grid_blank  : 0    //default 0
+}--></div>
+        <div id="bar12"></div>
+        
+    </div>
+    
+    <!-- stacked -->
+    
+
+    <div class="yslider-panelwrapper" title="Stacked Bar">
+                    
+        <h4>Horizontal Dataset Stacked</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+type : 'bhs'//default bvg
+}--></div>
+        <div id="stacked1"></div>
+        
+        <h4>Vertical Dataset Stacked</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+type : 'bvs'//default bvg
+}--></div>
+        <div id="stacked2"></div>
+
+    </div>    
+
+
+    <!-- line -->
+
+
+    <div class="yslider-panelwrapper" title="Line">
+        <div id="line1"></div>
+        <h4>Js</h4>
+        <div class="code javascript"><!--var api = new jGCharts.Api();
+jQuery('<img>')
+.attr('src', api.make({
+data : [[105.7,97.9],[108.1,101.6],[110.7,102.9],[111.0,93.7],[110.0,89.8],[109.0,90.7],
+[107.5,93.0],[106.1,94.5],[104.3,91.9],[102.0,93.9],[102.8,93.6],[103.8,92.6],
+[102.9,94.0],[102.1,92.7],[100.6,96.0],[101.7,97.9],[101.8,105.0],
+[103.3,104.1],[104.0,105.1],[103.7,108.1],[108.4,108.4],[109.4,113.8],
+[112.0,109.1],[112.6,106.3],[115.5,106.7],[115.7,108.8],[114.7,118.8],
+[115.9,120.4],[116.2,115.9],[118.0,124.7],[123.3,126.5],[127.6,131.6],
+[130.3,134.0],[135.5,135.7],[138.2,126.4],[139.6,127.4],[145.1,131.0],
+[146.4,129.9],[147.1,133.7],[149.0,138.4],[150.3,141.0],[151.3,139.3],
+[153.4,145.3],[152.7,142.9],[152.9,129.2],[152.2,126.0],[151.9,124.8],
+[150.1,125.9],[148.2,118.9],[145.3,122.9],[142.9,127.7],[142.6,134.4],
+[144.0,138.5],[145.5,138.7],[147.2,141.8],[150.0,139.2],[153.8,145.6],
+[155.4,147.6],[157.0,157.9],[158.4,156.2],[162.8,153.9],[162.8,158.6],
+[164.7,166.3],[168.5,165.8]] //MANDATORY
+type : lc 
+}))
+.appendTo("#line1");--></div>
+    </div>
+    
+    <!-- line options -->
+    <div class="yslider-panelwrapper" title="Line Options">
+
+        <h4>Other options</h4>
+        <p>See bar options for legend, axis, grid, background, colors etc....</p>
+                
+        <h4>Schema</h4>
+        <div class="code javascript"><!--//1 ) api
+var api = new jGCharts.Api();    
+//2) options
+var opt = {};//set options 
+//3) append img
+jQuery('<img>')
+.attr('src', api.make(opt))//options 
+.appendTo("#chart_container");--></div>
+
+        <h4>Fillarea</h4>
+        <div class="code javascript"><!--{
+data : [[105.7,97.9] //...[etc] 
+type : 'lc',
+fillarea : true //default false
+}--></div>
+        <div id="line2"></div>
+
+        <h4>FillBottom</h4>
+        <div class="code javascript"><!--{
+data : [[105.7,97.9] //...[etc] 
+type : 'lc',
+fillarea : true, //default false
+fillbottom : true //default false
+}--></div>
+        <div id="line3"></div>
+
+        <h4>FillTop</h4>
+        <div class="code javascript"><!--{
+data : [[105.7,97.9] //...[etc] 
+type : 'lc',
+fillarea : true, //default false
+fillbottom : true, //default false
+filltop : true //default false
+}--></div>
+        <div id="line4"></div>
+
+        <h4>Line options</h4>
+        <div class="code javascript"><!--{
+data : [[105.7,97.9] //...[etc] 
+type : 'lc',
+lines: [[4,2,2],[6,3,3]] 
+//[line width, solid width, blank width], [serie2N,serie2N,serie2N] - default false 
+}--></div>
+        <div id="line5"></div>
+
+        <h4>Axis step</h4>
+        <div class="code javascript"><!--{
+data : [[105.7,97.9] //...[etc] 
+axis_labels : ['01-03','02-03','03-03'// ... [etc]
+axis_step : 10, 
+type : 'lc'
+}--></div>
+        <div id="line6"></div>    
+        
+        <h4>Sparklines</h4>
+        <p>A sparkline chart has exactly the same parameters as a line chart. The only difference is that the axes lines are not drawn for sparklines by default. You can add axes labels if you wish. (Google Api)</p>
+        <div class="code javascript"><!--{data : [[105.7,97.9] //...[etc] 
+type : 'ls'
+}--></div>
+        <div id="line7"></div>        
+    </div>
+    
+    
+    <!-- pie -->
+    
+    <div class="yslider-panelwrapper" title="Pie">
+        
+        <h4>Pie</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+type : 'p'//default bvg
+}--></div>
+        <div id="pie1"></div>
+        
+    </div>
+    
+    <div class="yslider-panelwrapper" title="Pie 3d">
+        
+        <h4>Pie</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]],//mandatory 
+type : 'p3',//default bvg
+size : '400x200'
+}--></div>
+        <div id="p3d1"></div>
+        
+    </div>
+    
+    <!--gallery -->
+    
+    <div class="yslider-panelwrapper" title="Charts gallery">
+        <h4>Horizontal Stacked Bar</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'bhs',
+colors      : ['2c50f2','FFCC00','99CC00'],
+
+//bar
+bar_width   : 50,
+bar_spacing : 5,
+
+//bg
+bg          : 'FFFFFF',
+bg_type     : 'gradient',
+bg_angle    : 90,
+bg_offset   : '8c8c8c',
+
+//grid
+grid        : true,
+grid_x      : 5,
+grid_y      : 5,
+grid_line   : 5,
+grid_blank  : 5
+}--></div>
+        <div id="gallery1"></div>
+        <h4>Vertical Stacked Bar</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '250x400',
+type        : 'bvs',
+
+//bar
+bar_width   : 50,
+bar_spacing : 5,
+
+//bg
+chbg          : 'FFFFFF',
+chbg_type     : 'gradient',
+chbg_angle    : 90,
+chbg_offset   : '8c8c8c',
+
+//grid
+grid        : true,
+grid_x      : 5,
+grid_y      : 5,
+grid_line   : 5,
+grid_blank  : 0
+
+}--></div>
+        <div id="gallery2"></div>
+        <h4>Horizontal Bar</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '250x400',
+type        : 'bhg',
+
+//bar
+bar_width   : 50,
+bar_spacing : 5,
+
+//bg
+chbg          : '000000',
+chbg_trasparency: 20
+
+}--></div>
+        <div id="gallery3"></div>
+        <h4>Vertical Bar</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'bvg',
+colors      : ['4b9b41','81419b','41599b'],
+//bar
+bar_width   : 20,
+bar_spacing : 5,
+
+//style
+bg          : 'ffffff',
+bg_type     : 'stripes',
+bg_angle    : 90,
+bg_offset   : '999999',
+bg_width    : 20,
+}--></div>
+        <div id="gallery4"></div>
+        <h4>Vertical Bar</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'bvg',
+
+//bar
+bar_width   : 10,
+bar_spacing : 10,
+
+//style
+chbg          : 'ffffff',
+chbg_type     : 'stripes',
+chbg_angle    : 90,
+chbg_offset   : '999999',
+chbg_width    : 20,
+}--></div>
+        <div id="gallery5"></div>
+        <h4>Line chart</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'lc',
+
+//style
+chbg          : 'ffffff',
+chbg_type     : 'stripes',
+chbg_angle    : 90,
+chbg_offset   : '999999',
+chbg_width    : 20,
+
+bg            : 'ffffff',
+bg_type       : 'gradient',
+bg_angle      : 45,
+bg_offset     : '4b9b41',
+bg_width      : 20
+
+}--></div>
+        <div id="gallery6"></div>
+        <h4>Line chart</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+          
+//source
+//legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'lc',
+
+//style
+fillarea    : true,
+fillbottom  : true,
+filltop     : true,
+ 
+//series line 
+lines       : [[3,3,3],[4,4,4],[5,5,5]],
+
+bg            : 'ffffff',
+bg_type       : 'gradient',
+bg_angle      : 45,
+bg_offset     : '81419b',
+bg_width      : 20
+
+}--></div>
+        <div id="gallery7"></div>
+        <h4>Pie</h4>
+        <div class="code javascript"><!--{
+data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+//source
+legend      : ['Data 1','Data 2','Data 3'],
+axis_labels : ['2001','2002','2003'],
+                        
+//options 
+size        : '400x250',
+type        : 'p',
+
+bg            : '999999',
+bg_type       : 'gradient',
+bg_angle      : 45,
+bg_offset     : 'ffffff',
+bg_width      : 20
+}--></div>
+        <div id="gallery8"></div>
+        <h4>Pie 3d</h4>
+        <div class="code javascript"><!--{
+   data : [[153, 60, 52], [113, 70, 60], [120, 80, 40]], 
+   //source
+   legend      : ['Data 1','Data 2','Data 3'],
+   axis_labels : ['2001','2002','2003'],
+
+   //options 
+   size        : '400x200',
+   type        : 'p3',
+   
+   bg            : 'ffffff',
+   bg_type       : 'gradient',
+   bg_angle      : 45,
+   bg_offset     : '999999',
+   bg_width      : 20
+}--></div>
+        <div id="gallery9"></div>
+        
+    </div>
+    <!--credits -->
+    
+    <div class="yslider-panelwrapper" title="Credits">
+        <h4>Credits</h4>
+        <p>
+        Google Chart Api - <a href="http://code.google.com/apis/chart/" class="blank">http://code.google.com/apis/chart/</a>
+        </p>     
+        <h4>Libraries</h4>
+        <p>
+        jquery v1.3.1 of John Resig <a href="http://jquery.com" class="blank">jquery.com</a><br />
+        </p>
+        <h4>Demo Libraries (YCodaSlider 2.0)</h4>
+        <p>
+        jquery history_remote v1.0.3 of Klaus Hartl <a href="http://stilbuero.de" class="blank">stilbuero.de</a><br />
+        jquery easing v1.3 of George McGinley Smith<br />
+        jquery.chili-1.9.js of <a href="http://noteslog.com/chili/" class="blank">Andrea Ercolino</a><br />
+        Icons <a class="blank tracking" href="http://www.icon-king.com/?p=15">Nuvola</a><br />
+        Yahoo Css Reset version: 2.5.1
+        GreyBox <a href="http://jquery.com/demo/grey/" class="blank tracking">Css</a>
+        </p>
+    </div>
+</div>    
+
+<div id="yslider-table" class="ycodaslider">
+
+    <div class="yslider-panelwrapper" title="jGTable 1.0">
+    
+        <h3>jQuery Google Charts Table 1.0</h3>
+        <p>
+        Copyright (c) 2008 Massimiliano Balestrieri<br />
+        Examples and docs at: http://maxb.net/blog/<br />
+        Licensed GPL licenses:<br />
+        http://www.gnu.org/licenses/gpl.html<br />
+        </p>
+        <blockquote>
+        <p>
+        
+        </p>
+        </blockquote>
+        <p>
+        </p>
+        <h4>Basic usage:</h4>
+        <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+        <h4>Html (see class="serie"):</h4>
+        <div class="code html"><!--<div class="jgtable">
+  <table>
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+  </table>
+</div>--></div>
+        <h4>Basic scripts (use packed version in production):</h4>
+        <div class="code html"><!--<script src="jquery-1.3.1.min.js" type="text/javascript"></script>
+<script src="jquery.metadata.min.js" type="text/javascript"></script>
+<script src="jgcharts.js" type="text/javascript"></script>
+<script src="plugins/jgtable/jgtable.js" type="text/javascript"></script>--></div>
+
+    </div>
+    
+    <div class="yslider-panelwrapper" title="Basic">
+    
+    	<div class="jgtable">
+        <table>
+          <thead>
+            <tr>
+                <th>Anno</th>
+                <th class="serie">Data 1</th>
+                <th class="serie">Data 2</th>
+                <th class="serie">Data 3</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+                <th class="serie">2001</th>
+                <td>153</td>
+                <td>60</td>
+                <td>52</td>
+            </tr>
+            <tr>
+                <th class="serie">2002</th>
+                <td>113</td>
+                <td>70</td>
+                <td>60</td>
+            </tr>
+            <tr>
+                <th class="serie">2003</th>
+                <td>120</td>
+                <td>80</td>
+                <td>40</td>
+            </tr>
+          </tbody>
+        </table>
+        </div>
+        
+        <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+        <div class="code html"><!-- <div class="jgtable">
+  <table>
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+  </table>
+</div>--></div>
+    </div>
+    
+    <div class="yslider-panelwrapper" title="Metadata">
+    
+        
+            <div class="example">
+            <h3>Example 1</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'550x400',
+type:'bhg',
+title:'Example 1',
+title_color:'000000',
+title_size:16,
+bar_width:30,
+bar_spacing:2,
+colors:['5131c9','FFCC00','da1b1b'],
+bg:'FFFFFF',
+bg_type:'gradient',
+bg_angle:90,
+bg_offset:'6d6969',
+grid:true,
+grid_x:7,
+grid_y:10,
+grid_line:0,
+grid_blank:0}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+            <div class="jgtable {size:'550x400',
+                                                type:'bhg',
+                                                title:'Example 1',
+                                                title_color:'000000',
+                                                title_size:16,
+                                                bar_width:30,
+                                                bar_spacing:2,
+                                                colors:['5131c9','FFCC00','da1b1b'],
+                                                bg:'FFFFFF',
+                                                bg_type:'gradient',
+                                                bg_angle:90,
+                                                bg_offset:'6d6969',
+                                                grid:true,
+                                                grid_x:7,
+                                                grid_y:10,
+                                                grid_line:0,
+                                                grid_blank:0}">
+              <table>
+              <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 2</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'400x500',
+type:'bvg',
+title:'Example 2',
+title_color:'c81e3d',
+title_size:16,
+bar_width:30,
+bar_spacing:2,
+colors:['1aa22f','FFCC00','da1b1b'],
+bg:'FFFFFF',
+bg_type:'stripes',
+bg_angle:90,
+bg_offset:'b7b4b4',
+bg_width:10,
+chbg:'000000',
+chbg_type:'solid'}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+            <div class="jgtable {size:'400x500',
+                                type:'bvg',
+                                title:'Example 2',
+                                title_color:'c81e3d',
+                                title_size:16,
+                                bar_width:30,
+                                bar_spacing:2,
+                                colors:['1aa22f','FFCC00','da1b1b'],
+                                bg:'FFFFFF',
+                                bg_type:'stripes',
+                                bg_angle:90,
+                                bg_offset:'b7b4b4',
+                                bg_width:10,
+                                chbg:'000000',
+                                chbg_type:'solid'}">
+              <table>                           
+              <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 3</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'500x250',
+type:'p3',
+title:'Example 4',
+title_color:'28179b',
+title_size:16,
+colors:['a21a9c','FFCC00'],
+bg:'FFFFFF',
+bg_type:'gradient',
+bg_angle:90,
+bg_offset:'b7b4b4'}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+             <div class="jgtable {size:'500x250',
+                                                type:'p3',
+                                                title:'Example 4',
+                                                title_color:'28179b',
+                                                title_size:16,
+                                                colors:['a21a9c','FFCC00'],
+                                                bg:'FFFFFF',
+                                                bg_type:'gradient',
+                                                bg_angle:90,
+                                                bg_offset:'b7b4b4'}">
+             <table>
+             <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 4</th>
+                    <th class="serie">Data 5</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>40</td>
+                    <td>30</td>
+                </tr>
+                <tr>
+                    <th class="serie">2000</th>
+                    <td>30</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 4</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'450x350',
+type:'p',
+title:'Example 5',
+title_color:'28179b',
+title_size:16,
+colors:['a21a9c','FFCC00'],
+bg:'FFFFFF',
+bg_type:'gradient',
+bg_angle:90,
+bg_offset:'b7b4b4'}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+             <div class="jgtable {size:'450x350',
+                                                type:'p',
+                                                title:'Example 5',
+                                                title_color:'28179b',
+                                                title_size:16,
+                                                colors:['a21a9c','FFCC00'],
+                                                bg:'FFFFFF',
+                                                bg_type:'gradient',
+                                                bg_angle:90,
+                                                bg_offset:'b7b4b4'}">
+             <table>
+             <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 4</th>
+                    <th class="serie">Data 5</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>40</td>
+                    <td>30</td>
+                </tr>
+                <tr>
+                    <th class="serie">2000</th>
+                    <td>30</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 5</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'550x450',
+type:'lc',
+colors:['f04242','FFCC00','99CC00'],
+lines:[[12,9,7],[14,9,7],[13,9,7]],
+bg:'dca0ee',
+bg_type:'solid',
+grid:true,
+grid_x:3,
+grid_y:3,
+grid_line:0,
+grid_blank:0}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+            <div class="jgtable {size:'550x450',
+                                                type:'lc',
+                                                colors:['f04242','FFCC00','99CC00'],
+                                                lines:[[12,9,7],[14,9,7],[13,9,7]],
+                                                bg:'dca0ee',
+                                                bg_type:'solid',
+                                                grid:true,
+                                                grid_x:3,
+                                                grid_y:3,
+                                                grid_line:0,
+                                                grid_blank:0}">
+              <table>
+              <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 7</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'550x450',
+type:'bhs',
+bar_width:90,
+bar_spacing:11,
+colors:['f04242','FFCC00','99CC00'],
+bg:'dca0ee',
+bg_type:'gradient',
+bg_angle:40,
+bg_offset:'FFFFFF',
+chbg:'bfbfbf',
+chbg_type:'stripes',
+chbg_angle:0,
+chbg_offset:'f5f5f5',
+chbg_width:10}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+            <div class="jgtable {size:'550x450',
+                                                type:'bhs',
+                                                bar_width:90,
+                                                bar_spacing:11,
+                                                colors:['f04242','FFCC00','99CC00'],
+                                                bg:'dca0ee',
+                                                bg_type:'gradient',
+                                                bg_angle:40,
+                                                bg_offset:'FFFFFF',
+                                                chbg:'bfbfbf',
+                                                chbg_type:'stripes',
+                                                chbg_angle:0,
+                                                chbg_offset:'f5f5f5',
+                                                chbg_width:10}">
+              <table>
+              <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+            </div>
+            <div class="example">
+            <h3>Example 8</h3>
+            <div class="code javascript"><!--jQuery(".jgtable").jgtable();--></div>
+            <div class="code html"><!--<div class="jgtable {size:'450x450',
+type:'bvs',
+bar_width:90,
+bar_spacing:11,
+colors:['f04242','FFCC00','99CC00'],
+bg:'dca0ee',
+bg_type:'gradient',
+bg_angle:40,
+bg_offset:'FFFFFF',
+chbg:'bfbfbf',
+chbg_type:'stripes',
+chbg_angle:0,
+chbg_offset:'f5f5f5',
+chbg_width:10}">
+	<table>
+	[etc...]
+	</table>
+</div>--></div>
+             <div class="jgtable {size:'450x450',
+                                                type:'bvs',
+                                                bar_width:90,
+                                                bar_spacing:11,
+                                                colors:['f04242','FFCC00','99CC00'],
+                                                bg:'dca0ee',
+                                                bg_type:'gradient',
+                                                bg_angle:40,
+                                                bg_offset:'FFFFFF',
+                                                chbg:'bfbfbf',
+                                                chbg_type:'stripes',
+                                                chbg_angle:0,
+                                                chbg_offset:'f5f5f5',
+                                                chbg_width:10}">
+             <table>
+             <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+            </div>
+    		</div>
+    </div>
+    
+    <div class="yslider-panelwrapper" title="Json">
+        
+        <h3>JS</h3>
+        <div class="code javascript"><!--jQuery.getJSON(
+    "../json/example.json",
+    //wait json data
+    function(json){
+        jQuery("#jgjson").jgtable(json);
+    }
+);--></div>
+        
+        <h3>Options in external json file (../json/example.json)</h3>
+        <div class="code javascript"><!--{
+size:'550x400',
+type:'bhg',
+title:'Example 1',
+title_color:'000000',
+title_size:16,
+bar_width:30,
+bar_spacing:2,
+colors:['5131c9','FFCC00','da1b1b'],
+bg:'FFFFFF',
+bg_type:'gradient',
+bg_angle:90,
+bg_offset:'6d6969',
+grid:true,
+grid_x:7,
+grid_y:10,
+grid_line:0,
+grid_blank:0
+}--></div>
+        
+        <h3>Html Table</h3>
+        <div class="code html"><!--<div id="jgjson">
+  <table>      
+  <thead>
+    <tr>
+        <th>Anno</th>
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+  </table>
+</div>--></div>
+              <div id="jgjson">                                  
+              <table>
+              <thead>
+                <tr>
+                    <th>Anno</th>
+                    <th class="serie">Data 1</th>
+                    <th class="serie">Data 2</th>
+                    <th class="serie">Data 3</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr>
+                    <th class="serie">2001</th>
+                    <td>153</td>
+                    <td>60</td>
+                    <td>52</td>
+                </tr>
+                <tr>
+                    <th class="serie">2002</th>
+                    <td>113</td>
+                    <td>70</td>
+                    <td>60</td>
+                </tr>
+                <tr>
+                    <th class="serie">2003</th>
+                    <td>120</td>
+                    <td>80</td>
+                    <td>40</td>
+                </tr>
+              </tbody>
+            </table>
+    		</div>        
+    </div>
+    
+    <div class="yslider-panelwrapper" title="Custom data">
+        
+        <h3>Alessandro Del Piero</h3>
+        <div id="jgcustomdata">
+        <table>
+          <thead>
+            <tr>
+            <th colspan="2">Cronologia</th>
+            <th colspan="2">Campionato</th>
+            <th colspan="2">Coppe di Lega<small><sup>*</sup></small></th>
+            <th colspan="2">Coppe Europee<small><sup>**</sup></small></th>
+            <th colspan="2">Coppe Internazionali<small><sup>***</sup></small></th>
+            <th colspan="2">Totale</th>
+          </tr>
+          <tr>
+            <th>Stagione - Squadra</th>
+            <th>Serie</th>
+            <th>Presenze</th>
+            <th>Gol</th>
+            <th>Presenze</th>
+            <th>Gol</th>
+            <th>Presenze</th>
+            
+            <th>Gol</th>
+            <th>Presenze</th>
+            <th>Gol</th>
+            <th>Presenze</th>
+            <th>Gol</th>
+          </tr>
+          </thead>
+          <tfoot>
+            <tr>
+                <th colspan="2">Totale</th>
+                <th>417</th>
+                <th>176</th>
+                <th>51</th>
+                <th>22</th>
+                <th>105</th>
+                <th>43</th>
+                <th>1</th>
+                
+                <th>1</th>
+                <th>574</th>
+                <th>242</th>
+            </tr>
+            </tfoot>
+          <tbody>
+          
+          <tr>
+            <th class="custom">1991-92 - Padova</th>
+            
+            <td>B</td>
+            <td>4</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>4</td>
+            <td>-</td>
+            </tr>
+            <tr>
+            <th class="custom">1992-93 - Juventus</th>
+            <td>B</td>
+            <td>10</td>
+            <td>1</td>
+            
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>10</td>
+            <td>1</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">1993-94 - Juventus</th>
+            <td>A</td>
+            <td>11</td>
+            <td>5</td>
+            <td>1</td>
+            <td>-</td>
+            <td>2</td>
+            
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>14</td>
+            <td>5</td>
+            </tr>
+            <tr>
+            <th class="custom">1994-95 - Juventus</th>
+            
+            <td>A</td>
+            <td>29</td>
+            <td>8</td>
+            <td>10</td>
+            <td>1</td>
+            <td>11</td>
+            <td>1</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>50</td>
+            <td>10</td>
+            </tr>
+            <tr>
+            <th class="custom">1995-96 - Juventus</th>
+            <td>A</td>
+            <td>29</td>
+            <td>6</td>
+            
+            <td>3</td>
+            <td>1</td>
+            <td>11</td>
+            <td>6</td>
+            <td>-</td>
+            <td>-</td>
+            <td>43</td>
+            <td>13</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">1996-97 - Juventus</th>
+            <td>A</td>
+            <td>22</td>
+            <td>8</td>
+            <td>4</td>
+            <td>-</td>
+            <td>8</td>
+            
+            <td>6</td>
+            <td>1</td>
+            <td>1</td>
+            <td>35</td>
+            <td>15</td>
+            </tr>
+            <tr>
+            <th class="custom">1997-98 - Juventus</th>
+            
+            <td>A</td>
+            <td>32</td>
+            <td>21</td>
+            <td>5</td>
+            <td>1</td>
+            <td>10</td>
+            <td>10</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>47</td>
+            <td>32</td>
+            </tr>
+            <tr>
+            <th class="custom">1998-99 - Juventus</th>
+            <td>A</td>
+            <td>8</td>
+            <td>2</td>
+            
+            <td>2</td>
+            <td>1</td>
+            <td>4</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>14</td>
+            <td>3</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">1999-00 - Juventus</th>
+            <td>A</td>
+            <td>34</td>
+            <td>9</td>
+            <td>2</td>
+            <td>1</td>
+            <td>9</td>
+            
+            <td>2</td>
+            <td>-</td>
+            <td>-</td>
+            <td>45</td>
+            <td>12</td>
+            </tr>
+            <tr>
+            <th class="custom">2000-01 - Juventus</th>
+            
+            <td>A</td>
+            <td>25</td>
+            <td>9</td>
+            <td>2</td>
+            <td>-</td>
+            <td>6</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>33</td>
+            <td>9</td>
+            </tr>
+            <tr>
+            <th class="custom">2001-02 - Juventus</th>
+            <td>A</td>
+            <td>32</td>
+            <td>16</td>
+            
+            <td>4</td>
+            <td>1</td>
+            <td>10</td>
+            <td>4</td>
+            <td>-</td>
+            <td>-</td>
+            <td>46</td>
+            <td>21</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">2002-03 - Juventus</th>
+            <td>A</td>
+            <td>24</td>
+            <td>16</td>
+            <td>1</td>
+            <td>2</td>
+            <td>13</td>
+            
+            <td>5</td>
+            <td>-</td>
+            <td>-</td>
+            <td>38</td>
+            <td>23</td>
+            </tr>
+            <tr>
+            <th class="custom">2003-04 - Juventus</th>
+            
+            <td>A</td>
+            <td>22</td>
+            <td>8</td>
+            <td>5</td>
+            <td>3</td>
+            <td>4</td>
+            <td>3</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>31</td>
+            <td>14</td>
+            </tr>
+            <tr>
+            <th class="custom">2004-05 - Juventus</th>
+            <td>A</td>
+            <td>30</td>
+            <td>14</td>
+            
+            <td>1</td>
+            <td>-</td>
+            <td>10</td>
+            <td>3</td>
+            <td>-</td>
+            <td>-</td>
+            <td>41</td>
+            <td>17</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">2005-06 - Juventus</th>
+            <td>A</td>
+            <td>33</td>
+            <td>12</td>
+            <td>5</td>
+            <td>5</td>
+            <td>7</td>
+            
+            <td>3</td>
+            <td>-</td>
+            <td>-</td>
+            <td>45</td>
+            <td>20</td>
+            </tr>
+            <tr>
+            <th class="custom">2006-07 - Juventus</th>
+            
+            <td>B</td>
+            <td>35</td>
+            <td>20</td>
+            <td>2</td>
+            <td>3</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            
+            <td>37</td>
+            <td>23</td>
+            </tr>
+            
+            <tr>
+            <th class="custom">2007-08 - Juventus</th>
+            <td>A</td>
+            <td>37</td>
+            <td>21</td>
+            
+            <td>4</td>
+            <td>3</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>-</td>
+            <td>41</td>
+            <td>24</td>
+            </tr>
+            
+            
+            </tbody>
+            
+        </table>
+        </div>
+        <h3>JS</h3>
+        <div class="code javascript"><!--jQuery.getJSON(
+"../json/delpiero.json",
+//wait json data
+function(json){
+    var data_custom = [];
+    for(var x= 0;x< jQuery("#jgcustomdata").find("tbody > tr").size();x++){
+        data_custom.push(jQuery.map( jQuery("#jgcustomdata").find("tbody > tr:eq(" + x + ") > td"),
+           function(td,index){
+                if(index % 11 == 1 || index % 11 == 2){
+                    if(parseInt(jQuery(td).text()))
+                        return parseInt(jQuery(td).text());
+                    else
+                        return 0;
+                } 
+           }
+        ));
+        
+    }
+    var axis_custom = jQuery.map( jQuery("#jgcustomdata").find("tbody > tr > th.custom"),
+               function(th) { return jQuery(th).text(); }
+    );
+    var legend_custom = ["presenze", "gol"];
+    
+    json.axis_labels = axis_custom;
+    json.data = data_custom;
+    json.legend = legend_custom;
+    jQuery("#jgcustomdata").jgtable(json);
+    
+    var data_custom = [];
+    for(var x= 0;x< jQuery("#jgcustomdata").find("tbody > tr").size();x++){
+        data_custom.push(jQuery.map( jQuery("#jgcustomdata").find("tbody > tr:eq(" + x + ") > td"),
+           function(td,index){
+                if(index % 11 == 9 || index % 11 == 10){
+                    if(parseInt(jQuery(td).text()))
+                        return parseInt(jQuery(td).text());
+                    else
+                        return 0;
+                } 
+           }
+        ));
+        
+    }
+    json.data = data_custom;
+    json.title = 'Gol e presenze totali';
+    
+    jQuery("#jgcustomdata").jgtable(json);
+    
+});--></div>
+        
+        <h3>Options in json file</h3>
+        <div class="code javascript"><!--{
+size:'450x600',
+type:'bhg',
+axis_step:1,
+title:'Gol e presenze in campionato',
+title_color:'000000',
+title_size:16,
+bar_width:10,
+bar_spacing:0,
+colors:['5131c9','da1b1b'],
+grid:true,
+grid_x:5,
+grid_y:5,
+grid_line:5,
+grid_blank:5
+}--></div>
+        
+        <h3>Html Table</h3>
+        <div class="code html"><!--<div id="jgcustomdata">
+  <table>
+  <thead>
+    <tr>
+    <th colspan="2">Cronologia</th>
+    <th colspan="2">Campionato</th>
+    <th colspan="2">Coppe di Lega<small><sup>*</sup></small></th>
+    <th colspan="2">Coppe Europee<small><sup>**</sup></small></th>
+    <th colspan="2">Coppe Internazionali<small><sup>***</sup></small></th>
+    <th colspan="2">Totale</th>
+  </tr>
+  <tr>
+    <th>Stagione - Squadra</th>
+    <th>Serie</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+    <th>Presenze</th>
+    <th>Gol</th>
+  </tr>
+  </thead>
+  <tfoot>
+    <tr>
+        <th colspan="2">Totale</th>
+        <th>417</th>
+        <th>176</th>
+        <th>51</th>
+        <th>22</th>
+        <th>105</th>
+        <th>43</th>
+        <th>1</th>
+        
+        <th>1</th>
+        <th>574</th>
+        <th>242</th>
+    </tr>
+    </tfoot>
+  <tbody>
+  
+  <tr>
+    <th class="custom">1991-92 - Padova</th>
+    
+    <td>B</td>
+    <td>4</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>4</td>
+    <td>-</td>
+    </tr>
+    <tr>
+    <th class="custom">1992-93 - Juventus</th>
+    <td>B</td>
+    <td>10</td>
+    <td>1</td>
+    
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>10</td>
+    <td>1</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">1993-94 - Juventus</th>
+    <td>A</td>
+    <td>11</td>
+    <td>5</td>
+    <td>1</td>
+    <td>-</td>
+    <td>2</td>
+    
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>14</td>
+    <td>5</td>
+    </tr>
+    <tr>
+    <th class="custom">1994-95 - Juventus</th>
+    
+    <td>A</td>
+    <td>29</td>
+    <td>8</td>
+    <td>10</td>
+    <td>1</td>
+    <td>11</td>
+    <td>1</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>50</td>
+    <td>10</td>
+    </tr>
+    <tr>
+    <th class="custom">1995-96 - Juventus</th>
+    <td>A</td>
+    <td>29</td>
+    <td>6</td>
+    
+    <td>3</td>
+    <td>1</td>
+    <td>11</td>
+    <td>6</td>
+    <td>-</td>
+    <td>-</td>
+    <td>43</td>
+    <td>13</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">1996-97 - Juventus</th>
+    <td>A</td>
+    <td>22</td>
+    <td>8</td>
+    <td>4</td>
+    <td>-</td>
+    <td>8</td>
+    
+    <td>6</td>
+    <td>1</td>
+    <td>1</td>
+    <td>35</td>
+    <td>15</td>
+    </tr>
+    <tr>
+    <th class="custom">1997-98 - Juventus</th>
+    
+    <td>A</td>
+    <td>32</td>
+    <td>21</td>
+    <td>5</td>
+    <td>1</td>
+    <td>10</td>
+    <td>10</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>47</td>
+    <td>32</td>
+    </tr>
+    <tr>
+    <th class="custom">1998-99 - Juventus</th>
+    <td>A</td>
+    <td>8</td>
+    <td>2</td>
+    
+    <td>2</td>
+    <td>1</td>
+    <td>4</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>14</td>
+    <td>3</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">1999-00 - Juventus</th>
+    <td>A</td>
+    <td>34</td>
+    <td>9</td>
+    <td>2</td>
+    <td>1</td>
+    <td>9</td>
+    
+    <td>2</td>
+    <td>-</td>
+    <td>-</td>
+    <td>45</td>
+    <td>12</td>
+    </tr>
+    <tr>
+    <th class="custom">2000-01 - Juventus</th>
+    
+    <td>A</td>
+    <td>25</td>
+    <td>9</td>
+    <td>2</td>
+    <td>-</td>
+    <td>6</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>33</td>
+    <td>9</td>
+    </tr>
+    <tr>
+    <th class="custom">2001-02 - Juventus</th>
+    <td>A</td>
+    <td>32</td>
+    <td>16</td>
+    
+    <td>4</td>
+    <td>1</td>
+    <td>10</td>
+    <td>4</td>
+    <td>-</td>
+    <td>-</td>
+    <td>46</td>
+    <td>21</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">2002-03 - Juventus</th>
+    <td>A</td>
+    <td>24</td>
+    <td>16</td>
+    <td>1</td>
+    <td>2</td>
+    <td>13</td>
+    
+    <td>5</td>
+    <td>-</td>
+    <td>-</td>
+    <td>38</td>
+    <td>23</td>
+    </tr>
+    <tr>
+    <th class="custom">2003-04 - Juventus</th>
+    
+    <td>A</td>
+    <td>22</td>
+    <td>8</td>
+    <td>5</td>
+    <td>3</td>
+    <td>4</td>
+    <td>3</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>31</td>
+    <td>14</td>
+    </tr>
+    <tr>
+    <th class="custom">2004-05 - Juventus</th>
+    <td>A</td>
+    <td>30</td>
+    <td>14</td>
+    
+    <td>1</td>
+    <td>-</td>
+    <td>10</td>
+    <td>3</td>
+    <td>-</td>
+    <td>-</td>
+    <td>41</td>
+    <td>17</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">2005-06 - Juventus</th>
+    <td>A</td>
+    <td>33</td>
+    <td>12</td>
+    <td>5</td>
+    <td>5</td>
+    <td>7</td>
+    
+    <td>3</td>
+    <td>-</td>
+    <td>-</td>
+    <td>45</td>
+    <td>20</td>
+    </tr>
+    <tr>
+    <th class="custom">2006-07 - Juventus</th>
+    
+    <td>B</td>
+    <td>35</td>
+    <td>20</td>
+    <td>2</td>
+    <td>3</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    
+    <td>37</td>
+    <td>23</td>
+    </tr>
+    
+    <tr>
+    <th class="custom">2007-08 - Juventus</th>
+    <td>A</td>
+    <td>37</td>
+    <td>21</td>
+    
+    <td>4</td>
+    <td>3</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>-</td>
+    <td>41</td>
+    <td>24</td>
+    </tr>
+    
+    
+    </tbody>
+    
+   </table>
+</div>--></div>
+                                                
+              
+        
+    </div>
+</div>
+<!--todo: copy events -->
+<div id="yslider-code" class="ycodaslider">
+    <a class="javascript" href="../../jgcharts.js" class="tracking {label : '/jgcharts/code/jgcharts'}">jGCharts 1.0</a>
+    <a class="javascript" href="../../plugins/jgtable/jgtable.js" class="tracking {label : '/jgcharts/code/jgtable'}">jGTable 1.0</a>
+</div>
+<div id="analytics" class="UA-258871-1 {host: 'maxb.net'}"></div><!--debug:true-->
+</body>
+</html>    

+ 588 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/index.html

@@ -0,0 +1,588 @@
+<!DOCTYPE html 
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <title>jQuery Google Charts Gui 1.0 - Demo</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <script src="lib/jquery-1.2.6.min.js" type="text/javascript"></script>
+	<script src="lib/jquery.metadata.js" type="text/javascript"></script>
+	<script src="lib/jquery-ui-personalized-1.6rc2.min.js" type="text/javascript"></script>
+    <script src="lib/farbtastic/farbtastic.js" type="text/javascript"></script>
+	<link href="lib/farbtastic/farbtastic.css" type="text/css" rel="stylesheet" />
+		
+	<script src="../../jgcharts.js" type="text/javascript"></script>
+	<script src="../../plugins/jgtable/jgtable.js" type="text/javascript"></script>
+	<script src="plugins/jggui/jggui.js" type="text/javascript"></script>
+	<link href="plugins/jggui/jggui.css" type="text/css" rel="stylesheet" />
+	<link href="plugins/jggui/theme/jquery-ui-themeroller.css" type="text/css" rel="stylesheet" />
+	<script type="text/javascript">
+		var STATIC = 0;
+		jQuery(document).bind("jggui", function(){
+			var _callback = function(){
+				STATIC++;
+				jQuery(".jgchart").remove();
+				jQuery(".jgtable")
+				.jgtable({
+					single : STATIC,
+					gui    : true
+				});
+			};
+			_callback();
+			
+			jQuery("img.jggui").jggui({
+				url : "plugins/jggui/",
+				height : 400,
+				width : 600,
+				callback : _callback
+			});
+		});
+		jQuery(document).ready(function(){
+			jQuery(document).trigger("jggui");
+		});
+	</script>
+</head>
+<body>
+<h1>Click on chart</h1>
+<div class="jgtable {type : 'p',colors : ['5131C9'],size : '300x200'}">
+<table class="demo">
+  <thead>
+    <tr>
+        <th>Anno</th>
+
+        <th class="serie">Data 1</th>
+        <th class="serie">Data 2</th>
+        <th class="serie">Data 3</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+
+        <th class="serie">2001</th>
+        <td>153</td>
+        <td>60</td>
+        <td>52</td>
+    </tr>
+    <tr>
+        <th class="serie">2002</th>
+
+        <td>113</td>
+        <td>70</td>
+        <td>60</td>
+    </tr>
+    <tr>
+        <th class="serie">2003</th>
+        <td>120</td>
+
+        <td>80</td>
+        <td>40</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="jgtable {type : 'bhg',bar_width : 15,grid : true,colors : ['5131C9'],size : '390x490'}">
+<table class="demo">
+  <thead>
+    <tr>
+        <th>Squadra</th>
+
+        <th class="serie">Punti</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr><th class="serie">Inter</th><td>27</td></tr>
+    <tr><th class="serie">Juventus</th><td>24</td></tr>
+    <tr><th class="serie">Milan</th><td>23</td></tr>
+    <tr><th class="serie">Napoli</th><td>23</td></tr>
+    <tr><th class="serie">Lazio</th><td>22</td></tr>
+    <tr><th class="serie">Udinese</th><td>21</td></tr>
+    <tr><th class="serie">Genoa</th><td>20</td></tr>
+    <tr><th class="serie">Fiorentina</th><td>20</td></tr>
+    <tr><th class="serie">Catania</th><td>18</td></tr>
+    <tr><th class="serie">Palermo</th><td>16</td></tr>
+    <tr><th class="serie">Atalanta</th><td>14</td></tr>
+    <tr><th class="serie">Lecce</th><td>12</td></tr>
+    <tr><th class="serie">Siena</th><td>12</td></tr>
+    <tr><th class="serie">Torino</th><td>11</td></tr>
+    <tr><th class="serie">Cagliari</th><td>10</td></tr>
+    <tr><th class="serie">Sampdoria</th><td>10</td></tr>
+    <tr><th class="serie">Roma</th><td>8</td></tr>
+    <tr><th class="serie">Bologna</th><td>7</td></tr>
+    <tr><th class="serie">Chievo</th><td>6</td></tr>
+    <tr><th class="serie">Reggina</th><td>5</td></tr>
+  </tbody>
+</table>
+</div>
+<div class="jgtable {
+	type : 'bhg',
+	bar_width : 19,
+	bg : 'FFFFFF',
+	bg_type : 'stripes',
+	bg_offset : '7a7a7a',
+	bg_angle : 45,
+	bg_trasparency : 90,
+	chbg : 'FFFFFF',
+	chbg_type : 'gradient',
+	chbg_offset : 'cb7e01',
+	grid : true,
+	grid_x : 3,
+	grid_y : 3,
+	grid_line : 2,
+	grid_blank : 2,
+	colors : ['5131C9','FFCC00','DA1B1B','FF9900','FF6600','CCFFFF','CCFF00','CCCCCC','FF99CC','999900','999999','66FF00','66CC00','669900','660099','33CC00','333399','000000','000000','000000'],
+	size : '300x460'
+}">
+<table class="demo">
+  <thead>
+    <tr>
+        <th>Squadra</th>
+		<th class="serie">Inter</th>
+	    <th class="serie">Juventus</th>
+	    <th class="serie">Milan</th>
+	    <th class="serie">Napoli</th>
+	    <th class="serie">Lazio</th>
+	    <th class="serie">Udinese</th>
+	    <th class="serie">Genoa</th>
+	    <th class="serie">Fiorentina</th>
+	    <th class="serie">Catania</th>
+	    <th class="serie">Palermo</th>
+	    <th class="serie">Atalanta</th>
+	    <th class="serie">Lecce</th>
+	    <th class="serie">Siena</th>
+	    <th class="serie">Torino</th>
+	    <th class="serie">Cagliari</th>
+	    <th class="serie">Sampdoria</th>
+	    <th class="serie">Roma</th>
+	    <th class="serie">Bologna</th>
+	    <th class="serie">Chievo</th>
+	    <th class="serie">Reggina</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+    <th class="serie">Punti</th>
+    <td>27</td>
+    <td>24</td>
+    <td>23</td>
+    <td>23</td>
+    <td>22</td>
+    <td>21</td>
+    <td>20</td>
+    <td>20</td>
+    <td>18</td>
+    <td>16</td>
+    <td>14</td>
+    <td>12</td>
+    <td>12</td>
+    <td>11</td>
+    <td>10</td>
+    <td>10</td>
+    <td>8</td>
+    <td>7</td>
+    <td>6</td>
+    <td>5</td>
+    </tr>
+  </tbody>
+</table>
+</div>
+<div class="jgtable {
+	type : 'lc',
+	size : '520x370',
+	lines : [['1','0','0'],['1','0','0']],
+	axis_step : 10,
+	bg : '000000',
+	bg_type : 'gradient',
+	bg_offset : 'FFFFFF',
+	bg_trasparency : 90,
+	grid : true,
+	grid_x : 4,
+	grid_y : 4,
+	grid_line : 2,
+	grid_blank : 2,
+	colors : ['5131C9','FFCC00'],
+	filltop : ''
+}">
+<table>
+<thead>
+<tr>
+    <th></th>
+    <th class="serie">CA</th>
+    <th class="serie">DF</th>
+</tr>
+</thead>
+<tbody>
+   <tr>
+    <th class="serie">01-03</th>
+
+    <td>105.7</td>
+    <td>97.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-03</th>
+    <td>108.1</td>
+    <td>101.6</td>
+
+  </tr>
+  <tr>
+    <th class="serie">03-03</th>
+    <td>110.7</td>
+    <td>102.9</td>
+  </tr>
+  
+  <tr>
+
+    <th class="serie">04-03</th>
+    <td>111.0</td>
+    <td>93.7</td>
+  </tr>
+  <tr>
+    <th class="serie">05-03</th>
+    <td>110.0</td>
+
+    <td>89.8</td>
+  </tr>
+  <tr>
+    <th class="serie">06-03</th>
+    <td>109.0</td>
+    <td>90.7</td>
+  </tr>
+
+  <tr>
+    <th class="serie">07-03</th>
+    <td>107.5</td>
+    <td>93.0</td>
+  </tr>
+  <tr>
+    <th class="serie">08-03</th>
+
+    <td>106.1</td>
+    <td>94.5</td>
+  </tr>
+  <tr>
+    <th class="serie">09-03</th>
+    <td>104.3</td>
+    <td>91.9</td>
+
+  </tr>
+  <tr>
+    <th class="serie">10-03</th>
+    <td>102.0</td>
+    <td>93.9</td>
+  </tr>
+  <tr>
+
+    <th class="serie">11-03</th>
+    <td>102.8</td>
+    <td>93.6</td>
+  </tr>
+  <tr>
+    <th class="serie">12-03</th>
+    <td>103.8</td>
+
+    <td>92.6</td>
+  </tr>
+  
+  <tr>
+    <th class="serie">01-04</th>
+    <td>102.9</td>
+    <td>94.0</td>
+  </tr>
+
+  <tr>
+    <th class="serie">02-04</th>
+    <td>102.1</td>
+    <td>92.7</td>
+  </tr>
+  <tr>
+    <th class="serie">03-04</th>
+
+    <td>100.6</td>
+    <td>96.0</td>
+  </tr>
+  
+ <tr>
+    <th class="serie">04-04</th>
+    <td>101.7</td>
+    <td>97.9</td>
+
+  </tr>
+  <tr>
+    <th class="serie">05-04</th>
+    <td>101.8</td>
+    <td>105.0</td>
+  </tr>
+  <tr>
+
+    <th class="serie">06-04</th>
+    <td>103.3</td>
+    <td>104.1</td>
+  </tr>
+  <tr>
+    <th class="serie">07-04</th>
+    <td>104.0</td>
+
+    <td>105.1</td>
+  </tr>
+  <tr>
+    <th class="serie">08-04</th>
+    <td>103.7</td>
+    <td>108.1</td>
+  </tr>
+
+  <tr>
+    <th class="serie">09-04</th>
+    <td>108.4</td>
+    <td>108.4</td>
+  </tr>
+  <tr>
+    <th class="serie">10-04</th>
+
+    <td>109.4</td>
+    <td>113.8</td>
+  </tr>
+  <tr>
+    <th class="serie">11-04</th>
+    <td>112.0</td>
+    <td>109.1</td>
+
+  </tr>
+  <tr>
+    <th class="serie">12-04</th>
+    <td>112.6</td>
+    <td>106.3</td>
+  </tr>
+  <tr>
+
+    <th class="serie">01-05</th>
+    <td>115.5</td>
+    <td>106.7</td>
+  </tr>
+  <tr>
+    <th class="serie">02-05</th>
+    <td>115.7</td>
+
+    <td>108.8</td>
+  </tr>
+  <tr>
+    <th class="serie">03-05</th>
+    <td>114.7</td>
+    <td>118.8</td>
+  </tr>
+
+  <tr>
+    <th class="serie">04-05</th>
+    <td>115.9</td>
+    <td>120.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-05</th>
+
+    <td>116.2</td>
+    <td>115.9</td>
+  </tr>
+  <tr>
+    <th class="serie">06-05</th>
+    <td>118.0</td>
+    <td>124.7</td>
+
+  </tr>
+  <tr>
+    <th class="serie">07-05</th>
+    <td>123.3</td>
+    <td>126.5</td>
+  </tr>
+  <tr>
+
+    <th class="serie">08-05</th>
+    <td>127.6</td>
+    <td>131.6</td>
+  </tr>
+  <tr>
+    <th class="serie">09-05</th>
+    <td>130.3</td>
+
+    <td>134.0</td>
+  </tr>
+  <tr>
+    <th class="serie">10-05</th>
+    <td>135.5</td>
+    <td>135.7</td>
+  </tr>
+
+  <tr>
+    <th class="serie">11-05</th>
+    <td>138.2</td>
+    <td>126.4</td>
+  </tr>
+  <tr>
+    <th class="serie">12-05</th>
+
+    <td>139.6</td>
+    <td>127.4</td>
+  </tr>
+  <tr>
+    <th class="serie">01-06</th>
+    <td>145.1</td>
+    <td>131.0</td>
+
+  </tr>
+  <tr>
+    <th class="serie">02-06</th>
+    <td>146.4</td>
+    <td>129.9</td>
+  </tr>
+  <tr>
+
+    <th class="serie">03-06</th>
+    <td>147.1</td>
+    <td>133.7</td>
+  </tr>
+  <tr>
+    <th class="serie">04-06</th>
+    <td>149.0</td>
+
+    <td>138.4</td>
+  </tr>
+  <tr>
+    <th class="serie">05-06</th>
+    <td>150.3</td>
+    <td>141.0</td>
+  </tr>
+
+  <tr>
+    <th class="serie">06-06</th>
+    <td>151.3</td>
+    <td>139.3</td>
+  </tr>
+  <tr>
+    <th class="serie">07-06</th>
+
+    <td>153.4</td>
+    <td>145.3</td>
+  </tr>
+  <tr>
+    <th class="serie">08-06</th>
+    <td>152.7</td>
+    <td>142.9</td>
+
+  </tr>
+  <tr>
+    <th class="serie">09-06</th>
+    <td>152.9</td>
+    <td>129.2</td>
+  </tr>
+  <tr>
+
+    <th class="serie">10-06</th>
+    <td>152.2</td>
+    <td>126.0</td>
+  </tr>
+  <tr>
+    <th class="serie">11-06</th>
+    <td>151.9</td>
+
+    <td>124.8</td>
+  </tr>
+  <tr>
+    <th class="serie">12-06</th>
+    <td>150.1</td>
+    <td>125.9</td>
+  </tr>
+
+  <tr>
+    <th class="serie">01-07</th>
+    <td>148.2</td>
+    <td>118.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-07</th>
+
+    <td>145.3</td>
+    <td>122.9</td>
+  </tr>
+  <tr>
+    <th class="serie">03-07</th>
+    <td>142.9</td>
+    <td>127.7</td>
+
+  </tr>
+  <tr>
+    <th class="serie">04-07</th>
+    <td>142.6</td>
+    <td>134.4</td>
+  </tr>
+  <tr>
+
+    <th class="serie">05-07</th>
+    <td>144.0</td>
+    <td>138.5</td>
+  </tr>
+  <tr>
+    <th class="serie">06-07</th>
+    <td>145.5</td>
+
+    <td>138.7</td>
+  </tr>
+  <tr>
+    <th class="serie">07-07</th>
+    <td>147.2</td>
+    <td>141.8</td>
+  </tr>
+
+  <tr>
+    <th class="serie">08-07</th>
+    <td>150.0</td>
+    <td>139.2</td>
+  </tr>
+  <tr>
+    <th class="serie">09-07</th>
+
+    <td>153.8</td>
+    <td>145.6</td>
+  </tr>
+  <tr>
+    <th class="serie">10-07</th>
+    <td>155.4</td>
+    <td>147.6</td>
+
+  </tr>
+  <tr>
+    <th class="serie">11-07</th>
+    <td>157.0</td>
+    <td>157.9</td>
+  </tr>
+  <tr>
+
+    <th class="serie">12-07</th>
+    <td>158.4</td>
+    <td>156.2</td>
+  </tr>
+  <tr>
+    <th class="serie">01-08</th>
+    <td>162.8</td>
+
+    <td>153.9</td>
+  </tr>
+  <tr>
+    <th class="serie">02-08</th>
+    <td>162.8</td>
+    <td>158.6</td>
+  </tr>
+
+  <tr>
+    <th class="serie">03-08</th>
+    <td>164.7</td>
+    <td>166.3</td>
+  </tr>
+  <tr>
+    <th class="serie">04-08</th>
+
+    <td>168.5</td>
+    <td>165.8</td>
+  </tr>
+</tbody>
+</table>
+</div>
+</body>
+</html>  

BIN
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/_marker.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/colorpicker_select.gif


+ 43 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/farbtastic.css

@@ -0,0 +1,43 @@
+#picker{
+  z-index: 99999999;
+}
+
+.farbtastic {
+  position: absolute;
+  background: #222;
+  border: 1px solid #444;
+  border-top: 0;
+  top: 1.6em;
+  right: 0;
+  z-index: 99999999;
+}
+.farbtastic * {
+  position: absolute;
+  cursor: crosshair;
+}
+.farbtastic, .farbtastic .wheel {
+  width: 195px;
+  height: 195px;
+}
+.farbtastic .color, .farbtastic .overlay {
+  top: 47px;
+  left: 47px;
+  width: 101px;
+  height: 101px;
+}
+.farbtastic .wheel {
+  background: url(wheel.png) no-repeat;
+  width: 195px;
+  height: 195px;
+}
+.farbtastic .overlay {
+  background: url(mask.png) no-repeat;
+}
+.farbtastic .marker {
+  width: 17px;
+  height: 17px;
+  margin: -8px 0 0 -8px;
+  overflow: hidden; 
+  background: url(colorpicker_select.gif) no-repeat;
+}
+

+ 329 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/farbtastic.js

@@ -0,0 +1,329 @@
+// $Id: farbtastic.js,v 1.1 2009/10/01 18:28:22 ccheng Exp $
+// Farbtastic 1.2
+
+jQuery.fn.farbtastic = function (callback) {
+  $.farbtastic(this, callback);
+  return this;
+};
+
+jQuery.farbtastic = function (container, callback) {
+  var container = $(container).get(0);
+  return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback));
+}
+
+jQuery._farbtastic = function (container, callback) {
+  // Store farbtastic object
+  var fb = this;
+
+  // Insert markup
+  $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');
+  var e = $('.farbtastic', container);
+  fb.wheel = $('.wheel', container).get(0);
+  // Dimensions
+  fb.radius = 84;
+  fb.square = 100;
+  fb.width = 194;
+
+  // Fix background PNGs in IE6
+  if (navigator.appVersion.match(/MSIE [0-6]\./)) {
+    $('*', e).each(function () {
+      if (this.currentStyle.backgroundImage != 'none') {
+        var image = this.currentStyle.backgroundImage;
+        image = this.currentStyle.backgroundImage.substring(5, image.length - 2);
+        $(this).css({
+          'backgroundImage': 'none',
+          'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
+        });
+      }
+    });
+  }
+
+  /**
+   * Link to the given element(s) or callback.
+   */
+  fb.linkTo = function (callback) {
+    // Unbind previous nodes
+    if (typeof fb.callback == 'object') {
+      $(fb.callback).unbind('keyup', fb.updateValue);
+    }
+
+    // Reset color
+    fb.color = null;
+
+    // Bind callback or elements
+    if (typeof callback == 'function') {
+      fb.callback = callback;
+    }
+    else if (typeof callback == 'object' || typeof callback == 'string') {
+      fb.callback = $(callback);
+      fb.callback.bind('keyup', fb.updateValue);
+      if (fb.callback.get(0).value) {
+        fb.setColor(fb.callback.get(0).value);
+      }
+    }
+    return this;
+  }
+  fb.updateValue = function (event) {
+    if (this.value && this.value != fb.color) {
+      fb.setColor(this.value);
+    }
+  }
+
+  /**
+   * Change color with HTML syntax #123456
+   */
+  fb.setColor = function (color) {
+    var unpack = fb.unpack(color);
+    if (fb.color != color && unpack) {
+      fb.color = color;
+      fb.rgb = unpack;
+      fb.hsl = fb.RGBToHSL(fb.rgb);
+      fb.updateDisplay();
+    }
+    return this;
+  }
+
+  /**
+   * Change color with HSL triplet [0..1, 0..1, 0..1]
+   */
+  fb.setHSL = function (hsl) {
+    fb.hsl = hsl;
+    fb.rgb = fb.HSLToRGB(hsl);
+    fb.color = fb.pack(fb.rgb);
+    fb.updateDisplay();
+    return this;
+  }
+
+  /////////////////////////////////////////////////////
+
+  /**
+   * Retrieve the coordinates of the given event relative to the center
+   * of the widget.
+   */
+  fb.widgetCoords = function (event) {
+    var x, y;
+    var el = event.target || event.srcElement;
+    var reference = fb.wheel;
+
+    if (typeof event.offsetX != 'undefined') {
+      // Use offset coordinates and find common offsetParent
+      var pos = { x: event.offsetX, y: event.offsetY };
+
+      // Send the coordinates upwards through the offsetParent chain.
+      var e = el;
+      while (e) {
+        e.mouseX = pos.x;
+        e.mouseY = pos.y;
+        pos.x += e.offsetLeft;
+        pos.y += e.offsetTop;
+        e = e.offsetParent;
+      }
+
+      // Look for the coordinates starting from the wheel widget.
+      var e = reference;
+      var offset = { x: 0, y: 0 }
+      while (e) {
+        if (typeof e.mouseX != 'undefined') {
+          x = e.mouseX - offset.x;
+          y = e.mouseY - offset.y;
+          break;
+        }
+        offset.x += e.offsetLeft;
+        offset.y += e.offsetTop;
+        e = e.offsetParent;
+      }
+
+      // Reset stored coordinates
+      e = el;
+      while (e) {
+        e.mouseX = undefined;
+        e.mouseY = undefined;
+        e = e.offsetParent;
+      }
+    }
+    else {
+      // Use absolute coordinates
+      var pos = fb.absolutePosition(reference);
+      x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x;
+      y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y;
+    }
+    // Subtract distance to middle
+    return { x: x - fb.width / 2, y: y - fb.width / 2 };
+  }
+
+  /**
+   * Mousedown handler
+   */
+  fb.mousedown = function (event) {
+    // Capture mouse
+    if (!document.dragging) {
+      $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
+      document.dragging = true;
+    }
+
+    // Check which area is being dragged
+    var pos = fb.widgetCoords(event);
+    fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square;
+
+    // Process
+    fb.mousemove(event);
+    return false;
+  }
+
+  /**
+   * Mousemove handler
+   */
+  fb.mousemove = function (event) {
+    // Get coordinates relative to color picker center
+    var pos = fb.widgetCoords(event);
+
+    // Set new HSL parameters
+    if (fb.circleDrag) {
+      var hue = Math.atan2(pos.x, -pos.y) / 6.28;
+      if (hue < 0) hue += 1;
+      fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]);
+    }
+    else {
+      var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5));
+      var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5));
+      fb.setHSL([fb.hsl[0], sat, lum]);
+    }
+    return false;
+  }
+
+  /**
+   * Mouseup handler
+   */
+  fb.mouseup = function () {
+    // Uncapture mouse
+    $(document).unbind('mousemove', fb.mousemove);
+    $(document).unbind('mouseup', fb.mouseup);
+    document.dragging = false;
+  }
+
+  /**
+   * Update the markers and styles
+   */
+  fb.updateDisplay = function () {
+    // Markers
+    var angle = fb.hsl[0] * 6.28;
+    $('.h-marker', e).css({
+      left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px',
+      top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px'
+    });
+
+    $('.sl-marker', e).css({
+      left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px',
+      top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px'
+    });
+
+    // Saturation/Luminance gradient
+    $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5])));
+
+    // Linked elements or callback
+    if (typeof fb.callback == 'object') {
+      // Set background/foreground color
+      $(fb.callback).css({
+        backgroundColor: fb.color,
+        color: fb.hsl[2] > 0.5 ? '#000' : '#fff'
+      });
+
+      // Change linked value
+      $(fb.callback).each(function() {
+        if (this.value && this.value != fb.color) {
+          this.value = fb.color;
+        }
+      });
+    }
+    else if (typeof fb.callback == 'function') {
+      fb.callback.call(fb, fb.color);
+    }
+  }
+
+  /**
+   * Get absolute position of element
+   */
+  fb.absolutePosition = function (el) {
+    var r = { x: el.offsetLeft, y: el.offsetTop };
+    // Resolve relative to offsetParent
+    if (el.offsetParent) {
+      var tmp = fb.absolutePosition(el.offsetParent);
+      r.x += tmp.x;
+      r.y += tmp.y;
+    }
+    return r;
+  };
+
+  /* Various color utility functions */
+  fb.pack = function (rgb) {
+    var r = Math.round(rgb[0] * 255);
+    var g = Math.round(rgb[1] * 255);
+    var b = Math.round(rgb[2] * 255);
+    return '#' + (r < 16 ? '0' : '') + r.toString(16) +
+           (g < 16 ? '0' : '') + g.toString(16) +
+           (b < 16 ? '0' : '') + b.toString(16);
+  }
+
+  fb.unpack = function (color) {
+    if (color.length == 7) {
+      return [parseInt('0x' + color.substring(1, 3)) / 255,
+        parseInt('0x' + color.substring(3, 5)) / 255,
+        parseInt('0x' + color.substring(5, 7)) / 255];
+    }
+    else if (color.length == 4) {
+      return [parseInt('0x' + color.substring(1, 2)) / 15,
+        parseInt('0x' + color.substring(2, 3)) / 15,
+        parseInt('0x' + color.substring(3, 4)) / 15];
+    }
+  }
+
+  fb.HSLToRGB = function (hsl) {
+    var m1, m2, r, g, b;
+    var h = hsl[0], s = hsl[1], l = hsl[2];
+    m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;
+    m1 = l * 2 - m2;
+    return [this.hueToRGB(m1, m2, h+0.33333),
+        this.hueToRGB(m1, m2, h),
+        this.hueToRGB(m1, m2, h-0.33333)];
+  }
+
+  fb.hueToRGB = function (m1, m2, h) {
+    h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
+    if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
+    if (h * 2 < 1) return m2;
+    if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
+    return m1;
+  }
+
+  fb.RGBToHSL = function (rgb) {
+    var min, max, delta, h, s, l;
+    var r = rgb[0], g = rgb[1], b = rgb[2];
+    min = Math.min(r, Math.min(g, b));
+    max = Math.max(r, Math.max(g, b));
+    delta = max - min;
+    l = (min + max) / 2;
+    s = 0;
+    if (l > 0 && l < 1) {
+      s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
+    }
+    h = 0;
+    if (delta > 0) {
+      if (max == r && max != g) h += (g - b) / delta;
+      if (max == g && max != b) h += (2 + (b - r) / delta);
+      if (max == b && max != r) h += (4 + (r - g) / delta);
+      h /= 6;
+    }
+    return [h, s, l];
+  }
+
+  // Install mousedown handler (the others are set on the document on-demand)
+  $('*', e).mousedown(fb.mousedown);
+
+    // Init color
+  fb.setColor('#000000');
+
+  // Set linked elements/callback
+  if (callback) {
+    fb.linkTo(callback);
+  }
+}

BIN
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/mask.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/lib/farbtastic/wheel.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 11 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-1.2.6.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 22 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-ui-personalized-1.6rc2.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery-ui-personalized-1.6rc6.min.js


+ 129 - 0
theme/tripal_theme_core/js/jgcharts/include/gui/lib/jquery.metadata.js

@@ -0,0 +1,129 @@
+ 
+////////////////////////////////////////////////////////////////////////////////
+//*********** JQUERY METADATA **************************************************
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * Metadata - jQuery plugin for parsing metadata from elements
+ *
+ * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id: jquery.metadata.js,v 1.1 2009/10/01 18:28:20 ccheng Exp $
+ *
+ */
+
+/**
+ * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
+ * in the JSON will become a property of the element itself.
+ *
+ * There are three supported types of metadata storage:
+ *
+ *   attr:  Inside an attribute. The name parameter indicates *which* attribute.
+ *          
+ *   class: Inside the class attribute, wrapped in curly braces: { }
+ *   
+ *   elem:  Inside a child element (e.g. a script tag). The
+ *          name parameter indicates *which* element.
+ *          
+ * The metadata for an element is loaded the first time the element is accessed via jQuery.
+ *
+ * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
+ * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
+ * 
+ * @name $.metadata.setType
+ *
+ * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.metadata.setType("class")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from the class attribute
+ * 
+ * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.metadata.setType("attr", "data")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from a "data" attribute
+ * 
+ * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
+ * @before $.metadata.setType("elem", "script")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from a nested script element
+ * 
+ * @param String type The encoding type
+ * @param String name The name of the attribute to be used to get metadata (optional)
+ * @cat Plugins/Metadata
+ * @descr Sets the type of encoding to be used when loading metadata for the first time
+ * @type undefined
+ * @see metadata()
+ */
+
+(function($) {
+
+$.extend({
+	metadata : {
+		defaults : {
+			type: 'class',
+			name: 'metadata',
+			//cre: /({.*})/,
+			cre: /({[\s\S]*})/,
+			single: 'metadata'
+		},
+		setType: function( type, name ){
+			this.defaults.type = type;
+			this.defaults.name = name;
+		},
+		get: function( elem, opts ){
+			var settings = $.extend({},this.defaults,opts);
+			// check for empty string in single property
+			if ( !settings.single.length ) settings.single = 'metadata';
+			
+			var data = $.data(elem, settings.single);
+			// returned cached data if it already exists
+			if ( data ) return data;
+			
+			data = "{}";
+			
+			if ( settings.type == "class" ) {
+				var m = settings.cre.exec( elem.className );
+				if ( m )
+					data = m[1];
+			} else if ( settings.type == "elem" ) {
+				if( !elem.getElementsByTagName )
+					return undefined;
+				var e = elem.getElementsByTagName(settings.name);
+				if ( e.length )
+					data = $.trim(e[0].innerHTML);
+			} else if ( elem.getAttribute != undefined ) {
+				var attr = elem.getAttribute( settings.name );
+				if ( attr )
+					data = attr;
+			}
+			
+			if ( data.indexOf( '{' ) <0 )
+			data = "{" + data + "}";
+			
+			data = eval("(" + data + ")");
+			
+			$.data( elem, settings.single, data );
+			return data;
+		}
+	}
+});
+
+/**
+ * Returns the metadata object for the first member of the jQuery object.
+ *
+ * @name metadata
+ * @descr Returns element's metadata object
+ * @param Object opts An object contianing settings to override the defaults
+ * @type jQuery
+ * @cat Plugins/Metadata
+ */
+$.fn.metadata = function( opts ){
+	return $.metadata.get( this[0], opts );
+};
+
+})(jQuery);
+

BIN
theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bhg.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bhs.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bvg.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/bvs.png


BIN
theme/tripal_theme_core/js/jgcharts/include/gui/plugins/jggui/img/fillall.png


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác