Hi all Attached are two patches for consideration.
The first replaces the HTML textarea tag with editarea (but only in the create and details pages of managed config files). editarea provides search and replace, syntax highlighting, resizing of the textarea and other functionality. This patch requires editarea .zip file to be unpacked in the directory web/html/javascript/editarea. The second patch is a trivial grammar correction replacing "This specifies when the script gets ran ..." with "This specifies when the script gets run ...". I noticed this while looking for something else. I will be submitting another patch similar to the first but for the Kickstart pre/post scripts if/when the first patch is accepted. Thanks! CC NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
From 07a0415870733f641c4011222edbfeca42de2698 Mon Sep 17 00:00:00 2001 From: Colin Coe <[email protected]> Date: Tue, 6 Jan 2009 21:36:39 +0900 Subject: [PATCH] Replace HTML textarea tag with editarea for managed config files --- .../fragments/configuration/channel/create.jspf | 3 ++- .../fragments/configuration/files/contents.jspf | 2 +- .../WEB-INF/pages/common/fragments/editarea.jspf | 13 +++++++++++++ .../pages/configuration/channel/filecreate.jsp | 6 ++++++ .../pages/configuration/files/filedetails.jsp | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf index 51233a1..5f29c03 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf @@ -56,10 +56,11 @@ <tr> <th><bean:message key="addfiles.create.jspf.content-name" /></th> <td> - <html:textarea property="contents" rows="20" cols="80" /><br /> + <textarea name="contents" rows="20" cols="80" property="contents" id="contents">${revision.configContent.contentsString}</textarea> <span class="small-text"><bean:message key="filedetails.jsp.tip.edit"/></span> </td> </tr> + </table> <hr /> <div align="right"><html:submit> diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/contents.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/contents.jspf index 49d6b9c..13b7cb5 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/contents.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/contents.jspf @@ -22,7 +22,7 @@ arg3="${revbytes}"/> </c:when> <c:otherwise > - <html:textarea property="contents" rows="20" cols="80" /><br /> + <textarea name="contents" rows="20" cols="80" id="contents">${revision.configContent.contentsString}</textarea><br /> <span class="small-text"><bean:message key="filedetails.jsp.tip.edit"/></span> </c:otherwise> </c:choose> diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf new file mode 100644 index 0000000..cd08e69 --- /dev/null +++ b/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf @@ -0,0 +1,13 @@ + +<script language="javascript" type="text/javascript" src="/javascript/editarea/edit_area/edit_area_full.js"></script> +<script language="javascript" type="text/javascript"> +editAreaLoader.init({ + id : "contents" + ,syntax: "css" + ,syntax_selection_allow: "css,html,js,php,python,vb,xml,c,cpp,sql,basic,pas,perl,bash" + ,start_highlight: true + ,allow_toggle: true + ,toolbar: "search,go_to_line,undo,redo,reset_highlight,highlight,syntax_selection" +}); +</script> + diff --git a/java/code/webapp/WEB-INF/pages/configuration/channel/filecreate.jsp b/java/code/webapp/WEB-INF/pages/configuration/channel/filecreate.jsp index e4eb131..4aa7cf8 100644 --- a/java/code/webapp/WEB-INF/pages/configuration/channel/filecreate.jsp +++ b/java/code/webapp/WEB-INF/pages/configuration/channel/filecreate.jsp @@ -3,12 +3,18 @@ <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> +<head> +<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %> +</head> + <html:xhtml/> <html> <body> + <html:errors /> + <%@ include file="/WEB-INF/pages/common/fragments/configuration/channel/details-header.jspf"%> diff --git a/java/code/webapp/WEB-INF/pages/configuration/files/filedetails.jsp b/java/code/webapp/WEB-INF/pages/configuration/files/filedetails.jsp index cee4a33..f6ce23d 100644 --- a/java/code/webapp/WEB-INF/pages/configuration/files/filedetails.jsp +++ b/java/code/webapp/WEB-INF/pages/configuration/files/filedetails.jsp @@ -8,6 +8,7 @@ <html:xhtml/> <html> <head> +<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %> </head> <body> -- 1.5.5.1
From 285138df804073b3b72c8945022e611fd3ba42a9 Mon Sep 17 00:00:00 2001 From: Colin Coe <[email protected]> Date: Tue, 6 Jan 2009 21:37:45 +0900 Subject: [PATCH] Trivial error in grammar --- .../frontend/strings/jsp/StringResource_en_US.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml index f709520..5ae4511 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml @@ -10603,7 +10603,7 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro </trans-unit> <trans-unit id="kickstart.script.tip3"> - <source><span class="small-text"><strong>Tip:</strong> This specifies when the script gets ran (before or after kickstart).</span></source> + <source><span class="small-text"><strong>Tip:</strong> This specifies when the script gets run (before or after kickstart).</span></source> <context-group name="ctx"> <context context-type="sourcefile">/rhn/kickstart/KickstartScriptEdit.do</context> </context-group> -- 1.5.5.1
_______________________________________________ Spacewalk-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-devel
