dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13556
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4373: minor javascript fixes
------------------------------------------------------------
revno: 4373
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 13:23:33 +0200
message:
minor javascript fixes
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js 2011-04-11 09:51:38 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/updateUserAccountForm.js 2011-08-19 11:23:33 +0000
@@ -6,7 +6,7 @@
rules["rawPassword"].required = false;
rules["oldPassword"] = {
required: true
- }
+ };
validation2( 'updateUserinforForm', updateUser, {
'rules' : rules
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2011-07-22 09:17:04 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2011-08-19 11:23:33 +0000
@@ -15,16 +15,16 @@
function SelectionTreeSelection()
{
- var onSelectFunction;
-
- var listenerFunction;
-
+ var onSelectFunction = undefined;
+
+ var listenerFunction = undefined;
+
var multipleSelectionAllowed = true;
this.setOnSelectFunction = function( onSelectFunction_ )
{
onSelectFunction = onSelectFunction_;
- }
+ };
this.setListenerFunction = function( listenerFunction_ )
{
@@ -39,7 +39,7 @@
this.getSelected = function()
{
return selectedOrganisationUnit;
- }
+ };
this.select = function( unitId )
{
@@ -197,9 +197,8 @@
function treeReceived( rootElement )
{
- var rootsElement = $(rootElement).find( 'roots' ).first();
var unitElements = $(rootElement).find( 'unit' );
-
+
var treeTag = document.getElementById( 'selectionTree' );
var rootsTag = document.createElement( 'ul' );
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm 2011-08-08 15:09:46 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm 2011-08-19 11:23:33 +0000
@@ -5,40 +5,3 @@
</div>
<img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
-
-
-#*
-#macro( parseNode $node )
- #if( $node.hasChildren )
- #if( $node.children )
- #set( $toggle = '<img src="../images/expand.png" width="9" height="9" alt="[-]">' )
- #else
- #set( $toggle = '<img src="../images/colapse.png" width="9" height="9" alt="[+]">' )
- #end
- #else
- #set( $toggle = '<img src="../images/transparent.gif" width="9" height="9" alt="">' )
- #end
- #if( $node.selected )
- #set( $selected = 'class="selected" ' )
- #else
- #set( $selected = '' )
- #end
- <li id="orgUnit${node.id}">
- <span class="toggle" #if( $node.hasChildren ) onclick="subtree.toggle(${node.id})" #end>$toggle</span>
- <a ${selected}href="javascript:void selection.select(${node.id})">$encoder.htmlEncode( $node.name )</a>
- #if( $node.children )
- <ul>
- #foreach( $child in $node.children )
- #parseNode( $child )
- #end
- </ul>
- #end
- </li>
-#end
-
-#if( $organisationUnitTree )
- #foreach( $root in $organisationUnitTree )
- #parseNode( $root )
- #end
-#end
-*#