dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30580
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15536: minor
------------------------------------------------------------
revno: 15536
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Tue 2014-06-03 11:51:54 +0200
message:
minor
modified:
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.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-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache 2014-05-22 12:58:32 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache 2014-06-03 09:51:54 +0000
@@ -5,6 +5,7 @@
../dhis-web-commons/javascripts/jQuery/ui/jquery-ui.min.js
../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js
../dhis-web-commons/javascripts/jQuery/ui/css/redmond/jquery-ui.css
+../dhis-web-commons/javascripts/jQuery/ui/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
../dhis-web-commons/fonts/LiberationSans-Regular-webfont.eot
@@ -50,6 +51,14 @@
../images/expand.png
../images/transparent.gif
../images/treeview-gray-line.gif
+../images/search.png
+
+../icons/usersettings.png
+../icons/function-profile.png
+../icons/function-account.png
+../icons/function-help-center.png
+../icons/function-log-out.png
+../icons/function-about-dhis2.png
../dhis-web-commons/javascripts/underscore.min.js
../dhis-web-commons/javascripts/dhis2/dhis2.util.js
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-06-02 10:50:49 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-06-03 09:51:54 +0000
@@ -328,7 +328,8 @@
</td>
<!-- Visible when event is under editing - in grid -->
- <td style="cursor:default;"
+ <td style="cursor:default;"
+ ng-dblclick="showEventList()"
ng-if="(currentEvent.event == dhis2Event.event) && eventGridColumn.show"
ng-repeat="eventGridColumn in eventGridColumns">
<ng-form name="innerFormGrid">
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-06-03 06:19:46 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js 2014-06-03 09:51:54 +0000
@@ -172,9 +172,21 @@
$.ajax({
url: '../api/programs.json',
type: 'GET',
- data:'type=3&paging=false&include=id,name,version,programStages[id,version,programStageDataElements[dataElement[optionSet[id,version]]]]'
- }).done( function(response) {
- def.resolve( response.programs );
+ data:'type=3&paging=false&include=id,name,version,programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+ }).done( function(response) {
+ var programs = [];
+ _.each( _.values( response.programs ), function ( program ) {
+ if( program.programStages &&
+ program.programStages.length &&
+ program.programStages[0].programStageDataElements &&
+ program.programStages[0].programStageDataElements.length ) {
+
+ programs.push(program);
+ }
+
+ });
+
+ def.resolve( programs );
});
return def.promise();
@@ -271,6 +283,7 @@
var build = builder.promise();
_.each( _.values( programs ), function ( program ) {
+
build = build.then(function() {
var d = $.Deferred();
var p = d.promise();
@@ -284,6 +297,7 @@
return p;
});
+
});
build.done(function() {
@@ -327,23 +341,24 @@
var builder = $.Deferred();
var build = builder.promise();
-
_.each( _.values( programs ), function ( program ) {
_.each(_.values( program.programStages[0].programStageDataElements), function(prStDe){
- build = build.then(function() {
- var d = $.Deferred();
- var p = d.promise();
- dhis2.ec.store.get('optionSets', prStDe.dataElement.optionSet.id).done(function(obj) {
- if(!obj || obj.version !== prStDe.dataElement.optionSet.version) {
- promise = promise.then( getOptionSet( prStDe.dataElement.optionSet.id ) );
- }
- d.resolve();
+ if( prStDe.dataElement.optionSet && prStDe.dataElement.optionSet ){
+ build = build.then(function() {
+ var d = $.Deferred();
+ var p = d.promise();
+ dhis2.ec.store.get('optionSets', prStDe.dataElement.optionSet.id).done(function(obj) {
+ if(!obj || obj.version !== prStDe.dataElement.optionSet.version) {
+ promise = promise.then( getOptionSet( prStDe.dataElement.optionSet.id ) );
+ }
+ d.resolve();
+ });
+
+ return p;
});
-
- return p;
- });
- });
+ }
+ });
});
build.done(function() {