[seam-commits] Seam SVN: r8262 - in trunk/examples/wiki: src/main/org/jboss/seam/wiki/core/action and 19 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu May 22 07:00:11 EDT 2008
Author: christian.bauer at jboss.com
Date: 2008-05-22 07:00:11 -0400 (Thu, 22 May 2008)
New Revision: 8262
Modified:
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
trunk/examples/wiki/view/docEdit_d.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/js/lacewiki.js
trunk/examples/wiki/view/themes/default/m/css/template.css
trunk/examples/wiki/view/themes/default/m/template.xhtml
trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml
trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/inrelationto/js/lacewiki.js
trunk/examples/wiki/view/themes/inrelationto/m/css/template.css
trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/confirmationRegistration.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml
trunk/examples/wiki/view/themes/inrelationto/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/js/lacewiki.js
trunk/examples/wiki/view/themes/sfwkorg/m/css/template.css
trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/confirmationRegistration.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
Log:
Some minor bugfixes
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -7,7 +7,8 @@
<param name="nodeId" value="#{wikiRequestResolver.nodeId}"/>
<param name="areaName" value="#{wikiRequestResolver.areaName}"/>
<param name="nodeName" value="#{wikiRequestResolver.nodeName}"/>
- <param name="message" value="#{wikiRequestResolver.message}"/>
+ <param name="messageKey" value="#{wikiRequestResolver.messageKey}"/>
+ <param name="messageSeverity" value="#{wikiRequestResolver.messageSeverity}"/>
<action execute="#{wikiRequestResolver.resolve}"/>
<navigation>
<rule if-outcome="docDisplay">
@@ -37,7 +38,7 @@
<end-conversation before-redirect="true"/>
<redirect view-id="/wiki.xhtml">
<param name="nodeId" value="#{documentHistory.currentFile.id}"/>
- <param name="message" value="lacewiki.msg.docHistory.PurgedHistory"/>
+ <param name="messageKey" value="lacewiki.msg.docHistory.PurgedHistory"/>
</redirect>
</rule>
@@ -189,7 +190,7 @@
<rule if-outcome="persisted">
<end-conversation before-redirect="true"/>
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.AccountCreatedConfirmationSent"/>
+ <param name="messageKey" value="lacewiki.msg.AccountCreatedConfirmationSent"/>
</redirect>
</rule>
</navigation>
@@ -203,7 +204,7 @@
<rule if-outcome="updatedCurrentCredentials">
<end-conversation before-redirect="true"/>
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.UpdatedCurrentCredentials"/>
+ <param name="messageKey" value="lacewiki.msg.UpdatedCurrentCredentials"/>
</redirect>
</rule>
<rule if-outcome="removed">
@@ -227,12 +228,13 @@
<navigation>
<rule if-outcome="activated">
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.AccountActivatedPleaseLogin"/>
+ <param name="messageKey" value="lacewiki.msg.AccountActivatedPleaseLogin"/>
</redirect>
</rule>
<rule if-outcome="notFound">
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.InvalidActivationCode"/>
+ <param name="messageKey" value="lacewiki.msg.InvalidActivationCode"/>
+ <param name="messageSeverity" value="WARN"/>
</redirect>
</rule>
</navigation>
@@ -243,12 +245,13 @@
<navigation>
<rule if-outcome="prepared">
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.resetPassword.PasswordResetPrepared"/>
+ <param name="messageKey" value="lacewiki.msg.resetPassword.PasswordResetPrepared"/>
</redirect>
</rule>
<rule if-outcome="notFound">
<redirect view-id="/wiki.xhtml">
- <param name="message" value="lacewiki.msg.InvalidActivationCode"/>
+ <param name="messageKey" value="lacewiki.msg.InvalidActivationCode"/>
+ <param name="messageSeverity" value="WARN"/>
</redirect>
</rule>
</navigation>
@@ -269,11 +272,6 @@
<redirect url="#{wikiURLRenderer.renderSearchURL(wikiSearch.simpleQuery)}"/>
</rule>
- <rule if-outcome="error">
- <redirect view-id="/message.xhtml">
- <message severity="ERROR">#{messages['lacewiki.msg.FatalError']}</message>
- </redirect>
- </rule>
</navigation>
</page>
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-22 11:00:11 UTC (rev 8262)
@@ -171,29 +171,25 @@
// Set activation code (unique user in time)
String seed = getInstance().getUsername() + System.currentTimeMillis() + prefs.getActivationCodeSalt();
getInstance().setActivationCode( ((Hash)Component.getInstance(Hash.class)).hash(seed) );
+ getLog().debug("setting activation code of newly registered user: " + getInstance().getActivationCode());
String outcome = super.persist();
if (outcome != null) {
- try {
+ getLog().debug("sending activation e-mail to registered user");
- // Send confirmation email
- renderer.render("/themes/"
- + Preferences.instance().get(WikiPreferences.class).getThemeName()
- + "/mailtemplates/confirmationRegistration.xhtml");
+ // Send confirmation email
+ renderer.render("/themes/"
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ + "/mailtemplates/confirmationRegistration.xhtml");
- /* For debugging
- statusMessages.addFromResourceBundleOrDefault(
- INFO,
- getMessageKeyPrefix() + "confirmationEmailSent",
- "Activiate account: /confirmRegistration.seam?activationCode=" + getInstance().getActivationCode());
- */
+ /* For debugging
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
+ getMessageKeyPrefix() + "confirmationEmailSent",
+ "Activiate account: /confirmRegistration.seam?activationCode=" + getInstance().getActivationCode());
+ */
- } catch (Exception ex) {
- statusMessages.add(ERROR, "Couldn't send confirmation email: " + ex.getMessage());
- return "error";
- }
-
org.jboss.seam.core.Events.instance().raiseEvent("User.persisted", getInstance());
}
return outcome;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-05-22 11:00:11 UTC (rev 8262)
@@ -17,8 +17,8 @@
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.search.WikiSearch;
-import static org.jboss.seam.international.StatusMessage.Severity.INFO;
import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage;
/**
* Returns <tt>docDisplay</tt>, <tt>dirDisplay</tt>, or <tt>search</tt> for the resolved <tt>nodeId</tt>.
@@ -87,11 +87,15 @@
public String getNodeName() { return nodeName; }
public void setNodeName(String nodeName) { this.nodeName = nodeName != null && nodeName.length() > 0 ? nodeName : null; }
- protected String message;
+ protected String messageKey;
+ protected String messageSeverity;
- public String getMessage() { return message; }
- public void setMessage(String message) { this.message = message; }
+ public String getMessageKey() { return messageKey; }
+ public void setMessageKey(String messageKey) { this.messageKey = messageKey; }
+ public String getMessageSeverity() { return messageSeverity; }
+ public void setMessageSeverity(String messageSeverity) { this.messageSeverity = messageSeverity;}
+
protected WikiDocument currentDocument = null;
protected WikiDirectory currentDirectory = null;
@@ -102,12 +106,17 @@
resolveRequestParameters();
// Queue a message if requested (for message passing across session invalidations and conversations)
- if (message != null) {
- log.debug("wiki request contained message: " + message);
- StatusMessages.instance().addFromResourceBundle(
- INFO,
- message
- );
+ if (getMessageKey() != null) {
+ log.debug("wiki request contained message: " + getMessageKey());
+ StatusMessage.Severity msgSeverity = StatusMessage.Severity.INFO;
+ if (getMessageSeverity() != null && getMessageSeverity().length() > 0) {
+ try {
+ msgSeverity = StatusMessage.Severity.valueOf(getMessageSeverity().trim());
+ } catch (IllegalArgumentException ex) {
+ // Swallow
+ }
+ }
+ StatusMessages.instance().addFromResourceBundle(msgSeverity, getMessageKey());
}
// Have we been called with a nodeId request parameter, must be a document
Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/docEdit_d.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -125,7 +125,7 @@
</div>
</s:div>
<s:div id="pushOnSiteFeedSwitchUnmanaged">
- <s:fragment rendered="#{s:hasPermission('Feed','write',wikiRoot.feed)}">
+ <s:fragment rendered="#{s:hasPermission('Feed','write',wikiRoot.feed) and s:hasPermission('User','isAdmin',currentUser)}">
<s:div styleClass="entry">
<div class="label"> </div>
<div class="input">
@@ -158,7 +158,7 @@
</div>
</s:div>
<s:div id="pushOnSiteFeedSwitch">
- <s:fragment rendered="#{s:hasPermission('Feed','write',wikiRoot.feed)}">
+ <s:fragment rendered="#{s:hasPermission('Feed','write',wikiRoot.feed) and s:hasPermission('User','isAdmin',currentUser)}">
<s:div styleClass="entry">
<div class="label"> </div>
<div class="input">
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -354,6 +354,12 @@
font-weight: bold;
}
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
+
/* General
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/default/js/lacewiki.js
===================================================================
--- trunk/examples/wiki/view/themes/default/js/lacewiki.js 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/js/lacewiki.js 2008-05-22 11:00:11 UTC (rev 8262)
@@ -1,5 +1,19 @@
/* Cachable global scripts */
+// ###################### COOKIE SUPPORT #################################
+
+function checkCookieSupport() {
+ if(!document.cookie) {
+ jQuery("body")
+ .prepend("<div class='cookieJavaScriptWarning'>" +
+ "Please enable cookie support in your browser, otherwise " +
+ "some features of this website will not work. Cookies are " +
+ "used only for temporary client identification and destroyed " +
+ "when you quit the browser." +
+ "</div>");
+ }
+}
+
// ###################### Log #################################
function log(message) {
Modified: trunk/examples/wiki/view/themes/default/m/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/m/css/template.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/m/css/template.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -144,4 +144,10 @@
.commentAuthorDate {
font-style: italic;
padding: 5px;
-}
\ No newline at end of file
+}
+
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
Modified: trunk/examples/wiki/view/themes/default/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/m/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/m/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -17,6 +17,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<s:div id="screen">
<s:div id="header">
@@ -28,12 +35,12 @@
</s:div>
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
</ui:repeat>
</s:div>
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,7 +16,7 @@
you registered an account on the LaceWiki. You need to click the following link to confirm the
validity of your e-mail address and to activate your account:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</a>
<p>
Regards,<br/>
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,7 +16,7 @@
you (or someone else) requested a password reset on LaceWiki. You need to click the following link to confirm the
validity of your e-mail address and to enter a new password:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</a>
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -195,6 +195,7 @@
}
function initPage() {
+ checkCookieSupport();
wrapBoxes();
}
@@ -207,6 +208,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<ui:include src="../../includes/helpPopup.xhtml"/>
<s:div id="screen">
@@ -281,25 +289,23 @@
<s:div id="messageBoxContainer"><j4j:idProxy id="messageBoxContainer_"/>
<s:div styleClass="box" rendered="#{!empty facesMessages.currentGlobalMessages}">
<div id="messageBox" class="messageBox">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
-
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal == 0}">
+ rendered="#{msg.severity.ordinal == 0}">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal > 0}">
+ rendered="#{msg.severity.ordinal > 0}">
<h:graphicImage value="#{imagePath}/attention.gif"
- rendered="#{message.severity.ordinal > 0}"
+ rendered="#{msg.severity.ordinal > 0}"
width="18" height="18"
styleClass="attentionImage"/>
- <h:outputText styleClass="attentionMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="attentionMessage" value="#{msg.summary}"/>
</h:panelGrid>
-
</ui:repeat>
<script type="text/javascript">jQuery(function() {
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -352,7 +352,13 @@
.messageBox .infoMessage {
}
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
+
/* General
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/inrelationto/js/lacewiki.js
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/js/lacewiki.js 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/js/lacewiki.js 2008-05-22 11:00:11 UTC (rev 8262)
@@ -1,5 +1,19 @@
/* Cachable global scripts */
+// ###################### COOKIE SUPPORT #################################
+
+function checkCookieSupport() {
+ if(!document.cookie) {
+ jQuery("body")
+ .prepend("<div class='cookieJavaScriptWarning'>" +
+ "Please enable cookie support in your browser, otherwise " +
+ "some features of this website will not work. Cookies are " +
+ "used only for temporary client identification and destroyed " +
+ "when you quit the browser." +
+ "</div>");
+ }
+}
+
// ###################### Log #################################
function log(message) {
Modified: trunk/examples/wiki/view/themes/inrelationto/m/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/m/css/template.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/m/css/template.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -145,4 +145,10 @@
.commentAuthorDate {
font-style: italic;
padding: 5px;
-}
\ No newline at end of file
+}
+
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
Modified: trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,6 +16,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<s:div id="screen">
<s:div id="header">
@@ -29,12 +36,12 @@
</s:div>
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
</ui:repeat>
</s:div>
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/confirmationRegistration.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/confirmationRegistration.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/confirmationRegistration.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -15,7 +15,7 @@
you registered an account on the LaceWiki. You need to click the following link to confirm the
validity of your e-mail address and to activate your account:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</a>
<p>
Regards,<br/>
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,7 +16,7 @@
you (or someone else) requested a password reset on LaceWiki. You need to click the following link to confirm the
validity of your e-mail address and to enter a new password:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</a>
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -202,6 +202,7 @@
}
function initPage() {
+ checkCookieSupport();
wrapBoxes();
}
@@ -214,6 +215,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<ui:include src="../../includes/helpPopup.xhtml"/>
<s:div id="screen">
@@ -285,23 +293,23 @@
<!-- Status messages -->
<s:div id="messageBoxContainer">
<s:div id="messageBox" styleClass="messageBox" rendered="#{!empty facesMessages.currentGlobalMessages}">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal == 0}">
+ rendered="#{msg.severity.ordinal == 0}">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="messageBoxImage infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal > 0}">
+ rendered="#{msg.severity.ordinal > 0}">
<h:graphicImage value="#{imagePath}/attention.gif"
- rendered="#{message.severity.ordinal > 0}"
+ rendered="#{msg.severity.ordinal > 0}"
width="18" height="18"
styleClass="messageBoxImage attentionImage"/>
- <h:outputText styleClass="attentionMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="attentionMessage" value="#{msg.summary}"/>
</h:panelGrid>
</ui:repeat>
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -469,6 +469,12 @@
color: #666;
}
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
+
/* General
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/sfwkorg/js/lacewiki.js
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/js/lacewiki.js 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/js/lacewiki.js 2008-05-22 11:00:11 UTC (rev 8262)
@@ -1,5 +1,19 @@
/* Cachable global scripts */
+// ###################### COOKIE SUPPORT #################################
+
+function checkCookieSupport() {
+ if(!document.cookie) {
+ jQuery("body")
+ .prepend("<div class='cookieJavaScriptWarning'>" +
+ "Please enable cookie support in your browser, otherwise " +
+ "some features of this website will not work. Cookies are " +
+ "used only for temporary client identification and destroyed " +
+ "when you quit the browser." +
+ "</div>");
+ }
+}
+
// ###################### Log #################################
function log(message) {
Modified: trunk/examples/wiki/view/themes/sfwkorg/m/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/m/css/template.css 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/m/css/template.css 2008-05-22 11:00:11 UTC (rev 8262)
@@ -140,4 +140,10 @@
.commentText {
padding: 10px;
-}
\ No newline at end of file
+}
+
+.cookieJavaScriptWarning {
+ margin: 10px;
+ color: red;
+ text-align: center;
+}
Modified: trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -15,6 +15,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<s:div id="screen">
<h:outputText value="Seam Framework - "/><ui:insert name="screenname"/>
@@ -24,12 +31,12 @@
</s:div>
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
</ui:repeat>
</s:div>
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/confirmationRegistration.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/confirmationRegistration.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/confirmationRegistration.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,7 +16,7 @@
you registered an account on the Seam community website. You need to click the following link to confirm the
validity of your e-mail address and to activate your account:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/confirmRegistration.seam?activationCode=#{userHome.instance.activationCode}">Click this link to activate the account '#{userHome.instance.username}'</a>
</body>
</html>
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -16,7 +16,7 @@
you (or someone else) requested a password reset on the Seam community website. You need to click the following link to confirm the
validity of your e-mail address and to enter a new password:</p>
- <h:outputLink value="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</h:outputLink>
+ <a href="#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}">Click this link to reset the password of the account '#{resetPasswordOfUser.username}'</a>
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-05-22 10:48:01 UTC (rev 8261)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-05-22 11:00:11 UTC (rev 8262)
@@ -196,6 +196,7 @@
}
function initPage() {
+ checkCookieSupport();
wrapBoxes();
}
@@ -209,6 +210,13 @@
<body>
+<noscript>
+ <div class="cookieJavaScriptWarning">
+ Please activate JavaScript in your browser. Without it, you will only be able to browse this website
+ but clicking on any advanced feature (any forms or submit buttons) will not work.
+ </div>
+</noscript>
+
<ui:include src="../../includes/helpPopup.xhtml"/>
<div id="wrapper">
@@ -337,23 +345,23 @@
<!-- Status messages -->
<s:div id="messageBoxContainer">
<s:div id="messageBox" styleClass="messageBox" rendered="#{!empty facesMessages.currentGlobalMessages}">
- <ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
+ <ui:repeat var="msg" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal == 0}">
+ rendered="#{msg.severity.ordinal == 0}">
<h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="messageBoxImage infoImage"/>
- <h:outputText styleClass="infoMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="infoMessage" value="#{msg.summary}"/>
</h:panelGrid>
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
- rendered="#{message.severity.ordinal > 0}">
+ rendered="#{msg.severity.ordinal > 0}">
<h:graphicImage value="#{imagePath}/attention.gif"
- rendered="#{message.severity.ordinal > 0}"
+ rendered="#{msg.severity.ordinal > 0}"
width="18" height="18"
styleClass="messageBoxImage attentionImage"/>
- <h:outputText styleClass="attentionMessage" value="#{message.summary}"/>
+ <h:outputText styleClass="attentionMessage" value="#{msg.summary}"/>
</h:panelGrid>
</ui:repeat>
More information about the seam-commits
mailing list