<% 
  import org.exoplatform.webui.core.UITree ; 
  import org.exoplatform.webui.core.UIRightClickPopupMenu ;
  import org.exoplatform.web.application.JavascriptManager;

  UIRightClickPopupMenu uiPopupMenu = uicomponent.getChild(UIRightClickPopupMenu.class);
  String popupMenu = "";
%>
<div id="UINavigationNodeSelector">
<%
  if(uiPopupMenu != null && uiPopupMenu.isRendered()) {
    String id = uicomponent.getParent().getId();
  	
  	def objId = uicomponent.getChild(UITree.class).getParentSelected().getId();
    if(uicomponent.getCopyNode()!= null) {
      popupMenu = uiPopupMenu.getJSOnclickShowPopup(objId, "AddNode,PasteNode,EditNavigation,SaveNavigation,DeleteNavigation");
    } else {
      popupMenu = uiPopupMenu.getJSOnclickShowPopup(objId, "AddNode,EditNavigation,SaveNavigation,DeleteNavigation");
    }
  	JavascriptManager jsmanager = _ctx.getRequestContext().getJavascriptManager();
  	jsmanager.require("SHARED/uiRightClickPopupMenu", "uiRightClickPopupMenu").addScripts("uiRightClickPopupMenu.disableContextMenu('"+id+"') ;");
    uicomponent.renderUIComponent(uiPopupMenu) ;
  }
%>
	<div class="TopLeftContainerOptions">
		<div class="TopRightContainerOptions">
	  	<div class="TopCenterContainerOptions"><span></span></div>
	  </div>
	</div>
	<div class="MiddleLeftContainerOptions" $popupMenu>
		<div class="MiddleRightContainerOptions">
			<div class="UINavigationNodeSelector" id="UINavigationNodeSelector">
			  <%/*Begin PortalNodeSelectorContainer*/%>
			  <div class="UIContainerConfigOptions ItemSelectorAncestor" style="margin: 0px;"> 
				  <div class="ContainerConfigOptions">						
						<div class="UIVerticalSlideTabs ItemList CategoryContainer" style="padding: 1px;">
							<%
								uicomponent.renderChild(UITree.class);
							%>
						</div>
					</div>
				</div>
			</div>
	  </div>
	</div>
	<div class="BottomLeftContainerOptions">
		<div class="BottomRightContainerOptions">
	  	<div class="BottomCenterContainerOptions"><span></span></div>
	  </div>
	</div> 
</div>


