Author: chanaka
Date: Tue Jan 29 04:07:26 2008
New Revision: 13139
Log:
fix some IE compatibility issues
Added:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/tinymce/jscripts/tiny_mce/blank.htm
Modified:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/common.js
branches/registry/1_0/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Modified:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
==============================================================================
---
branches/registry/1_0/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
(original)
+++
branches/registry/1_0/modules/webapps/src/main/webapp/admin/ajax/resource-properties.jsp
Tue Jan 29 04:07:26 2008
@@ -15,46 +15,63 @@
ResourceDetailsAction details = (ResourceDetailsAction)
request.getSession().getAttribute(UIConstants.RESOURCE_BEAN);
String resourcePath = (String)
request.getSession().getAttribute("resourcePath");
Properties props = PropertiesUtil.getResourceProperties(resourcePath,
request);
- %>
- <table cellpadding="0" cellspacing="0" border="0" class="data-table"
style="width:100%">
- <tr>
- <th style="width:40%">Name</th>
- <th>Value</th>
- <th style="width:70px;"></th>
- </tr>
+
+
+ if (!props.isEmpty()) {
+%>
+<table cellpadding="0" cellspacing="0" border="0" class="data-table"
style="width:100%">
+ <tr>
+ <th style="width:40%">Name</th>
+ <th>Value</th>
+ <th style="width:70px;"></th>
+ </tr>
<%
- Iterator iProps = props.keySet().iterator();
- for (int i=0;iProps.hasNext();i++) {
+ Iterator iProps = props.keySet().iterator();
+ for (int i = 0; iProps.hasNext(); i++) {
+
+ String name = (String) iProps.next();
+ String value = (String) props.get(name);
+
+ %>
+
- String name = (String) iProps.next();
- String value = (String) props.get(name);
+ <tr id="propEditPanel_<%=i%>" style="display:none;">
+ <td><input id="propRPath_<%=i%>" type="hidden"
value="<%=details.getPath()%>"/><input id="oldPropName_<%=i%>"
+
type="hidden"
+
value="<%=name%>"/><input
+ value="<%=name%>" type="text" id="propName_<%=i%>"/></td>
+ <td><input value="<%=value%>" id="propValue_<%=i%>" type="text"/></td>
+ <td>
+ <a href="#"
+
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>');
editProperty('<%=i%>')"><img
+ border="0" align="top" title="Save"
src="/wso2registry/admin/images/save-button.gif"
+ id="propSaveButton_<%=i%>"/></a>
+ </td>
+ </tr>
- %>
-
-
- <tr id="propEditPanel_<%=i%>" style="display:none;">
- <td><input id="propRPath_<%=i%>" type="hidden"
value="<%=details.getPath()%>"/><input id="oldPropName_<%=i%>" type="hidden"
value="<%=name%>"/><input value="<%=name%>" type="text" id="propName_<%=i%>"
/></td>
- <td><input value="<%=value%>" id="propValue_<%=i%>"
type="text"/></td>
- <td>
- <a href="#"
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>');
editProperty('<%=i%>')"><img border="0" align="top" title="Save"
src="/wso2registry/admin/images/save-button.gif" id="propSaveButton_<%=i%>"
/></a>
- </td>
- </tr>
-
-
-
- <tr id="propViewPanel_<%=i%>">
- <td><%=name%></td>
- <td><%=value%></td>
- <td>
+
+ <tr id="propViewPanel_<%=i%>">
+ <td><%=name%>
+ </td>
+ <td><%=value%>
+ </td>
+ <td>
<% if (details.isPutAllowed()) { %>
- <a href="#"
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
title="Edit" border="0" align="top"
src="/wso2registry/admin/images/icon-edit.gif" /></a>
- <a href="#" onclick="removeProperty('<%=name%>')"
style="margin-left:5px;"><img title="Remove" style="margin-top:3px;" border="0"
align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
- <% } %>
- </td>
- </tr>
-
-
- <%
+ <a href="#"
onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
+ title="Edit" border="0" align="top"
src="/wso2registry/admin/images/icon-edit.gif"/></a>
+ <a href="#" onclick="removeProperty('<%=name%>')"
style="margin-left:5px;"><img title="Remove"
+
style="margin-top:3px;"
+
border="0" align="top"
+
src="/wso2registry/admin/images/icon-trash.gif"/></a>
+ <% } %>
+ </td>
+ </tr>
+
+
+ <%
+ }
+ %>
+</table>
+<%
}
%>
-</table>
Modified:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/common.js
==============================================================================
--- branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/common.js
(original)
+++ branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/common.js
Tue Jan 29 04:07:26 2008
@@ -186,9 +186,19 @@
if(divx.nodeName == 'DIV')
divx.style.display='block';
if(divx.nodeName == 'IMG')
- divx.style.display='inline';
- if(divx.nodeName == 'TR')
- divx.style.display='table-row';
+ try {
+ divx.style.display='inline';
+ } catch(e) {
+ divx.style.display = 'block';
+ }
+
+ if(divx.nodeName == 'TR'){
+ try {
+ divx.style.display='table-row';
+ } catch(e) {
+ divx.style.display = 'block';
+ }
+ }
if(divx.nodeName == 'TD')
divx.style.display='table-cell';
if(divx.nodeName == 'A')
@@ -203,40 +213,61 @@
else
{
divx.style.display='none';
-
- //link.innerHTML=textShown;
}
}
-
+function so_clearInnerHTML(obj) {
+ // perform a shallow clone on obj
+ nObj = obj.cloneNode(false);
+ // insert the cloned object into the DOM before the original one
+ obj.parentNode.insertBefore(nObj,obj);
+ // remove the original object
+ obj.parentNode.removeChild(obj);
+}
function processDescription() {
var normal_div=document.getElementById('descView');
var edit_div=document.getElementById('descEdit');
var edit_button = document.getElementById('editButton');
+ var save_button = document.getElementById('saveButton');
+ var save_button_on = false;
+
+ if(save_button.style.display=='block')
+ save_button_on=true;
- if (edit_button.title=='Save Description') {
+ alert(normal_div.style.display);
+ if (save_button_on) {
tinyMCE.triggerSave();
var desc = tinyMCE.getContent();
tinyMCE.execCommand('mceRemoveControl', false, 'descEdit');
new Ajax.Updater('descView', '/wso2registry/system/setDescription', {
method: 'post', parameters: {description: desc} });
- edit_div.textContent = normal_div.innerHTML;
+
+
+
}
if(normal_div.style.display=='block'){
+
+ var tmpNormalContent = normal_div.innerHTML;
+
normal_div.style.display='none';
- edit_div.style.display='block';
+ //edit_div.style.display='block';
+ edit_div.style.width="100%";
+ edit_div.textContent="test";
+ showHideCommon('editButton');
+ showHideCommon('saveButton');
tinyMCE.execCommand('mceAddControl', false, 'descEdit');
- tinyMCE.setContent(normal_div.innerHTML);
- edit_button.title= 'Save Description';
- document.editButtonImage.src=
'/wso2registry/admin/images/save-button.gif';
+ //alert("active Editor thing 2" + tmpNormalContent);
+ tinyMCE.activeEditor.setContent(tmpNormalContent);
+
+
}
else {
normal_div.style.display='block';
edit_div.style.display='none'
- edit_button.title= 'Edit Description';
- document.editButtonImage.src=
'/wso2registry/admin/images/icon-edit.gif';
+ showHideCommon('editButton');
+ showHideCommon('saveButton');
}
}
Added:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/tinymce/jscripts/tiny_mce/blank.htm
==============================================================================
--- (empty file)
+++
branches/registry/1_0/modules/webapps/src/main/webapp/admin/js/tinymce/jscripts/tiny_mce/blank.htm
Tue Jan 29 04:07:26 2008
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>blank_page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body class="mceContentBody">
+
+</body>
+</html>
Modified:
branches/registry/1_0/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
---
branches/registry/1_0/modules/webapps/src/main/webapp/admin/registry-resources.jsp
(original)
+++
branches/registry/1_0/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Tue Jan 29 04:07:26 2008
@@ -150,13 +150,14 @@
<% } %>
</td>
- <td id="propertiesAddDiv" style="display:none;
padding-left:10px;">
- <form>
+ <td>
+ <div id="propertiesAddDiv" style="display:none;
padding-left:10px;"><form>
<input type="hidden" id="propRPath"
value="<%=details.getPath()%>"/>
Name: <input type="text" id="propName"/> Value:
<input type="text" id="propValue"/>
<input type="button" class="button" value="Add"
onclick="setProperty();showHideCommon('propertiesAddDiv');"/>
</form>
- </td>
+ </div>
+ </td>
</tr>
</table>
@@ -223,7 +224,8 @@
<th style="width:120px; padding-bottom:10px; "
valign="top">Description:</th>
<td valign="top" style="width:17px;">
<% if (details.isPutAllowed() && !details.isVersionView()) { %>
- <a href="#editButton" id="editButton" name="editButton"
title="Edit Description" onclick="processDescription();"><img
src="/wso2registry/admin/images/icon-edit.gif" name="editButtonImage"
border="0" align="top" id="mainIconExpanded" /></a>
+ <div id="editButton" style="display:inline;"><a
href="#editButton" name="editButton" title="Edit Description"
onclick="processDescription();"><img
src="/wso2registry/admin/images/icon-edit.gif" name="editButtonImage"
border="0" align="top" /></a></div>
+ <div id="saveButton" style="display:none;"><a
href="#saveButton" name="saveButton" title="Save Description"
onclick="processDescription();"><img
src="/wso2registry/admin/images/save-button.gif" name="saveButtonImage"
border="0" align="top" /></a></div>
<% } %>
</td>
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev