View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Reproduce the same event than on ticket's page - ProjeQtOr
 
 

Reproduce the same event than on ticket's page

More
29 Jan 2013 16:57 #1 by eB0Z
Hi Babynus,
I am looking for something.
I would reproduce the behaviour that is on Tickets' page (CF screenshot)



You fill automatically fields up with dates when we change the status or even when we click on the checkbox.

In fact, I would do the same for Document's page. I have added 2 fields (input text, readonly) and I would fill them up with the status changes.



Where can I find the function which is used for the tickets' page ?
Or how can I do that ?

Thank you.
Attachments:

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 19:57 #2 by babynus
Check the function getValidationScript($colName) in Ticket.php and in SqlElement.php...

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
30 Jan 2013 15:00 #3 by eB0Z
Hi Babynus thank you for your reply,
I have tried with this code in SqlElement.php but it does not work.
 if ($colName=="idStatus") {
      $colScript .= '<script type="dojo/connect" event="onChange" >';
			[..........]
 
    // Ajout automatique de la date dans le champ internalValidation
      if(property_exists($this, 'internalValidation')) {
      	
      	$colScript .= htmlGetJsTable('Status', 'setInternalValidation', 'tabInternalValidation');
      	$colScript .= '  var setValidationInternal=1;';
        $colScript .= '  var filterInternalValidation=dojo.filter(tabInternalValidation, function(item){return item.id==dijit.byId("idStatus").value;});';
        $colScript .= '  dojo.forEach(filterInternalValidation, function(item, i) {setValidationInternal=item.setInternalValidation;});';
      	$colScript .= '  	if(setValidationInternal==1){';
        $colScript .= '      	var curDate = new Date();';
        $colScript .= '     	dijit.byId("internalValidation").set("value", curDate);';
        $colScript .= '		}';      
      }
		[..............................]
      $colScript .= '  formChanged();';
      $colScript .= '</script>';
    } else if ($colName=="idle") {   
	
		[....................]

The thing is that I think it does not execute the javascript code I made.
If I write the command :
dijit.byId("internalValidation").set("value", curDate);
directly in the javascript's console in the browser, it changes the input's value. But not working with the $colScript...

Thank you.

Please Log in or Create an account to join the conversation.

More
30 Jan 2013 22:43 #4 by babynus
1) Check the code that you return.
=> try a debugLog on $colScript

2) use web console to debug your javascript code

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: eB0Z

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.056 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.