Commit 654fae82 authored by Kedar A.'s avatar Kedar A. 💻

Merge pull request #1247 from kedar2a/mongokit-dev

theme topic graph issues resolved
parents edf89a57 d388cf61
......@@ -46,6 +46,8 @@
// console.log($(".themes"))
if( ($(".themes").length > 0) ) { TreeTillNode() }
}, 100 );
$('article').unblock();
}
......
......@@ -35,7 +35,7 @@
font-size: 7em;
z-index: 0;
opacity: 0.1;
padding-top: 2rem;
/*padding-top: 2rem;*/
}
{% endblock %}
......
......@@ -184,8 +184,8 @@
</a>
<ul id="hover1" class="f-dropdown" data-dropdown-content style="width: 7em;">
<li><a class="fold"><i class="fi-plus"></i> {% trans "Open" %} </a></li>
<li><a class="unfold"><i class="fi-minus"></i> {% trans "Close" %} </a></li>
<li><a class="unfold"><i class="fi-minus"></i> {% trans "Open" %} </a></li>
<li><a class="fold"><i class="fi-plus"></i> {% trans "Close" %} </a></li>
</ul>
</div>
......@@ -388,30 +388,32 @@
{% if node and tree %}
{% if tree == "hierarchical" %}
$("article").block({message: '<h4>Building the theme tree...</h4>'});
$("#theme-drag-zoom-tree-container").addClass("hide")
$(".themes").removeClass("hide");
if({{unfold}})
{
$("article").block({message: '<h4>Building a graph... <br/>Please hold on...</h4>'});
$("#theme-drag-zoom-tree-container").addClass("hide")
$(".themes").removeClass("hide");
plotHierarchyTree(true);
}
else
{
$("article").block({message: '<h4>Building a graph... <br/>Please hold on...</h4>'});
$("#theme-drag-zoom-tree-container").addClass("hide")
$(".themes").removeClass("hide");
plotHierarchyTree(false);
}
{% else %}
$(".themes").addClass("hide");
{% if node %}
$("article").block({message: '<h4>Building a graph... <br/>Please hold on...</h4>'});
$("article").block({message: '<h4>Building the theme graph...</h4>'});
$.getJSON("{% url 'get_tree_hierarchy' group_id node.pk %}?collapsible=true", function(data){ treeData = data;})
.done(function(){plotDragZoomTree(treeData);
.done(function(){
plotDragZoomTree(treeData);
$('article').unblock();
});
{% endif %}
......
......@@ -59,15 +59,15 @@
return d.children && d.children.length > 0 ? d.children : null;
});
// sort the tree according to the node names
function sortTree() {
tree.sort(function(a, b) {
return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;
});
}
// // sort the tree according to the node names
// function sortTree() {
// tree.sort(function(a, b) {
// return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;
// });
// }
// Sort the tree initially incase the JSON isn't in a sorted order.
sortTree();
// // Sort the tree initially incase the JSON isn't in a sorted order.
// sortTree();
// TODO: Pan function, can be better implemented.
function pan(domNode, direction) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment