[Carbon-dev] svn commit r31288 - in branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator: . js

supun at wso2.com supun at wso2.com
Mon Feb 23 00:55:44 PST 2009


Author: supun
Date: Mon Feb 23 00:55:30 2009
New Revision: 31288
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31288

Log:
Allowing the user to specify only the throttle id

Modified:
   branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/edit-mediator.jsp
   branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/js/mediator-util.js
   branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/update-mediator.jsp

Modified: branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/edit-mediator.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/edit-mediator.jsp?rev=31288&r1=31287&r2=31288&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/edit-mediator.jsp	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/edit-mediator.jsp	Mon Feb 23 00:55:30 2009
@@ -134,7 +134,7 @@
     </td>
 </tr>
 <tr id="refer_policy" style="<%=inLine?"display:none" : ""%>">
-    <td><fmt:message key="referring.policy"/><span class="required">*</span></td>
+    <td><fmt:message key="referring.policy"/></td>
     <td><input class="longInput" type="text" name="mediator.throttle.regPolicy"
                id="mediator.throttle.regPolicy" value="<%=key%>"
                disabled="disabled" style="float:left"/>
@@ -150,7 +150,7 @@
 </tr>
 
 <tr id="inline_policy_input" style="<%=!inLine?"display:none" : ""%>">
-    <td><fmt:message key="in.lined.policy"/><span class="required">*</span></td>
+    <td><fmt:message key="in.lined.policy"/></td>
     <td><a href="#throttleBrowserLink" class="policie-icon-link"
            style="padding-left:40px"
            onclick="showInLinedThrottlePolicyEditor('<%=policyID%>')"><fmt:message

Modified: branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/js/mediator-util.js
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/js/mediator-util.js?rev=31288&r1=31287&r2=31288&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/js/mediator-util.js	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/js/mediator-util.js	Mon Feb 23 00:55:30 2009
@@ -55,14 +55,14 @@
 //        }
 //    }
 
-    var policyValueOpt = document.getElementById("policygroupValueId");
-    if (policyValueOpt && policyValueOpt.checked) {
-        var throttleregPolicyId = document.getElementById("mediator.throttle.regPolicy");
-        if (throttleregPolicyId && throttleregPolicyId.value.replace(/\s+/g,'') == "") {
-            CARBON.showErrorDialog(thottleMediatorJsi18n["throttle.policykey.required"]);
-            return false;
-        }
-    }   
+//    var policyValueOpt = document.getElementById("policygroupValueId");
+//    if (policyValueOpt && policyValueOpt.checked) {
+//        var throttleregPolicyId = document.getElementById("mediator.throttle.regPolicy");
+//        if (throttleregPolicyId && throttleregPolicyId.value.replace(/\s+/g,'') == "") {
+//            CARBON.showErrorDialog(thottleMediatorJsi18n["throttle.policykey.required"]);
+//            return false;
+//        }
+//    }
 
     return true;
 }

Modified: branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/update-mediator.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/update-mediator.jsp?rev=31288&r1=31287&r2=31288&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/update-mediator.jsp	(original)
+++ branches/carbon/1.5.1/trunk/carbon-components/mediators/throttle/org.wso2.carbon.mediator.throttle.ui/src/main/resources/web/throttle-mediator/update-mediator.jsp	Mon Feb 23 00:55:30 2009
@@ -38,6 +38,8 @@
     if (param != null && !param.equals("")) {
         throttleMediator.setId(param);
     }
+    throttleMediator.setPolicyKey(null);
+    throttleMediator.setInLinePolicy(null);
     param = request.getParameter("policygroup");
     if (param != null && !param.equals("")) {
         if (param.equals("InLinePolicy")) {
@@ -56,7 +58,9 @@
             }
         } else if (param.equals("PolicyKey")) {
             String key = request.getParameter("mediator.throttle.regPolicy_hidden");
-            throttleMediator.setPolicyKey(key);
+            if (key != null && !key.equals("")) {
+                throttleMediator.setPolicyKey(key);
+            }
         }
     }
 



More information about the Carbon-dev mailing list