← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3935: Few changes done in BULK SMS

 

------------------------------------------------------------
revno: 3935
committer: mithilesh <mithilesh-hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-06-17 17:14:03 +0530
message:
  Few changes done in BULK SMS
added:
  local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPageThirdParty.vm
modified:
  local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/SendBulkSMSAction.java
  local/in/dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml
  local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPage.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 'local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/SendBulkSMSAction.java'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/SendBulkSMSAction.java	2011-06-17 10:06:08 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/SendBulkSMSAction.java	2011-06-17 11:44:03 +0000
@@ -142,7 +142,7 @@
                         if ( availableOrganisationUnitGroups.get( j ).getId() == parseInt )
                         {
 
-                            //System.out.println( "  -" + availableOrganisationUnitGroups.get( j ).getMembers().size() );
+                            System.out.println( "  -" + availableOrganisationUnitGroups.get( j ).getMembers().size() );
                             Iterator itr = availableOrganisationUnitGroups.get( j ).getMembers().iterator();
                             while ( itr.hasNext() )
                             {
@@ -151,7 +151,7 @@
                                 {
                                     phonenos.add( temp.getPhoneNumber() );
                                 }
-                                //  System.out.println( "       phone=" + temp.getPhoneNumber() );
+                                 System.out.println( "       phone=" + temp.getPhoneNumber() );
                             }
 
                         }

=== modified file 'local/in/dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2011-06-17 10:06:08 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2011-06-17 11:44:03 +0000
@@ -6,17 +6,17 @@
     <!-- use the DHIS web portal default -->
     <include file="dhis-web-commons.xml"/>
     <package name="dhis-web-mobile" extends="dhis-web-commons"
-        namespace="/dhis-web-mobile">
-        
-        <!-- Pages -->
+		namespace="/dhis-web-mobile">
+		
+		<!-- Pages -->
         <action name="index"
-            class="org.hisp.dhis.mobile.action.MobileHomePageAction">
+			class="org.hisp.dhis.mobile.action.MobileHomePageAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/welcome.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
         </action>
         <action name="receiveImport"
-            class="org.hisp.dhis.mobile.action.ReceiveImportPageAction">
+			class="org.hisp.dhis.mobile.action.ReceiveImportPageAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/receiveImportPage.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
@@ -38,7 +38,7 @@
         
         <action name="sendBulkSMSThirdParty" class="org.hisp.dhis.mobile.action.SendBulkSMSThirdPartyAction">
             <result name="success" type="velocity">/main.vm</result>
-            <param name="page">/dhis-web-mobile/sendBulkSMSPage.vm</param>
+            <param name="page">/dhis-web-mobile/sendBulkSMSPageThirdParty.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
             <param name="requiredAuthorities">F_MOBILE_SENDSMS</param>
         </action>
@@ -51,61 +51,61 @@
             <param name="requiredAuthorities">F_MOBILE_SENDSMS</param>
         </action>
         <action name="mobileSettings"
-            class="org.hisp.dhis.mobile.action.MobileSettingsAction">
+			class="org.hisp.dhis.mobile.action.MobileSettingsAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/mobileSettingsPage.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
             <param name="requiredAuthorities">F_MOBILE_SETTINGS</param>
         </action>
-        
+		
         <action name="receiveAllMessages"
-            class="org.hisp.dhis.mobile.action.ReceiveMessagesPageAction">
+			class="org.hisp.dhis.mobile.action.ReceiveMessagesPageAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/inbox.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
             <param name="stylesheets">css/receiveImportPage.css</param>
         </action>
-        
+		
         <action name="getAllDraftMessages"
-            class="org.hisp.dhis.mobile.action.DraftPageAction">
+			class="org.hisp.dhis.mobile.action.DraftPageAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/draft.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
             <param name="stylesheets">css/receiveImportPage.css</param>
         </action>
-        
-        
-        <!-- Create Mobile Application -->
+		
+		
+		<!-- Create Mobile Application -->
         <action name="createMobileApp"
-            class="org.hisp.dhis.mobile.app.action.CreateMobileAppAction">
+			class="org.hisp.dhis.mobile.app.action.CreateMobileAppAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/createMobileAppPage.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
         </action>
-        
+		
         <action name="getDataElements"
-            class="org.hisp.dhis.mobile.app.action.GetDataElementsAction">
+			class="org.hisp.dhis.mobile.app.action.GetDataElementsAction">
             <result name="success" type="velocity">
