I've got two areas with the same links, which I pick up with jquery and handle. The sidebar works fine, but the modal dialog does nothing. I don't have a ton of experience with jQuery, and I suspect my issue is there. The relevant html is as follows:
<div id="sidebar">
Case List:
<br />
<a id="add_case" href="#"> New </a>
<ul>
{%recursetree nodes %}
<li>
<a class="get_case" data-id="{{node.id}}" href="#">{{node.name}}</a>
{%if not node.is_leaf_node %}
<ul class="children">
{{children}}
</ul>
{% endif %}
</li>
{% endrecursetree %}
</ul>
</div>
<div id="openFileTree" class="modalDialog">
<div>
<a href="#close" title="Close" class="close">X</a>
<h2>Select:</h2>
<ul>
{%recursetree nodes %}
<li>
<a class="get_case" data-id="{{node.id}}" href="#">{{node.name}}</a>
{%if not node.is_leaf_node %}
<ul class="children">
{{children}}
</ul>
{% endif %}
</li>
{% endrecursetree %}
</ul>
</div>
</div>
And the relevant javascript is here:
$('.get_case').click(function(){
var id;
id = $(this).attr("data-id");
$.get('/CLP/case/', {caseId: id}, function(data){
if(editor == undefined || editor.status == "destroyed")
{
$('#primary').html(data.value);
$('#primary').attr('data-id', id);
}
else
{
$('#secondary').html(data.value);
$('#secondary').attr('data-id', id);
}
});
})
I feel like it's an oversight in scope or something, but I'm not sure what I messed up