Skip to content

Instantly share code, notes, and snippets.

@stan229
Created December 14, 2011 03:42
Show Gist options
  • Save stan229/1475167 to your computer and use it in GitHub Desktop.
Save stan229/1475167 to your computer and use it in GitHub Desktop.
createCard
createCard : function(recommendation) {
return {
xtype : 'DetailedReport',
record : recommendation,
title : recommendation.get('summary'),
checkmarks : true,
data : {
benefits : {
whyitmatters : recommendation.get('description'),
cost : recommendation.get('approx_cost'),
savings : recommendation.get('annual_savings'),
savingspermo : Math.round(recommendation.get('annual_savings') / 12),
rebates_incentives : recommendation.get('rebates'),
roi : recommendation.get('roi'),
comfort : recommendation.get('comfort'),
healthsafety : recommendation.get('healthsafety')
},
main : {
auditor : recommendation.get('auditor'),
auditorSays : recommendation.get('auditorSays'),
highlightTitle : recommendation.get('highlightTitle'),
highlightDesc : recommendation.get('highlightSays'),
subsections : [
{
title : "Observations",
subtitle : {
title : recommendation.get('observations')
}
},
{
title : "Your Home Now",
icon : "lib/resources/css/images/home.png",
halfWidth : true,
subtitle : {
text : recommendation.get('base')
}
},
{
title : "Upgrade Goals",
icon : "lib/resources/css/images/star.png",
halfWidth : true,
subtitle : {
text : recommendation.get('improved')
}
}
]
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment