[TIC-Web] fix the expandNode bug 25/126425/1
authorChangHyun Lee <leechwin.lee@samsung.com>
Fri, 21 Apr 2017 10:04:33 +0000 (19:04 +0900)
committerChangHyun Lee <leechwin.lee@samsung.com>
Fri, 21 Apr 2017 10:04:33 +0000 (19:04 +0900)
- Tree does not collase after expanding tree with function.
- There is a bug that does not reflect the 'state.expanded' value,
so i apply a patch that gives a click event.

Change-Id: I5bb850e4979e0c928fa9ca7db98dfb8b7ea6e337
Signed-off-by: ChangHyun Lee <leechwin.lee@samsung.com>
public/src/js/page/package.js

index dd2a856..160cc79 100644 (file)
@@ -1246,7 +1246,13 @@ define([
 
         logger.info('[Check] checked: ' + localNode.name);
         _nodeSelected(event, node);
-        $tree.treeview('expandNode', [node, { silent: false }]);
+
+        // FIXME: 'state.expanded = true' is not reflected in the node.
+        //$tree.treeview('expandNode', [node, { silent: false }]);
+        var $expand = node.$el.find('.expand-icon.glyphicon-plus')[0];
+        if ($expand) {
+            $expand.click();
+        }
 
         localNode.selfChecked = true;
         // 1. pre-dependency analysis