dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26986
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13374: Data entry, using divs instead of table for selection box
------------------------------------------------------------
revno: 13374
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-12-21 20:53:48 +0100
message:
Data entry, using divs instead of table for selection box
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
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css
--
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 2013-12-21 19:02:27 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2013-12-21 19:53:48 +0000
@@ -540,16 +540,14 @@
function resetSectionFilters()
{
- $( '#selectionBox' ).css( 'height', '93px' );
- $( '#filterDataSetSectionTr' ).hide();
+ $( '#filterDataSetSectionDiv' ).hide();
$( '.formSection' ).show();
}
function clearSectionFilters()
{
$( '#filterDataSetSection' ).children().remove();
- $( '#selectionBox' ).css( 'height', '93px' );
- $( '#filterDataSetSectionTr' ).hide();
+ $( '#filterDataSetSectionDiv' ).hide();
$( '.formSection' ).show();
}
@@ -640,8 +638,6 @@
if ( $sectionHeaders.size() > 1)
{
- $( '#selectionBox' ).css( 'height', '123px' );
-
$( '#filterDataSetSection' ).append( "<option value='all'>" + i18n_show_all_sections + "</option>" );
$sectionHeaders.each( function( idx, value )
@@ -649,12 +645,11 @@
$( '#filterDataSetSection' ).append( "<option value='" + idx + "'>" + value.innerHTML + "</option>" );
} );
- $( '#filterDataSetSectionTr' ).show();
+ $( '#filterDataSetSectionDiv' ).show();
}
else
{
- $( '#selectionBox' ).css( 'height', '93px' );
- $( '#filterDataSetSectionTr' ).hide();
+ $( '#filterDataSetSectionDiv' ).hide();
}
}
=== 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-11-21 11:27:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2013-12-21 19:53:48 +0000
@@ -70,31 +70,25 @@
</div>
<div id="selectionBox" class="inputCriteria" style="width:534px">
-<table>
- <tr>
- <td><label for="selectedOrganisationUnit">$i18n.getString( "organisation_unit" )</label></td>
- <td><input type="text" id="selectedOrganisationUnit" readonly="readonly" value="[ $i18n.getString( 'select_from_tree' ) ]" style="width: 394px; padding: 3px;"></td>
- </tr>
- <tr>
- <td><label for="selectedDataSetId">$i18n.getString( "data_set" )</label></td>
- <td><select id="selectedDataSetId" name="selectedDataSetId" style="width:401px" onchange="dataSetSelected()" disabled="disabled"></select>
- <span id="loaderSpan" style="display:none"><img src='../images/ajax-loader-bar.gif'></span></td>
- </tr>
- <tr>
- <td><label for="selectedPeriodId">$i18n.getString( "period" )</label></td>
- <td><select id="selectedPeriodId" name="selectedPeriodId" style="width:225px" onchange="periodSelected()" disabled="disabled"></select>
- <input type="button" id="prevButton" style="width:85px" value="$i18n.getString( 'prev_year' )" title="$i18n.getString('earlier_periods')" onclick="previousPeriodsSelected()" disabled="disabled">
- <input type="button" id="nextButton" style="width:85px" value="$i18n.getString( 'next_year' )" title="$i18n.getString('later_periods')" onclick="nextPeriodsSelected()" disabled="disabled">
- </td>
- </tr>
- <tr id="filterDataSetSectionTr" style="display: none;">
- <td><label for="filterDataSetSection">$i18n.getString( "filter_on_section" )</label></td>
- <td>
- <select id="filterDataSetSection" name="filterDataSetSection" style="width:401px" onchange="filterOnSection()">
- </select>
- </td>
- </tr>
-</table>
+<div class="selectionBoxRow">
+ <div class="selectionLabel">$i18n.getString( "organisation_unit" )</div>
+ <input type="text" id="selectedOrganisationUnit" readonly="readonly" value="[ $i18n.getString( 'select_from_tree' ) ]" style="width: 394px; padding: 3px;">
+</div>
+<div class="selectionBoxRow">
+ <div class="selectionLabel">$i18n.getString( "data_set" )</div>
+ <select id="selectedDataSetId" name="selectedDataSetId" style="width:401px" onchange="dataSetSelected()" disabled="disabled"></select>
+ <span id="loaderSpan" style="display:none"><img src='../images/ajax-loader-bar.gif'></span>
+</div>
+<div class="selectionBoxRow">
+ <div class="selectionLabel">$i18n.getString( "period" )</div>
+ <select id="selectedPeriodId" name="selectedPeriodId" style="width:225px" onchange="periodSelected()" disabled="disabled"></select>
+ <input type="button" id="prevButton" style="width:85px" value="$i18n.getString( 'prev_year' )" title="$i18n.getString('earlier_periods')" onclick="previousPeriodsSelected()" disabled="disabled">
+ <input type="button" id="nextButton" style="width:85px" value="$i18n.getString( 'next_year' )" title="$i18n.getString('later_periods')" onclick="nextPeriodsSelected()" disabled="disabled">
+</div>
+<div id="filterDataSetSectionDiv" class="selectionBoxRow" style="display:none">
+ <div class="selectionLabel">$i18n.getString( "filter_on_section" )</div>
+ <select id="filterDataSetSection" name="filterDataSetSection" style="width:401px;" onchange="filterOnSection()"></select>
+</div>
</div>
#parse( "dhis-web-commons/loader/loader.vm" )
=== 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-11 18:21:30 +0000
+++ 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
@@ -71,6 +71,17 @@
margin-bottom: 1px;
}
+.selectionBoxRow
+{
+ padding: 2px 0;
+}
+
+.selectionLabel
+{
+ display: inline-block;
+ width: 100px;
+}
+
.formSection td
{
padding-right: 2px;