dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05760
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1818: Applied patch from Hieu. Fixed bug - about pages need back button.
------------------------------------------------------------
revno: 1818
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-05-05 11:17:27 +0200
message:
Applied patch from Hieu. Fixed bug - about pages need back button.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
--
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/about/about.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm 2010-04-01 08:59:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/about.vm 2010-05-05 09:17:27 +0000
@@ -14,4 +14,4 @@
<dt>$i18n.getString( "java_opts" ):</dt><dd>$!javaOpts</dd>
</dl>
<br/>
-<div><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='help.action'" style="width:140px"/></div>
\ No newline at end of file
+<div><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:140px"/></div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm 2010-04-23 08:13:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm 2010-05-05 09:17:27 +0000
@@ -12,4 +12,4 @@
<dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.0.1" target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
</dl>
<br/>
-<div><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='help.action'" style="width:140px"/></div>
\ No newline at end of file
+<div><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:140px"/></div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm 2010-04-01 08:59:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm 2010-05-05 09:17:27 +0000
@@ -35,7 +35,7 @@
<table>
<tr>
<td><input type="button" value="$i18n.getString( 'send' )" onclick="validateForm()" style="width:140px"/></td>
-<td><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='help.action'" style="width:140px"/></td>
+<td><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:140px"/></td>
</tr>
</table>
</p>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js 2010-04-01 08:59:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.js 2010-05-05 09:17:27 +0000
@@ -1,12 +1,6 @@
$( document ).ready( function()
{
- $( "div#helpBack" ).click(
- function()
- {
- window.location.href="/dhis/dhis-web-portal/intro.action";
- });
-
$.get(
'getHelpItems.action',
function( data )
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.vm 2010-04-01 08:59:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/help.vm 2010-05-05 09:17:27 +0000
@@ -5,6 +5,9 @@
<tr>
<td valign="top"><div id="helpMenu"></div></td>
<td valign="top"><div id="helpContent">$i18n.getString( "help_intro" )</div><br/>
-<div id="helpBack" align="right"><input type="button" value="$i18n.getString( 'back' )" style="width:140px"/></div></td>
+ <div id="helpBack" align="right">
+ <input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:140px"/>
+ </div>
+</td>
</tr>
</table>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm 2010-04-06 04:35:39 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm 2010-05-05 09:17:27 +0000
@@ -32,7 +32,7 @@
<form id="updateUserinforForm" action="updateUserAccount.action" method="post" onsubmit='return false;'>
<div>
- <input type="hidden" id="id" name="id" value="$userCredentials.id">
+ <input type="hidden" id="id" name="id" value="$userCredentials.id"/>
</div>
<table>
@@ -41,39 +41,40 @@
</tr>
<tr>
<td><label for="username">$i18n.getString( "user_name" )</label></td>
- <td><input type="text" id="username" name="username" value="$encoder.htmlEncode( $userCredentials.username )" style="width:20em" disabled="disabled" class="{validate:{required:true,firstletteralphabet:true,minlength:2,maxlength:50,alphanumeric:true}}"></td>
+ <td><input type="text" id="username" name="username" value="$encoder.htmlEncode( $userCredentials.username )" style="width:20em" disabled="disabled" class="{validate:{required:true,firstletteralphabet:true,minlength:2,maxlength:50,alphanumeric:true}}"/></td>
</tr>
<tr>
<td><label for="rawPassword">$i18n.getString( "old_password" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="password" id="oldPassword" name="oldPassword" style="width:20em" style="width:20em" class="{validate:{required:true,minlength:5,maxlength:50,notequalto:'#username'}}"></td>
+ <td><input type="password" id="oldPassword" name="oldPassword" style="width:20em" style="width:20em" class="{validate:{required:true,minlength:5,maxlength:50,notequalto:'#username'}}"/></td>
</tr>
<tr>
<td><label for="rawPassword">$i18n.getString( "new_password" )</label></td>
- <td><input type="password" id="rawPassword" name="rawPassword" style="width:20em" style="width:20em" class="{validate:{required:false,minlength:5,maxlength:50,notequalto:'#username'}}" ></td>
+ <td><input type="password" id="rawPassword" name="rawPassword" style="width:20em" style="width:20em" class="{validate:{required:false,minlength:5,maxlength:50,notequalto:'#username'}}"/></td>
</tr>
<tr>
<td><label for="retypePassword">$i18n.getString( "retype_new_password" )</label></td>
- <td><input type="password" id="retypePassword" name="retypePassword" style="width:20em" class="{validate:{required:false,minlength:5,maxlength:50,equalTo:'#rawPassword'}}"></td>
+ <td><input type="password" id="retypePassword" name="retypePassword" style="width:20em" class="{validate:{required:false,minlength:5,maxlength:50,equalTo:'#rawPassword'}}"/></td>
</tr>
<tr>
<td><label for="surname">$i18n.getString( "surname" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="surname" name="surname" value="$encoder.htmlEncode( $userCredentials.user.surname )" style="width:20em"></td>
+ <td><input type="text" id="surname" name="surname" value="$encoder.htmlEncode( $userCredentials.user.surname )" style="width:20em"/></td>
</tr>
<tr>
<td><label for="firstName">$i18n.getString( "first_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="firstName" name="firstName" value="$encoder.htmlEncode( $userCredentials.user.firstName )" style="width:20em"></td>
+ <td><input type="text" id="firstName" name="firstName" value="$encoder.htmlEncode( $userCredentials.user.firstName )" style="width:20em"/></td>
</tr>
<tr>
<td><label for="email">$i18n.getString( "email" )</label></td>
- <td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $userCredentials.user.email )" style="width:20em"></td>
+ <td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $userCredentials.user.email )" style="width:20em"/></td>
</tr>
<tr>
<td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
- <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $userCredentials.user.phoneNumber )" style="width:20em"></td>
+ <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $userCredentials.user.phoneNumber )" style="width:20em"/></td>
</tr>
<tr>
<td></td>
- <td valign="top"><input type="submit" value="$i18n.getString( "save" )" style="width:10em"></td>
+ <td valign="top"><input type="submit" value="$i18n.getString( "save" )" style="width:10em">
+ <input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:120px"/></td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js 2010-03-08 09:25:52 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js 2010-05-05 09:17:27 +0000
@@ -60,6 +60,41 @@
$( '#mainPage').css('margin-left','200px' );
$( 'div#orgUnitTree ul').css('margin-left','10px' );
}
+
+ // Set dynamic back URLs for about page links
+
+ var currentPath = '../dhis-web-commons-about/';
+ var backURL = '?backUrl=' + window.location;
+
+ $( "#menuDropDownHelpCenter" ).click(
+ function()
+ {
+ window.location.href = currentPath + 'help.action' + backURL;
+ });
+
+ $( "#menuDropDownFeedBack" ).click(
+ function()
+ {
+ window.location.href = currentPath + 'displayFeedbackForm.action' + backURL;
+ });
+
+ $( "#menuDropDownChangeLog" ).click(
+ function()
+ {
+ window.location.href = currentPath + 'displayChangeLog.action' + backURL;
+ });
+
+ $( "#menuDropDownUserAccount" ).click(
+ function()
+ {
+ window.location.href = currentPath + 'showUpdateUserAccountForm.action' + backURL;
+ });
+
+ $( "#menuDropDownAboutDHIS2" ).click(
+ function()
+ {
+ window.location.href = currentPath + 'about.action' + backURL;
+ });
} );
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2010-04-14 15:10:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2010-05-05 09:17:27 +0000
@@ -74,7 +74,7 @@
</ul>
</div>
- <div id="menuDropDown3" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
+ <!--div id="menuDropDown3" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
<ul class="menuDropDownBox">
<li class="menuDropDownItem" onclick="window.location.href='../dhis-web-commons-about/help.action'">$i18n.getString( "help_center" ) </li>
<li class="menuDropDownItem" onclick="window.location.href='../dhis-web-commons-about/displayFeedbackForm.action'">$i18n.getString( "feedback" ) </li>
@@ -82,8 +82,18 @@
<li class="menuDropDownItem" onclick="window.location.href='../dhis-web-commons-about/showUpdateUserAccountForm.action'">$i18n.getString( "user_account" ) </li>
<li class="menuDropDownItem" onclick="window.location.href='../dhis-web-commons-about/about.action'">$i18n.getString( "about_dhis2" ) </li>
</ul>
+ </div-->
+
+ <div id="menuDropDown3" class="menuDropDownArea" onmouseover="cancelHideDropDownTimeout()" onmouseout="hideDropDownTimeout()">
+ <ul class="menuDropDownBox">
+ <li class="menuDropDownItem" id="menuDropDownHelpCenter" >$i18n.getString( "help_center" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownFeedBack" >$i18n.getString( "feedback" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownChangeLog" >$i18n.getString( "change_log" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownUserAccount" >$i18n.getString( "user_account" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownAboutDHIS2" >$i18n.getString( "about_dhis2" ) </li>
+ </ul>
</div>
-
+
<span id="headerText">
#if ( $applicationTitle )
$encoder.htmlEncode( $applicationTitle )
@@ -132,6 +142,6 @@
</span>
<div id="rightBarContents"/>
</div>
-
+
</body>
</html>
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java 2010-05-05 09:17:27 +0000
@@ -48,6 +48,8 @@
/**
* @author Hans S. Toemmerholt
* @version $Id: AboutAction.java 3255 2007-04-23 09:58:06Z andegje $
+ * @modifier Dang Duy Hieu
+ * @since 2010-05-04
*/
public class AboutAction
implements Action
@@ -136,6 +138,18 @@
{
return javaOpts;
}
+
+ private String backUrl;
+
+ public String getBackUrl()
+ {
+ return backUrl;
+ }
+
+ public void setBackUrl( String backUrl )
+ {
+ this.backUrl = backUrl;
+ }
// -------------------------------------------------------------------------
// Action implementation
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java 2010-05-05 09:17:27 +0000
@@ -32,14 +32,37 @@
/**
* @author Lars Helge Overland
* @version $Id$
+ * @modifier Dang Duy Hieu
+ * @since 2010-05-04
*/
public class NoAction
implements Action
{
- //TODO remove not required with struts2
+ // TODO remove not required with struts2
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private String backUrl;
+
+ public String getBackUrl()
+ {
+ return backUrl;
+ }
+
+ public void setBackUrl( String backUrl )
+ {
+ this.backUrl = backUrl;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
public String execute()
{
return SUCCESS;
}
+
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java 2010-05-05 09:17:27 +0000
@@ -37,6 +37,8 @@
/**
* @author Chau Thu Tran
* @version $Id$
+ * @modifier Dang Duy Hieu
+ * @since 2010-05-04
*/
public class GetCurrentUserAction
implements Action
@@ -55,6 +57,8 @@
private UserCredentials userCredentials;
+ private String backUrl;
+
// -------------------------------------------------------------------------
// Getters && Setters
// -------------------------------------------------------------------------
@@ -74,6 +78,16 @@
return userCredentials;
}
+ public String getBackUrl()
+ {
+ return backUrl;
+ }
+
+ public void setBackUrl( String backUrl )
+ {
+ this.backUrl = backUrl;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-04-27 07:20:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-05-05 09:17:27 +0000
@@ -264,5 +264,4 @@
help_intro = Welcome to the DHIS 2 Help Center. Please select an item from the menu to the left.
close = Close
please_wait_while_the_system_is_processing = Please wait while the system is processing
-
-
+back = Back