<!DOCTYPE html>


<html>
<head>
  {% include "chlamdb/header.html" %}
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/plotly.js/1.48.1/plotly.min.js"></script>
<head>

  <div class="container-fluid" id="main_container">
    <div class="row">
      <div id="wrapper">
          <div id="page-content-wrapper">
            <div class="row">
              <div class="col-lg-12">
                 {% include "chlamdb/menu.html" %}
                 <div class="row">
                    <div class="col-lg-5">
                        {{plot_effective_T3|safe}}
                    </div>
                    <div class="col-lg-5">
                        {{plot_T3MM|safe}}
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-5">
                        {{plot_BPBAac|safe}}
                    </div>
                    <div class="col-lg-5">
                        {{plot_DeepT3|safe}}
                    </div>
                </div>
                <div class="row" >
                    <div class="col-lg-12" id="effefctors_venn">

                    </div>

                </div>
                <div id="datatable" style="display: table;margin: 0;">
                </div>

              </div>
          </div>
        </div>
      </div>
    </div>
  </div>

<script language="Javascript">

	var h = new Object(); // or just {}

    $(document).ready(function(){
      $('#effefctors_venn').jvenn({
        series: {{ series_string|safe }}
        ,
		displayStat: true,
		fnClickCallback: function() {
			var value = `<div id="export_bouttons_groups">
                   <a download="biodb_extract.xls" href="#" onclick="return ExcellentExport.excel(this, 'eff_table', 'search');" style="background-color:#DCFFF0;color:black;padding:2px;border:1px solid black;">Export to Excel</a>
                   <a download="biodb_extract.csv" href="#" onclick="return ExcellentExport.csv(this, 'eff_table');" style="background-color:#DCFFF0;color:black;padding:2px;border:1px solid black;"">Export to CSV</a>
                   <br/>
                   </div>`;
			if (this.listnames.length == 1) {
				value += "<h3>Elements only in:<br> </h3><ul compact>";
			} else {
				value += "<h3>Common elements in: </h3><ul compact>";
			}
			for (name in this.listnames) {
				value += '<li id="list_strains">' +this.listnames[name] + "</li>";
			}
			value += '</ul>\n<table id="eff_table" class="sorttable"><tr><th>Locus tag</th</tr>';
			for (val in this.list) {
				value += '<tr><td><a href="/chlamdb/locusx/'+
						this.list[val] + '">'+  this.list[val] + '</a></td</tr>';
			}
		    value += '</table>';
			$("#datatable").html(value);
			var newTableObject = document.getElementById("eff_table");
			sorttable.makeSortable(newTableObject);
		}

      });
    });

	</script>
</body>
{% include "chlamdb/style_menu.html" %}
</html>
