Author: rajika Date: Fri Mar 13 02:20:12 2009 New Revision: 32069 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=32069
Log: Fixed CARBON-2872 Modified: branches/esb/java/2.0.1/carbon-components/localentry/org.wso2.carbon.localentry.ui/src/main/resources/web/localentries/inlinedText.jsp Modified: branches/esb/java/2.0.1/carbon-components/localentry/org.wso2.carbon.localentry.ui/src/main/resources/web/localentries/inlinedText.jsp URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.0.1/carbon-components/localentry/org.wso2.carbon.localentry.ui/src/main/resources/web/localentries/inlinedText.jsp?rev=32069&r1=32068&r2=32069&view=diff ============================================================================== --- branches/esb/java/2.0.1/carbon-components/localentry/org.wso2.carbon.localentry.ui/src/main/resources/web/localentries/inlinedText.jsp (original) +++ branches/esb/java/2.0.1/carbon-components/localentry/org.wso2.carbon.localentry.ui/src/main/resources/web/localentries/inlinedText.jsp Fri Mar 13 02:20:12 2009 @@ -13,21 +13,21 @@ <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %> <fmt:bundle basename="org.wso2.carbon.localentry.ui.i18n.Resources"> - <carbon:breadcrumb - label="inlined.text.entry" - resourceBundle="org.wso2.carbon.localentry.ui.i18n.Resources" - topPage="false" - request="<%=request%>" /> +<carbon:breadcrumb + label="inlined.text.entry" + resourceBundle="org.wso2.carbon.localentry.ui.i18n.Resources" + topPage="false" + request="<%=request%>"/> <script type="text/javascript"> String.prototype.trim = function() { - return this.replace(/^\s+|\s+$/g,""); -} -String.prototype.ltrim = function() { - return this.replace(/^\s+/,""); -} -String.prototype.rtrim = function() { - return this.replace(/\s+$/,""); -} + return this.replace(/^\s+|\s+$/g, ""); + } + String.prototype.ltrim = function() { + return this.replace(/^\s+/, ""); + } + String.prototype.rtrim = function() { + return this.replace(/\s+$/, ""); + } function ValidateTextForm(form) { if (IsEmpty(form.Name)) { @@ -43,11 +43,12 @@ return false; } - if(specialCharValidator()){ - CARBON.showWarningDialog('The Value field has special characters. \nThese are not allowed.\n') - form.Value.focus(); - return false; - } +// if (specialCharValidator()) { +// CARBON.showWarningDialog('The Value field has special characters. \nThese are not allowed.\n') +// form.Value.focus(); +// return false; +// } + return true; } function IsEmpty(aTextField) { @@ -60,38 +61,38 @@ } } - function specialCharValidator(){ + function specialCharValidator() { var iChars = "!,-...@#$%^&*()+=-[]\\\';,./{}|\":<>?"; for (var i = 0; i < document.Submit.Value.value.length; i++) { - if (iChars.indexOf(document.Submit.Value.value.charAt(i)) != -1) { - //CARBON.showWarningDialog('The Value field has special characters. \nThese are not allowed.\n') + if (iChars.indexOf(document.Submit.Value.value.charAt(i)) != -1) { return true; + } } - } + return false; } </script> - <%-- - <%if(session.getAttribute("locerrMsg")!=null){ +<%-- +<%if(session.getAttribute("locerrMsg")!=null){ - String msg = (String)session.getAttribute("locerrMsg"); - - if(!(msg.equalsIgnoreCase("set"))){ - %> - <script type="text/javascript"> - jQuery(document).ready(function(){ - CARBON.showErrorDialog('<%=msg%>'); - - }); - - </script> - - <%}}%> - <% if(session.getAttribute("locerrMsg")!=null){ - session.setAttribute("locerrMsg","set"); - } - %> --%> +String msg = (String)session.getAttribute("locerrMsg"); + + if(!(msg.equalsIgnoreCase("set"))){ +%> +<script type="text/javascript"> + jQuery(document).ready(function(){ + CARBON.showErrorDialog('<%=msg%>'); + + }); + +</script> + +<%}}%> +<% if(session.getAttribute("locerrMsg")!=null){ + session.setAttribute("locerrMsg","set"); +} +%> --%> <div id="middle"> @@ -112,7 +113,7 @@ ConfigurationContext configContext = (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); + String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); LocalEntryAdminClient client = new LocalEntryAdminClient(cookie, url, configContext); EntryData entry = null; if (entryName != null) { @@ -131,41 +132,45 @@ %> <table cellpadding="0" cellspacing="0" border="0" class="styledLeft noBorders"> <thead> - <tr><th colspan="2"></th></tr> + <tr> + <th colspan="2"></th> + </tr> </thead> <tbody> <input type="hidden" name="pageName" value="inlinedText.jsp"/> - <%if ((entry != null) && entry.getName() != null) {%> - <tr> + <%if ((entry != null) && entry.getName() != null) {%> + <tr> - <td><fmt:message key="name"/><span class="required">*</span></td> - <td><input type="text" name="Name" value="<%=entry.getName()%>" size="60" readonly="readonly" style="background-color:lightgray;"/></td> - </tr> - <%} else {%> - <tr> - <td><fmt:message key="name"/><span class="required">*</span></td> - <td><input type="text" size="60" name="Name" value=""/></td> - </tr> - <%}%> - <tr> - <td style="width:100px;"><fmt:message key="value"/><span class="required">*</span></td> - <td> - <%if ((entry != null) && entry.getValue() != null) {%> - <textarea name="Value" title="In-lined Text Value" - cols="70" rows="18"><%=entry.getValue().trim()%> - </textarea> <br/> - <%} else {%> - <textarea name="Value" title="In-lined Text Value" cols="70" rows="18"></textarea> <br/> - <%}%> - </td> - </tr> - <tr> - <td colspan="2" class="buttonRow"> - <input type="submit" value="<fmt:message key="save"/>" class="button"/> <input type="button" value="<fmt:message key="cancel"/>" - onclick="javascript:document.location.href='index.jsp'" - class="button"/> - </td> - </tr> + <td><fmt:message key="name"/><span class="required">*</span></td> + <td><input type="text" name="Name" value="<%=entry.getName()%>" size="60" readonly="readonly" + style="background-color:lightgray;"/></td> + </tr> + <%} else {%> + <tr> + <td><fmt:message key="name"/><span class="required">*</span></td> + <td><input type="text" size="60" name="Name" value=""/></td> + </tr> + <%}%> + <tr> + <td style="width:100px;"><fmt:message key="value"/><span class="required">*</span></td> + <td> + <%if ((entry != null) && entry.getValue() != null) {%> + <textarea name="Value" title="In-lined Text Value" + cols="70" rows="18"><%=entry.getValue().trim()%> + </textarea> <br/> + <%} else {%> + <textarea name="Value" title="In-lined Text Value" cols="70" rows="18"></textarea> <br/> + <%}%> + </td> + </tr> + <tr> + <td colspan="2" class="buttonRow"> + <input type="submit" value="<fmt:message key="save"/>" class="button"/> <input type="button" + value="<fmt:message key="cancel"/>" + onclick="javascript:document.location.href='index.jsp'" + class="button"/> + </td> + </tr> </tbody> </table> </form> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
