Hiya,
We're wanting to add some custom task buttons to some of our custom
types. I'm needing to stick these after the add, delete, request
approval etc.
I've come up with the following code but I was wondering if anyone had
a better / cleaner way of doing this?
Cheers,
James
------
<cfimport taglib="/farcry/core/tags/admin/" prefix="admin">
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
<cfscript>
// Append any custom buttons we need for this type
variables.typename = 'dmFacts';
variables.aButtons = [];
variables.aColumns = [];
oTypeAdmin = createobject("component",
"#application.packagepath#.farcry.objectadmin").init(
stprefs=session.objectadmin[typename],attributes=variables
);
// Custom Buttons -
variables.aButtons[arrayLen(aButtons)]={
buttonType = 'custom',
class = 'f-submit',
name = 'test',
onClick = '',
Permission = 1,
value = 'Export to CSV'
};
</cfscript>
<!--- set up page header --->
<admin:header title="Fact Admin" writingDir="#session.writingDir#"
userLanguage="#session.userLanguage#" />
<ft:objectadmin
typename="#typename#"
title="#application.rb.getResource('factsAdministration', 'Facts
Administration')#"
columnList="title,link,catfacts,datetimelastUpdated"
sortableColumns="title,link,datetimelastUpdated"
aButtons = #aButtons#
lFilterFields="title,link,catFacts"
stFilterMetaData="#stFilterMetaData#"
sqlorderby="datetimelastUpdated desc"/>
<admin:footer />
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry