Parent: [320778] (diff)

Child: [314be8] (diff)

Download this file

analysis_list.html    63 lines (60 with data), 3.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends "base.html" %}
{% load staticfiles %}
{% block content %}
<h2>Analyses</h2>
<ul>
<script type="text/javascript">
var w='<img src="{% static "images/wait1.gif" %}">';
var options = {
dataType: 'json',
beforeSubmit: function() {$("div#search_results").html(w);},
success: function(data) {
$html = '<table id="tableSearchResults">' + data + '</table>';
$('div#search_results').html($html);
$('#tableSearchResults').dataTable();
},
error: function (data) {
if (data.status == 200) {
$html = '<table id="tableSearchResults">' + data.responseText + '</table>';
$('div#search_results').html($html);
$('#tableSearchResults').dataTable();
}
}
};
</script>
{% for analysis in analises_list %}
<li>
<script type="text/javascript">
var mv_id = {{ analysis.methodology_version.methodology.entity.id }};
ae_app = "/{{ analysis.methodology_version.methodology.entity.actual_entity_app }}/";
function searchOnClick() {
$("div#search").html(w);
$.get(ae_app + "search_html/",
function(data){ $("div#search").html(data);
$("div#search").tabs();
$("form#searchForm").ajaxForm(options);
//following lines because at the second click it loses the .tabs formatting-->
$("ul#id_target").addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all")
$("div#detail>ul").addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all")
$("div#detail>ul").attr( "role", "tablist" );
$("div#detail>ul>li").addClass( "ui-state-default ui-corner-top ui-tabs-active ui-state-active" );
$("div#detail>ul>li").attr( "role", "tab" );
$("div#detail>ul>li>a").attr( "role", "presentation" );
$("div#detail>ul>li>a").addClass( "ui-tabs-anchor" );
}
);
$("div#detail").html(w);
$.get(ae_app + "instance_list_html/{{ analysis.id }}",
function(data){
$("div#detail").html(data);
$("div#detail").tabs();
}
);
}
</script>
<a href="">[Edit]</a> <a href="">[Export]</a> <a href="">[Delete]</a> <a href="">[Weights]</a>
<a onclick='searchOnClick()'>{{ analysis.name }}</a>
</li>
{% endfor %}
</ul>
{% endblock %}