View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] Question about datefieldbox in object detail - ProjeQtOr
 

[SOLVED] Question about datefieldbox in object detail

More
12 May 2016 13:59 - 12 May 2016 14:36 #1 by keloniton
Hello dear Mr babynus, How are you.
I appreciate if you help me with the following question.
my question concept: I want to add a button undert the regular projeqtor datetextbx in objectdetail. then by clicking that button a window opens and some inputs are taken. the results of inputs will have effect in the datetextbox.
What i did: Then, i need to have the id of datetextbox to assign a value to it. In order to do this, i simply added a button under the </div> of datetextbox in view/objectdetail.php as follows:
echo '<button id="thebutton" onclick=processingfunction ( " ' . $classObj . '_' . $col . ' ");>UN</button>';
Based on line 782 of view/objectdetail the input of processingfunction would be the id of the datetextelement. Then, in view/projecqtor.js i added the following function:
function processingfunction(input) {
dijit.byId(input).set('value','2016-12-12');
}
Logically the date must be dedicated to datetextbox, but it does not work. do you have any idea?
let me appreciate your time and help
thanks in advance
Last edit: 12 May 2016 14:36 by keloniton.

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

More
12 May 2016 15:23 #2 by babynus
Your code is valid only if $included is set, for instance if you treat some planningElement item.

For other cases, it should be onclick=processingfunction ( " ' . $col . ' ");

Babynus
Administrator of ProjeQtOr web site

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

More
15 May 2016 07:13 - 15 May 2016 07:20 #3 by keloniton
Thanks Dear Mr babynus;
I am trying to add a simple button and div in objectdetail.php. The button should be seen and the div should not. then i add following code in objectdetail.php and I set div property to be hidden at the first. When the user clicks on the button, the function testfuntion is run and the div would be shown. the code is as follows:

objectdetail.php:
echo '<button id="un" onclick=testfunction("' . $classObj . '_' . $col . '")>testbutton</button>'; //defining a button
echo '<div id="pop" name="popdiv" style="display:none">'; //defining a Div and set its property to NONE
echo '<input id="test">';
echo '</div>';

projeqtor.js:
function testfunction(input){
documnet.getElementById("pop").style.display='block'; //setting the div property to BLOCK
}
I tested this in a sample file. It worked. But i do not know why it does not work in projeqtor and the div content is not show. I appreciate to know your idea.
Thank you very much
Last edit: 15 May 2016 07:20 by keloniton.

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

More
15 May 2016 10:11 #4 by babynus
There is a syntax error
documnet.getElementById
and you'd better use
dojo.byId

Babynus
Administrator of ProjeQtOr web site

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

Moderators: babynusprotion
Time to create page: 0.035 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.