[jboss-cvs] jboss-seam/examples/wiki/view/includes ...
Christian Bauer
christian at hibernate.org
Thu Dec 20 13:35:54 EST 2007
User: cbauer
Date: 07/12/20 13:35:54
Modified: examples/wiki/view/includes helpPopupButton.xhtml
helpPopup.xhtml wikiTextEditor.xhtml
Log:
Simplifed and fixed help popup
Revision Changes Path
1.3 +1 -1 jboss-seam/examples/wiki/view/includes/helpPopupButton.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: helpPopupButton.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/helpPopupButton.xhtml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- helpPopupButton.xhtml 19 Dec 2007 04:29:19 -0000 1.2
+++ helpPopupButton.xhtml 20 Dec 2007 18:35:54 -0000 1.3
@@ -1,7 +1,7 @@
<a:commandLink
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
ajaxSingle="true"
- oncomplete="showHelpPopup( '#{width}', '#{height}', '#{top}', '#{left}' ); onAjaxRequestComplete()"
+ oncomplete="showHelpPopup( '#{width}', '#{height}', '#{offsetId}' ); onAjaxRequestComplete()"
reRender="dialogHelpContent"
action="#{help.selectDocumentByName(helpDocument)}"
styleClass="buttonNonpersistent sessionEventTrigger"><span class="buttonLabel">#{label}</span></a:commandLink>
\ No newline at end of file
1.6 +30 -69 jboss-seam/examples/wiki/view/includes/helpPopup.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: helpPopup.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/helpPopup.xhtml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- helpPopup.xhtml 19 Dec 2007 04:29:19 -0000 1.5
+++ helpPopup.xhtml 20 Dec 2007 18:35:54 -0000 1.6
@@ -3,6 +3,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:wiki="http://jboss.com/products/seam/wiki">
@@ -12,89 +13,49 @@
<ui:define name="dialogInit">
<script type="text/javascript">
- function showHelpPopup(width, height, top, left) {
+ function showHelpPopup(width, height, offsetId) {
+ var offset = jQuery("#"+offsetId).offset();
jsf('dialogHelpPopup')
- .css({
- width: width + "px",
- minWidth: width + "px",
- maxWidth: width + "px",
-
- height: height + "px",
- minHeight: height + "px",
- maxHeight: height + "px",
-
- top: top + "px",
- left: left + "px"
- })
+ .css({width: width+"px", height: height+"px", top: offset.top-100+"px", left: offset.left-150+"px"})
.jqm({
closeClass: "closeDialog",
overlay: 0
});
- // Fix for Firefox iframe scrollbar rendering bug (wrong z-index, scrollbars are hidden)
- jQuery('#dialogHelp').css('position', 'fixed')
- jQuery(".closeDialog").attr("accesskey", "H");
+ jQuery("#dialogHelpContent").css("width", width-20+"px").css("height", height-75+"px");
+ jQuery("#dialogHelpContent").css("overflow", "auto");
jsf('dialogHelpPopup').jqmShow();
+ }
+ </script>
- };</script>
</ui:define>
<ui:define name="dialogTitle">#{messages['lacewiki.label.help.DialogTitle']}</ui:define>
<ui:define name="dialogContent">
- <s:div id="helpSelector">
- <h:panelGrid columns="3" styleClass="fullWidth"
-
- columnClasses="alignLeft fivePercentColumn, alignLeft defaultColumn, alignRight tenPercentColumn">
- <h:outputText value="#{messages['lacewiki.label.help.Browse']}:"/>
- <h:form id="helpSelectorForm" style="display:inline;">
- <h:selectOneMenu value="#{help.selectedNode}" styleClass="ajaxSupport" converter="#{nestedSetNodeWrapperRestrictedEntityConverter}">
- <s:selectItems value="#{help.root.wrappedChildren}"
- var="helpNode"
- label="#{wiki:repeatString(' ',helpNode.level-1)}#{wiki:truncateString(helpNode.wrappedNode.name, 40, '...')}"/>
- <a:support event="onchange" reRender="helpSelectorForm, helpSelectorFullscreenLink, helpContent" oncomplete="onAjaxRequestComplete()"/>
- </h:selectOneMenu>
- </h:form>
-
- <h:panelGroup>
- <s:span id="helpSelectorFullscreenLink">
- <h:outputLink value="#{wiki:renderURL(help.selectedDocument)}"
- rendered="#{not empty help.selectedDocument}"
- styleClass="buttonNonpersistent"
- tabindex="1">
- <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.help.OpenFullscreen']}"/>
- </h:outputLink>
- </s:span>
+ <c:if test="#{not empty help.selectedHelpDoc}">
- <h:outputLink value="#" styleClass="buttonNonpersistent closeDialog" tabindex="1">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.help.CloseHelp']}"/>
- </h:outputLink>
- </h:panelGroup>
- </h:panelGrid>
+ <s:div rendered="#{help.selectedHelpDoc.nameAsTitle}">
+ <h1 class="documentTitle">#{help.selectedHelpDoc.name}</h1>
</s:div>
- <s:div id="helpContent">
- <s:fragment rendered="#{empty help.selectedDocument and not empty help.selectedDirectory}">
- <iframe id="helpContentFrame" src="#{wiki:renderPlainURL(help.selectedDirectory)}"
- frameborder="0">
- </iframe>
- </s:fragment>
- <s:fragment rendered="#{not empty help.selectedDocument}">
- <iframe id="helpContentFrame" src="#{wiki:renderPlainURL(help.selectedDocument)}"
- frameborder="0">
- </iframe>
- </s:fragment>
- <s:fragment rendered="#{not empty help.selectedDocument or not empty help.selectedDirectory}">
- <script type="text/javascript">
- jQuery(function() {
- jQuery("#helpContentFrame").width( jQuery("#dialogHelp").width()-10 );
- jQuery("#helpContentFrame").height( jQuery("#dialogHelp").height()-62 );
- });
- </script>
- </s:fragment>
- </s:div>
+ <wiki:formattedText value="#{help.selectedHelpDoc.content}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{help.selectedHelpDoc}"
+ currentAreaNumber="#{help.selectedHelpDoc.areaNumber}"
+ enablePlugins="false"/>
+ </c:if>
</ui:define>
- <ui:define name="dialogControls"/>
+ <ui:define name="dialogControls">
+ <s:div style="padding:5px;">
+ <h:outputLink styleClass="buttonNonpersistent closeDialog">
+ <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.help.CloseHelp']}"/>
+ </h:outputLink>
+ </s:div>
+ </ui:define>
</ui:decorate>
1.10 +4 -5 jboss-seam/examples/wiki/view/includes/wikiTextEditor.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: wikiTextEditor.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/wikiTextEditor.xhtml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- wikiTextEditor.xhtml 19 Dec 2007 04:29:19 -0000 1.9
+++ wikiTextEditor.xhtml 20 Dec 2007 18:35:54 -0000 1.10
@@ -115,10 +115,9 @@
<ui:decorate template="helpPopupButton.xhtml">
<ui:param name="label" value="?"/>
- <ui:param name="width" value="550"/>
+ <ui:param name="width" value="450"/>
<ui:param name="height" value="350"/>
- <ui:param name="top" value="100"/>
- <ui:param name="left" value="100"/>
+ <ui:param name="offsetId" value="#{namingContainer}\\\\:#{textEditorId}TextEditDiv"/>
<ui:param name="helpDocument" value="Wiki Text Markup"/>
</ui:decorate>
More information about the jboss-cvs-commits
mailing list