dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33384
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17029: Reverted r 17028
------------------------------------------------------------
revno: 17029
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-10-10 09:10:36 +0200
message:
Reverted r 17028
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js
--
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/dhis2/dhis2.util.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js 2014-10-10 07:00:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js 2014-10-10 07:10:36 +0000
@@ -166,6 +166,16 @@
};
/**
+ * Convenience method to be used from inside custom forms. When a function is
+ * registered inside a form it will be loaded every time the form is loaded,
+ * hence the need to unregister and the register the function.
+ */
+dhis2.util.on = function( event, fn )
+{
+ $( document ).off( event ).on( event, fn );
+};
+
+/**
* adds ':containsNC' to filtering.
* $(sel).find(':containsNC(key)').doSomething();
*/