Hi devs,
I’ve been working to have the orgUnit tree working on a custom app, but I’ve seen that on the first line of code that the dhis2
base URL is defined as:
var dhis2BaseUrl = “…”;
Could this be changed to var dhis2BaseUrl = dhis2.settings.baseUrl; ?
Right now I have to change the code of the ouwt.js file if I want the images to load correctly and with every dhis2 update it
would need maintenance to keep it working correctly, using that variable I believe that everything should work correctly and
it would be available to any user using the code snippet provided in the documentation:
<script>
window.dhis2 = window.dhis2 || {};
dhis2.settings = dhis2.settings || {};
dhis2.settings.baseUrl = '';
</script>
Something similar happens with the “treeview-gray-line.gif”, but I couldn’t find where this image is requested as it seems to use another baseUrl.
I’m looking forward to hearing from you
Have a nice day
Eric
Hi again,
Sorry for the rapid succession of mails but I wanted to report a bug with the multiple selection on the tree where
the orgUnits are not removed correctly when multiple selection is set to true, around line 530:
“dhis2.array.remove(selected, idx, idx);” is not working and could be replaced by “selected.splice(idx, 1);”
I attached a file with the changes on ouwt.js in case you are interested
Cheers!
Eric
ouwt.zip (5.49 KB)
···
From: ericmourin@hotmail.com
To: dhis2-devs@lists.launchpad.net
Subject: ouwt Tree
Date: Fri, 3 Jun 2016 04:53:34 +0200
Hi devs,
I’ve been working to have the orgUnit tree working on a custom app, but I’ve seen that on the first line of code that the dhis2
base URL is defined as:
var dhis2BaseUrl = “…”;
Could this be changed to var dhis2BaseUrl = dhis2.settings.baseUrl; ?
Right now I have to change the code of the ouwt.js file if I want the images to load correctly and with every dhis2 update it
would need maintenance to keep it working correctly, using that variable I believe that everything should work correctly and
it would be available to any user using the code snippet provided in the documentation:
<script>
window.dhis2 = window.dhis2 || {};
dhis2.settings = dhis2.settings || {};
dhis2.settings.baseUrl = '';
</script>
Something similar happens with the “treeview-gray-line.gif”, but I couldn’t find where this image is requested as it seems to use another baseUrl.
I’m looking forward to hearing from you
Have a nice day
Eric
morten
(Morten Hansen)
3 June 2016 03:50
3
Hi Eric
Have you had a look at our d2-ui library? the ouwt widget is kinda flaky, and should probably not be used in new applications if you don’t have to…
We have a new tree widget from 2.23 I believe it is, Mark can fill you in on the details
···
On Fri, Jun 3, 2016 at 10:47 AM, eric mourin ericmourin@hotmail.com wrote:
Hi again,
Sorry for the rapid succession of mails but I wanted to report a bug with the multiple selection on the tree where
the orgUnits are not removed correctly when multiple selection is set to true, around line 530:
“dhis2.array.remove(selected, idx, idx);” is not working and could be replaced by “selected.splice(idx, 1);”
I attached a file with the changes on ouwt.js in case you are interested
Cheers!
Eric
From: ericmourin@hotmail.com
To: dhis2-devs@lists.launchpad.net
Subject: ouwt Tree
Date: Fri, 3 Jun 2016 04:53:34 +0200
Hi devs,
I’ve been working to have the orgUnit tree working on a custom app, but I’ve seen that on the first line of code that the dhis2
base URL is defined as:
var dhis2BaseUrl = “…”;
Could this be changed to var dhis2BaseUrl = dhis2.settings.baseUrl; ?
Right now I have to change the code of the ouwt.js file if I want the images to load correctly and with every dhis2 update it
would need maintenance to keep it working correctly, using that variable I believe that everything should work correctly and
it would be available to any user using the code snippet provided in the documentation:
Something similar happens with the “treeview-gray-line.gif”, but I couldn’t find where this image is requested as it seems to use another baseUrl.
I’m looking forward to hearing from you
Have a nice day
Eric
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org
Dear Morten,
Thanks for giving us a pointer to the d2-ui library. I have been facing the same challenge while doing the scorecard application. idsr custom apps.
Thanks.
Alex
···
On Fri, Jun 3, 2016 at 6:50 AM, Morten Olav Hansen morten@dhis2.org wrote:
Hi Eric
Have you had a look at our d2-ui library? the ouwt widget is kinda flaky, and should probably not be used in new applications if you don’t have to…
We have a new tree widget from 2.23 I believe it is, Mark can fill you in on the details
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
–
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org
On Fri, Jun 3, 2016 at 10:47 AM, eric mourin ericmourin@hotmail.com wrote:
Hi again,
Sorry for the rapid succession of mails but I wanted to report a bug with the multiple selection on the tree where
the orgUnits are not removed correctly when multiple selection is set to true, around line 530:
“dhis2.array.remove(selected, idx, idx);” is not working and could be replaced by “selected.splice(idx, 1);”
I attached a file with the changes on ouwt.js in case you are interested
Cheers!
Eric
From: ericmourin@hotmail.com
To: dhis2-devs@lists.launchpad.net
Subject: ouwt Tree
Date: Fri, 3 Jun 2016 04:53:34 +0200
Hi devs,
I’ve been working to have the orgUnit tree working on a custom app, but I’ve seen that on the first line of code that the dhis2
base URL is defined as:
var dhis2BaseUrl = “…”;
Could this be changed to var dhis2BaseUrl = dhis2.settings.baseUrl; ?
Right now I have to change the code of the ouwt.js file if I want the images to load correctly and with every dhis2 update it
would need maintenance to keep it working correctly, using that variable I believe that everything should work correctly and
it would be available to any user using the code snippet provided in the documentation:
Something similar happens with the “treeview-gray-line.gif”, but I couldn’t find where this image is requested as it seems to use another baseUrl.
I’m looking forward to hearing from you
Have a nice day
Eric
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
Alex Tumwesigye
Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda
Kampala
Uganda
+256 774149 775, + 256 759 800161
Skype ID: talexie
IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant
"I don’t want to be anything other than what I have been - one tree hill "
Hey Alex,
Please have a look at [1]. When you clone the repository and run npm install
followed by npm start
the examples page should run.
For the org unit tree examples it expects your local dhis2 instance to be located at localhost:8080/dhis
. But you can change this by putting a config.json
file in your DHIS2_HOME directory.
The examples there should give you a good idea on how to use it. However if you got any questions feel free to ask in an e-mail or through a github issue.
[1] https://github.com/dhis2/d2-ui/tree/master/examples/org-unit-tree
···
On Fri, Jun 3, 2016 at 2:50 AM, Alex Tumwesigye atumwesigye@gmail.com wrote:
Dear Morten,
Thanks for giving us a pointer to the d2-ui library. I have been facing the same challenge while doing the scorecard application. idsr custom apps.
Thanks.
Alex
–
On Fri, Jun 3, 2016 at 6:50 AM, Morten Olav Hansen morten@dhis2.org wrote:
Hi Eric
Have you had a look at our d2-ui library? the ouwt widget is kinda flaky, and should probably not be used in new applications if you don’t have to…
We have a new tree widget from 2.23 I believe it is, Mark can fill you in on the details
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
Alex Tumwesigye
Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda
Kampala
Uganda
+256 774149 775, + 256 759 800161
Skype ID: talexie
IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant
"I don’t want to be anything other than what I have been - one tree hill "
–
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org
On Fri, Jun 3, 2016 at 10:47 AM, eric mourin ericmourin@hotmail.com wrote:
Hi again,
Sorry for the rapid succession of mails but I wanted to report a bug with the multiple selection on the tree where
the orgUnits are not removed correctly when multiple selection is set to true, around line 530:
“dhis2.array.remove(selected, idx, idx);” is not working and could be replaced by “selected.splice(idx, 1);”
I attached a file with the changes on ouwt.js in case you are interested
Cheers!
Eric
From: ericmourin@hotmail.com
To: dhis2-devs@lists.launchpad.net
Subject: ouwt Tree
Date: Fri, 3 Jun 2016 04:53:34 +0200
Hi devs,
I’ve been working to have the orgUnit tree working on a custom app, but I’ve seen that on the first line of code that the dhis2
base URL is defined as:
var dhis2BaseUrl = “…”;
Could this be changed to var dhis2BaseUrl = dhis2.settings.baseUrl; ?
Right now I have to change the code of the ouwt.js file if I want the images to load correctly and with every dhis2 update it
would need maintenance to keep it working correctly, using that variable I believe that everything should work correctly and
it would be available to any user using the code snippet provided in the documentation:
Something similar happens with the “treeview-gray-line.gif”, but I couldn’t find where this image is requested as it seems to use another baseUrl.
I’m looking forward to hearing from you
Have a nice day
Eric
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
Regards,
Mark Polak
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org
mark@dhis2.org