-                /dhis-web-mobile/dataElementsResponse.vm
+				/dhis-web-mobile/dataElementsResponse.vm
             </result>
             <param name="onExceptionReturn">plainTextError</param>
         </action>
-        
+		
         <action name="splashUpload"
-            class="org.hisp.dhis.mobile.app.action.SplashUploadAction">
+			class="org.hisp.dhis.mobile.app.action.SplashUploadAction">
             <result name="success" type="velocity">
-                /dhis-web-mobile/splashUploadResponse.vm
+				/dhis-web-mobile/splashUploadResponse.vm
             </result>
             <param name="onExceptionReturn">plainTextError</param>
             <interceptor-ref name="fileUploadStack">
                 <param name="allowedTypes">image/png</param>
             </interceptor-ref>
         </action>
-        
+		
         <action name="jarGenerator"
-            class="org.hisp.dhis.mobile.app.action.JarGeneratorAction">
+			class="org.hisp.dhis.mobile.app.action.JarGeneratorAction">
             <result name="success" type="chain">createMobileApp</result>
         </action>
-        
+		
     </package>
 </struts>

=== modified file 'local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPage.vm'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPage.vm	2011-06-17 10:06:08 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPage.vm	2011-06-17 11:44:03 +0000
@@ -66,7 +66,7 @@
     ##</form>
     #else
     ##<form method="post">
-        <BUTTON type="submit" name="send" value="Send" onClick="validateSend();">Send</BUTTON>
+        <BUTTON type="submit" name="send" value="Send" disabled onClick="validateSend();">Send</BUTTON>
     
     #end
 </form>

=== added file 'local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPageThirdParty.vm'
--- local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPageThirdParty.vm	1970-01-01 00:00:00 +0000
+++ local/in/dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendBulkSMSPageThirdParty.vm	2011-06-17 11:44:03 +0000
@@ -0,0 +1,62 @@
+<script type="text/javascript" src="javascript/bulkSMS.js"></script>
+
+<script type="text/javascript" language="javascript">
+function Select()
+{
+##alert("Size= "+$availableOrganisationUnitGroups.size());
+
+##alert(document.theForm.availableOrganisationUnitGroups.selectedIndex);
+document.theForm.selectedIdString.value=document.theForm.selectedIdString.value +","+ document.theForm.availableOrganisationUnitGroups.options[document.theForm.availableOrganisationUnitGroups.selectedIndex].value;
+##alert("....>"+document.theForm.selectedIdString.value);
+}
+</script>
+
+
+<style type="text/css">
+    .statusBar{
+        color: white;
+        padding: 5px 5px;
+        margin: -16px 0 20px -20px;
+        font-weight: bold;
+        background-color: #8FABC7;
+    }
+</style>
+
+
+<h1>Send Bulk SMS</h1>
+<div>
+    <form method="post" name="theForm">
+    <textarea ID="selectedIdString" name="selectedIdString" style="display:none;"></textarea>
+    <INPUT TYPE=CHECKBOX NAME="texttype" ID="p" VALUE="p" onClick="checkCheckBox()"/>Predefined Text <BR>
+        <select size="1" id="availableDataElements" disabled=true name="availableDataElements" style="min-width:400px">
+            #foreach ( $group in $availableDataElements )
+                <option value="$unit.id">$unit.name</option>
+            #end
+       </select><BR><BR>
+         Enter Text<BR>
+    <textarea name="message" ID="message" cols="70" rows="5" style="width: 397px; height: 97px;"></textarea><BR><BR>
+    User Groups<BR>
+        <select multiple id="availableOrganisationUnitGroups" name="availableOrganisationUnitGroups" style="min-width:400px" onClick="Select();moveSelectedById( 'availableOrganisationUnitGroups', 'selectedOrganisationUnitGroups' );">
+            #foreach ( $group in $availableOrganisationUnitGroups )
+                <option value="$group.id">$group.name</option>
+            #end
+        </select><BR><BR>
+        Selected Groups</BR>
+        <select multiple id="selectedOrganisationUnitGroups" name="selectedOrganisationUnitGroups" style="min-width:400px">
+            #foreach ( $group in $selectedOrganisationUnitGroups )
+                <option value="$group.id">$group.name</option>
+            #end
+        </select><BR><BR>
+   ## </form>
+    
+        <BUTTON type="submit" name="send" value="Send" onClick="validateSend();">Send</BUTTON>
+
+</form>
+
+
+</div>
+<p>
+<span id="result" style="#if($result.trim().equals("")) none#else background-color:yellow;
+border:3px; padding:.3em;#end">  $result
+
+</span>