dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11051
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3083: js cleanup in module dhis-web-validationrule
------------------------------------------------------------
revno: 3083
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-18 15:58:26 +0100
message:
js cleanup in module dhis-web-validationrule
modified:
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleGroupForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRule.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.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-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleForm.vm 2011-01-25 19:26:03 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleForm.vm 2011-03-18 14:58:26 +0000
@@ -1,23 +1,19 @@
-<script>
-
-//-----------------------------------------------------------------------
-//init jQuery validation for addValidationRuleForm
-//-----------------------------------------------------------------------
- jQuery(document).ready(
- function()
- {
- jQuery("#name").focus();
-
- // validation form
- validation( 'addValidationRuleForm', function( form ){
- form.submit();
- });
-
- checkValueIsExist( "name", "validateValidationRule.action");
- }
- );
-
+<script type="text/javascript">
+ //-----------------------------------------------------------------------
+ //init jQuery validation for addValidationRuleForm
+ //-----------------------------------------------------------------------
+ jQuery(document).ready(function() {
+ jQuery("#name").focus();
+
+ // validation form
+ validation( 'addValidationRuleForm', function( form ){
+ form.submit();
+ });
+
+ checkValueIsExist( "name", "validateValidationRule.action");
+ });
</script>
+
<h3>$encoder.htmlEncode( $i18n.getString( "create_new_validation_rule" ) )</h3>
<form id="addValidationRuleForm" action="addValidationRule.action" method="post" onsubmit="enable('periodTypeName');">
@@ -82,5 +78,3 @@
</form>
#parse( "/dhis-web-validationrule/expressionBuilderForm.vm" )
-
-
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleGroupForm.vm 2010-09-22 07:54:20 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/addValidationRuleGroupForm.vm 2011-03-18 14:58:26 +0000
@@ -1,21 +1,30 @@
-<script>
-//-----------------------------------------------------------------------
-//init jQuery validation for addValidationRuleGroupForm
-//-----------------------------------------------------------------------
- jQuery(document).ready(
- function()
- {
- jQuery("#name").focus();
-
- validation( 'addValidationRuleGroupForm',
- function( form ){ form.submit() },
- function(){ selectAllById('groupMembers') });
-
- checkValueIsExist( "name", "validateValidationRuleGroup.action");
- }
- );
-
+<script type="text/javascript">
+ //-----------------------------------------------------------------------
+ //init jQuery validation for addValidationRuleGroupForm
+ //-----------------------------------------------------------------------
+ jQuery(document).ready(function() {
+ jQuery("#name").focus();
+
+ validation( 'addValidationRuleGroupForm', function( form ){ form.submit() },
+ function(){ selectAllById('groupMembers')
+ });
+
+ checkValueIsExist( "name", "validateValidationRuleGroup.action");
+
+ initLists();
+ });
+
+ var groupMembers = new Object();
+ #foreach( $validationRule in $groupMembers )
+ groupMembers['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
+ #end
+
+ var availableValidationRules = new Object();
+ #foreach( $validationRule in $availableValidationRules )
+ availableValidationRules['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
+ #end
</script>
+
<h3>$i18n.getString( "create_new_validation_rule_group" )</h3>
<form id="addValidationRuleGroupForm" action="addValidationRuleGroup.action" method="post" >
@@ -64,19 +73,3 @@
<p><input type="submit" value="$i18n.getString( "add" )" style="width:10em"><input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='showValidationRuleGroupForm.action'" style="width:10em"></p>
</form>
-
-<script type="text/javascript">
-
- var groupMembers = new Object();
- #foreach( $validationRule in $groupMembers )
- groupMembers['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
- #end
-
- var availableValidationRules = new Object();
- #foreach( $validationRule in $availableValidationRules )
- availableValidationRules['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
- #end
-
- initLists();
-
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2011-03-01 04:17:29 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,13 @@
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ datePickerInRange( 'fromDate' , 'toDate' );
+ });
+
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+ var i18n_specify_dataset = '$encoder.jsEscape( $i18n.getString( "specify_dataset" ) , "'")';
+ var i18n_specify_a_start_date = '$encoder.jsEscape( $i18n.getString( "specify_a_start_date" ) , "'")';
+ var i18n_specify_an_ending_date = '$encoder.jsEscape( $i18n.getString( "specify_an_ending_date" ) , "'")';
+</script>
<h3>$i18n.getString( "${key}_analysis" ) #openHelp( "${key}Analysis" )</h3>
@@ -113,18 +123,6 @@
</table>
<span id="message"></span>
-
-<script type="text/javascript">
- var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
- var i18n_specify_dataset = '$encoder.jsEscape( $i18n.getString( "specify_dataset" ) , "'")';
- var i18n_specify_a_start_date = '$encoder.jsEscape( $i18n.getString( "specify_a_start_date" ) , "'")';
- var i18n_specify_an_ending_date = '$encoder.jsEscape( $i18n.getString( "specify_an_ending_date" ) , "'")';
-
- jQuery(document).ready(function(){
- datePickerInRange( 'fromDate' , 'toDate' );
- });
-</script>
-
</div>
<div id="analysisResult"></div>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2011-01-22 22:35:40 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2011-03-18 14:58:26 +0000
@@ -1,71 +1,8 @@
-<div id="expression-container">
-<form id="expression-form" name="expression-form">
-<table width="800" style="text-align:left">
- <colgroup>
- <col width="250"/>
- <col width="50"/>
- <col width="500"/>
- </colgroup>
- <tr>
- <th colspan="3">$i18n.getString( "description" )</th>
- </tr>
- <tr>
- <td colspan="3">
- <input type="text" id="description" name="description" style="width:250px" class="{validate:{required:true}}"/>
- </td>
- </tr>
- <tr>
- <td colspan="3"></td>
- </tr>
- <tr>
- <th colspan="2">$i18n.getString( "expression" )</th>
- <th>$i18n.getString( "available_data_elements" )</th>
- </tr>
- <tr>
- <td valign="top">
- <textarea id="expression" name="expression" style="width:250px; height:150px" wrap="virtual" onchange="getExpressionText()" class="{validate:{required:true}}"></textarea><br/>
- <a href="javascript:insertText( 'expression', '(', 'aggregationOperator' )"><img src="../images/left_parent.png" alt="$i18n.getString( 'left_brackets' )"/></a>
- <a href="javascript:insertText( 'expression', ')', 'aggregationOperator' )"><img src="../images/right_parent.png" alt="$i18n.getString( 'right_brackets' )"/></a>
- <a href="javascript:insertText( 'expression', '*', 'aggregationOperator' )"><img src="../images/multiply.png" alt="$i18n.getString( 'multiply' )"/></a>
- <a href="javascript:insertText( 'expression', '/', 'aggregationOperator' )"><img src="../images/divide.png" alt="$i18n.getString( 'divide' )"/></a>
- <a href="javascript:insertText( 'expression', '+', 'aggregationOperator' )"><img src="../images/plus.png" alt="$i18n.getString( 'plus' )"/></a>
- <a href="javascript:insertText( 'expression', '-', 'aggregationOperator' )"><img src="../images/minus.png" alt="$i18n.getString( 'minus' )"/></a>
- </td>
- <td></td>
- <td valign="top">
- <label>$encoder.htmlEncode( $i18n.getString( "filter_by_name" ) )</label><br/>
- <input type="text" id="filter" name="filter" style="width:380px">
- <input type="button" value="$i18n.getString( 'filter' )" onclick="getOperandsPage()" style="width:60px"><br/>
-
- <select id="dataElementId" name="dataElementId" size="7" style="min-width:450px" ondblclick="insertText( 'expression', this.value )">
- </select>
- </td>
- </tr>
- <tr>
- <th colspan="3">$i18n.getString( "description" )</th>
- </tr>
- <tr>
- <td colspan="3"><div id="formulaText" style="width:740px;height:70px;overflow:auto"></div></td>
- </tr>
- <tr>
- <td colspan="3"></td>
- </tr>
- <tr>
- <td colspan="3">
- <input type="submit" value="$i18n.getString( 'save' )" style="width:125px"/>
- <input type="button" value="$i18n.getString( 'cancel' )" style="width:125px" onclick="dialog.dialog('close')"/>
- </td>
- </tr>
-</table>
-</form>
-</div>
-
-<script>
+<script type="text/javascript">
var left = true;
var dialog = null;
- jQuery(function(){
-
+ jQuery(document).ready(function() {
dialog = jQuery( "#expression-container" ).dialog({
modal: true,
autoOpen:false,
@@ -177,5 +114,66 @@
var i18n_description_not_null = '$encoder.jsEscape( $i18n.getString( "description_not_null" ) , "'")';
var i18n_expression_not_null = '$encoder.jsEscape( $i18n.getString( "expression_not_null" ) , "'")';
-
</script>
+
+<div id="expression-container">
+<form id="expression-form" name="expression-form">
+<table width="800" style="text-align:left">
+ <colgroup>
+ <col width="250"/>
+ <col width="50"/>
+ <col width="500"/>
+ </colgroup>
+ <tr>
+ <th colspan="3">$i18n.getString( "description" )</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <input type="text" id="description" name="description" style="width:250px" class="{validate:{required:true}}"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3"></td>
+ </tr>
+ <tr>
+ <th colspan="2">$i18n.getString( "expression" )</th>
+ <th>$i18n.getString( "available_data_elements" )</th>
+ </tr>
+ <tr>
+ <td valign="top">
+ <textarea id="expression" name="expression" style="width:250px; height:150px" wrap="virtual" onchange="getExpressionText()" class="{validate:{required:true}}"></textarea><br/>
+ <a href="javascript:insertText( 'expression', '(', 'aggregationOperator' )"><img src="../images/left_parent.png" alt="$i18n.getString( 'left_brackets' )"/></a>
+ <a href="javascript:insertText( 'expression', ')', 'aggregationOperator' )"><img src="../images/right_parent.png" alt="$i18n.getString( 'right_brackets' )"/></a>
+ <a href="javascript:insertText( 'expression', '*', 'aggregationOperator' )"><img src="../images/multiply.png" alt="$i18n.getString( 'multiply' )"/></a>
+ <a href="javascript:insertText( 'expression', '/', 'aggregationOperator' )"><img src="../images/divide.png" alt="$i18n.getString( 'divide' )"/></a>
+ <a href="javascript:insertText( 'expression', '+', 'aggregationOperator' )"><img src="../images/plus.png" alt="$i18n.getString( 'plus' )"/></a>
+ <a href="javascript:insertText( 'expression', '-', 'aggregationOperator' )"><img src="../images/minus.png" alt="$i18n.getString( 'minus' )"/></a>
+ </td>
+ <td></td>
+ <td valign="top">
+ <label>$encoder.htmlEncode( $i18n.getString( "filter_by_name" ) )</label><br/>
+ <input type="text" id="filter" name="filter" style="width:380px">
+ <input type="button" value="$i18n.getString( 'filter' )" onclick="getOperandsPage()" style="width:60px"><br/>
+
+ <select id="dataElementId" name="dataElementId" size="7" style="min-width:450px" ondblclick="insertText( 'expression', this.value )">
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="3">$i18n.getString( "description" )</th>
+ </tr>
+ <tr>
+ <td colspan="3"><div id="formulaText" style="width:740px;height:70px;overflow:auto"></div></td>
+ </tr>
+ <tr>
+ <td colspan="3"></td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <input type="submit" value="$i18n.getString( 'save' )" style="width:125px"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" style="width:125px" onclick="dialog.dialog('close')"/>
+ </td>
+ </tr>
+</table>
+</form>
+</div>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm 2010-07-04 23:55:46 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm 2011-03-18 14:58:26 +0000
@@ -1,10 +1,10 @@
+<script type="text/javascript">
+ jQuery(document).ready(function() {
+ getFollowUpAnalysis();
+ });
+
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+</script>
<span id="message"></span>
-
<div id="analysisResult"></div>
-
-<script type="text/javascript">
- var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
-
- getFollowUpAnalysis();
-</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2010-09-06 10:24:08 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,17 @@
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ datePickerInRange( 'startDate' , 'endDate' );
+
+ selectionTree.clearSelectedOrganisationUnits();
+ selectionTree.buildSelectionTree();
+ selectionTreeSelection.setMultipleSelectionAllowed( false );
+ selectionTreeSelection.setListenerFunction( organisationUnitSelected );
+ });
+
+ var i18n_aggregate_data_info = '$encoder.jsEscape( $i18n.getString( "aggregate_data_info" ) , "'")';
+ var i18n_captured_data_info = '$encoder.jsEscape( $i18n.getString( "captured_data_info" ) , "'")';
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+</script>
<h3>$encoder.htmlEncode( $i18n.getString( "run_validation" ) ) #openHelp( "validationRuleAnalysis" )</h3>
@@ -73,21 +87,6 @@
<span id="message"></span>
-<script type="text/javascript">
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
- selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTreeSelection.setListenerFunction( organisationUnitSelected );
-
- jQuery(document).ready(function(){
- datePickerInRange( 'startDate' , 'endDate' );
- });
-
- var i18n_aggregate_data_info = '$encoder.jsEscape( $i18n.getString( "aggregate_data_info" ) , "'")';
- var i18n_captured_data_info = '$encoder.jsEscape( $i18n.getString( "captured_data_info" ) , "'")';
- var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
-</script>
-
</div>
<div id="analysisResult"></div>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2011-02-10 23:09:13 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,15 @@
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ tableSorter( 'listTable' );
+ pageInit();
+ });
+
+ var i18n_value_must_be_a_number = '$encoder.jsEscape( $i18n.getString( "value_must_be_a_number" ) , "'")';
+ var i18n_value_is_lower_than_min_value = '$encoder.jsEscape( $i18n.getString( "value_is_lower_than_min_value" ) , "'")';
+ var i18n_value_is_higher_than_max_value = '$encoder.jsEscape( $i18n.getString( "value_is_higher_than_max_value" ) , "'")';
+ var i18n_mark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "mark_value_for_followup" ) , "'")';
+ var i18n_unmark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "unmark_value_for_followup" ) , "'")';
+</script>
#if ( $dataValues.size() == 0 )
@@ -60,19 +72,4 @@
#end
</tbody>
</table>
-
#end
-
-<script type="text/javascript">
- var i18n_value_must_be_a_number = '$encoder.jsEscape( $i18n.getString( "value_must_be_a_number" ) , "'")';
- var i18n_value_is_lower_than_min_value = '$encoder.jsEscape( $i18n.getString( "value_is_lower_than_min_value" ) , "'")';
- var i18n_value_is_higher_than_max_value = '$encoder.jsEscape( $i18n.getString( "value_is_higher_than_max_value" ) , "'")';
- var i18n_mark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "mark_value_for_followup" ) , "'")';
- var i18n_unmark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "unmark_value_for_followup" ) , "'")';
-
-
- jQuery(document).ready(function(){
- tableSorter( 'listTable' );
- pageInit();
- });
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm 2011-01-25 19:26:03 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm 2011-03-18 14:58:26 +0000
@@ -1,26 +1,24 @@
-<script>
-
-//-----------------------------------------------------------------------
-//init jQuery validation for updateValidationRuleForm
-//-----------------------------------------------------------------------
- jQuery(document).ready(
- function()
- {
- jQuery("#name").focus();
-
- // validation form
- validation( 'updateValidationRuleForm', function( form ){
- form.submit();
- });
- /* validation( 'updateValidationRuleForm', function( form ){
- form.submit();
- },function(){
- validateExpression();
- }); */
- checkValueIsExist( "name", "validateValidationRule.action", {id:getFieldValue('id')});
- }
- );
-
+<script type="text/javascript">
+ //-----------------------------------------------------------------------
+ //init jQuery validation for updateValidationRuleForm
+ //-----------------------------------------------------------------------
+ jQuery(document).ready(function() {
+ jQuery("#name").focus();
+
+ // validation form
+ validation( 'updateValidationRuleForm', function( form ){
+ form.submit();
+ });
+ /* validation( 'updateValidationRuleForm', function( form ){
+ form.submit();
+ },function(){
+ validateExpression();
+ }); */
+ checkValueIsExist( "name", "validateValidationRule.action", {id:getFieldValue('id')});
+ });
+
+ var i18n_description_not_null = '$encoder.jsEscape( $i18n.getString( "description_not_null" ) , "'")';
+ var i18n_expression_not_null = '$encoder.jsEscape( $i18n.getString( "expression_not_null" ) , "'")';
</script>
<h3>$encoder.htmlEncode( $i18n.getString( "edit_validation_rule" ) )</h3>
@@ -87,8 +85,3 @@
</form>
#parse( "/dhis-web-validationrule/expressionBuilderForm.vm" )
-
-<script>
- var i18n_description_not_null = '$encoder.jsEscape( $i18n.getString( "description_not_null" ) , "'")';
- var i18n_expression_not_null = '$encoder.jsEscape( $i18n.getString( "expression_not_null" ) , "'")';
-</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm 2010-10-08 11:07:39 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm 2011-03-18 14:58:26 +0000
@@ -1,21 +1,30 @@
-<script>
-//-----------------------------------------------------------------------
-//init jQuery validation for updateValidationRuleGroupForm
-//-----------------------------------------------------------------------
- jQuery(document).ready(
- function()
- {
- jQuery("#name").focus();
-
- validation( 'updateValidationRuleGroupForm',
- function( form ){ form.submit() },
- function(){ selectAllById('groupMembers') });
-
- checkValueIsExist( "name", "validateValidationRuleGroup.action", {id:getFieldValue('id')});
- }
- );
-
+<script type="text/javascript">
+ //-----------------------------------------------------------------------
+ //init jQuery validation for updateValidationRuleGroupForm
+ //-----------------------------------------------------------------------
+ jQuery(document).ready(function() {
+ jQuery("#name").focus();
+
+ validation( 'updateValidationRuleGroupForm',
+ function( form ){ form.submit() },
+ function(){ selectAllById('groupMembers') });
+
+ checkValueIsExist( "name", "validateValidationRuleGroup.action", {id:getFieldValue('id')});
+
+ initLists();
+ });
+
+ var groupMembers = new Object();
+ #foreach( $validationRule in $groupMembers )
+ groupMembers['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
+ #end
+
+ var availableValidationRules = new Object();
+ #foreach( $validationRule in $availableValidationRules )
+ availableValidationRules['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
+ #end
</script>
+
<h3>$i18n.getString( "edit_validation_rule_group" )</h3>
<form id="updateValidationRuleGroupForm" action="updateValidationRuleGroup.action" method="post" >
@@ -71,19 +80,3 @@
</form>
<span id="message"></span>
-
-<script type="text/javascript">
-
- var groupMembers = new Object();
- #foreach( $validationRule in $groupMembers )
- groupMembers['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
- #end
-
- var availableValidationRules = new Object();
- #foreach( $validationRule in $availableValidationRules )
- availableValidationRules['$validationRule.id'] = '$encoder.jsEscape( $validationRule.name, "'" )';
- #end
-
- initLists();
-
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRule.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRule.vm 2011-01-25 13:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRule.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,18 @@
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ tableSorter( 'listTable' );
+ });
+
+ var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_validation_rule" ) , "'")';
+ var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
+ var i18n_equal_to = '$encoder.jsEscape( $i18n.getString( "equal_to" ) , "'")';
+ var i18n_not_equal_to = '$encoder.jsEscape( $i18n.getString( "not_equal_to" ) , "'")';
+ var i18n_greater_than = '$encoder.jsEscape( $i18n.getString( "greater_than" ) , "'")';
+ var i18n_greater_than_or_equal_to = '$encoder.jsEscape( $i18n.getString( "greater_than_or_equal_to" ) , "'")';
+ var i18n_less_than = '$encoder.jsEscape( $i18n.getString( "less_than" ) , "'")';
+ var i18n_less_than_or_equal_to = '$encoder.jsEscape( $i18n.getString( "less_than_or_equal_to" ) , "'")';
+</script>
+
<h3>$encoder.htmlEncode( $i18n.getString( "validation_rule_management" ) ) #openHelp( "validationRule" )</h3>
<table class="mainPageTable">
@@ -66,18 +81,3 @@
</td>
</tr>
</table>
-
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_validation_rule" ) , "'")';
- var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
- var i18n_equal_to = '$encoder.jsEscape( $i18n.getString( "equal_to" ) , "'")';
- var i18n_not_equal_to = '$encoder.jsEscape( $i18n.getString( "not_equal_to" ) , "'")';
- var i18n_greater_than = '$encoder.jsEscape( $i18n.getString( "greater_than" ) , "'")';
- var i18n_greater_than_or_equal_to = '$encoder.jsEscape( $i18n.getString( "greater_than_or_equal_to" ) , "'")';
- var i18n_less_than = '$encoder.jsEscape( $i18n.getString( "less_than" ) , "'")';
- var i18n_less_than_or_equal_to = '$encoder.jsEscape( $i18n.getString( "less_than_or_equal_to" ) , "'")';
-
- jQuery(document).ready(function(){
- tableSorter( 'listTable' );
- });
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm 2011-01-25 13:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,10 @@
+<script type="text/javascript">
+ jQuery(document).ready(function(){
+ tableSorter( 'listTable' );
+ });
+
+ var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_validation_rule_group" ) , "'")';
+</script>
<h3>$encoder.htmlEncode( $i18n.getString( "validation_rule_group_management" ) ) #openHelp( "validationRuleGroup" )</h3>
@@ -60,10 +67,3 @@
</td>
</tr>
</table>
-
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_validation_rule_group" ) , "'")';
- jQuery(document).ready(function(){
- tableSorter( 'listTable' );
- });
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm 2011-02-10 23:09:13 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/viewValidationResultForm.vm 2011-03-18 14:58:26 +0000
@@ -1,3 +1,6 @@
+<script type="text/javascript">
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+</script>
<h3>$encoder.htmlEncode( $i18n.getString( "validation_violations" ) )</h3>
@@ -116,7 +119,3 @@
</div>
#end
-
-<script type="text/javascript">
- var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
-</script>