dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26829
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13281: show heading with datasetname+orgunit/period in smartphone data-entry screen.
------------------------------------------------------------
revno: 13281
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-17 15:41:36 +0100
message:
show heading with datasetname+orgunit/period in smartphone data-entry screen.
modified:
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.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-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2013-10-15 11:45:28 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2013-12-17 14:41:36 +0000
@@ -15,6 +15,7 @@
function selectOrganisationUnit( e ) {
Selected.orgUnit = $(this).data('id');
+ Selected.orgUnitName = $(this).html();
}
function selectDataSet( e ) {
@@ -23,6 +24,7 @@
function selectPeriod( e ) {
Selected.period = $(this).data('id');
+ Selected.periodName = $(this).html();
}
function loadOrganisationUnitsPage() {
@@ -162,7 +164,9 @@
$( '#data-entry-page section[data-role="content"]' ).html(
_.template( tmpl, {
'form': form,
- 'valueMap': valueMap
+ 'valueMap': valueMap,
+ periodName: Selected.periodName,
+ orgUnitName: Selected.orgUnitName
})
);
@@ -309,11 +313,15 @@
</script>
<script id="data-entry-template" type="text/template">
- <h1><%= form.label %></h1>
+ <ul data-role="listview" data-inset="true">
+ <li data-role="list-divider"><%= form.label %></li>
+ <li><%= orgUnitName %> / <%= periodName %></li>
+ </ul>
+
<form id='data-entry-form'>
<ul id="data-entry-list" data-role="listview" data-inset="true">
<% _( form.groups ).each( function(group, idx) { %>
- <li data-role="list-divider"><%= group.label %></li>
+ <% if(group.label !== 'default') { %><li data-role="list-divider"><%= group.label %></li><% } %>
<% _( group.fields ).each( function(field, idx) { %>
<% var fieldId = _.uniqueId('field'); %>