Ensure ajax requests are sent on second click of an object. Fixes #1462

This commit is contained in:
Murtuza Zabuawala authored and Dave Page committed 2016-07-21 13:26:09 +01:00
1 parent 417af3676d
commit 419ead9121
4 files changed
+35 -42

No files matched your search

+2 -10
View File
@@ -185,20 +185,12 @@ define(
n_type = type;
// Avoid unnecessary reloads
if (_.isUndefined(treeHierarchy[n_type]) ||
_.isUndefined(treeHierarchy[n_type]._id)) {
n_value = -1;
} else {
n_value = treeHierarchy[n_type]._id;
}
if (n_value == $(panel[0]).data(n_type)) {
if (_.isEqual($(panel[0]).data('node-prop'), treeHierarchy)) {
return;
}
// Cache the current IDs for next time
$(panel[0]).data(n_type, n_value);
$(panel[0]).data('node-prop', treeHierarchy);
// Hide the grid container and show the default message container
if (!$gridContainer.hasClass('hidden'))