← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16616: Data entry, removed function for updating the current selection for attribute option combo, slow.

 

------------------------------------------------------------
revno: 16616
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-02 15:24:02 -0400
message:
  Data entry, removed function for updating the current selection for attribute option combo, slow.
modified:
  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/select.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-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	2014-08-29 15:50:39 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2014-09-02 19:24:02 +0000
@@ -979,8 +979,6 @@
         clearEntryForm();
         dhis2.de.clearAttributes();
     }
-
-    dhis2.de.updateOptionsStatus();
 }
 
 // -----------------------------------------------------------------------------
@@ -1164,35 +1162,6 @@
 };
 
 /**
- * Updates the options status showing options selected if any.
- */
-dhis2.de.updateOptionsStatus = function()
-{
-    var html = '';
-
-    if ( dhis2.de.currentCategories && dhis2.de.currentCategories.length != 0 )
-    {
-        var prefix = '(';
-        $.safeEach( dhis2.de.currentCategories, function ( idx, category ) {
-            var option = $('#category-' + category.id).val();
-
-            if ( option && option != -1) {
-                var options = dhis2.de.categories[ category.id ].options;
-                var matching = $.grep(options, function (e) {
-                    return e.id == option;
-                });
-                
-                html += prefix + matching[0].name;
-                prefix = ', ';
-            }
-        });
-        html += html.length == 0 ? '' : ')';
-    }
-
-    $( '#currentOptionsSelection' ).html( html );
-};
-
-/**
  * Returns a query param value for the currently selected category options where
  * each option is separated by the ; character.
  */
@@ -1287,8 +1256,6 @@
     {
         clearEntryForm();
     }
-
-    dhis2.de.updateOptionsStatus();
 };
 
 // -----------------------------------------------------------------------------

=== 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	2014-07-21 09:45:25 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2014-09-02 19:24:02 +0000
@@ -63,7 +63,6 @@
 <div id="currentSelection">
 	<span id="closeCurrentSelection"><img src="../images/hide.png" title="$i18n.getString( 'close' )" onclick="closeCurrentSelection()"></span>
 	<span id="currentOrganisationUnit">$i18n.getString( "no_organisationunit_selected" )</span> - <span id="currentPeriod">$i18n.getString( "no_period_selected" )</span/>
-    <span id="currentOptionsSelection"></span><br>
 	<span id="currentDataElement">$i18n.getString( "no_dataelement_selected" )</span>
 </div>