← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6080: Removed unused js file

 

------------------------------------------------------------
revno: 6080
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-02-22 16:24:59 +0100
message:
  Removed unused js file
removed:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationForm.js
modified:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml


--
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/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml	2012-02-13 20:04:18 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml	2012-02-22 15:24:59 +0000
@@ -32,7 +32,7 @@
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-validationrule/addValidationRuleForm.vm</param>
       <param name="menu">/dhis-web-validationrule/menu.vm</param>
-      <param name="javascripts">javascript/general.js,javascript/validationForm.js,javascript/expression.js,
+      <param name="javascripts">javascript/general.js,javascript/expression.js,
         javascript/addValidationRuleForm.js</param>
       <param name="requiredAuthorities">F_VALIDATIONRULE_ADD</param>
     </action>
@@ -62,7 +62,7 @@
     <action name="showUpdateValidationRuleForm" class="org.hisp.dhis.validationrule.action.ShowUpdateValidationRuleFormAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-validationrule/updateValidationRuleForm.vm</param>
-      <param name="javascripts">javascript/general.js,javascript/validationForm.js,javascript/expression.js,
+      <param name="javascripts">javascript/general.js,javascript/expression.js,
         javascript/updateValidationRuleForm.js</param>
       <param name="requiredAuthorities">F_VALIDATIONRULE_UPDATE</param>
     </action>

=== removed file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationForm.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationForm.js	2011-06-23 14:44:17 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationForm.js	1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
-// -----------------------------------------------------------------------------
-// Validation
-// -----------------------------------------------------------------------------
-
-function validateAddValidationRule()
-{
-    var params = 'name=' + getFieldValue( 'name' );
-    params += '&operator=' + getFieldValue( 'operator' );
-    params += '&leftSideExpression=' + getFieldValue( 'leftSideExpression' );
-    params += '&leftSideDescription=' + getFieldValue( 'leftSideDescription' );
-    params += '&rightSideExpression=' + getFieldValue( 'rightSideExpression' );
-    params += '&rightSideDescription=' + getFieldValue( 'rightSideDescription' );
-    params += '&periodTypeName=' + getFieldValue( 'periodTypeName' );
-    var request = new Request();
-    request.setResponseTypeXML( 'message' );
-    request.setCallbackSuccess( addValidationCompleted );
-    request.sendAsPost( params );
-    request.send( 'validateValidationRule.action' );
-
-    return false;
-}
-
-function addValidationCompleted( messageElement )
-{
-    var type = messageElement.getAttribute( 'type' );
-    var message = messageElement.firstChild.nodeValue;
-
-    if ( type == 'success' )
-    {
-        byId( 'periodTypeName' ).disabled = false;
-
-        var form = document.getElementById( 'addValidationRuleForm' );
-        form.submit();
-    } else if ( type == 'error' )
-    {
-        window.alert( i18n_adding_validation_rule_failed + ':' + '\n' + message );
-    } else if ( type == 'input' )
-    {
-        setMessage( message );
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Update validation rule
-// -----------------------------------------------------------------------------
-
-function validateUpdateValidationRule()
-{
-    var params = 'name=' + getFieldValue( 'name' );
-    params += 'id=' + getFieldValue( 'id' );
-    params += '&operator=' + getFieldValue( 'operator' );
-    params += '&leftSideExpression=' + getFieldValue( 'leftSideExpression' );
-    params += '&leftSideDescription=' + getFieldValue( 'leftSideDescription' );
-    params += '&rightSideExpression=' + getFieldValue( 'rightSideExpression' );
-    params += '&rightSideDescription=' + getFieldValue( 'rightSideDescription' );
-    params += '&periodTypeName=' + getFieldValue( 'periodTypeName' );
-
-    var request = new Request();
-    request.setResponseTypeXML( 'message' );
-    request.setCallbackSuccess( updateValidationCompleted );
-    request.sendAsPost( params );
-    request.send( 'validateValidationRule.action' );
-
-    return false;
-}
-
-function updateValidationCompleted( messageElement )
-{
-    var type = messageElement.getAttribute( 'type' );
-    var message = messageElement.firstChild.nodeValue;
-
-    if ( type == 'success' )
-    {
-        byId( 'periodTypeName' ).disabled = false;
-
-        var form = document.getElementById( 'updateValidationRuleForm' );
-        form.submit();
-    } else if ( type == 'error' )
-    {
-        window.alert( i18n_saving_validation_rule_failed + ':' + '\n' + message );
-    } else if ( type == 'input' )
-    {
-        setMessage( message );
-    }
-}
-
-// ---------------------------------------------------------------------
-// disabled PeriodType field
-// ---------------------------------------------------------------------
-function disabledPeriodTypeField()
-{
-    if ( getFieldValue( 'leftSideExpression' ) == '' && getFieldValue( 'rightSideExpression' ) == '' )
-    {
-        byId( 'periodTypeName' ).disabled = false;
-    } else
-    {
-        byId( 'periodTypeName' ).disabled = true;
-    }
-}