dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13801
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4526: DataElement list - Expanded to show details with the list of data sets.
------------------------------------------------------------
revno: 4526
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-09-06 14:57:07 +0700
message:
DataElement list - Expanded to show details with the list of data sets.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js
--
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-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm 2010-11-20 08:23:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm 2011-09-06 07:57:07 +0000
@@ -13,4 +13,9 @@
<url>$!encoder.xmlEncode( $dataElement.url )</url>
<lastUpdated>$!format.formatDate( $dataElement.lastUpdated )</lastUpdated>
<categoryCombo>$!encoder.xmlEncode( $dataElement.categoryCombo.name )</categoryCombo>
+ <dataSets>
+ #foreach( $ds in $dataElement.dataSets )
+ <dataSet>$!encoder.xmlEncode( $ds.name )</dataSet>
+ #end
+ </dataSets>
</dataElement>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2011-05-12 13:10:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2011-09-06 07:57:07 +0000
@@ -46,7 +46,7 @@
<input type="button" value="$i18n.getString( 'get_pdf' )" onclick="exportPdfByType( 'dataelement' );" style="width:80px"/>
<input type="button" value="$i18n.getString( 'sort' )" onclick="window.location.href='showSortDataElementForm.action'" style="width:80px"/>
#if ( $!dataDictionaryMode && $dataDictionaryMode == "extended" )
- <input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddExtendedDataElementForm.action'" style="width:80px">
+ <input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='showAddExtendedDataElementForm.action'" style="width:80px"/>
#else
<input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='showAddDataElementForm.action'" style="width:80px"/>
#end
@@ -99,6 +99,7 @@
<p><label>$i18n.getString( "category_combination" ):</label><br/><span id="categoryComboField"></span></p>
<p><label>$i18n.getString( "url" ):</label><br/><span id="urlField"></span></p>
<p><label>$i18n.getString( "last_updated" ):</label><br/><span id="lastUpdatedField"></span></p>
+ <p><label>$i18n.getString( "data_sets" ):</label><br/><span id="dataSetsField"></span></p>
</div>
<div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2011-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2011-09-06 07:57:07 +0000
@@ -95,6 +95,14 @@
var lastUpdated = getElementValue( dataElementElement, 'lastUpdated' );
setInnerHTML( 'lastUpdatedField', lastUpdated ? lastUpdated : '[' + i18n_none + ']' );
+ var temp = '';
+ var dataSets = dataElementElement.getElementsByTagName( 'dataSet' );
+ for ( var i = 0 ; i < dataSets.length ; i ++ )
+ {
+ temp += dataSets[i].firstChild.nodeValue + '<br/>';
+ }
+ setInnerHTML( 'dataSetsField', temp ? temp : '[' + i18n_none + ']' );
+
showDetails();
}