Commit 9cfe3b79 authored by dkasliwal's avatar dkasliwal

Add code for hyperlink from card view.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101087 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e98dfdd7
...@@ -3,6 +3,7 @@ package ibase.client; ...@@ -3,6 +3,7 @@ package ibase.client;
import java.util.ArrayList; import java.util.ArrayList;
import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.ScrollPanel; import com.google.gwt.user.client.ui.ScrollPanel;
...@@ -12,7 +13,8 @@ import com.google.gwt.user.client.ui.VerticalPanel; ...@@ -12,7 +13,8 @@ import com.google.gwt.user.client.ui.VerticalPanel;
public class CardBuilder public class CardBuilder
{ {
public SimplePanel buildCard(ArrayList<ArrayList<String>> graphDtlList, JSONObject jsonObjGraph, String dataSource) /*Add ParameterList and filterList in buildCard method By Dhanendra on Date 01-04-2016*/
public SimplePanel buildCard(ArrayList<ArrayList<String>> graphDtlList, JSONObject jsonObjGraph, String dataSource,ArrayList<String> parameterList,ArrayList<FilterInfo> filterList)
{ {
JSONObject jsonObjFrGraph = (JSONObject) jsonObjGraph.get(dataSource); JSONObject jsonObjFrGraph = (JSONObject) jsonObjGraph.get(dataSource);
...@@ -41,6 +43,7 @@ public class CardBuilder ...@@ -41,6 +43,7 @@ public class CardBuilder
HorizontalPanel horizontalPnl = null; HorizontalPanel horizontalPnl = null;
HTML html = null; HTML html = null;
cardScrlPnl.setStyleName("cardScrlPnl"); cardScrlPnl.setStyleName("cardScrlPnl");
verticalPnl.setStyleName("cardVPnl"); verticalPnl.setStyleName("cardVPnl");
verticalPnl.getElement().setAttribute("cellpadding", "2"); verticalPnl.getElement().setAttribute("cellpadding", "2");
verticalPnl.getElement().setAttribute("cellspacing", "1"); verticalPnl.getElement().setAttribute("cellspacing", "1");
...@@ -48,6 +51,10 @@ public class CardBuilder ...@@ -48,6 +51,10 @@ public class CardBuilder
String dataString = ""; String dataString = "";
String componentIcon = ""; String componentIcon = "";
//String oldDataStr = ""; //String oldDataStr = "";
int anchorTagPresent = 0;
int count=0;
String propertyStr = "";
for (int i = 0; i < graphDtlList.size(); i++) for (int i = 0; i < graphDtlList.size(); i++)
{ {
...@@ -106,7 +113,21 @@ public class CardBuilder ...@@ -106,7 +113,21 @@ public class CardBuilder
} }
allCardList.add(dataList); allCardList.add(dataList);
} }
/*Add Add parameters to url for hyper link data By Dhanendra on Date 01-04-2016*/
for (FilterInfo filterInfo : filterList)
{
if(count==0)
{
propertyStr = "&"+filterInfo.getFieldName()+"="+parameterList.get(count+1);
}
else
{
propertyStr = propertyStr+"&"+filterInfo.getFieldName()+"="+parameterList.get(count+1);
}
count++;
}
/*End parameters to url for hyper link data By Dhanendra on Date 01-04-2016*/
for (ArrayList<String> cardDataList : allCardList) for (ArrayList<String> cardDataList : allCardList)
{ {
layoutHtmlStr = layOutStr; layoutHtmlStr = layOutStr;
...@@ -120,13 +141,27 @@ public class CardBuilder ...@@ -120,13 +141,27 @@ public class CardBuilder
layoutHtmlStr = layoutHtmlStr.replaceAll(id, dataString); layoutHtmlStr = layoutHtmlStr.replaceAll(id, dataString);
} }
layoutHtmlStr = layoutHtmlStr.replace("{", "").replace("}", ""); layoutHtmlStr = layoutHtmlStr.replace("{", "").replace("}", "");
/*Add Add parameters to url for hyper link data By Dhanendra on Date 01-04-2016*/
anchorTagPresent = layoutHtmlStr.indexOf("PARAMETERLIST");
if(anchorTagPresent > 0)
{
layoutHtmlStr = layoutHtmlStr.replaceAll("PARAMETERLIST", propertyStr);
}
/*End Add parameters to url for hyper link data By Dhanendra on Date 01-04-2016*/
html.setHTML(layoutHtmlStr); html.setHTML(layoutHtmlStr);
horizontalPnl.add(html); horizontalPnl.add(html);
horizontalPnl.setStyleName("cardhorizontalPnl"); horizontalPnl.setStyleName("cardhorizontalPnl");
verticalPnl.add(horizontalPnl); verticalPnl.add(horizontalPnl);
} }
cardScrlPnl.add(verticalPnl); cardScrlPnl.add(verticalPnl);
simplePnl.setHeight(heightList.get(0)); /*Add Height for cardScrlPnl from metadataxml height tag and comment height from simplePnl by Dhanendra 01-04-2016*/
cardScrlPnl.setHeight(heightList.get(0));
//simplePnl.setHeight(heightList.get(0));
/*Add Height for cardScrlPnl from metadataxml height tag and comment height from simplePnl by Dhanendra 01-04-2016*/
simplePnl.setWidth(widthList.get(0)); simplePnl.setWidth(widthList.get(0));
simplePnl.add(cardScrlPnl); simplePnl.add(cardScrlPnl);
//simplePnl.add(verticalPnl); //simplePnl.add(verticalPnl);
......
...@@ -325,11 +325,11 @@ public class GraphComponent extends Composite ...@@ -325,11 +325,11 @@ public class GraphComponent extends Composite
} }
} }
else{ else{
/*Add uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/ /*Add uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/
this.createOuterDiv("Graph"+uniqueId+componentId,type,groupCssTypeNameList.get(0)); this.createOuterDiv("Graph"+uniqueId+componentId,type,groupCssTypeNameList.get(0));
idList.add("Graph"+uniqueId+componentId+"Div"); idList.add("Graph"+uniqueId+componentId+"Div");
this.createInnerDiv(uniqueId+componentId,"Graph"+componentId); /*Add append uniqueId in createInnerDiv method by Dhanendra on Date 14-03-2016*/
this.createInnerDiv(uniqueId+componentId,"Graph"+uniqueId+componentId);
graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList); graphJson = ChartCreator.buildChartData(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" +uniqueId+ componentId, width, height, imageName,userMail,reportCaption); this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" +uniqueId+ componentId, width, height, imageName,userMail,reportCaption);
/*End uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/ /*End uniqueId to Graph,chartContainer by Dhanendra on Date 10-11-2015*/
...@@ -469,7 +469,7 @@ public class GraphComponent extends Composite ...@@ -469,7 +469,7 @@ public class GraphComponent extends Composite
RootPanel.get("Grid"+uniqueId+componentId+"head").add(gridTtlPanel); RootPanel.get("Grid"+uniqueId+componentId+"head").add(gridTtlPanel);
RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable); RootPanel.get("Grid"+uniqueId+componentId+"Div").add(flexTable);
/*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/ /*Add uniqueId to Grid by Dhanendra on date 10-11-2015*/
/*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/ /*Ended code for Dyanamic Div and New CSS By Dhanendra 01-07-15*/
/*RootPanel.get("chartContainer"+componentId).clear(); /*RootPanel.get("chartContainer"+componentId).clear();
...@@ -704,7 +704,8 @@ public class GraphComponent extends Composite ...@@ -704,7 +704,8 @@ public class GraphComponent extends Composite
{ {
//RootPanel.get("chartContainer"+componentId).clear(); //RootPanel.get("chartContainer"+componentId).clear();
graphDtlList = graphDataMap.get(graphNo); graphDtlList = graphDataMap.get(graphNo);
SimplePanel panel = new CardBuilder().buildCard(graphDtlList, jsonObjFrGraph, dtSrouce); /* Add parameterList,filterList to buildCard Method By Dhanendra on date 01-04-2016*/
SimplePanel panel = new CardBuilder().buildCard(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList);
//RootPanel.get("chartContainer"+componentId).add(panel); //RootPanel.get("chartContainer"+componentId).add(panel);
/*Added code for Dyanamic Div and New CSS By Dhanendra 13-07-15*/ /*Added code for Dyanamic Div and New CSS By Dhanendra 13-07-15*/
...@@ -1313,7 +1314,8 @@ public class GraphComponent extends Composite ...@@ -1313,7 +1314,8 @@ public class GraphComponent extends Composite
{ {
//RootPanel.get("chartContainer"+componentId).clear(); //RootPanel.get("chartContainer"+componentId).clear();
graphDtlList = graphDataMap.get(graphNo); graphDtlList = graphDataMap.get(graphNo);
SimplePanel panel = new CardBuilder().buildCard(graphDtlList, jsonObjFrGraph, dtSrouce); /* Add parameterList,filterList to buildCard Method By Dhanendra on date 01-04-2016*/
SimplePanel panel = new CardBuilder().buildCard(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList);
//RootPanel.get("chartContainer"+componentId).add(panel); //RootPanel.get("chartContainer"+componentId).add(panel);
/*Added code for Dyanamic Div and New CSS By Dhanendra 13-07-15*/ /*Added code for Dyanamic Div and New CSS By Dhanendra 13-07-15*/
......
...@@ -1356,7 +1356,7 @@ color: #999; !important; ...@@ -1356,7 +1356,7 @@ color: #999; !important;
} }
.cardScrlPnl { .cardScrlPnl {
height: 300px; /* height: 300px; */
width: 100%; width: 100%;
padding: 1px; padding: 1px;
cellspacing: 10px; cellspacing: 10px;
...@@ -1438,3 +1438,41 @@ color: #999; !important; ...@@ -1438,3 +1438,41 @@ color: #999; !important;
height: 250px; height: 250px;
} }
/*End Added new Code by sachin on 28 sep 15 for Showing scroll bar to auto suggest box of autocomplete filter */ /*End Added new Code by sachin on 28 sep 15 for Showing scroll bar to auto suggest box of autocomplete filter */
/*Add code for Card square format by Dhanendra on Date 01-04-2016*/
.cardSqrLbl
{
text-align:right;
padding-right:5px;
}
.cardProdLbl
{
text-align:right;
padding-right:5px;
}
.cardSqrProdVal
{
text-align:center;
border-radius:3px;
color: #fff;
width:100px;
padding: 4px;
}
.cardSqrVal
{
text-align:center;
border-radius:3px;
color: #fff;
width:100px;
margin-right:20px;
padding: 4px;
}
.cardProdImg
{
border-radius: 50%;
margin-left: 5px;
padding: 2px;
}
/*End code for Card square format by Dhanendra on Date 01-04-2016*/
\ No newline at end of file
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