Commit 1d93a95a authored by cmahajan's avatar cmahajan

For add dynamic div to existing chart container panel


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102394 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 02d9007c
......@@ -55,19 +55,19 @@ public class CardBuilder
HorizontalPanel hOuterPnl = new HorizontalPanel();
hOuterPnl.setStyleName("cardVPnl");
hOuterPnl.getElement().setAttribute("cellpadding", "2");
hOuterPnl.getElement().setAttribute("cellspacing", "1");
//hOuterPnl.getElement().setAttribute("cellpadding", "2");
//hOuterPnl.getElement().setAttribute("cellspacing", "1");
hOuterPnlFinal.getElement().setId("hOuterPnlFinal");
VerticalPanel vInnerPnl = null;
hOuterPnlFinal.setStyleName("cardVPnl");
hOuterPnlFinal.getElement().setAttribute("cellpadding", "2");
hOuterPnlFinal.getElement().setAttribute("cellspacing", "1");
//hOuterPnlFinal.getElement().setAttribute("cellpadding", "2");
//hOuterPnlFinal.getElement().setAttribute("cellspacing", "1");
/* Ended by Swati for 3 by 3 layout of card view for serdia on dated 09052016 */
verticalPnl.setStyleName("cardVPnl");
verticalPnl.getElement().setAttribute("cellpadding", "2");
verticalPnl.getElement().setAttribute("cellspacing", "1");
//verticalPnl.getElement().setAttribute("cellpadding", "2");
//verticalPnl.getElement().setAttribute("cellspacing", "1");
String id = "";
String dataString = "";
String componentIcon = "";
......@@ -172,7 +172,6 @@ public class CardBuilder
count++;
}
/*End parameters to url for hyper link data By Dhanendra on Date 01-04-2016*/
if(panelView.equalsIgnoreCase("vertical"))
{
int ctr = 0;
......@@ -181,13 +180,11 @@ public class CardBuilder
/* Added by Swati for 3 by 3 layout of card view for serdia on dated 09052016 */
if(ctr!=0 && ctr%3==0)
{
Window.alert("ctr :"+ctr);
hOuterPnlFinal.add(hOuterPnl);
hOuterPnl = new HorizontalPanel();
hOuterPnl.getElement().setId("hOuterPnl");
hOuterPnl.setStyleName("cardVPnl");
hOuterPnl.getElement().setAttribute("cellpadding", "2");
hOuterPnl.getElement().setAttribute("cellspacing", "1");
//hOuterPnl.getElement().setAttribute("cellpadding", "2");
//hOuterPnl.getElement().setAttribute("cellspacing", "1");
}
/* Ended by Swati for 3 by 3 layout of card view for serdia on dated 09052016 */
layoutHtmlStr = layOutStr;
......@@ -217,13 +214,35 @@ public class CardBuilder
if(linkMetadataName.length() > 0)
{
//setOnClick(linkMetadataName, html,"/ibase/dwh/GwtDashboardPage.html?metadataname="+linkMetadataName+propertyStr);
setOnClick(linkMetadataName, html,"/ibase/dwh/GwtDashboardPage.html?metadataname="+linkMetadataName+propertyStr);
}
/*End Add parameters to url for hyper link data By Swati on Date 05-05-2016*/
hOuterPnl.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
hOuterPnl.add(vInnerPnl);
/*Add Width By Dhanendra on date 29-06-2016*/
vInnerPnl.getElement().getParentElement().setAttribute("width", "30%");
/*End Width By Dhanendra on date 29-06-2016*/
ctr++;
}
/*Add Code Empty Panel for proper Alignment by Dhanendra 29-06-2016 */
if(ctr%3==1)
{
vInnerPnl = new VerticalPanel();
hOuterPnl.add(vInnerPnl);
vInnerPnl.getElement().getParentElement().setAttribute("width", "30%");
vInnerPnl = new VerticalPanel();
hOuterPnl.add(vInnerPnl);
vInnerPnl.getElement().getParentElement().setAttribute("width", "30%");
}
if(ctr%3==2)
{
vInnerPnl = new VerticalPanel();
hOuterPnl.add(vInnerPnl);
vInnerPnl.getElement().getParentElement().setAttribute("width", "30%");
}
/*Add Code Empty Panel for proper Alignment by Dhanendra 29-06-2016 */
/* Added by Swati for 3 by 3 layout of card view for serdia on dated 09052016 */
if(ctr==allCardList.size())
{
......@@ -263,7 +282,7 @@ public class CardBuilder
/*Add Add parameters to url for hyper link data By Swati on Date 05-05-2016*/
if(linkMetadataName.length() > 0)
{
//setOnClick(linkMetadataName, html,"/ibase/dwh/GwtDashboardPage.html?metadataname="+linkMetadataName+propertyStr);
setOnClick(linkMetadataName, html,"/ibase/dwh/GwtDashboardPage.html?metadataname="+linkMetadataName+propertyStr);
}
/*End Add parameters to url for hyper link data By Swati on Date 05-05-2016*/
verticalPnl.add(horizontalPnl);
......@@ -291,14 +310,30 @@ public class CardBuilder
return simplePnl;
}
/*Added by Dhanendra for Linked Chart on 06-March-16 Start */
public void setOnClick(final String linkMetadata, HTML html, final String url)
public void setOnClick(final String linkMetadata, final HTML html, final String url)
{
html.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Window.open(url, linkMetadata, "");
//Window.open(url, linkMetadata, "");
if(html.getElement().getAttribute("a") != null)
{
buildGridFrameContainer();
}
}
});
}
/*Added by Dhanendra for Linked Chart on 06-March-16 End */
/*Added by Chetan mahajan For add dynamic div to existing chart container panel on 1-July-2016*/
private native void buildGridFrameContainer()
/*-{
try {
$wnd.createGridFrameContainer();
document.getElementById('frameContainer').innerHTML = "<iframe name='iframeContainer' scrolling='no' id='iframeContainer' width='100%' height='430' frameborder='0' src='iframeContainer.htm'></iframe>";
} catch (e) {
alert("Excpeiton :: GraphComponent : createChart [" + e.message+ "]");
}
}-*/;
/*Added by Chetan mahajan For add dynamic div to existing chart container panel on 1-July-2016*/
}
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