dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19839
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8821: Triggering event in case entry value save method in order to be able to hook in from custom forms
------------------------------------------------------------
revno: 8821
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-11-01 13:00:52 +0300
message:
Triggering event in case entry value save method in order to be able to hook in from custom forms
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-10-22 03:02:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-11-01 10:00:52 +0000
@@ -81,6 +81,8 @@
}
var valueSaver = new ValueSaver( dataElementId, fieldValue, type, SUCCESS_COLOR );
valueSaver.save();
+
+ jQuery( "body" ).trigger( "event-value-saved", [ dataElementId, fieldValue ] ); // Hook
}
function saveOpt( dataElementId )
@@ -101,8 +103,7 @@
spanField.style.backgroundColor = SAVING_COLOR;
var facilitySaver = new FacilitySaver( dataElementId, checked, SUCCESS_COLOR );
- facilitySaver.save();
-
+ facilitySaver.save();
}
function saveExecutionDate( programId, programStageInstanceId, field )