← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2071: Applied css style for drill-down table

 

------------------------------------------------------------
revno: 2071
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-07-04 02:33:08 +0700
message:
  Applied css style for drill-down table
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserResult.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm	2010-07-02 09:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm	2010-07-03 19:33:08 +0000
@@ -46,7 +46,7 @@
 				<option value ="null">[ $i18n.getString( "select_mode" ) ]</option>
 				<option value ="DataSet">$i18n.getString( "data_sets" )</option>
 				<option value ="DataElementGroup">$i18n.getString( "data_element_groups" )</option>
-				<option value ="OrganisationUnitGroup">$i18n.getString( "Organisation unit groups" )</option>
+				<option value ="OrganisationUnitGroup">$i18n.getString( "organisation_unit_groups" )</option>
 				<option value ="OrganisationUnit">$i18n.getString( "organisation_units" )</option>
 			</select>
 		</td>
@@ -78,7 +78,7 @@
 <br/>
 
 <div>
-	<input type="submit" value="$i18n.getString( 'browser' )" />
+	<input type="submit" value="$i18n.getString( 'browse' )" />
 </div>
 
 </form>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserResult.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserResult.vm	2010-07-02 09:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserResult.vm	2010-07-03 19:33:08 +0000
@@ -6,6 +6,11 @@
 	  position: absolute;
 	  display: none;
 	}
+	
+	th.formatLabel
+	{
+	  text-align: center;
+	}
 
 </style>
 
@@ -139,11 +144,11 @@
 	<br/><br/>
 	$i18n.getString( "no_data_found" )
 #else	
-	<table id="drillDownTable">
+	<table id="drillDownTable" class="listTable" border="1">
 	<thead>
 		<tr>
 		#foreach ( $col in $allColumnsConverted )
-			<th title="$col.metaValue">$i18n.getString( $col.name )</th>
+			<th title="$col.metaValue" class="formatLabel">$i18n.getString( $col.name )</th>
 		#end
 		</tr>
 	</thead>
@@ -156,18 +161,14 @@
 			<tr #if ($i%2 == 1) class="odd" #else class="par" #end >
 			#if ( $searchOption=="OrganisationUnit" && !$parent && $rowMeta.id)
 			#set ( $urlLink = "searchResult.action?searchOption=OrganisationUnit&amp;selectedUnitChanger=" + $rowMeta.id + "&amp;periodType=" + $periodTypeId + "&amp;toDate=" + $toDate + "&amp;fromDate=" + $fromDate )
-				<td style="min-width:200px" onclick="javascript:viewDrillDownMenu( '$urlLink', '$rowMeta.id' );">
-					<!--a href="searchResult.action?searchOption=OrganisationUnit&amp;parent=$rowMeta.id&amp;periodType=$periodTypeId&amp;toDate=$toDate&amp;fromDate=$fromDate&amp;selectedUnitChanger=$rowMeta.id"
-					title="$i18n.getString('see_datasets_for') $rowMeta.name $i18n.getString('by_drilldown_option')">$rowMeta.name</a-->
-					<a>$rowMeta.name</a>
-				</td>
+				<td style="min-width:200px;cursor:pointer" onclick="javascript:viewDrillDownMenu( '$urlLink', '$rowMeta.id' );" title="$i18n.getString('click_on_this_orgunit')">$rowMeta.name</td>
 			#elseif ( $rowMeta.id && !$parent )
 				<td style="min-width:200px"><a href="searchResult.action?searchOption=$searchOption&amp;parent=$rowMeta.id&amp;periodType=$periodTypeId&amp;toDate=$toDate&amp;fromDate=$fromDate">$rowMeta.name</a></td>
 			#else
 				<td style="min-width:200px">$rowMeta.name</td>
 			#end
 			#foreach ( $rowItem in $col )
-				<td style="min-width:80px;text-align:right">#if ( $rowItem > 0 )$rowItem #else<span style="color:red;font-weight:bold;">$rowItem</span> #end</td>
+				<td style="min-width:80px;text-align:right">#if ( $rowItem > 0 )$rowItem #else<span style="color:blue;font-weight:bold;">$rowItem</span> #end</td>
 			#end
 			</tr>
 		#end
@@ -190,12 +191,12 @@
 
 	<div id="drillDownMenu" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
 	  <ul class="menuDropDownBox">
+		<li class="menuDropDownItem" onclick='viewDrillDownData( "descendant_level" )'>$i18n.getString( "view_data_at_descendant_levels" )&nbsp;</li>
 		<li class="menuDropDownItem" onclick='viewDrillDownData( "current_level" )'>$i18n.getString( "view_data_at_this_level" )&nbsp;</li>
-		<li class="menuDropDownItem" onclick='viewDrillDownData( "descendant_level" )'>$i18n.getString( "view_data_at_descendant_levels" )&nbsp;</li>
 	  </ul>
 	</div>
-	
+
 	<script type="text/javascript">
-		loadListeners();
+		loadListeners();		
 	</script>
 	
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js	2010-07-02 09:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js	2010-07-03 19:33:08 +0000
@@ -18,43 +18,43 @@
     
     if ( periodType == "null" )
     {
-        setMessage( "i18n_drilldown_choose_period_type" );
+        setMessage( i18n_drilldown_choose_period_type );
         return false;
     }
     
     if ( fromDate[0] != "" && fromDate.length != 3 )
     {
-        setMessage( "i18n_drilldown_fromdate_invalid" );
+        setMessage( i18n_drilldown_fromdate_invalid );
         return false;
     }
     
     if ( toDate[0] != "" && toDate.length != 3 )
     {
-        setMessage( "i18n_drilldown_enddate_invalid" );
+        setMessage( i18n_drilldown_enddate_invalid );
         return false;
     }
     
     if ( fromDate[0] > toDate[0] )
     {
-        setMessage( "i18n_drilldown_fromdate_is_later_than_todate" );
+        setMessage( i18n_drilldown_fromdate_is_later_than_todate );
         return false;
     }
     
     if ( fromDate[0] == toDate[0] && fromDate[1] > toDate[1] )
     {
-        setMessage( "i18n_drilldown_fromdate_is_later_than_todate" );
+        setMessage( i18n_drilldown_fromdate_is_later_than_todate );
         return false;
     }
     
     if ( fromDate[0] == toDate[0] && fromDate[1] == toDate[1] && fromDate[2] > toDate[2] )
     {
-        setMessage( "i18n_drilldown_fromdate_is_later_than_todate" );
+        setMessage( i18n_drilldown_fromdate_is_later_than_todate );
         return false;
     }
     
     if ( mode == "null" )
     {
-        setMessage( "i18n_drilldown_select_browse_mode" );
+        setMessage( i18n_drilldown_select_browse_mode );
         return false;
     }
     
@@ -91,9 +91,12 @@
  */
 function loadListeners()
 {
-  var table = byId( "drillDownTable" );
-  
-  table.addEventListener( "click", setPosition, false );
+	var table = byId( "drillDownTable" );
+
+	if ( table != null )
+	{
+		table.addEventListener( "click", setPosition, false );
+	}
 }
 
 /**