Author: chanaka
Date: Wed Dec 19 01:17:50 2007
New Revision: 11513

Log:

minor fix

Modified:
   trunk/registry/modules/webapps/src/main/webapp/admin/js/common.js
   trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp

Modified: trunk/registry/modules/webapps/src/main/webapp/admin/js/common.js
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/js/common.js   
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/js/common.js   Wed Dec 
19 01:17:50 2007
@@ -361,3 +361,12 @@
     var greeting = ("Good " + display);
     document.write(greeting);
 }
+function disableFields(idHideInput,idShowInput){
+       var showInput=document.getElementById(idHideInput);
+       var hideInput=document.getElementById(idShowInput);
+       
+       hideInput.removeAttribute('disabled');
+       hideInput.setAttribute('disabled','disabled');
+       showInput.removeAttribute('disabled');
+       
+}
\ No newline at end of file

Modified: 
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp 
Wed Dec 19 01:17:50 2007
@@ -212,20 +212,21 @@
         <h3>Add Resource</h3>
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
             <tr>
-                <td valign="top"><input id="contentFile" type="radio" 
name="contentMethod" value="file"/>Import content from file</td>
+                <td valign="top"><input id="contentFile" type="radio" 
name="contentMethod" value="file" checked="checked" 
onClick="disableFields('fetchURLID','resourceFile')" /><span 
id="contentFileText">Import content from file</span></td>
                 <td>
                     <input id="resourceFile" type="file" name="upload" 
onchange="fillResourceDetails()"/>
                     <div class="helpText">Give the url of a file to fetch 
content (xml,wsdl,jar etc..)</div>
                 </td>
             </tr>
             <tr>
-                <td valign="top" style="width:180px;"><input id="contentURL" 
type="radio" name="contentMethod" value="url"/>Import content from URL</td>
+                <td valign="top" style="width:180px;"><input id="contentURL" 
type="radio" name="contentMethod"  value="url" 
onClick="disableFields('resourceFile','fetchURLID')"/><span 
id="contentURLText">Import content from URL</span></td>
                 <td>
-                    <input id="fetchURLID" type="text" name="fetchURL" 
onchange="fillResourceDetailsForURLs()"/>
+                    <input id="fetchURLID" type="text" disabled="disabled" 
name="fetchURL" onchange="fillResourceDetailsForURLs()"/>
                     <div class="helpText">Give the full url of the resource to 
fetch content from URL</div>
                 </td>
             </tr>
             <tr>
+            <tr>
                 <td valign="top">Name</td>
 
                 <td><input id="resourceName" type="text" name="filename" 
style="margin-bottom:10px;"/></td>

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to