SmartClient_v101p_2016-02-18_PowerEdition
REPRO steps
==========
1. Load test case
2. Create a formula field
3. Observe "Formula Updated" in console
4. Create summary field
5. Observe that there is not a console entry "Sumamry Updated"
We need this to fire as we do some post processing when summaries are created/updated.
REPRO steps
==========
1. Load test case
2. Create a formula field
3. Observe "Formula Updated" in console
4. Create summary field
5. Observe that there is not a console entry "Sumamry Updated"
We need this to fire as we do some post processing when summaries are created/updated.
Code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
.diagInfo {
font-size: 14px;
font-weight: bold;
padding: 5px;
}
</style>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
<script type="text/javascript" >
var isomorphicDir="http://localhost:8080/isomorphic/";
// set this to the correct JIRA ticket
var jiraTicket = "SNT-12947";
// test data
var data = [
{inspectorID:12345, region:"Northeast", inspections:206, observations:913,lastInspectionDate:new Date(2012, 8, 13), index:52.6 },
{inspectorID:67890, region:"West", inspections:66, observations:2,lastInspectionDate:new Date(2013, 2,2), index:75.3 },
{inspectorID:54321, region:"Northeast", inspections:4, observations:67,lastInspectionDate:new Date(2013,2,3), index:75.3 },
{inspectorID:09876, region:"South", inspections:24, observations:0,lastInspectionDate:new Date(2012,8,31), index:52.6 }
];
// datasource for the grid
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer", showIf:"false" }, // hidden
{name:"inspections", type:"integer", title:"Number of Inspections Total"}
],
cacheData:data,
clientOnly: true
});
// once page loads set some diagnostic information
isc.Page.setEvent("load", function() {
document.title = jiraTicket + " (SmartClient version " + isc.versionNumber + ")";
var html = [];
html.push("Jira: " + jiraTicket);
html.push("SmartClient: " + isc.versionNumber);
html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion);
diagLabel.setContents( html.join("<br>"));
});
</script>
</head>
<body>
<script>
// this laebl should not be removed, all test cases should have this
var diagLabel = isc.Label.create({
ID: "diagInfo",
width: "100%",
styleName: "diagInfo",
autoFit: true
});
// basic grid
var grid = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
position: "relative",
width : "100%",
align : "center",
autoFitData : "vertical",
autoFitMaxHeight : 400,
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
autoDraw: false
});
// the main page layout - place all other components afetr diagLabel
isc.VLayout.create({
width:"100%",
membersMargin: 20,
members: [
// this must remain here to output diagnostic information
diagLabel,
// add any other components here
grid
]
});
grid.formulaUpdated = function(field, formula) {
console.log("Formula updated");
}
grid.summaryUpdated = function(field, summary) {
console.log("Summary updated");
}
</script>
</body>
</html>
Comment