=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2013-12-21 19:53:48 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2013-12-21 20:44:52 +0000
@@ -1369,6 +1369,54 @@
$( 'body' ).off( EVENT_FORM_LOADED ).on( EVENT_FORM_LOADED, fn );
}
+/**
+ * Returns an array of category combo objects for the given data set. Default
+ * category combos are omitted.
+ */
+dhis2.de.getCategoryCombos = function( dataSets )
+{
+ var combos = [];
+
+ $.safeEach( dataSets, function( idx, item ) {
+ if ( item.categoryCombo && dhis2.de.defaultCategoryCombo != item.categoryCombo ) {
+ var combo = dhis2.de.categoryCombos[item.categoryCombo];
+ combos.push( combo );
+ }
+ } );
+
+ return combos;
+}
+
+/**
+ * Returns markup for drop down boxes to be put in the selection box for the
+ * given category combos.
+ */
+dhis2.de.getAttributeComboMarkup = function( categoryCombos )
+{
+ var html = '';
+
+ if ( undefined === categoryCombos || categoryCombos.length == 0 ) {
+ return html;
+ }
+
+ html = '
';
+
+ $.safeEach( categoryCombos, function( idx, combo ) {
+ html += '
' + combo.name + '
';
+ html += '
';
+ } );
+
+ html += '
';
+ return html;
+}
+
// -----------------------------------------------------------------------------
// Data completeness
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 2013-12-20 22:02:12 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 2013-12-21 20:44:52 +0000
@@ -67,7 +67,7 @@
"categoryCombos": {
#set( $size1 = $categoryCombos.size() )
#foreach( $categoryCombo in $categoryCombos )
-"${categoryCombo.uid}":{"name":"$encoder.jsonEncode( ${categoryCombo.displayName} )","categories":[
+"${categoryCombo.uid}":{"id":"${categoryCombo.uid}","name":"$encoder.jsonEncode( ${categoryCombo.displayName} )","categories":[
#set( $size2 = $categoryCombo.categories.size() )
#foreach( $category in $categoryCombo.categories )
"${category.uid}"#if( $velocityCount < $size2 ),#end
@@ -82,7 +82,7 @@
"${category.uid}":{"name":"$encoder.jsonEncode( ${category.displayName} )","options":[
#set( $size2 = $category.categoryOptions.size() )
#foreach( $option in $category.categoryOptions )
-{"id":"${option.uid}","name":"$encoder.jsonEncode( ${option.displayName} )"}#if( $velocityCount < $size2 ),#end
+{"id":"${option.uid}","id":"${option.uid}","name":"$encoder.jsonEncode( ${option.displayName} )"}#if( $velocityCount < $size2 ),#end
#end
] }#if( $velocityCount < $size1 ),#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2013-12-21 19:53:48 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2013-12-21 20:44:52 +0000
@@ -76,7 +76,7 @@
$i18n.getString( "data_set" )
-
+
@@ -85,9 +85,11 @@
+
+
$i18n.getString( "filter_on_section" )
-
+
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2013-12-21 19:53:48 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2013-12-21 20:44:52 +0000
@@ -76,6 +76,11 @@
padding: 2px 0;
}
+.selectionBoxSelect
+{
+ width: 401px;
+}
+
.selectionLabel
{
display: inline-block;