------------------------------------------------------------ revno: 11900 committer: Morten Olav Hansen <morte...@gmail.com> branch nick: dhis2 timestamp: Wed 2013-09-04 10:04:26 +0200 message: allow export of compressed events in event export UI modified: dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.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-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm' --- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2013-09-03 11:15:40 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2013-09-04 08:04:26 +0000 @@ -6,10 +6,11 @@ $( '#submit' ).on( 'click', function() { var format = $( '#format' ).val(); + var compression = $( '#compression' ).val(); var program = $( '#programs' ).val(); var programStage = $( '#programStages' ).val(); - var url = '../api/events' + format + "?program=" + program; + var url = '../api/events' + format + compression + "?program=" + program; if( programStage && programStage.length > 0 ) { url += "&programStage=" + programStage; @@ -46,8 +47,8 @@ } ).done(function(data) { var options = []; - $.each(data.programs, function(idx, item) { - var option = $( '<option/>' ).html( item.name ).val(item.id); + $.each(data.programs, function() { + var option = $( '<option/>' ).html( this.name ).val(this.id); options.push( option ); }); @@ -72,8 +73,8 @@ } ).done(function(data) { var options = []; - $.each(data.programStages, function(idx, item) { - var option = $( '<option/>' ).html( item.name ).val(item.id); + $.each(data.programStages, function() { + var option = $( '<option/>' ).html( this.name ).val(this.id); options.push( option ); }); @@ -121,36 +122,35 @@ <tr> <td>$i18n.getString("start_date")</td> - <td><input type="text" id="startDate" name="startDate" value="$!startDate" style="width:300px"></td> + <td><input type="text" id="startDate" name="startDate" value="$!startDate" style="width:296px"></td> </tr> <tr> <td>$i18n.getString("end_date")</td> - <td><input type="text" id="endDate" name="endDate" value="$!endDate" style="width:300px"></td> + <td><input type="text" id="endDate" name="endDate" value="$!endDate" style="width:296px"></td> </tr> + <tr> + <td>$i18n.getString( "format" )</td> + <td> + <select id="format" style="width: 300px;"> + <option value=".xml">XML</option> + <option value=".json">Json</option> + </select> + </td> + </tr> + <tr> <td>$i18n.getString( "compression" )</td> <td> - <select disabled="disabled" id="compression" style="width: 300px;"> + <select id="compression" style="width: 300px;"> <option value="">$i18n.getString( "uncompressed" )</option> - <option value=".zip">$i18n.getString( "compression_zip" )</option> <option value=".gz">$i18n.getString( "compression_gzip" )</option> </select> </td> </tr> <tr> - <td>$i18n.getString( "format" )</td> - <td> - <select id="format" style="width: 300px;"> - <option value=".xml">XML</option> - <option value=".json">Json</option> - </select> - </td> -</tr> - -<tr> <td></td> <td><input type="button" id="submit" value="$i18n.getString( 'export' )" style="width:120px" /></td> </tr>
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp