hello,
i already tried to code the import excel as in the documentation, i can load my file, task and progress bar looks good, BUT all of the task from the imported file did not saved on database. How can i put them in the database?
next,
i have this priority option, i used to gave the key in integer data 0 for critical, 1 for high, etc. but it’s going to make the user become confused because usually they kept a priority as text like critical high etc. so i need it to be varchar datatype as on below. But it’s also become stressful because “critical” and “Critical” and “CRITICAL” is not same, should i convert it with strtolower() function and change my keys with lower case word?
gantt.serverList(“priority”, [
{ “key”:“Critical”, “label”:“Critical”},
{ “key”:“High”,“label”:“High”},
{ “key”:“Medium”, “label”:“Medium”},
{ “key”:“Low”, “label”:“Low”}]);
last,
i used to ask about add new option by user on selection box, and i used the jQuery that ramli said, here is the link -> HELP ME! need Selection box with input text
gantt.form_blocks["custom_editor"] = {
render: function (sns) {
return '<input type="text" name="color" height="18px">';
},set_value: function (node, value, task) {
$('input[name="color"]').amsifySuggestags({
type : 'amsify'});
node.value = task.person || "";
},get_value: function (node, task) {
return node.value;}};
gantt.attachEvent("onLightbox", function (task_id){
var task = gantt.getTask(task_id);
gantt.getLightboxSection('person').setValue(task.options);});
gantt.config.lightbox.sections = [
{name: "description", height:22, map_to: "text", type: "textarea"},
{name: "priority", map_to: "priority", type: "select", options: gantt.serverList("priority")},
{name: "person", height:18, width: 80, map_to: "person", type: "custom_editor"},
{name: "time", type: "duration", map_to: "auto", time_format: ["%d", "%m", "%Y"]},
{name: "deadline", map_to: {start_date: "deadline"},type: "duration_optional",button: true,single_date: true
}];
gantt.config.columns = [
{name:"text", label:"Task", tree:true, width:"190"},
{name: "status", label: "Status", align: "center", template: function (item) {
if (item.progress == 1){
return "Complete";}
if (item.progress < 0.00009){
return "Not started yet";}
if (item.progress >0 && item.progress <1){
return "On going";}}},
{name:"priority", label:"Priority", align: "center", width:"55", template: function(item) {
return gantt.getLabel('priority', item.priority)}},
{name:"person", label:"Holder", width:"83", align: "center", autofit:true, get_value: function (node, task) { return node.value;}},
{name:"add", id:"add", label:"", width:"35" }];
and now it’s become an obstacle when user import a file. It’s look fine after importing the file, but after updating the task on lightbox (responsible person is not being change on this case) the name of people who is responsible for the task is gone, so the user need to put the name again, any solution?
Help me please!