dotProject Forums

Go Back   dotProject Forums > DOTPROJECT VERSION 2 > Customisation Questions 2.x
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

Customisation Questions 2.x How do you modify ..... for your own site

Reply
 
Thread Tools Display Modes
  #1  
Old 21-06-12, 11:46 PM
devil00456 devil00456 is offline
Junior Member
Return Visitor
dotProject Version: 2.1.5
php Version: 5.2
MySQL Version: 5.0
Operating System Version: Linux
Browser: Firefox
 
Join Date: 21-03-12
Posts: 3
Default Task completion checkbox

Hello all,

I tried to implement the following to add one click task completion:
http://thedesignspace.net/MT2archive...l#.T-MlWUhO2as

The problem is that the first task in a project can't be completed on the one click checkbox.

Is there any module or some other customization to implement this feature?

Thanks in advance.

Reply With Quote
  #2  
Old 11-09-12, 12:05 AM
devil00456 devil00456 is offline
Junior Member
Return Visitor
dotProject Version: 2.1.5
php Version: 5.2
MySQL Version: 5.0
Operating System Version: Linux
Browser: Firefox
 
Join Date: 21-03-12
Posts: 3
Default Re: Task completion checkbox

If somebody needs this feature I figured out how it could be implemented. I tested it and it works perfect for me.

Solution:

Edit two files in ./modules/tasks
tasks.class.php
tasks.php

tasks.class.php in function showtask near line 2415 (between section //percent complete and priority and section //dots add the following lines:
PHP Code:
//one click complete
if ($a['task_dynamic'] != 1) {
  
//task complete 100% ??  
  
if (intval($a['task_percent_complete']) < 100){
    
$s .= "\n\t<td align=\"center\" width=\"15\">";
    
$s .= "<form name='taskCompleteForm".$a['task_id']."'  action='?m=tasks&a=view' method='post'>";
    
$s .= "<input name='dosql' type='hidden' value='do_task_aed' />";
    
$s .= "<input type = 'hidden'  name='task_id' value='".$a['task_id']."'>";
    
$s .= "<input type = 'hidden'  name='task_percent_complete' value='100'>";
    
$s .= "<input type='checkbox' name='completeIt' onclick='document.taskCompleteForm".$a['task_id'].".submit();'>";
    
//$s .= intval( $a["task_percent_complete"] ).'%';
    
$s .= "</form>";
  }
  else {
    
$s .= "\n\t<td align=\"center\" width=\"15\">";
    
$s .= '<img src="./images/log-notice.gif" alt="F" />';//intval( $a["task_percent_complete"] ).'%';
  
}
} else {
        
$s .= "\n\t<td align=\"center\" width=\"15\">";
        
$s .= ' - ';//intval( $a["task_percent_complete"] ).'%';

and in tasks.php after line 485
PHP Code:
<th width="20"><?php echo $AppUI->_('One Click complete');?></th>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 08:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.