← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7417: [mobile] update style for sms command

 

------------------------------------------------------------
revno: 7417
committer: Em <em.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-06-27 14:25:34 +0700
message:
  [mobile] update style for sms command
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.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-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java	2012-06-14 09:41:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java	2012-06-27 07:25:34 +0000
@@ -14,9 +14,12 @@
 
 import com.opensymphony.xwork2.Action;
 
-public class SMSCommandAction implements Action {
+public class SMSCommandAction
+    implements Action
+{
 
     private SMSCommandService smsCommandService;
+
     private DataSetService dataSetService;
 
     private int selectedCommandID = -1;
@@ -27,71 +30,92 @@
     // Action implementation
     // -------------------------------------------------------------------------
 
-    public String execute() throws Exception {
-        if (getSMSCommand() != null && getSMSCommand().getCodes() != null) {
-            for (SMSCode x : getSMSCommand().getCodes()) {
-                codes.put("" + x.getDataElement().getId() + x.getOptionId(), x.getCode());
+    public String execute()
+        throws Exception
+    {
+        if ( getSMSCommand() != null && getSMSCommand().getCodes() != null )
+        {
+            for ( SMSCode x : getSMSCommand().getCodes() )
+            {
+                codes.put( "" + x.getDataElement().getId() + x.getOptionId(), x.getCode() );
             }
         }
         return SUCCESS;
     }
 
-    public Set<DataElement> getDataSetElements() {
-        if (getSMSCommand() != null) {
+    public Set<DataElement> getDataSetElements()
+    {
+        if ( getSMSCommand() != null )
+        {
             DataSet d = getSMSCommand().getDataset();
-            if (d != null) {
+            if ( d != null )
+            {
                 return d.getDataElements();
             }
         }
         return null;
     }
 
-    public Collection<DataSet> getDataSets() {
+    public Collection<DataSet> getDataSets()
+    {
         return getDataSetService().getAllDataSets();
     }
 
-    public Collection<SMSCommand> getSMSCommands() {
-        System.out.println("get:" + smsCommandService.getSMSCommands());
+    public Collection<SMSCommand> getSMSCommands()
+    {
+        System.out.println( "get:" + smsCommandService.getSMSCommands() );
         return smsCommandService.getSMSCommands();
     }
 
-    public SMSCommand getSMSCommand() {
-        if (selectedCommandID > -1) {
-            return smsCommandService.getSMSCommand(selectedCommandID);
-        } else {
+    public SMSCommand getSMSCommand()
+    {
+        if ( selectedCommandID > -1 )
+        {
+            return smsCommandService.getSMSCommand( selectedCommandID );
+        }
+        else
+        {
             return null;
         }
     }
 
-    public SMSCommandService getSmsCommandService() {
+    public SMSCommandService getSmsCommandService()
+    {
         return smsCommandService;
     }
 
-    public void setSmsCommandService(SMSCommandService smsCommandService) {
+    public void setSmsCommandService( SMSCommandService smsCommandService )
+    {
         this.smsCommandService = smsCommandService;
     }
 
-    public int getSelectedCommandID() {
+    public int getSelectedCommandID()
+    {
         return selectedCommandID;
     }
 
-    public void setSelectedCommandID(int selectedCommandID) {
+    public void setSelectedCommandID( int selectedCommandID )
+    {
         this.selectedCommandID = selectedCommandID;
     }
 
-    public DataSetService getDataSetService() {
+    public DataSetService getDataSetService()
+    {
         return dataSetService;
     }
 
-    public void setDataSetService(DataSetService dataSetService) {
+    public void setDataSetService( DataSetService dataSetService )
+    {
         this.dataSetService = dataSetService;
     }
 
-    public Map<String, String> getCodes() {
+    public Map<String, String> getCodes()
+    {
         return codes;
     }
 
-    public void setCodes(Map<String, String> codes) {
+    public void setCodes( Map<String, String> codes )
+    {
         this.codes = codes;
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2012-06-06 07:48:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2012-06-27 07:25:34 +0000
@@ -122,4 +122,8 @@
 hierachy_orgunit=Hierarchy organisation unit
 total_result=Total number of results
 search_result_matching_the_search_criteria=Result matches the search criteria
-search_patients_by_attributes=Search persons by attributes
\ No newline at end of file
+search_patients_by_attributes=Search persons by attributes
+sms_command_form=SMS Commands
+add_command=Add command
+command_details=Command Details
+

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2012-06-13 08:44:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2012-06-27 07:25:34 +0000
@@ -1,11 +1,11 @@
-<h2>DHIS Mobile Configuration</h2>
-<ul>
-	<!--<li><a href = "mobileSettings.action">Settings</a></li>-->
-	<li><a href="patientMobileSetting.action">$i18n.getString( "patient_mobile_setting" )</a></li>
-	<li><a href="showMobileDataSet.action">$i18n.getString( "mobile_dataset" )&nbsp;</a></li>
-	<li><a href="showSMSConfigureForm.action">$i18n.getString( "sms_service_configuration" )</a></li>
-    <li><a href="showSMSForm.action">$i18n.getString( "show_send_sms_form" )</a></li>
-	<li><a href="showReceivingPage.action">$i18n.getString( "show_receive_sms_form" )</a></li>
-	<li><a href="SMSCommands.action">$i18n.getString( "sms_command_from" )</a></li>
-	
+<h2>DHIS Mobile Configuration</h2>
+<ul>
+	<!--<li><a href = "mobileSettings.action">Settings</a></li>-->
+	<li><a href="patientMobileSetting.action">$i18n.getString( "patient_mobile_setting" )</a></li>
+	<li><a href="showMobileDataSet.action">$i18n.getString( "mobile_dataset" )&nbsp;</a></li>
+	<li><a href="showSMSConfigureForm.action">$i18n.getString( "sms_service_configuration" )</a></li>
+    <li><a href="showSMSForm.action">$i18n.getString( "show_send_sms_form" )</a></li>
+	<li><a href="showReceivingPage.action">$i18n.getString( "show_receive_sms_form" )</a></li>
+	<li><a href="SMSCommands.action">$i18n.getString( "sms_command_form" )</a></li>
+	
 </ul>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm	2012-06-18 08:51:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm	2012-06-27 07:25:34 +0000
@@ -18,7 +18,7 @@
 
 <div>
     </div>
-
+<h3>Edit command</h3>
 <form id="updateSMSCommand" name="updateSMSCommand" action="saveEditSMSCommandForm.action" method="post">
 
  <!-- 
@@ -28,7 +28,12 @@
     
 	
 	
-	<table width="100%" border="0">
+	<table>
+	<thead>
+      <tr>
+        <th colspan="2">$i18n.getString( "command_details" )</th>
+      </tr>
+    </thead>
 		<tr>
 			<td>
 				<input type="hidden" value="$selectedCommandID" name="selectedCommandID" />
@@ -36,29 +41,29 @@
 		</tr>
 		<tr>
 			<td>Name:</td>
-			<td><input type="text" name="name" value="$SMSCommand.name" /></td>
+			<td><input type="text" name="name" value="$SMSCommand.name" style="width:20em" /></td>
 		</tr>
 		<tr>
 			<td>DataSet:</td>
 			<td>
 	
 				<!-- onchange="window.location.href='editSMSCommand.action?selectedDataSetID=' + this.options[this.selectedIndex].value" -->
-				<select name="selectedDataSetID" >
+				<select name="selectedDataSetID" style="min-width:20em; margin:0;" >
 				#foreach( $dataSet in $dataSets )
 				<option value="$dataSet.id" #if ($SMSCommand.dataset.id == $dataSet.id) selected #end >$dataSet.name</option>
 				#end
 				</select> 
 			</td>
-		</tr>
+		</tr> 
 		<tr>
 			<td>Separator:</td>
 			<td>
-				<input type="text"  #if($SMSCommand.seperator) value="$SMSCommand.seperator" #end name="seperator" />
+				<input type="text"  #if($SMSCommand.seperator) value="$SMSCommand.seperator" #end name="seperator" style="width:20em" />
 			</td>
 		</tr>
 		<tr>
 			<td>Code seperator:</td>
-			<td><input type="text" #if($SMSCommand.codeSeperator) value="$SMSCommand.codeSeperator" #end name="codeSeperator" /></td>
+			<td><input type="text" #if($SMSCommand.codeSeperator) value="$SMSCommand.codeSeperator" #end name="codeSeperator" style="width:20em" /></td>
 		</tr>
 	
 	</table>
@@ -67,12 +72,17 @@
 	</br>
 	
 	
-    <table id="codes">
+    <table id="codes">   
+		<col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+    <thead>
+      <tr>
+        <th>Data Element Category Combination</th>
+		<th>Code</th>
+      </tr>
+    </thead>
 		
-        <tr>
-            <td style="color:#009">Data Element Category Combination</td>
-            <td style="color:#009">Code</td>
-        </tr>     
          #foreach( $dataElement in $dataSetElements)
             #if ($dataElement.categoryCombo && $dataElement.categoryCombo.categories) 
                 #foreach($category in $dataElement.categoryCombo.categories)

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm	2012-06-18 08:51:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm	2012-06-27 07:25:34 +0000
@@ -1,12 +1,21 @@
+
+<h3>Add command</h3>
 <form id="newSMSCommand" name="updateSMSCommand" action="createSMSCommandForm.action" method="post">
    
-	<table width="75%" align="center">
+	<table>
+	 <col/> ## Labels
+    <col/> ## Input
+    <thead>
+      <tr>
+        <th colspan="2">$i18n.getString( "command_details" )</th>
+      </tr>
+    </thead>
 		<tr>
 			<td>
 				Name:
 			</td>
 			<td>
-				<input type="text" value="" id="name" name="name" />
+				<input type="text" value="" id="name" name="name" style="width:20em"/>
 			</td>
 		</tr>
 		<tr>
@@ -14,7 +23,7 @@
 			Parser:
 			</td>
 			<td>
-				<select name="parser">
+				<select name="parser" style="min-width:20em; margin:0;">
 					<option value="syntax1">Syntax1</option>
 					<option value="syntax2">Syntax2</option>
 				</select> 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm	2012-06-18 08:51:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm	2012-06-27 07:25:34 +0000
@@ -1,21 +1,50 @@
-<a href="newSMSCommand.action">New command</a>
-
-<br>
-
-
-<table width="75%" border="1" rules="all">
-  
+<script type="text/javascript">
+	jQuery(document).ready(function(){	
+		
+		leftBar.showAnimated();
+	});
+
+</script>
+<h3>Command management</h3>
+<table class="mainPageTable">
+<tr>
+	<td style="vertical-align:top">
+	<table width="100%">
+		<tr>
+				
+				<td >
+					<input type="button" value="New command" onclick="window.location.href='newSMSCommand.action'" style="width:100px"/></a>	
+				</td>
+		</tr>
+	</table>
+	
+	<table class="listTable" id="listTable">
+		
+          <thead>
+		  
+          <tr>
+            <th>Name</th>
+            <th>Edit</th>
+			<th>Delete</th>
+          </tr>
+          </thead>
+		  <tbody id="list">
 	 #foreach( $command in $SMSCommands )
       <tr>
-		<td>$velocityCount</td>
-	  
-		<td>$command.name </td>
+		<td height="35">$command.name </td>
 		<td><a href="editSMSCommand.action?selectedCommandID=$command.id">Edit</a></td>
 		<td><a href="deleteSMSCommand.action?deleteCommandId=$command.id">Delete</a></td>
 	  </tr><br/>
     #end
 	
-	
+	 </tbody>
     
-  </tr>
-</table>
\ No newline at end of file
+ 
+</table>
+</td>
+</tr>
+</table>
+
+
+
+<p></p>