Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
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.
Check the function getValidationScript($colName) in Ticket.php and in SqlElement.php...
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 .= '';
[..........]
// 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 .= '';
} 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.
1) Check the code that you return.
=> try a debugLog on $colScript
2) use web console to debug your javascript code