← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19248: ProgramIndicator, added filter property. Program indicator UI, using relative width.

 

------------------------------------------------------------
revno: 19248
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-06-02 13:13:53 +0200
message:
  ProgramIndicator, added filter property. Program indicator UI, using relative width.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.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-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java	2015-04-24 17:41:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java	2015-06-02 11:13:53 +0000
@@ -83,6 +83,8 @@
     private String valueType;
 
     private String expression;
+    
+    private String filter;
 
     private String rootDate;
 
@@ -153,6 +155,19 @@
     @JsonProperty
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public String getFilter()
+    {
+        return filter;
+    }
+
+    public void setFilter( String filter )
+    {
+        this.filter = filter;
+    }
+
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getRootDate()
     {
         return rootDate;

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2015-04-19 11:38:17 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2015-06-02 11:13:53 +0000
@@ -26,6 +26,8 @@
     
     <property name="expression" type="text" />
     
+    <property name="filter" type="text" />
+    
     <property name="rootDate" />
     
   </class>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-04-24 17:41:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2015-06-02 11:13:53 +0000
@@ -1,4 +1,4 @@
-<div id="tabs">
+<div id="tabs" style="width:670px">
 	<ul>
 		<li><a href="#tab-1">$i18n.getString("dataelements")</a></li>
 		#if($program.type!='3')
@@ -9,19 +9,19 @@
 	</ul>	
 	
 	<div id="tab-1">
-	  <table>
+	  <table style="width:100%">
         <tr>
 			<td><label for="dataelement">$i18n.getString( "dataelement" )</label></td>
 		</tr>
         <tr>
 			<td>
-				<input type='text' id='txtSearchValue' name='txtSearchValue' onKeyUp="filterDE(event, this.value, 'dataElements');" style='width:265px;'/>
-				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchValue', '');" style='width:50px'>			
+				<input type='text' id='txtSearchValue' name='txtSearchValue' onKeyUp="filterDE(event, this.value, 'dataElements');" />
+				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchValue', '');" />			
 			</td>
         </tr>
         <tr>
 			<td>
-				<select multiple id="dataElements" name="dataElements" size="8" style="width:652px" ondblclick="insertDataElement(this);"></select>
+				<select multiple id="dataElements" name="dataElements" size="8" style="width:100%" ondblclick="insertDataElement(this);"></select>
 			</td>
 		</tr>
       </table>
@@ -29,13 +29,13 @@
 	
 #if($program.type!='3')
 	<div id="tab-2">
-		<table>
+		<table style="width:100%">
 			<tr>
 				<td><label for="programProperty">$i18n.getString('program_properties')</label></td>
 			</tr>
 			<tr>
 				<td>
-					<select multiple id="programProperty" name="programProperty" size="10" style="width:652px" ondblclick="insertInfo(this, false);" >
+					<select multiple id="programProperty" name="programProperty" size="10" style="width:100%" ondblclick="insertInfo(this, false);" >
 						<option value="V{incident_date}">$i18n.getString( "incident_date" )</option>
 						<option value="V{enrollment_date}">$i18n.getString( "date_of_enrollment" )</option>
 						<option value="V{current_date}">$i18n.getString( "current_date" )</option>
@@ -48,19 +48,19 @@
 	</div>
 
 	<div id="tab-3">
-		<table>
+		<table style="width:100%">
         <tr>
 			<td><label for="attributes">$i18n.getString( "attribute" )</label></td>
 		</tr>
         <tr>
 			<td>
-				<input type='text' id='txtSearchAttrValue' name='txtSearchAttrValue' onKeyUp="filterAttr(event, this.value, 'attributes');" style='width:265px;'/>
-				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchAttrValue', '');" style='width:50px'>			
+				<input type='text' id='txtSearchAttrValue' name='txtSearchAttrValue' onKeyUp="filterAttr(event, this.value, 'attributes');" />
+				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchAttrValue', '');" />			
 			</td>
         </tr>
         <tr>
 			<td>
-				<select multiple id="attributes" name="attributes" size="8" style="width:652px" ondblclick="insertData(this,'A');">
+				<select multiple id="attributes" name="attributes" size="8" style="width:100%" ondblclick="insertData(this,'A');">
 					#foreach( $programAttribute in $program.programAttributes )
 						#if( $programAttribute.attribute.valueType=='number' )
 							<option value='$programAttribute.attribute.uid'>$encoder.htmlEncode($programAttribute.attribute.displayName)</option>
@@ -75,19 +75,19 @@
 #end
 
 	<div id="tab-4">
-		<table>
+		<table style="width:100%">
         <tr>
 			<td><label for="constant">$i18n.getString( "constant" )</label></td>
 		</tr>
         <tr>
 			<td>
-				<input type='text' id='txtSearchContsValue' name='txtSearchAttrValue' onKeyUp="filterAttr(event, this.value, 'attributes');" style='width:265px;'/>
-				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchAttrValue', '');" style='width:50px'>			
+				<input type='text' id='txtSearchContsValue' name='txtSearchAttrValue' onKeyUp="filterAttr(event, this.value, 'attributes');" />
+				<input type='button' value='$i18n.getString("clear")' onClick="setFieldValue('txtSearchAttrValue', '');" />			
 			</td>
         </tr>
         <tr>
 			<td>
-				<select multiple id="constants" name="constants" size="8" style="width:652px" ondblclick="insertData(this,'C');">
+				<select multiple id="constants" name="constants" size="8" style="width:100%" ondblclick="insertData(this,'C');">
 					#foreach( $constant in $constants )
 						<option value='$constant.uid'>$encoder.htmlEncode($constant.displayName)</option>
 					#end
@@ -106,7 +106,7 @@
       </tr>	
 	<tr>
 		<td>
-			<textarea style="width:660px" id="expression" name="expression" onkeyup='getConditionDescription();' >$!encoder.htmlEncode($!programIndicator.expression)</textarea>
+			<textarea style="width:662px" id="expression" name="expression" onkeyup='getConditionDescription();' >$!encoder.htmlEncode($!programIndicator.expression)</textarea>
 		</td>
 	</tr>	
 	<tr>