[jboss-cvs] jboss-seam/examples/wiki/view ...
Christian Bauer
christian at hibernate.org
Thu May 3 10:10:50 EDT 2007
User: cbauer
Date: 07/05/03 10:10:50
Modified: examples/wiki/view docDisplay.xhtml docEdit.xhtml
Log:
Resizable text editor area with jQuery
Revision Changes Path
1.17 +2 -2 jboss-seam/examples/wiki/view/docDisplay.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: docDisplay.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docDisplay.xhtml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- docDisplay.xhtml 19 Apr 2007 09:32:08 -0000 1.16
+++ docDisplay.xhtml 3 May 2007 14:10:50 -0000 1.17
@@ -7,6 +7,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:j4j="http://javascript4jsf.dev.java.net/"
template="themes/#{wikiPreferences.themeName}/template.xhtml">
<ui:define name="includeHeaders">
@@ -46,6 +47,7 @@
<ui:define name="content">
<s:div id="documentDisplay" styleClass="documentDisplay">
+ <j4j:idProxy id="documentDisplay_" />
<s:div rendered="#{currentDocument.nameAsTitle}"><h1 class="documentTitle">#{currentDocument.name}</h1></s:div>
<wiki:formattedText value="#{currentDocument.content}"
linkStyleClass="regularLink"
@@ -59,8 +61,6 @@
</s:div>
-
-
</ui:define>
<ui:define name="footer"> </ui:define>
1.29 +26 -16 jboss-seam/examples/wiki/view/docEdit.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: docEdit.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docEdit.xhtml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- docEdit.xhtml 26 Apr 2007 18:54:25 -0000 1.28
+++ docEdit.xhtml 3 May 2007 14:10:50 -0000 1.29
@@ -7,6 +7,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
template="themes/#{wikiPreferences.themeName}/template.xhtml">
@@ -107,21 +108,30 @@
<s:decorate>
<div class="entry">
<div class="label">Content:</div>
- <s:div styleClass="input" id="content">
+ <s:div styleClass="input">
+
+ <script type="text/javascript">$(function() {
+ $("#contentTextEdit").Resizable({
+ minHeight: 50,
+ handlers: {
+ s: '#contentTextEditResizeHandle'
+ },
+ onResize: function(size) {
+ $("textarea", this).css({ height: size.height + "px" });
+ }
+ });
+ });</script>
+ <div id="contentTextEdit">
<h:inputTextarea tabindex="3" required="true"
cols="#{docEditorPreferences.properties['regularEditAreaColumns']}"
rows="#{docEditorPreferences.properties['regularEditAreaRows']}"
- id="contentNoPreview"
- rendered="#{!documentHome.enabledPreview}"
- value="#{documentHome.formContent}"/>
- <h:inputTextarea tabindex="3" required="true"
- cols="#{docEditorPreferences.properties['previewEditAreaColumns']}"
- rows="#{docEditorPreferences.properties['previewEditAreaRows']}"
- id="contentWithPreview"
- rendered="#{documentHome.enabledPreview}"
+ id="contentTextArea"
value="#{documentHome.formContent}">
- <a:support event="onkeyup" reRender="preview,attachmentDisplay" requestDelay="3000" eventQueue="editKeyPress"/>
+ <a:support event="onkeyup" reRender="preview" requestDelay="3000" eventQueue="editKeyPress"/>
</h:inputTextarea>
+ <div id="contentTextEditResizeHandle"/>
+ </div>
+
</s:div>
</div>
</s:decorate>
@@ -130,7 +140,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox value="#{documentHome.enabledPreview}" tabindex="3">
- <a:support event="onchange" reRender="preview,attachmentDisplay,content,pluginSwitch"/>
+ <a:support event="onchange" reRender="preview,pluginSwitch"/>
</h:selectBooleanCheckbox>
Show interactive preview
</div>
More information about the jboss-cvs-commits
mailing list