Feng Forum

Other Topics => Development => Community Contributions => : paulorcdo March 11, 2011, 05:09:32 PM

: Simple Gantt Chart in Feng Office - Jumware flot
: paulorcdo March 11, 2011, 05:09:32 PM
Original: http://buzinagames.com/blog/?cat=8

Inserting Gantt Chart - Flot - Feng in the Area Office Tasks:

1-Download all the compressed files http://buzinagames.com/links/contador.php?arquivo=gantt (http://buzinagames.com/links/contador.php) on the link to the folder public / assets / javascript / og / tasks

2-Open the file application / views / task / new_list_tasks.php

3-Copy this code to call the script that creates the chart:

require_javascript ('og / tasks / gantt.js');

4 - Paste this code into the file new_list_tasks.php just below the line containing require_javascript ('og / tasks / print.js');

5-Open the file public / assets / javascript / og / tasks / TasksTopToolbar.js

6-Copy this code to create the button on the desktop task:

    this.add ('-');
     this.add (new Ext.Action ({
text: 'Gantt',
             tooltip: 'Gantt',
            iconCls: 'ico-reporting',
handler: function () {
ogTasks.ganttAllGroups ();
}
scope: this
}));

7 - Paste this code in the last line before the closing brace of the function og.TasksTopToolbar (just after the "print all groups")
: Re: Gantt Chart in Feng Office - Jumware flot
: paulorcdo April 05, 2011, 08:37:36 AM
Flot The library is very simple to maintain, all developed in jquery and json. I have made ​​available since the beginning so that all developers can improve the code. The original library in flot not have flexibility to allow its use in this way. So I created an array generator to allow it. I found this code from the web and found that Jumware feng was simple to help create a similar report to the printing task, but with a temporal view. Although not a perfect solution, given the flexibility feng office, I believe it is the simplest way to address this demand.

Hugs, excuse my English! - by google  ;D

Paulo Oliveira - Brasília - Brasil
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: litogeno July 12, 2011, 08:24:18 AM
Congratulations, good work.
Thanks  a lot. It works!!!
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: potion July 12, 2011, 10:37:09 AM
Nice work.

In step 6 you forgot the comma here:
...
handler: function () {
ogTasks.ganttAllGroups ();
},   /*  <<<<< missing comma */
scope: this
...

I also changed the language to English (e.g. line 68, gantt.js), replaced:
"Ano Anterior" with "Previous Year"
"Ano Atual" with "Current Year"
"Ano Posterior" with "Next Year"

Now I need to find the month names...
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: paulorcdo July 12, 2011, 01:43:03 PM
Already adjusted in the file.
Also available is the English translation of the month.
Paste in your browser: buzinagames.com/links/jquery.flot_en.js
Or Clear the browser cache.
Thank you.
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: memnon January 10, 2012, 07:33:54 AM
would it be possible to add 2 buttons:

Month View, Week View ?
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: paulorcdo January 10, 2012, 09:31:15 AM
You can click and drag on the graph, the result is the same.
: Re: Simple Gantt Chart in Feng Office - Jumware flot
: memnon January 10, 2012, 09:56:50 AM
i have already seen that, thx

but i would prefer insteed of a Button with Current, last, next Year - a Current Month or Week Button