Hi All,
In FC5.0, the one link that I liked in that admin tab toolbar was the ability to go directly to the site tab, and land on the node holding the page being edited. This allowed a quick way to add a page without navigating through the site structure (which could take a while if that particular set of nodes had not been loaded yet). So, I set about looking how to add that functionality to the new admin toolbar at the bottom. Since displayAdminToolbarDetail.cfm is housed in /core/webskin/types/, I figure that it should be possible to extend this. I don't currently have access to my dev machine, so i can't check this myself. However, if that is the case, I figured that adding the following button should do it:
<sec:CheckPermission objectid="#stObj.objectid#" typename="#stObj.typename#" permission="Edit">
<cfif not stObj.typename eq "farCOAPI">
<cfset editurl = "#application.url.webtop#/#application.url.farcry#/index.cfm?sec=site&rootobjectid=#request.navid#" />
<cfsavecontent variable="html">
<cfoutput>
{
xtype:"tbbutton",
iconCls:"edit_icon",
text:"Edit Site",
listeners:{
"click":{
fn:function(){
parent.editContent("#editurl#","Edit #stObj.label#",1000,600,true,function(){
// make sure the object is unlocked
Ext.Ajax.request({
url: "#application.url.webtop#/navajo/unlock.cfm?objectid=#stObj.objectid#&typename=#stObj.typename#",
success: function() {
parent.refreshContent();
}
});
});
}
}
}
}
</cfoutput>
</cfsavecontent>
<cfset arrayappend(aActions,html) />
</cfif>
</sec:CheckPermission>
I believe that this Ext would create a popup box on the same page. I would like, however, to bring up a new tab for this function, but I have any idea how to do that with Ext! I figure it's something to do with the parent.editContent() function; i.e., I would have to replace that with something that brings up a tab), but I don't code in Ext so I don't know!
Anyone done something similar and wants to share their changes?
I've raised this as an improvement request in JIRA here:
http://bugs.farcrycms.org/browse/FC-1975. Vote for it if you would like to see it included!
Tomek