I include here for your reference my settings to make the integrated tab work in Feng Office. I reiterate however that it is *not* necessary to integrate jsGantt as a tab in Feng Office, you simply need to use the index.php I've supplied as a normal web page, and give it access to your Feng Office database. Your integrated tab after this exercise will be called "Labs".
First copy the attached file 'LabController.class.php' into your 'application/controllers' folder.
Second, you should already have copied all my jsGantt-related files into an 'application/views/lab' folder that you create.
Third, you add the tab to the tab panel by adding the following section to 'public/assets/javascript/og/layout.js'. Add it just BEFORE the following line of code: og.panels.reporting = new og.ContentPanel({
// AEL - Begin mod to add lab panel to Feng Office
og.panels.lab = new og.ContentPanel({
title: lang('labs'),
id: 'labs-panel',
iconCls: 'ico-labs',
refreshOnWorkspaceChange: false,
defaultContent: {
type: 'html',
data: '<iframe style="width:100%;height:100%;border:0" src="application/views/lab/index.php"></iframe>'
}
}),
// AEL - End mod to add lab panel to Feng Office
Fourth, you want to set up your label for your new tab. You want to paste the following code into your 'language/en_us/lang.js' file, just AFTER the following line of code: addLangs({
// AEL - Begin mod to add lab panel to Feng Office
'labs': 'Labs',
// AEL - End mod to add lab panel to Feng Office
For completeness, I added this line of code to every lang.js file for every language shown under the 'languages' folder, but if you only use English you don't need to do this.
Fifth, you can set up your icon for your application. I cheated and re-used the magic wand icon from templates. This probably isn't necessary per-se, but I wanted a nifty little icon like the rest of the tabs. To do that I copied the file 'public/assets/themes/default/images/16x16/template.png' to 'lab.png' in the same directory. Then I added the following code in 'public/assets/themes/default/stylesheets/general/layout.css' in the same general section the other icons were defined (ico-tasks, ico-documents, etc.).
/* AEL - Begin mod to add labs to Feng Office */
.ico-labs {
background-image: url(../../images/16x16/lab.png) !important;
}
/* AEL - End mod to add labs to Feng Office */
That is what it took to make the tab work for me. Again, I'm not a tab expert, I really started the thread more to share our work with jsGantt, and having it on a tab is kind of just a nice thing to do.