Skip to content

Commit

Permalink
Moving images in web refreshes destination Dataset. Closes #6450
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Moore committed Jan 5, 2012
1 parent eab0467 commit 58c4b57
Showing 1 changed file with 14 additions and 6 deletions.
Expand Up @@ -634,14 +634,22 @@
});
});
if (refresh) {
//data.inst.refresh();
if (refresh) {
data.inst.deselect_all();
if (!data.inst.is_leaf(data.rslt.op) && $.inArray(data.rslt.op.attr("rel").replace("-locked", ""), ["dataset", "orphaned"]) > -1) data.inst.refresh(data.inst._get_node('#'+data.rslt.op.attr('id')));
data.inst.deselect_all();
// refresh source
if (!data.inst.is_leaf(data.rslt.op) && $.inArray(data.rslt.op.attr("rel").replace("-locked", ""), ["dataset", "orphaned"]) > -1) {
data.inst.refresh(data.inst._get_node('#'+data.rslt.op.attr('id')));
}
//refresh destination (will already be expanded, even if orphaned)
if (!data.inst.is_leaf(data.rslt.cr) && $.inArray(data.rslt.cr.attr("rel").replace("-locked", ""), ["dataset", "orphaned"]) > -1) {
data.inst.refresh(data.inst._get_node('#'+data.rslt.cr.attr('id')));
}
// select the destination (select source if destination is orphaned)
if (data.rslt.cr.attr("rel").replace("-locked", "") === "orphaned") {
data.inst.select_node(data.rslt.op);
if (!data.inst.is_leaf(data.rslt.cr) && $.inArray(data.rslt.cr.attr("rel").replace("-locked", ""), ["dataset", "orphaned"]) > -1) data.inst.refresh(data.inst._get_node('#'+data.rslt.cr.attr('id')));
if(!data.inst.data.crrm.cp_nodes && !data.inst.data.crrm.ct_nodes) refreshCenterPanel();
} else {
data.inst.select_node(data.rslt.cr);
}
refreshCenterPanel();
}
})
// Delete functionality: This is called AFTER the item is removed from tree. Need to rollback if user does not confirm
Expand Down

0 comments on commit 58c4b57

Please sign in to comment.