You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/06/09 05:19:20 UTC
svn commit: r189695 [66/67] - in /incubator/roller/trunk: ./ contrib/
contrib/lib/ contrib/plugins/ contrib/plugins/src/ contrib/plugins/src/org/
contrib/plugins/src/org/roller/ contrib/plugins/src/org/roller/presentation/
contrib/plugins/src/org/roller/presentation/velocity/
contrib/plugins/src/org/roller/presentation/velocity/plugins/
contrib/plugins/src/org/roller/presentation/velocity/plugins/acronyms/
contrib/plugins/src/org/roller/presentation/velocity/plugins/bookmarks/
contrib/plugins/src/org/roller/presentation/velocity/plugins/email/
contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/
contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/
contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/
contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/
contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/
contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/
custom/ custom/src/ custom/web/ docs/ docs/images/ docs/installguide/
docs/installguide/old/ docs/userguide/ docs/userguide/images/
docs/userguide/old/ metadata/ metadata/database/
metadata/database/hibernate/ metadata/xdoclet/ nbproject/ personal/
personal/eclipse/ personal/testing/ sandbox/ sandbox/planetroller/
sandbox/planetroller/metadata/ sandbox/planetroller/metadata/database/
sandbox/planetroller/src/ sandbox/planetroller/src/org/
sandbox/planetroller/src/org/roller/
sandbox/planetroller/src/org/roller/tools/
sandbox/planetroller/src/org/roller/tools/planet/
sandbox/planetroller/templates/ sandbox/planetroller/test/
sandbox/planetroller/test/org/ sandbox/planetroller/test/org/roller/
sandbox/planetroller/test/org/roller/model/
sandbox/planetroller/test/org/roller/tools/
sandbox/planetroller/test/org/roller/tools/planet/
sandbox/planetroller/testdata/ sandbox/planetroller/testdata/cache/
sandbox/planetroller/testdata/output/ sandbox/standalone/
sandbox/standalone/jspwiki/ sandbox/standalone/jspwiki/default/
sandbox/standalone/jspwiki/default/images/ sandbox/standalone/lib/
sandbox/standalone/src/ sandbox/standalone/src/org/
sandbox/standalone/src/org/roller/ sandbox/standalone/src/org/roller/jspwiki/
sandbox/standalone/src/org/roller/tomcat/
sandbox/standalone/src/org/roller/util/ sandbox/standalone/tests/
sandbox/standalone/tests/org/ sandbox/standalone/tests/org/roller/
sandbox/standalone/tests/org/roller/util/ sandbox/standalone/tomcat/ src/
src/org/ src/org/roller/ src/org/roller/business/
src/org/roller/business/hibernate/ src/org/roller/business/search/
src/org/roller/business/search/operations/ src/org/roller/business/utils/
src/org/roller/config/ src/org/roller/config/runtime/ src/org/roller/model/
src/org/roller/pojos/ src/org/roller/presentation/
src/org/roller/presentation/atomapi/ src/org/roller/presentation/bookmarks/
src/org/roller/presentation/bookmarks/actions/
src/org/roller/presentation/bookmarks/formbeans/
src/org/roller/presentation/bookmarks/tags/
src/org/roller/presentation/filters/ src/org/roller/presentation/forms/
src/org/roller/presentation/newsfeeds/ src/org/roller/presentation/pagecache/
src/org/roller/presentation/pagecache/rollercache/
src/org/roller/presentation/pings/ src/org/roller/presentation/planet/
src/org/roller/presentation/tags/ src/org/roller/presentation/tags/calendar/
src/org/roller/presentation/tags/menu/ src/org/roller/presentation/util/
src/org/roller/presentation/velocity/ src/org/roller/presentation/weblog/
src/org/roller/presentation/weblog/actions/
src/org/roller/presentation/weblog/formbeans/
src/org/roller/presentation/weblog/tags/ src/org/roller/presentation/website/
src/org/roller/presentation/website/actions/
src/org/roller/presentation/website/formbeans/
src/org/roller/presentation/website/tags/
src/org/roller/presentation/xmlrpc/ src/org/roller/util/
src/org/roller/util/rome/ tests/ tests/org/ tests/org/roller/
tests/org/roller/ant/ tests/org/roller/business/
tests/org/roller/presentation/ tests/org/roller/presentation/atomapi/
tests/org/roller/presentation/bookmarks/
tests/org/roller/presentation/filters/
tests/org/roller/presentation/velocity/
tests/org/roller/presentation/velocity/plugins/
tests/org/roller/presentation/velocity/plugins/smileys/
tests/org/roller/presentation/velocity/plugins/textile/
tests/org/roller/presentation/weblog/ tests/org/roller/presentation/xmlrpc/
tests/org/roller/util/ tests/org/roller/util/rome/ tools/ tools/buildtime/
tools/buildtime/ant-1.6.2/ tools/buildtime/findbugs/
tools/buildtime/findbugs/lib/ tools/buildtime/findbugs/plugin/
tools/buildtime/mockrunner-0.3/ tools/buildtime/mockrunner-0.3/lib/
tools/buildtime/mockrunner-0.35/ tools/buildtime/mockrunner-0.35/lib/
tools/buildtime/tomcat-4.1.24/ tools/buildtime/xdoclet-1.2/
tools/buildtime/xdoclet-1.2/lib/ tools/hibernate-2.1/
tools/hibernate-2.1/lib/ tools/lib/ tools/standard-1.0.3/
tools/standard-1.0.3/lib/ tools/standard-1.0.3/tld/ tools/struts-1.2.4/
tools/struts-1.2.4/lib/ web/ web/WEB-INF/ web/WEB-INF/classes/
web/WEB-INF/classes/flavors/ web/WEB-INF/classes/themes/ web/bookmarks/
web/editor/ web/editor/images/ web/images/ web/images/editor/
web/images/midas/ web/images/preview/ web/images/smileys/ web/planet/
web/tags/ web/templates/ web/theme/ web/theme/images/ web/theme/lavender/
web/theme/scripts/ web/theme/scripts/classes/ web/themes/ web/themes/basic/
web/themes/berkley/ web/themes/berkley/images/ web/themes/brushedmetal/
web/themes/brushedmetal/images/ web/themes/cheb/ web/themes/cheb/images/
web/themes/cheb/scripts/ web/themes/clean/ web/themes/currency-i18n/
web/themes/currency-i18n/images/ web/themes/currency/
web/themes/currency/images/ web/themes/grey2/ web/themes/moonshine/
web/themes/movablemanila/ web/themes/movablemanila/images/
web/themes/pacifica/ web/themes/robot/ web/themes/rolling/
web/themes/rolling/images/ web/themes/sotto/ web/themes/sotto/images/
web/themes/sotto/styles/ web/themes/sunsets/ web/themes/sunsets/images/
web/themes/sunsets/scripts/ web/themes/sunsets/styles/ web/themes/werner/
web/themes/x2/ web/themes/x2/images/ web/themes/x2/scripts/
web/themes/x2/styles/ web/weblog/ web/website/
Added: incubator/roller/trunk/web/weblog/WeblogEdit.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/WeblogEdit.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/WeblogEdit.jsp (added)
+++ incubator/roller/trunk/web/weblog/WeblogEdit.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,452 @@
+<%@ include file="/taglibs.jsp" %><%@ include file="/theme/header.jsp" %>
+<%@ page import="org.roller.pojos.*" %>
+<%@ page import="org.roller.presentation.weblog.formbeans.WeblogEntryFormEx" %>
+<%@ page import="org.roller.presentation.weblog.actions.WeblogEntryPageModel" %>
+<%@ page import="org.roller.presentation.RollerRequest" %>
+<%
+WeblogEntryPageModel model = (WeblogEntryPageModel)request.getAttribute("model");
+try {
+%>
+<script type="text/javascript">
+<!--
+function postWeblogEntry() {
+ document.weblogEntryFormEx.submit();
+}
+function spellCheck() {
+ document.weblogEntryFormEx.method.value = "spellCheck";
+ postWeblogEntry();
+}
+function previewMode() {
+ document.weblogEntryFormEx.method.value = "preview";
+ postWeblogEntry();
+}
+function returnToEditMode() {
+ document.weblogEntryFormEx.method.value = "returnToEditMode";
+ postWeblogEntry();
+}
+function submitSpellingCorrections() {
+ document.weblogEntryFormEx.method.value = "correctSpelling";
+ postWeblogEntry();
+}
+function deleteWeblogEntry() {
+ document.weblogEntryFormEx.method.value = "removeOk";
+ postWeblogEntry();
+}
+function updateComments() {
+ document.weblogEntryFormEx.method.value = "updateComments";
+ postWeblogEntry();
+}
+function sendTrackback() {
+ document.weblogEntryFormEx.method.value = "sendTrackback";
+ postWeblogEntry();
+}
+function saveDraft() {
+ document.weblogEntryFormEx.publishEntry.value = "false";
+ document.weblogEntryFormEx.method.value = "save";
+ postWeblogEntry();
+}
+function publish() {
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.method.value = "save";
+ postWeblogEntry();
+}
+-->
+</script>
+
+<h1><fmt:message key="weblogEdit.pageTitle" /></h1>
+
+<html:form action="/editor/weblog" method="post" focus="title">
+
+ <html:hidden property="day"/>
+ <html:hidden property="id"/>
+ <html:hidden property="anchor"/>
+ <html:hidden property="updateTime"/>
+ <html:hidden property="publishEntry"/>
+ <html:hidden name="method" property="method" value="save"/>
+
+ <%-- ================================================================== --%>
+ <%-- weblog entry fields: title, link, category, etc. --%>
+
+ <div class="row">
+ <label style="width:10%; float:left;" for="title"><fmt:message key="weblogEdit.title" /></label>
+ <c:if test="${!empty weblogEntryFormEx.id}">
+ <a href="#trackbacks" style="float:right"><fmt:message key="weblogEdit.trackbacks" /></a>
+ </c:if>
+ <html:text property="title" size="70" maxlength="255" tabindex="1" />
+ </div>
+
+ <div class="row">
+ <label style="width:10%; float:left;" for="link"><fmt:message key="weblogEdit.link" /></label>
+ <c:if test="${model.editMode && !empty model.comments}" >
+ <a href="#comments" style="float:right"><fmt:message key="weblogEdit.comments" /></a>
+ </c:if>
+ <html:text property="link" size="70" maxlength="255" tabindex="2" />
+ </div>
+
+ <div class="row">
+ <label style="width:10%; float:left;" for="categoryId"><fmt:message key="weblogEdit.category" /></label>
+ <html:select property="categoryId" size="1" tabindex="4">
+ <html:optionsCollection name="model" property="categories" value="id" label="path" />
+ </html:select>
+ </div>
+
+ <c:if test="${!empty weblogEntryFormEx.id}">
+ <div class="row">
+ <label style="width:10%; float:left;" for="categoryId">
+ <fmt:message key="weblogEdit.permaLink" />
+ </label>
+ <a href='<c:out value="${model.permaLink}" />'>
+ <c:out value="${model.permaLink}" />
+ </a>
+ </div>
+ </c:if>
+
+ <div class="row">
+ <label style="width:10%; float:left;" for="title">
+ <fmt:message key="weblogEdit.status" />
+ </label>
+ <c:if test="${!empty weblogEntryFormEx.id}">
+ <c:if test="${weblogEntryFormEx.publishEntry}">
+ <span style="color:green; font-weight:bold">
+ <fmt:message key="weblogEdit.published" />
+ (<fmt:message key="weblogEdit.updateTime" />
+ <fmt:formatDate value="${weblogEntryFormEx.updateTime}" type="both"
+ dateStyle="short" timeStyle="short" />)
+ </span>
+ </c:if>
+ <c:if test="${!weblogEntryFormEx.publishEntry}">
+ <span style="color:orange; font-weight:bold">
+ <fmt:message key="weblogEdit.draft" />
+ (<fmt:message key="weblogEdit.updateTime" />
+ <fmt:formatDate value="${weblogEntryFormEx.updateTime}" type="both"
+ dateStyle="short" timeStyle="short" />)
+ </span>
+ </c:if>
+ </c:if>
+ <c:if test="${empty weblogEntryFormEx.id}">
+ <span style="color:red; font-weight:bold"><fmt:message key="weblogEdit.unsaved" /></span>
+ </c:if>
+ </div>
+
+ <%-- ================================================================== --%>
+ <%-- Weblog edit, preview, or spell check area --%>
+
+ <%-- EDIT MODE --%>
+ <c:if test="${model.editMode}">
+
+ <div style="width: 100%;"> <%-- need this div to control text-area size in IE 6 --%>
+
+ <%-- include edit page --%>
+ <div style="clear:both">
+ <jsp:include page="<%= model.getEditorPage() %>" />
+ </div>
+
+ </div>
+
+ </c:if>
+
+ <%-- PREVIEW MODE --%>
+ <c:if test="${model.previewMode}" >
+ <br />
+ <div class="centerTitle"><fmt:message key="weblogEdit.previewMode" /></div>
+ <html:hidden property="text" />
+ <div class="previewEntry">
+ <roller:ApplyPlugins name="model" property="weblogEntry" skipFlag="true" />
+ </div>
+ </c:if>
+
+ <%-- SPELLCHECK MODE --%>
+ <c:if test="${model.spellMode}" >
+ <br />
+ <div class="centerTitle"><fmt:message key="weblogEdit.spellMode" /></div>
+ <html:hidden property="text" />
+ <div class="previewEntry">
+ <c:out value="${model.spellCheckHtml}" escapeXml="false" />
+ </div>
+ </c:if>
+
+ <%-- ================================================================== --%>
+ <%-- the button box --%>
+
+ <br />
+ <div class="control">
+
+ <%-- save draft and post buttons: only in edit and preview mode --%>
+ <c:if test="${model.editMode || model.previewMode}" >
+
+ <input type="button" name="post"
+ value='<fmt:message key="weblogEdit.post" />'
+ onclick="publish()" />
+
+ <input type="button" name="draft"
+ value='<fmt:message key="weblogEdit.save" />'
+ onclick="saveDraft()" />
+
+ <%-- if entry has been saved, then show delete button --%>
+ <c:if test="${!empty weblogEntryFormEx.id}">
+ <input type="button" name="draft"
+ value='<fmt:message key="weblogEdit.deleteEntry" />'
+ onclick="deleteWeblogEntry()" />
+ </c:if>
+
+ </c:if>
+
+ <%-- edit mode buttons --%>
+ <c:if test="${model.editMode}" >
+
+ <input type="button" name="preview"
+ value='<fmt:message key="weblogEdit.previewMode" />'
+ onclick="previewMode()" />
+
+ <input type="button" name="spelling"
+ value='<fmt:message key="weblogEdit.check" />'
+ onclick="spellCheck()" />
+
+ </c:if>
+
+ <%-- preview mode buttons --%>
+ <c:if test="${model.previewMode}" >
+ <input type="button" name="edit" value='<fmt:message key="weblogEdit.returnToEditMode" />'
+ onclick="returnToEditMode()" />
+ </c:if>
+
+ <%-- spell mode buttons --%>
+ <c:if test="${model.spellMode}" >
+
+ <input type="button" name="correctSpelling"
+ value='<fmt:message key="weblogEdit.correctSpelling" />'
+ onclick="submitSpellingCorrections()" />
+
+ <input type="button" name="cancelSpelling"
+ value='<fmt:message key="weblogEdit.cancelSpelling" />'
+ onclick="returnToEditMode()" />
+
+ </c:if>
+ </div>
+ <br />
+
+ <%-- ================================================================== --%>
+ <%-- publish time --%>
+
+ <div id="dateControlToggle" class="controlToggle">
+ <span id="idateControl">+</span>
+ <a class="controlToggle" onclick="javascript:toggleControl('dateControlToggle','dateControl')">
+ <fmt:message key="weblogEdit.pubTime" />
+ </a>
+ </div>
+ <div id="dateControl" class="control" style="display:none">
+ <html:select property="hours">
+ <html:options name="model" property="hoursList" />
+ </html:select>
+ :
+ <html:select property="minutes" >
+ <html:options name="model" property="minutesList" />
+ </html:select>
+ :
+ <html:select property="seconds">
+ <html:options name="model" property="secondsList" />
+ </html:select>
+
+ <roller:Date property="dateString" dateFormat='<%= model.getShortDateFormat() %>' />
+ </div>
+ <script type="text/javascript">
+ <!--
+ toggleControl('dateControlToggle','dateControl');
+ -->
+ </script>
+
+ <%-- ================================================================== --%>
+ <%-- comment settings --%>
+
+ <div id="commentControlToggle" class="controlToggle">
+ <span id="icommentControl">+</span>
+ <a class="controlToggle" onclick="javascript:toggleControl('commentControlToggle','commentControl')">
+ <fmt:message key="weblogEdit.commentSettings" />
+ </a>
+ </div>
+ <div id="commentControl" class="control" style="display:none">
+ <html:checkbox property="allowComments" onchange="onAllowCommentsChange()" />
+ <fmt:message key="weblogEdit.allowComments" />
+ <fmt:message key="weblogEdit.commentDays" />
+ <html:select property="commentDays">
+ <html:option key="weblogEdit.unlimitedCommentDays" value="0" />
+ <html:option key="weblogEdit.days1" value="1" />
+ <html:option key="weblogEdit.days2" value="2" />
+ <html:option key="weblogEdit.days3" value="3" />
+ <html:option key="weblogEdit.days4" value="4" />
+ <html:option key="weblogEdit.days5" value="5" />
+ <html:option key="weblogEdit.days7" value="7" />
+ <html:option key="weblogEdit.days10" value="10" />
+ <html:option key="weblogEdit.days20" value="20" />
+ <html:option key="weblogEdit.days30" value="30" />
+ <html:option key="weblogEdit.days60" value="60" />
+ <html:option key="weblogEdit.days90" value="90" />
+ </html:select>
+ <br />
+ </div>
+
+ <%-- ================================================================== --%>
+ <%-- plugin chooser --%>
+
+ <c:if test="${model.hasPagePlugins}">
+ <div id="pluginControlToggle" class="controlToggle">
+ <span id="ipluginControl">+</span>
+ <a class="controlToggle" onclick="javascript:toggleControl('pluginControlToggle','pluginControl')">
+ <fmt:message key="weblogEdit.pluginsToApply" /></a>
+ </div>
+ <div id="pluginControl" class="control" style="display:none">
+ <logic:iterate id="plugin" type="org.roller.presentation.velocity.PagePlugin"
+ collection="<%= org.roller.presentation.velocity.ContextLoader.getPagePlugins() %>">
+ <html:multibox property="pluginsArray"
+ title="<%= plugin.getName() %>" value="<%= plugin.getName() %>"
+ styleId="<%= plugin.getName() %>"/></input>
+ <label for="<%= plugin.getName() %>"><%= plugin.getName() %></label>
+ <a href="javascript:void(0);" onmouseout="return nd();"
+ onmouseover="return overlib('<%= plugin.getDescription() %>', STICKY, MOUSEOFF, TIMEOUT, 3000);">?</a>
+ <br />
+ </logic:iterate>
+ </div>
+ </c:if>
+
+ <%-- ================================================================== --%>
+ <%-- misc settings --%>
+
+ <div id="miscControlToggle" class="controlToggle">
+ <span id="imiscControl">+</span>
+ <a class="controlToggle" onclick="javascript:toggleControl('miscControlToggle','miscControl')">
+ <fmt:message key="weblogEdit.miscSettings" /></a>
+ </div>
+ <div id="miscControl" class="control" style="display:none">
+
+ <html:checkbox property="rightToLeft" />
+ <fmt:message key="weblogEdit.rightToLeft" />
+ <br />
+
+ <c:if test="${model.isAdmin}">
+ <html:checkbox property="pinnedToMain" />
+ <fmt:message key="weblogEdit.pinnedToMain" />
+ <br />
+ </c:if>
+ <c:if test="${!model.isAdmin}">
+ <html:hidden property="pinnedToMain" />
+ </c:if>
+
+ </div>
+
+ <%-- ================================================================== --%>
+ <%-- MediaCast settings --%>
+
+ <div id="mediaCastControlToggle" class="controlToggle">
+ <span id="imediaCastControl">+</span>
+ <a class="controlToggle" onclick="javascript:toggleControl('mediaCastControlToggle','mediaCastControl')">
+ MediaCast Settings</a>
+ </div>
+ <div id="mediaCastControl" class="control" style="display:none">
+ <%
+ WeblogEntryFormEx form = model.getWeblogEntryForm();
+ String att_url = (String)form.getAttributes().get("att_mediacast_url");
+ att_url = (att_url == null) ? "" : att_url;
+ %>
+ <b>URL:</b> <input name="att_mediacast_url" type="text" size="80" maxlength="255" value='<%= att_url %>' />
+<%
+ String att_type = (String)form.getAttributes().get("att_mediacast_type");
+ String att_length = (String)form.getAttributes().get("att_mediacast_length");
+%>
+<% if (att_url != null && att_type != null && att_length != null) { %>
+ <b>Type:</b> <%= att_type %>
+ <b>Length:</b> <%= att_length %>
+<% } else if (att_url != null && att_url.trim().length()!=0) { %>
+ <span style="color:red">MediaCast URL is invalid</span>
+<% } %>
+ </div>
+
+ <%-- ================================================================== --%>
+ <%-- Trackback control --%>
+ <c:if test="${!empty weblogEntryFormEx.id}">
+ <br />
+ <br />
+ <a name="trackbacks"></a>
+ <h1><fmt:message key="weblogEdit.trackback" /></h1>
+ <fmt:message key="weblogEdit.trackbackUrl" /><br />
+ <html:text property="trackbackUrl" size="80" maxlength="255" />
+
+ <input type="button" name="draft"
+ value='<fmt:message key="weblogEdit.sendTrackback" />'
+ onclick="sendTrackback()" />
+
+ </c:if>
+
+ <%-- ================================================================== --%>
+ <%-- Comments of this weblog entry --%>
+
+ <c:if test="${model.editMode && !empty model.comments}" >
+ <br />
+ <br />
+ <a name="comments"></a>
+ <h1><fmt:message key="weblogEdit.comments" /></h1>
+ <br />
+ <table class="rollertable">
+ <tr>
+ <th class="rollertable"><fmt:message key="weblogEdit.commentDelete" /></th>
+ <th class="rollertable"><fmt:message key="weblogEdit.commentSpam" /></th>
+ <th class="rollertable"><fmt:message key="weblogEdit.comment" /></th>
+ <tr>
+ <c:forEach var="comment" items="${model.comments}">
+ <tr>
+
+ <td class="rollertable_entry" >
+ <html:multibox property="deleteComments">
+ <c:out value="${comment.id}" />
+ </html:multibox>
+ </td>
+
+ <td class="rollertable_entry" >
+ <html:multibox property="spamComments">
+ <c:out value="${comment.id}" />
+ </html:multibox>
+ </td>
+
+ <td class="rollertable_entry" valign="top" >
+ <span class="entryDetails">
+ <fmt:message key="weblogEdit.commenterName" />
+ [<c:out value="${comment.name}" />] |
+ <fmt:formatDate value="${comment.postTime}" type="both"
+ dateStyle="medium" timeStyle="medium" /><br />
+ <fmt:message key="weblogEdit.commenterEmail" />:
+ <c:out value="${comment.email}" /><br />
+ <fmt:message key="weblogEdit.commenterUrl" />:
+ <c:out value="${comment.url}" /><br />
+ </span>
+ <br />
+ <c:out value="${comment.content}" />
+ </td>
+
+ </tr>
+ </c:forEach>
+ </table>
+
+ <br />
+ <input type="button" name="post"
+ value='<fmt:message key="weblogEdit.updateComments" />'
+ onclick="updateComments(true)" />
+ </c:if>
+
+</html:form>
+
+<%--
+Add this back in once it has been properly internationalized
+<iframe id="keepalive" width="100%" height="25" style="border: none;"
+ src="<%= request.getContextPath() %>/keepalive.jsp" ></iframe>
+--%>
+
+<%@ include file="/theme/footer.jsp" %>
+
+<script type="text/javascript">
+<!--
+try {Start();} catch (e) {};
+-->
+</script>
+
+<% } catch (Throwable e) { e.printStackTrace(); } %>
+
+
Added: incubator/roller/trunk/web/weblog/WeblogEditSidebar.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/WeblogEditSidebar.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/WeblogEditSidebar.jsp (added)
+++ incubator/roller/trunk/web/weblog/WeblogEditSidebar.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,54 @@
+<%@ include file="/taglibs.jsp" %>
+<%@ page import="org.roller.presentation.weblog.actions.WeblogEntryPageModel" %>
+<%@ page import="org.roller.presentation.RollerRequest" %>
+<%
+WeblogEntryPageModel model = (WeblogEntryPageModel)request.getAttribute("model");
+%>
+
+<div style="font-size: x-small;">
+
+<span class="leftTitle">
+ <fmt:message key="weblogEdit.draftEntries" />
+</span>
+<br />
+<c:if test="${empty model.recentDraftEntries}">
+ <fmt:message key="application.none" />
+</c:if>
+<c:forEach var="post" items="${model.recentDraftEntries}">
+ <roller:link page="/editor/weblog.do">
+ <roller:linkparam
+ id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
+ name="post" property="id" />
+ <roller:linkparam id="method" value="edit" />
+ <img src='<c:url value="/images/Edit16.png"/>' align="absmiddle" border="0" alt="icon" title="Edit" />
+ <str:truncateNicely lower="23" upper="27">
+ <c:out value="${post.title}" />
+ </str:truncateNicely>
+ </roller:link>
+ <br />
+</c:forEach>
+<br />
+<br />
+
+<span class="leftTitle">
+ <fmt:message key="weblogEdit.publishedEntries" />
+</span>
+<br />
+<c:if test="${empty model.recentPublishedEntries}">
+ <fmt:message key="application.none" />
+</c:if>
+<c:forEach var="post" items="${model.recentPublishedEntries}">
+ <roller:link page="/editor/weblog.do">
+ <roller:linkparam
+ id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
+ name="post" property="id" />
+ <roller:linkparam id="method" value="edit" />
+ <img src='<c:url value="/images/Edit16.png"/>' align="absmiddle" border="0" alt="icon" title="Edit" />
+ <str:truncateNicely lower="23" upper="27">
+ <c:out value="${post.title}" />
+ </str:truncateNicely>
+ </roller:link>
+ <br />
+</c:forEach>
+
+</div>
Added: incubator/roller/trunk/web/weblog/WeblogEntryRemove.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/WeblogEntryRemove.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/WeblogEntryRemove.jsp (added)
+++ incubator/roller/trunk/web/weblog/WeblogEntryRemove.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,34 @@
+<%@ include file="/taglibs.jsp" %><%@ include file="/theme/header.jsp" %>
+
+<h3>
+<jsp:useBean id="weblogEntryFormEx" scope="session"
+ class="org.roller.presentation.weblog.formbeans.WeblogEntryFormEx"/>
+<fmt:message key="weblogEntryRemove.removeWeblogEntry" /> [<jsp:getProperty name="weblogEntryFormEx" property="title"/>]
+</h3>
+
+<p><fmt:message key="weblogEntryRemove.areYouSure" /></p>
+<p>
+Entry title = [<jsp:getProperty name="weblogEntryFormEx" property="title"/>]<br />
+Entry id = [<jsp:getProperty name="weblogEntryFormEx" property="id"/>]
+</p>
+
+<div style="float:left">
+<html:form action="/editor/weblog" method="post">
+ <input type="submit" value='<fmt:message key="weblogEntryRemove.yes" />' /></input>
+ <html:hidden property="method" value="remove"/></input>
+ <html:hidden property="id" /></input>
+</html:form>
+</div>
+
+<div style="float:left">
+<html:form action="/editor/weblog" method="post">
+ <input type="submit" value='<fmt:message key="weblogEntryRemove.no" />' /></input>
+ <html:hidden property="method" value="cancel"/></input>
+ <html:hidden property="id" /></input>
+</html:form>
+</div>
+
+<br />
+<br />
+
+<%@ include file="/theme/footer.jsp" %>
Added: incubator/roller/trunk/web/weblog/WeblogQuery.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/WeblogQuery.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/WeblogQuery.jsp (added)
+++ incubator/roller/trunk/web/weblog/WeblogQuery.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,178 @@
+<%@ include file="/taglibs.jsp" %><%@ include file="/theme/header.jsp" %>
+<%@ page import="org.roller.presentation.weblog.actions.WeblogQueryPageModel" %>
+<%
+WeblogQueryPageModel model = (WeblogQueryPageModel)request.getAttribute("model");
+%>
+
+<h1><fmt:message key="weblogEntryQuery.title" /></h1>
+
+<roller:StatusMessage/>
+
+<html:form action="/editor/weblogQuery" method="post" focus="title">
+
+ <%-- ========================================================= --%>
+ <%-- filter by category --%>
+
+ <div id="categoryControlToggle" class="controlToggle">
+ <span id="icategoryControl">+</span>
+ <a href="#" class="controlToggle"
+ onclick="javascript:toggleControl('categoryControlToggle','categoryControl')">
+ <fmt:message key="weblogEntryQuery.filterByCategory" />
+ </a>
+ </div>
+ <div id="categoryControl" class="control" style="display:none">
+
+ <label for="categoryId">
+ <fmt:message key="weblogEntryQuery.label.category" />
+ </label>
+
+ <html:select property="categoryId" size="1" tabindex="4">
+ <html:option key="weblogEntryQuery.label.any" value="" />
+ <html:optionsCollection name="model" property="categories" value="id" label="path" />
+ </html:select>
+
+ </div>
+
+ <%-- ========================================================= --%>
+ <%-- filter by date --%>
+
+ <div id="dateControlToggle" class="controlToggle">
+ <span id="idateControl">+</span>
+ <a href="#" class="controlToggle" onclick="javascript:toggleControl('dateControlToggle','dateControl')">
+ <fmt:message key="weblogEntryQuery.filterByPublishTime" />
+ </a>
+ </div>
+ <div id="dateControl" class="control" style="display:none">
+
+ <label for="startDateString">
+ <fmt:message key="weblogEntryQuery.label.startDate" />:
+ </label>
+ <roller:Date property="startDateString" dateFormat='<%= model.getShortDateFormat() %>' />
+
+ <label for="endDateString">
+ <fmt:message key="weblogEntryQuery.label.endDate" />:
+ </label>
+ <roller:Date property="endDateString" dateFormat='<%= model.getShortDateFormat() %>' />
+
+ </div>
+
+ <%-- ========================================================= --%>
+ <%-- filter by status --%>
+
+ <div id="statusControlToggle" class="controlToggle">
+ <span id="istatusControl">+</span>
+ <a href="#" class="controlToggle"
+ onclick="javascript:toggleControl('statusControlToggle','statusControl')">
+ <fmt:message key="weblogEntryQuery.filterByStatus" />
+ </a>
+ </div>
+ <div id="statusControl" class="control" style="display:none">
+
+ <label for="status">
+ <fmt:message key="weblogEntryQuery.label.status" />:
+ </label>
+
+ <html:radio property="status" value="ALL">
+ <fmt:message key="weblogEntryQuery.label.allEntries" /></html:radio>
+
+ <html:radio property="status" value="DRAFT_ONLY">
+ <fmt:message key="weblogEntryQuery.label.draftOnly" /></html:radio>
+
+ <html:radio property="status" value="PUBLISHED_ONLY" >
+ <fmt:message key="weblogEntryQuery.label.publishedOnly" /></html:radio>
+
+ </div>
+
+ <%-- ========================================================= --%>
+ <%-- limit number of results --%>
+
+ <div id="maxControlToggle" class="controlToggle">
+ <span id="imaxControl">+</span>
+ <a href="#" class="controlToggle" onclick="javascript:toggleControl('maxControlToggle','maxControl')">
+ <fmt:message key="weblogEntryQuery.limitResultsReturned" />
+ </a>
+ </div>
+ <div id="maxControl" class="control" style="display:none">
+
+ <label for="maxEntries">
+ <fmt:message key="weblogEntryQuery.label.maxEntries" />
+ </label>
+
+ <html:select property="maxEntries" size="1" tabindex="4">
+ <html:option value="25" />
+ <html:option value="50" />
+ <html:option value="75" />
+ <html:option value="100" />
+ </html:select>
+
+ </div>
+
+ <script type="text/javascript">
+ <!--
+ toggleControl('categoryControlToggle','categoryControl');
+ toggleControl('dateControlToggle','dateControl');
+ -->
+ </script>
+
+ <%-- ========================================================= --%>
+ <%-- search button --%>
+
+ <br />
+ <div class="control">
+ <input type="button" name="post"
+ value='<fmt:message key="weblogEntryQuery.button.query" />' onclick="submit()"></input>
+ </div>
+ <br />
+ <html:hidden name="method" property="method" value="query"/>
+
+</html:form>
+
+<table class="rollertable">
+ <tr>
+ <th class="rollertable"><fmt:message key="weblogEdit.entryCol" /></th>
+ <tr>
+ <c:forEach var="post" items="${model.recentWeblogEntries}">
+ <tr>
+ <td class="rollertable_entry" width="100%" >
+
+ <roller:link page="/editor/weblog.do">
+ <roller:linkparam
+ id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
+ name="post" property="id" />
+ <roller:linkparam id="method" value="edit" />
+ <img src='<c:url value="/images/Edit16.png"/>' border="0" alt="icon" title="Edit" />
+ <c:out value="${post.displayTitle}" />
+ </roller:link>
+ <br />
+
+ <span class="entryDetails">
+ <fmt:message key="weblogEdit.category" /> [<c:out value="${post.category.path}" />] |
+ <fmt:formatDate value="${post.pubTime}" type="both" dateStyle="medium" timeStyle="medium" />
+ <c:if test="${!empty post.link}">
+ <a href='<c:out value="${post.link}" />' class="entryDetails">
+ <fmt:message key="weblogEdit.link" />
+ </a>
+ </c:if>
+ <a href='<c:out value="${model.baseURL}" /><c:out value="${post.permaLink}" />'
+ class="entrypermalink" title="entry permalink">#</a>
+ <br />
+ <br />
+ </span>
+
+ <roller:ApplyPlugins name="post" skipFlag="true" scope="page" />
+
+ </td>
+ <tr>
+ </c:forEach>
+</table>
+
+<%@ include file="/theme/footer.jsp" %>
+
+
+<script type="text/javascript">
+<!--
+try {Start();} catch (e) {};
+-->
+</script>
+
+
Added: incubator/roller/trunk/web/weblog/bake-weblog.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/bake-weblog.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/bake-weblog.jsp (added)
+++ incubator/roller/trunk/web/weblog/bake-weblog.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,16 @@
+<%@ include file="/taglibs.jsp" %><%@ include file="/theme/header.jsp"%>
+
+<div id="content" style="margin-top: 40px">
+
+<roller:StatusMessage/>
+<html:errors />
+
+<h3>Bake your Weblog Template</h3>
+
+ <html:form action="/editor/bake" method="post">
+ <input type="submit" value="Bake" />
+ <input type=hidden name="method" value="bake" />
+ </html:form>
+</div>
+
+<%@ include file="/theme/footer.jsp"%>
\ No newline at end of file
Added: incubator/roller/trunk/web/weblog/colors.html
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/colors.html?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/colors.html (added)
+++ incubator/roller/trunk/web/weblog/colors.html Wed Jun 8 20:18:46 2005
@@ -0,0 +1,134 @@
+<html>
+<head>
+<title>Text Color</title>
+<script>
+function selectColor(color)
+{
+parent.document.getElementById("edit").contentDocument.execCommand(parent.command, false, color);
+parent.document.getElementById("colorpalette").style.visibility="hidden";
+parent.document.getElementById("edit").contentWindow.focus();
+}
+
+function InitColorPalette() {
+ if (document.getElementsByTagName)
+ var x = document.getElementsByTagName('TD');
+ else if (document.all)
+ var x = document.all.tags('TD');
+ for (var i=0;i<x.length;i++)
+ {
+ x[i].onmouseover = over;
+ x[i].onmouseout = out;
+ x[i].onclick = click;
+ }
+}
+
+function over()
+{
+this.style.border='2px dotted white';
+}
+
+function out()
+{
+this.style.border='1px solid gray';
+}
+
+function click()
+{
+ selectColor(this.id);
+}
+</script>
+</head>
+<body bgcolor="white" onLoad="InitColorPalette()">
+<table border="1" cellpadding="1" cellspacing="1">
+<tr>
+<td id="#FFFFFF" bgcolor="#FFFFFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCCCC" bgcolor="#FFCCCC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCC99" bgcolor="#FFCC99" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFFF99" bgcolor="#FFFF99" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFFFCC" bgcolor="#FFFFCC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#99FF99" bgcolor="#99FF99" width="20" height="20"><img width="1" height="1"></td>
+<td id="#99FFFF" bgcolor="#99FFFF" width="20" height="20"><img width="1" height="1"></td>
+
+<td id="#CCFFFF" bgcolor="#CCFFFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CCCCFF" bgcolor="#CCCCFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCCFF" bgcolor="#FFCCFF" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+<tr>
+<td id="#CCCCCC" bgcolor="#CCCCCC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF6666" bgcolor="#FF6666" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF9966" bgcolor="#FF9966" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFFF66" bgcolor="#FFFF66" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFFF33" bgcolor="#FFFF33" width="20" height="20"><img width="1" height="1"></td>
+<td id="#66FF99" bgcolor="#66FF99" width="20" height="20"><img width="1" height="1"></td>
+<td id="#33FFFF" bgcolor="#33FFFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#66FFFF" bgcolor="#66FFFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#9999FF" bgcolor="#9999FF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF99FF" bgcolor="#FF99FF" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+<tr>
+
+<td id="#C0C0C0" bgcolor="#C0C0C0" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF0000" bgcolor="#FF0000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF9900" bgcolor="#FF9900" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCC66" bgcolor="#FFCC66" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFFF00" bgcolor="#FFFF00" width="20" height="20"><img width="1" height="1"></td>
+<td id="#33FF33" bgcolor="#33FF33" width="20" height="20"><img width="1" height="1"></td>
+<td id="#66CCCC" bgcolor="#66CCCC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#33CCFF" bgcolor="#33CCFF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#6666CC" bgcolor="#6666CC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CC66CC" bgcolor="#CC66CC" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+<tr>
+<td id="#999999" bgcolor="#999999" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CC0000" bgcolor="#CC0000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FF6600" bgcolor="#FF6600" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCC33" bgcolor="#FFCC33" width="20" height="20"><img width="1" height="1"></td>
+<td id="#FFCC00" bgcolor="#FFCC00" width="20" height="20"><img width="1" height="1"></td>
+
+<td id="#33CC00" bgcolor="#33CC00" width="20" height="20"><img width="1" height="1"></td>
+<td id="#00CCCC" bgcolor="#00CCCC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#3366FF" bgcolor="#3366FF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#6633FF" bgcolor="#6633FF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CC33CC" bgcolor="#CC33CC" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+<tr>
+<td id="#666666" bgcolor="#666666" width="20" height="20"><img width="1" height="1"></td>
+<td id="#990000" bgcolor="#990000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CC6600" bgcolor="#CC6600" width="20" height="20"><img width="1" height="1"></td>
+<td id="#CC9933" bgcolor="#CC9933" width="20" height="20"><img width="1" height="1"></td>
+<td id="#999900" bgcolor="#999900" width="20" height="20"><img width="1" height="1"></td>
+<td id="#009900" bgcolor="#009900" width="20" height="20"><img width="1" height="1"></td>
+<td id="#339999" bgcolor="#339999" width="20" height="20"><img width="1" height="1"></td>
+<td id="#3333FF" bgcolor="#3333FF" width="20" height="20"><img width="1" height="1"></td>
+<td id="#6600CC" bgcolor="#6600CC" width="20" height="20"><img width="1" height="1"></td>
+<td id="#993399" bgcolor="#993399" width="20" height="20"><img width="1" height="1"></td>
+
+</tr>
+<tr>
+<td id="#333333" bgcolor="#333333" width="20" height="20"><img width="1" height="1"></td>
+<td id="#660000" bgcolor="#660000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#993300" bgcolor="#993300" width="20" height="20"><img width="1" height="1"></td>
+<td id="#996633" bgcolor="#996633" width="20" height="20"><img width="1" height="1"></td>
+<td id="#666600" bgcolor="#666600" width="20" height="20"><img width="1" height="1"></td>
+<td id="#006600" bgcolor="#006600" width="20" height="20"><img width="1" height="1"></td>
+<td id="#336666" bgcolor="#336666" width="20" height="20"><img width="1" height="1"></td>
+<td id="#000099" bgcolor="#000099" width="20" height="20"><img width="1" height="1"></td>
+<td id="#333399" bgcolor="#333399" width="20" height="20"><img width="1" height="1"></td>
+<td id="#663366" bgcolor="#663366" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+<tr>
+<td id="#000000" bgcolor="#000000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#330000" bgcolor="#330000" width="20" height="20"><img width="1" height="1"></td>
+<td id="#663300" bgcolor="#663300" width="20" height="20"><img width="1" height="1"></td>
+
+<td id="#663333" bgcolor="#663333" width="20" height="20"><img width="1" height="1"></td>
+<td id="#333300" bgcolor="#333300" width="20" height="20"><img width="1" height="1"></td>
+<td id="#003300" bgcolor="#003300" width="20" height="20"><img width="1" height="1"></td>
+<td id="#003333" bgcolor="#003333" width="20" height="20"><img width="1" height="1"></td>
+<td id="#000066" bgcolor="#000066" width="20" height="20"><img width="1" height="1"></td>
+<td id="#330099" bgcolor="#330099" width="20" height="20"><img width="1" height="1"></td>
+<td id="#330033" bgcolor="#330033" width="20" height="20"><img width="1" height="1"></td>
+</tr>
+</table>
+</body>
+</html>
Added: incubator/roller/trunk/web/weblog/editor-dhtml.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-dhtml.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-dhtml.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-dhtml.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,294 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+
+<html:hidden property="text" />
+
+<script language="JavaScript">
+<!--
+ // dhtml editor requires IE 6
+ var agt=navigator.userAgent.toLowerCase();
+ msie = agt.indexOf("msie");
+ ie = (msie != -1);
+ major = parseInt(navigator.appVersion);
+ if (ie)
+ {
+ major = parseInt( agt.substring( msie+5 ) );
+ }
+ if (!ie || major < 6)
+ {
+ document.write("<span class=\"statusMsg\">");
+ document.write("We recommend ");
+ document.write("<a href=\"http://www.microsoft.com/windows/ie/default.asp\">IE 6 or higher</a> ");
+ document.write("for using the dHtml editor. ")
+ document.write("Please <a href=\"");
+ document.write("editor/website.do?method=edit&rmik=Settings\">");
+ document.write("change to the text editor</a> or upgrade ");
+ document.write("your browser.</span>");
+ }
+
+ function postWeblogEntry(publish)
+ {
+ document.weblogEntryFormEx.text.value = iView.document.body.innerHTML;
+ if (publish)
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+ }
+
+ var viewMode = 1; // WYSIWYG
+
+ function selOn(ctrl)
+ {
+ ctrl.style.borderColor = '#000000';
+ ctrl.style.backgroundColor = '#B5BED6';
+ ctrl.style.cursor = 'hand';
+ }
+
+ function selOff(ctrl)
+ {
+ ctrl.style.borderColor = '#D6D3CE';
+ ctrl.style.backgroundColor = '#D6D3CE';
+ }
+
+ function selDown(ctrl)
+ {
+ ctrl.style.backgroundColor = '#8492B5';
+ }
+
+ function selUp(ctrl)
+ {
+ ctrl.style.backgroundColor = '#B5BED6';
+ }
+
+ function doBold()
+ {
+ iView.document.execCommand('bold', false, null);
+ }
+
+ function doItalic()
+ {
+ iView.document.execCommand('italic', false, null);
+ }
+
+ function doUnderline()
+ {
+ iView.document.execCommand('underline', false, null);
+ }
+
+ function doLeft()
+ {
+ iView.document.execCommand('justifyleft', false, null);
+ }
+
+ function doCenter()
+ {
+ iView.document.execCommand('justifycenter', false, null);
+ }
+
+ function doRight()
+ {
+ iView.document.execCommand('justifyright', false, null);
+ }
+
+ function doOrdList()
+ {
+ iView.document.execCommand('insertorderedlist', false, null);
+ }
+
+ function doBulList()
+ {
+ iView.document.execCommand('insertunorderedlist', false, null);
+ }
+
+ function doForeCol()
+ {
+ var fCol = prompt('Enter foreground color', '');
+
+ if(fCol != null)
+ iView.document.execCommand('forecolor', false, fCol);
+ }
+
+ function doBackCol()
+ {
+ var bCol = prompt('Enter background color', '');
+
+ if(bCol != null)
+ iView.document.execCommand('backcolor', false, bCol);
+ }
+
+ function doLink()
+ {
+ iView.document.execCommand('createlink');
+ }
+
+ function doImage()
+ {
+ var imgSrc = prompt('Enter image location', '');
+
+ if(imgSrc != null)
+ iView.document.execCommand('insertimage', false, imgSrc);
+ }
+
+ function doRule()
+ {
+ iView.document.execCommand('inserthorizontalrule', false, null);
+ }
+
+ function doFont(fName)
+ {
+ if(fName != '')
+ iView.document.execCommand('fontname', false, fName);
+ }
+
+ function doSize(fSize)
+ {
+ if(fSize != '')
+ iView.document.execCommand('fontsize', false, fSize);
+ }
+
+ function doHead(hType)
+ {
+ if(hType != '')
+ {
+ iView.document.execCommand('formatblock', false, hType);
+ doFont(selFont.options[selFont.selectedIndex].value);
+ }
+ }
+
+ function doToggleView()
+ {
+ if(viewMode == 1)
+ {
+ iHTML = iView.document.body.innerHTML;
+ iView.document.body.innerText = iHTML;
+
+ // Hide all controls
+ tblCtrls.style.display = 'none';
+ tblCtrls2.style.display = 'none';
+ //selFont.style.display = 'none';
+ //selSize.style.display = 'none';
+ //selHeading.style.display = 'none';
+ iView.focus();
+
+ viewMode = 2; // Code
+ }
+ else
+ {
+ iText = iView.document.body.innerText;
+ iView.document.body.innerHTML = iText;
+
+ // Show all controls
+ tblCtrls.style.display = 'inline';
+ tblCtrls2.style.display = 'inline';
+ //selFont.style.display = 'inline';
+ //selSize.style.display = 'inline';
+ //selHeading.style.display = 'inline';
+ iView.focus();
+
+ viewMode = 1; // WYSIWYG
+ }
+ }
+// -->
+</script>
+<style>
+
+ .butClass
+ {
+ border: 1px solid;
+ border-color: #D6D3CE;
+ }
+
+ .tdClass
+ {
+ padding-left: 3px;
+ padding-top:3px;
+ }
+
+</style>
+
+<table width="95%" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">
+<tr>
+ <td id="tblCtrls" class="tdClass">
+ <img alt="Bold" class="butClass" src="<%= request.getContextPath() %>/images/editor/bold.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBold()">
+ <img alt="Italic" class="butClass" src="<%= request.getContextPath() %>/images/editor/italic.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doItalic()">
+ <img alt="Underline" class="butClass" src="<%= request.getContextPath() %>/images/editor/underline.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doUnderline()">
+
+ <img alt="Left" class="butClass" src="<%= request.getContextPath() %>/images/editor/left.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLeft()">
+ <img alt="Center" class="butClass" src="<%= request.getContextPath() %>/images/editor/center.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doCenter()">
+ <img alt="Right" class="butClass" src="<%= request.getContextPath() %>/images/editor/right.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doRight()">
+
+ <img alt="Ordered List" class="butClass" src="<%= request.getContextPath() %>/images/editor/ordlist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doOrdList()">
+ <img alt="Bulleted List" class="butClass" src="<%= request.getContextPath() %>/images/editor/bullist.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBulList()">
+
+ <img alt="Text Color" class="butClass" src="<%= request.getContextPath() %>/images/editor/forecol.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doForeCol()">
+ <img alt="Background Color" class="butClass" src="<%= request.getContextPath() %>/images/editor/bgcol.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doBackCol()">
+
+ <img alt="Hyperlink" class="butClass" src="<%= request.getContextPath() %>/images/editor/link.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doLink()">
+ <img alt="Image" class="butClass" src="<%= request.getContextPath() %>/images/editor/image.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doImage()">
+ <img alt="Horizontal Rule" class="butClass" src="<%= request.getContextPath() %>/images/editor/rule.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doRule()">
+
+ </td>
+ <td class="tdClass" colspan="1" width="20%" align="right">
+ <img alt="Toggle Mode" class="butClass" src="<%= request.getContextPath() %>/images/editor/mode.gif" onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)" onMouseUp="selUp(this)" onClick="doToggleView()">
+
+ </td>
+</tr>
+</table>
+
+<table width="95%" height="30px" border="0" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">
+<tr>
+ <td id="tblCtrls2" class="tdClass" colspan="1" width="80%">
+ <select id="selFont" onChange="doFont(this.options[this.selectedIndex].value)">
+ <option value="">-- Font --</option>
+ <option value="Arial">Arial</option>
+ <option value="Courier">Courier</option>
+ <option value="Sans Serif">Sans Serif</option>
+ <option value="Tahoma">Tahoma</option>
+ <option value="Verdana">Verdana</option>
+ <option value="Wingdings">Wingdings</option>
+ </select>
+ <select id="selSize" onChange="doSize(this.options[this.selectedIndex].value)">
+ <option value="">-- Size --</option>
+ <option value="1">Very Small</option>
+ <option value="2">Small</option>
+ <option value="3">Medium</option>
+ <option value="4">Large</option>
+ <option value="5">Larger</option>
+ <option value="6">Very Large</option>
+ </select>
+ <select id="selHeading" onChange="doHead(this.options[this.selectedIndex].value)">
+ <option value="">-- Heading --</option>
+ <option value="Heading 1">H1</option>
+ <option value="Heading 2">H2</option>
+ <option value="Heading 3">H3</option>
+ <option value="Heading 4">H4</option>
+ <option value="Heading 5">H5</option>
+ <option value="Heading 6">H6</option>
+ </select>
+ </td>
+</tr>
+
+</table>
+
+<% // hack to support iframe's src attribute doing a call out
+// No longer needed because form is now session scope
+//session.setAttribute("weblogEntryFormEx",
+ //request.getAttribute("weblogEntryFormEx"));
+%>
+<table width="95%" border="0" cellspacing="0" cellpadding="0" >
+<tr>
+ <td><iframe id="iView" width="100%" height="250" tabindex="2">
+ Your browser does not support iframes.
+ Either change browsers or select a
+ different editor for your website.</iframe>
+ </td>
+</tr>
+</table>
+<script language="JavaScript">
+ iView.document.designMode = 'On';
+ iView.document.open();
+ iView.document.write(document.weblogEntryFormEx.text.value);
+ iView.document.close();
+</script>
+
Added: incubator/roller/trunk/web/weblog/editor-ekit.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-ekit.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-ekit.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-ekit.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,83 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+<%@ page import="org.roller.presentation.weblog.formbeans.WeblogEntryFormEx" %>
+<%@ include file="/taglibs.jsp" %>
+
+<script type="text/javascript">
+<!--
+function postWeblogEntry(publish)
+{
+ document.weblogEntryFormEx.text.value = document.Ekit.getDocumentText();
+ if (publish)
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+}
+-->
+</script>
+
+<html:hidden property="text" />
+
+<%-- Use the Ekit applet --%>
+
+<%--
+<%
+String text = "";
+WeblogEntryFormEx form
+ = (WeblogEntryFormEx) request.getAttribute("weblogEntryFormEx");
+if (form.getText() != null) {
+ text = form.getText();
+}
+String entryText = "<html><head></head><body>"+text+"</body></html>";
+%>
+<jsp:plugin type="applet" code="com.hexidec.ekit.EkitApplet.class" tabindex="2"
+ codebase="." jreversion="1.3" height="350" width="90%" name="Ekit"
+ archive="ekitapplet.jar" type="application/x-java-applet;version=1.3"
+ nspluginurl="http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html"
+ iepluginurl="http://java.sun.com/products/plugin/1.3.0_01/jinstall-130_01-win32.cab#Version=1,3,0,1">
+ <jsp:params>
+ <jsp:param name="stylesheet" value="ekit.css"/>
+ <jsp:param name="langcode" value="en" />
+ <jsp:param name="langcountry" value="US" />
+ <jsp:param name="toolbar" value="true"/>
+ <jsp:param name="sourceview" value="false"/>
+ <jsp:param name="exclusive" value="true"/>
+ <jsp:param name="menuicons" value="true"/>
+ <jsp:param name="scriptable" value="true"/>
+ <jsp:param name="document" value="<%=entryText%>"/>
+ </jsp:params>
+ <jsp:fallback>
+ <p>Unable to start Java Plugin.</p>
+ </jsp:fallback>
+</jsp:plugin>
+--%>
+
+<APPLET CODEBASE="." CODE="com.hexidec.ekit.EkitApplet.class"
+ ARCHIVE="ekitapplet.jar" NAME="Ekit" WIDTH="95%" HEIGHT="350">
+<PARAM NAME="codebase" VALUE=".">
+<PARAM NAME="code" VALUE="com.hexidec.ekit.EkitApplet.class">
+<PARAM NAME="archive" VALUE="ekitapplet.jar">
+<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
+<PARAM NAME="scriptable" VALUE="true">
+
+<!-- Load text into Ekit applet by using the form bean -->
+<PARAM NAME="DOCUMENT"
+ VALUE="<HTML><HEAD></HEAD><BODY><bean:write
+ name="weblogEntryFormEx" property="text" /></BODY></HTML>">
+
+<PARAM NAME="STYLESHEET" VALUE="ekit.css">
+<PARAM NAME="LANGCODE" VALUE="en">
+<PARAM NAME="LANGCOUNTRY" VALUE="US">
+<PARAM NAME="TOOLBAR" VALUE="true">
+<PARAM NAME="SOURCEVIEW" VALUE="false">
+<PARAM NAME="EXCLUSIVE" VALUE="true">
+<PARAM NAME="MENUICONS" VALUE="true">
+</APPLET>
+
+
+<br /><a href="http://www.hexidec.com">Ekit</a>
+editor by Howard Kistler of
+<a href="http://www.hexidec.com">hexidec codex</a>
+<br />
+<br />
+
+
Added: incubator/roller/trunk/web/weblog/editor-midas.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-midas.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-midas.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-midas.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,430 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+
+<html:hidden property="text" />
+
+<script type="text/javascript">
+<!--
+ function postWeblogEntry(publish)
+ {
+ document.weblogEntryFormEx.text.value = document.getElementById('edit').contentWindow.document.body.innerHTML;
+ if (publish) document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+ }
+-->
+</script>
+
+<%-- The rest of this is straight from the Midas demo, except the DMJ_MOD marked changes --%>
+
+<style type="text/css">
+.imagebutton {height: 22; width: 23; border: solid 2px #C0C0C0; background-color: #C0C0C0}
+.image {position: relative; left: 1; top: 1; height:20; width:21; border:none;}
+.toolbar {height: 30; background-color: #C0C0C0;}
+</style>
+
+<script>
+
+var command = "";
+
+function InitToolbarButtons() {
+ kids = document.getElementsByTagName('DIV');
+
+ for (var i=0; i < kids.length; i++) {
+ if (kids[i].className == "imagebutton") {
+ kids[i].onmouseover = tbmouseover;
+ kids[i].onmouseout = tbmouseout;
+ kids[i].onmousedown = tbmousedown;
+ kids[i].onmouseup = tbmouseup;
+ kids[i].onclick = tbclick;
+ }
+ }
+}
+
+function tbmousedown(e)
+{
+ this.firstChild.style.left = 2;
+ this.firstChild.style.top = 2;
+ this.style.border="inset 2px";
+ e.preventDefault();
+}
+
+function tbmouseup()
+{
+ this.firstChild.style.left = 1;
+ this.firstChild.style.top = 1;
+ this.style.border="outset 2px";
+}
+
+function tbmouseout()
+{
+ this.style.border="solid 2px #C0C0C0";
+}
+
+function tbmouseover()
+{
+ this.style.border="outset 2px";
+}
+
+ function insertNodeAtSelection(win, insertNode)
+ {
+ // get current selection
+ var sel = win.getSelection();
+
+ // get the first range of the selection
+ // (there's almost always only one range)
+ var range = sel.getRangeAt(0);
+
+ // deselect everything
+ sel.removeAllRanges();
+
+ // remove content of current selection from document
+ range.deleteContents();
+
+ // get location of current selection
+ var container = range.startContainer;
+ var pos = range.startOffset;
+
+ // make a new range for the new selection
+ range=document.createRange();
+
+ if (container.nodeType==3 && insertNode.nodeType==3) {
+
+ // if we insert text in a textnode, do optimized insertion
+ container.insertData(pos, insertNode.nodeValue);
+
+ // put cursor after inserted text
+ range.setEnd(container, pos+insertNode.length);
+ range.setStart(container, pos+insertNode.length);
+
+ } else {
+
+
+ var afterNode;
+ if (container.nodeType==3) {
+
+ // when inserting into a textnode
+ // we create 2 new textnodes
+ // and put the insertNode in between
+
+ var textNode = container;
+ container = textNode.parentNode;
+ var text = textNode.nodeValue;
+
+ // text before the split
+ var textBefore = text.substr(0,pos);
+ // text after the split
+ var textAfter = text.substr(pos);
+
+ var beforeNode = document.createTextNode(textBefore);
+ var afterNode = document.createTextNode(textAfter);
+
+ // insert the 3 new nodes before the old one
+ container.insertBefore(afterNode, textNode);
+ container.insertBefore(insertNode, afterNode);
+ container.insertBefore(beforeNode, insertNode);
+
+ // remove the old node
+ container.removeChild(textNode);
+
+ } else {
+
+ // else simply insert the node
+ afterNode = container.childNodes[pos];
+ container.insertBefore(insertNode, afterNode);
+ }
+
+ range.setEnd(afterNode, 0);
+ range.setStart(afterNode, 0);
+ }
+
+ sel.addRange(range);
+ };
+
+function getOffsetTop(elm) {
+
+ var mOffsetTop = elm.offsetTop;
+ var mOffsetParent = elm.offsetParent;
+
+ while(mOffsetParent){
+ mOffsetTop += mOffsetParent.offsetTop;
+ mOffsetParent = mOffsetParent.offsetParent;
+ }
+
+ return mOffsetTop;
+}
+
+function getOffsetLeft(elm) {
+
+ var mOffsetLeft = elm.offsetLeft;
+ var mOffsetParent = elm.offsetParent;
+
+ while(mOffsetParent){
+ mOffsetLeft += mOffsetParent.offsetLeft;
+ mOffsetParent = mOffsetParent.offsetParent;
+ }
+
+ return mOffsetLeft;
+}
+
+function tbclick()
+{
+ if ((this.id == "forecolor") || (this.id == "hilitecolor")) {
+ parent.command = this.id;
+ buttonElement = document.getElementById(this.id);
+ document.getElementById("colorpalette").style.left = getOffsetLeft(buttonElement);
+ document.getElementById("colorpalette").style.top = getOffsetTop(buttonElement) + buttonElement.offsetHeight;
+ document.getElementById("colorpalette").style.visibility="visible";
+ } else if (this.id == "createlink") {
+ var szURL = prompt("Enter a URL:", "");
+ document.getElementById('edit').contentWindow.document.execCommand("CreateLink",false,szURL)
+ } else if (this.id == "createtable") {
+ e = document.getElementById("edit");
+ rowstext = prompt("enter rows");
+ colstext = prompt("enter cols");
+ rows = parseInt(rowstext);
+ cols = parseInt(colstext);
+ if ((rows > 0) && (cols > 0)) {
+ table = e.contentWindow.document.createElement("table");
+ table.setAttribute("border", "1");
+ table.setAttribute("cellpadding", "2");
+ table.setAttribute("cellspacing", "2");
+ tbody = e.contentWindow.document.createElement("tbody");
+ for (var i=0; i < rows; i++) {
+ tr =e.contentWindow.document.createElement("tr");
+ for (var j=0; j < cols; j++) {
+ td =e.contentWindow.document.createElement("td");
+ br =e.contentWindow.document.createElement("br");
+ td.appendChild(br);
+ tr.appendChild(td);
+ }
+ tbody.appendChild(tr);
+ }
+ table.appendChild(tbody);
+ insertNodeAtSelection(e.contentWindow, table);
+ }
+ } else {
+ document.getElementById('edit').contentWindow.document.execCommand(this.id, false, null);
+ }
+}
+
+function Select(selectname)
+{
+ var cursel = document.getElementById(selectname).selectedIndex;
+ /* First one is always a label */
+ if (cursel != 0) {
+ var selected = document.getElementById(selectname).options[cursel].value;
+ document.getElementById('edit').contentWindow.document.execCommand(selectname, false, selected);
+ document.getElementById(selectname).selectedIndex = 0;
+ }
+ document.getElementById("edit").contentWindow.focus();
+}
+
+function dismisscolorpalette()
+{
+ document.getElementById("colorpalette").style.visibility="hidden";
+}
+
+function Start() {
+ document.getElementById('edit').contentWindow.document.designMode = "on";
+ try
+ {
+ //document.getElementById('edit').contentWindow.document.execCommand("undo", false, null);
+ }
+ catch (e)
+ {
+ alert("This demo is not supported on your level of Mozilla.");
+ }
+
+ InitToolbarButtons();
+ document.addEventListener("mousedown", dismisscolorpalette, true);
+ document.getElementById("edit").contentWindow.document.addEventListener("mousedown", dismisscolorpalette, true);
+ document.addEventListener("keypress", dismisscolorpalette, true);
+ document.getElementById("edit").contentWindow.document.addEventListener("keypress", dismisscolorpalette, true);
+
+ <%-- DMJ_MOD --%>
+ document.getElementById('edit').contentWindow.document.body.innerHTML = document.weblogEntryFormEx.text.value;
+}
+
+</script>
+
+<%-- DMJ_MOD commented this out, Roller provides the body
+</head>
+<body onLoad="Start()">
+<h2>Please note that the changing of text format (Heading, Paragraph, etc.) will only function
+properly on a 1.3b build dated after January 26, 2003. Thanks.</h2>
+--%>
+
+<table bgcolor="#C0C0C0" id="toolbar1">
+<tr>
+<td>
+
+<%-- DMJ_MOD change image paths to add images/midas --%>
+
+<div class="imagebutton" id="cut"><img class="image" src='<c:url value="/images/midas/cut.gif"/>' alt="Cut" title="Cut"></div>
+</td>
+<td>
+<div class="imagebutton" id="copy"><img class="image" src='<c:url value="/images/midas/copy.gif"/>' alt="Copy" title="Copy"></div>
+</td>
+<td>
+<div class="imagebutton" id="paste"><img class="image" src='<c:url value="/images/midas/paste.gif"/>' alt="Paste" title="Paste"></div>
+<td>
+</td>
+<td>
+</td>
+<td>
+<div class="imagebutton" id="undo"><img class="image" src='<c:url value="/images/midas/undo.gif"/>' alt="Undo" title="Undo"></div>
+</td>
+<td>
+<div class="imagebutton" id="redo"><img class="image" src='<c:url value="/images/midas/redo.gif"/>' alt="Redo" title="Redo"></div>
+</td>
+
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="createlink"><img class="image" src='<c:url value="/images/midas/link.gif"/>' alt="Insert Link" title="Insert Link"></div>
+</td>
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="createtable"><img class="image" src='<c:url value="/images/midas/table.gif"/>' alt="Insert Table" title="Insert Table"></div>
+</td>
+</tr>
+</table>
+<br>
+<table bgcolor="#C0C0C0" id="toolbar2">
+<tr>
+<td>
+<select id="formatblock" onchange="Select(this.id);">
+
+ <option value="<p>">Normal</option>
+ <option value="<p>">Paragraph</option>
+ <option value="<h1>">Heading 1 <h1></option>
+ <option value="<h2>">Heading 2 <h2></option>
+ <option value="<h3>">Heading 3 <h3></option>
+ <option value="<h4>">Heading 4 <h4></option>
+
+ <option value="<h5>">Heading 5 <h5></option>
+ <option value="<h6>">Heading 6 <h6></option>
+ <option value="<address>">Address <ADDR></option>
+ <option value="<pre>">Formatted <pre></option>
+</select>
+</td>
+<td>
+<select id="fontname" onchange="Select(this.id);">
+ <option value="Font">Font</option>
+
+ <option value="Arial">Arial</option>
+ <option value="Courier">Courier</option>
+ <option value="Times New Roman">Times New Roman</option>
+</select>
+</td>
+<td>
+<select unselectable="on" id="fontsize" onchange="Select(this.id);">
+ <option value="Size">Size</option>
+ <option value="1">1</option>
+
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+
+</select>
+</td>
+
+<%-- DMJ_MOD change image paths to add images/midas --%>
+
+<td>
+<div class="imagebutton" id="bold"><img class="image" src='<c:url value="/images/midas/bold.gif"/>' alt="Bold" title="Bold"></div>
+</td>
+<td>
+<div class="imagebutton" id="italic"><img class="image" src='<c:url value="/images/midas/italic.gif"/>' alt="Italic" title="Italic"></div>
+</td>
+<td>
+<div class="imagebutton" id="underline"><img class="image" src='<c:url value="/images/midas/underline.gif"/>' alt="Underline" title="Underline"></div>
+</td>
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="forecolor"><img class="image" src='<c:url value="/images/midas/forecolor.gif"/>' alt="Text Color" title="Text Color"></div>
+</td>
+<td>
+
+<div style="left: 40;" class="imagebutton" id="hilitecolor"><img class="image" src='<c:url value="/images/midas/backcolor.gif"/>' alt="Background Color" title="Background Color"></div>
+</td>
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="justifyleft"><img class="image" src='<c:url value="/images/midas/justifyleft.gif"/>' alt="Align Left" title="Align Left"></div>
+</td>
+<td>
+<div style="left: 40;" class="imagebutton" id="justifycenter"><img class="image" src='<c:url value="/images/midas/justifycenter.gif"/>' alt="Center" title="Center"></div>
+</td>
+<td>
+<div style="left: 70;" class="imagebutton" id="justifyright"><img class="image" src='<c:url value="/images/midas/justifyright.gif"/>' alt="Align Right" title="Align Right"></div>
+</td>
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="insertorderedlist"><img class="image" src='<c:url value="/images/midas/orderedlist.gif"/>' alt="Ordered List" title="Ordered List"></div>
+
+</td>
+<td>
+<div style="left: 40;" class="imagebutton" id="insertunorderedlist"><img class="image" src='<c:url value="/images/midas/unorderedlist.gif"/>' alt="Unordered List" title="Unordered List"></div>
+</td>
+<td>
+</td>
+<td>
+<div style="left: 10;" class="imagebutton" id="outdent"><img class="image" src='<c:url value="/images/midas/outdent.gif"/>' alt="Outdent" title="Outdent"></div>
+</td>
+<td>
+<div style="left: 40;" class="imagebutton" id="indent"><img class="image" src='<c:url value="/images/midas/indent.gif"/>' alt="Indent" title="Indent"></div>
+</td>
+</tr>
+</table>
+<br />
+<%-- DMJ_MOD added weblogs/ to colors.html path --%>
+<iframe width="250" height="170" id="colorpalette" src="weblog/colors.html" style="visibility:hidden; position: absolute;"></iframe>
+<iframe id="edit" width="95%" height="350px"></iframe>
+<script type="text/javascript">
+function viewsource(source)
+{
+ if (source) {
+ var html = document.createTextNode(document.getElementById('edit').contentWindow.document.body.innerHTML);
+ document.getElementById('edit').contentWindow.document.body.innerHTML = "";
+ document.getElementById('edit').contentWindow.document.body.appendChild(html);
+ document.getElementById("toolbar1").style.visibility="hidden";
+ document.getElementById("toolbar2").style.visibility="hidden";
+ } else {
+ var html = document.getElementById('edit').contentWindow.document.body.ownerDocument.createRange();
+ html.selectNodeContents(document.getElementById('edit').contentWindow.document.body);
+ document.getElementById('edit').contentWindow.document.body.innerHTML = html.toString();
+ document.getElementById("toolbar1").style.visibility="visible";
+ document.getElementById("toolbar2").style.visibility="visible";
+ }
+}
+
+function usecss(source)
+{
+ document.getElementById('edit').contentWindow.document.execCommand("useCSS", false, !(source));
+}
+
+function readonly(source)
+{
+ document.getElementById('edit').contentWindow.document.execCommand("readonly", false, !(source));
+}
+</script>
+<br />
+<input type="checkbox" onclick="viewsource(this.checked)">
+View HTML Source</input>
+<input checked type="checkbox" onclick="usecss(this.checked)">
+Use CSS</input>
+<input type="checkbox" onclick="readonly(this.checked)">
+Read only</input>
+
+<br />
+<br />
+
Added: incubator/roller/trunk/web/weblog/editor-rte.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-rte.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-rte.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-rte.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,55 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+
+<html:hidden property="text" />
+
+<script type="text/javascript" src="richtext.js" ></script>
+<script type="text/javascript">
+<!--
+ function postWeblogEntry(publish)
+ {
+ updateRTE('rte1');
+ document.weblogEntryFormEx.text.value = document.weblogEntryFormEx.rte1.value;
+ if (publish) document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+ }
+ // Usage: initRTE(imagesPath, includesPath, cssFile)
+ initRTE("images/", "<%= request.getContextPath() %>/editor/", "");
+//-->
+</script>
+<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
+
+
+<br />
+<script language="JavaScript" type="text/javascript">
+<!--
+//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
+writeRichText('rte1', document.weblogEntryFormEx.text.value, '95%', 300, true, false);
+//-->
+</script>
+
+ <script type="text/javascript">
+ <!--
+ if (getCookie("editorSize") != null) {
+ document.weblogEntryFormEx.text.rows = getCookie("editorSize");
+ }
+ -->
+ </script>
+ <div style="float:right">
+ <script type="text/javascript">
+ <!--
+ function changeSize(e,num) {
+ e.form.text.rows = e.form.text.rows + num;
+ var expires = new Date();
+ expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
+ setCookie("editorSize",e.form.rte1.rows,expires);
+ }
+ -->
+ </script>
+ <!-- Add buttons to make this textarea taller or shorter
+ <input type="button" name="taller" value=" ↓ " onclick="changeSize(this,5)" />
+ <input type="button" name="shorter" value=" ↑ " onclick="changeSize(this,-5)" />
+ -->
+ </div>
\ No newline at end of file
Added: incubator/roller/trunk/web/weblog/editor-text-js.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-text-js.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-text-js.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-text-js.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,269 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+<script type="text/javascript" src="<html:rewrite page="/theme/scripts/xmlp.js"/>"></script>
+<script type="text/javascript">
+<!--
+var expires = new Date();
+expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx 30 days.
+
+function doParse() {
+ var parser = new XMLParser();
+ var form = document.forms[0];
+ // wrap contents of textarea with root element
+ var xml = "<root>" + form.text.value + "</root>";
+ try
+ {
+ parser.parse(xml);
+ }
+ catch (e)
+ {
+ var msg = "Invalid XML: " + e.message;
+ msg += "\n\nClick OK to continue posting with (possibly) invalid markup.";
+ var ans = confirm(msg);
+ if (ans)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+function postWeblogEntry(publish)
+{
+ if (document.getElementById("parseXML").checked) {
+ setCookie("parseXML","true",expires,"/");
+ if (doParse()) {
+ if (publish) {
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ }
+ document.weblogEntryFormEx.submit();
+ }
+ } else {
+ deleteCookie("parseXML");
+ if (publish) {
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ }
+ document.weblogEntryFormEx.submit();
+ }
+}
+
+function htmlcode(theform,htmltag,prompttext)
+{
+ // insert <x>yyy</x> style markup
+ inserttext = prompt(tag_prompt+"\n<"+htmltag+">xxx</"+htmltag+">",'');
+ if ((inserttext != null) && (inserttext != "")) {
+ theform.text.value += "<"+htmltag+">"+inserttext+"</"+htmltag+"> ";
+ }
+ theform.text.focus();
+}
+
+// *******************************************************
+
+function dolist(theform) {
+// inserts list with option to have numbered or alphabetical type
+ listtype = prompt(list_type_prompt, "");
+ if ((listtype == "b") || (listtype == "1")) {
+ if (listtype == "b") {
+ thelist = "<ul>\n";
+ listend = "</ul> ";
+ }
+ else {
+ if (listtype == "1") {
+ thelist = "<ol>\n";
+ listend = "</ol> ";
+ }
+ }
+ }
+ else {
+ thelist = "<ul>\n";
+ listend = "</ul> ";
+ }
+ listentry = "initial";
+ while ((listentry != "") && (listentry != null)) {
+ listentry = prompt(list_item_prompt, "");
+ if ((listentry != "") && (listentry != null))
+ thelist = thelist+"<li>"+listentry+"\n";
+ }
+ theform.text.value += thelist+listend;
+ theform.text.focus();
+}
+
+// *******************************************************
+
+function htmllink(theform,thetag) {
+// inserts named url or email link
+ linktext = prompt(link_text_prompt,"");
+ var prompttext;
+ if (thetag == "url") {
+ thetype = "a href=\"";
+ prompt_text = link_url_prompt;
+ prompt_contents = "http://";
+ }
+ else {
+ thetype = "a href=mailto:";
+ prompt_text = link_email_prompt;
+ prompt_contents = "";
+ }
+ linkurl = prompt(prompt_text,prompt_contents);
+ if ((linkurl != null) && (linkurl != "")) {
+ theform.text.value += "<"+thetype+linkurl+"\">"+linktext+"</a> ";
+ }
+ else {
+ theform.text.value += "<"+thetype+linkurl+"\">"+linktext+"</a> ";
+ }
+ theform.text.focus();
+}
+
+// *******************************************************
+
+function insertimage(theform) {
+ //insert <img src="" alt="" align=""> tag
+ imgsrc = prompt(img_src_prompt,"http://");
+ imgalt = prompt(img_alt_prompt,"");
+ imgalign = prompt(img_align_prompt,"");
+ if (imgalign == "r") imgalign = "right";
+ if (imgalign == "l") imgalign = "left";
+ theform.text.value += "<img src=\""+imgsrc+"\" alt=\""+imgalt+"\" align=\""+imgalign+"\">";
+ theform.text.focus();
+}
+
+// *******************************************************
+
+function insertmedia(theform,type) {
+ if (type == 'img') {
+ //insert <img src="" alt="" align=""> tag'
+ imgsrc = "";
+ imgsrc = theform.imagefile.options[theform.imagefile.selectedIndex].value;
+ imgsrc2 = ""
+ for (i=0; i < imgsrc.length; i++) {
+ if (imgsrc.charAt(i) == "'") {
+ imgsrc2 = imgsrc2 + "\"";
+ }
+ else {
+ imgsrc2 = imgsrc2 + imgsrc.charAt(i);
+ }
+ }
+ imgalt = prompt(img_alt_prompt,"");
+ imgalign = prompt(img_align_prompt,"");
+ if (imgalign == "r") imgalign = "right";
+ if (imgalign == "l") imgalign = "left";
+ theform.text.value += "<img src="+imgsrc2+" alt=\""+imgalt+"\" align=\""+imgalign+"\">";
+ }
+ else {
+ //type must be 'other'
+ linksrc = "";
+ linksrc = theform.mediafile.options[theform.mediafile.selectedIndex].value;
+ linktext = "";
+ linktext = prompt("Please enter the text for this link: ");
+ theform.text.value += "<a href="+linksrc+">"+linktext+"</a>";
+ }
+ theform.text.focus();
+}
+
+// *******************************************************
+// the following are the text prompts for buttons etc.
+// DO NOT ADD LINE-BREAKS BETWEEN THE "...." QUOTES!
+
+// MINI-HELP MESSAGES
+
+b_text = "Insert BOLD text";
+i_text = "Insert ITALIC text";
+u_text = "Insert UNDERLINED text";
+
+url_text = "Insert a hyperlink into your message";
+email_text = "Insert an email-link into your message";
+img_text = "Insert an image into your message";
+
+list_text = "Insert an ordered list into your message";
+quote_text = "Insert a quote into your message";
+
+// TEXT FOR POP-UP PROMPTS
+
+tag_prompt = "Enter the text to be formatted:";
+
+font_formatter_prompt = "Enter the text to be formatted with the specified";
+
+img_src_prompt = "Enter the url to the image you would like displayed";
+img_alt_prompt = "Enter the text to appear while the image is downloading";
+img_align_prompt = "Image alignment: leave blank for no alignment, r for right, l for left";
+
+link_text_prompt = "Enter the text to be displayed for the link (optional)";
+link_url_prompt = "Enter the full URL for the link";
+link_email_prompt = "Enter the email address for the link";
+
+list_type_prompt = "What type of list do you want? Enter '1' for a numbered list, enter 'b' for an bulleted list.";
+list_item_prompt = "Enter a list item.\nLeave the box empty or press 'Cancel' to complete the list.";
+// -->
+</script>
+
+<div>
+<div style="text-align: right; width: 95%">
+<div style="float: left">
+<input type="checkbox" name="parseXML" id="parseXML"
+ onclick="parseXML()"> <label for="parseXML">Validate as XML</label>
+<script type="text/javascript">
+<!--
+// determine user's parse XML preference and check box appropriately
+if (getCookie("parseXML") == "true") {
+ document.getElementById('parseXML').checked = true;
+} else {
+ document.getElementById('parseXML').checked = false;
+}
+// -->
+</script>
+</div>
+
+<input type="button" name="bold" value="bold" tabindex="3"
+ onclick="htmlcode(weblogEntryFormEx,'strong',tag_prompt)" />
+<input type="button" name="italics" value="italics" tabindex="4"
+ onclick="htmlcode(weblogEntryFormEx,'em',tag_prompt)" />
+<input type="button" name="underline" value="underline" tabindex="5"
+ onclick="htmlcode(weblogEntryFormEx,'u',tag_prompt)" />
+<input type="button" name="list" value="list" tabindex="6"
+ onclick="dolist(weblogEntryFormEx)" />
+<input type="button" name="url" value="link" tabindex="7"
+ onclick="htmllink(weblogEntryFormEx,'url')" />
+<input type="button" name="email" value="e-mail"
+ onclick="htmllink(weblogEntryFormEx,'email')" tabindex="8" />
+<input type="button" name="image" value="image" tabindex="9"
+ onclick="insertimage(weblogEntryFormEx)" />
+</div>
+
+
+<html:textarea property="text" cols="75" rows="20"
+ styleId="text" style="width: 95%" tabindex="2"/>
+</div>
+
+ <script type="text/javascript">
+ <!--
+ if (getCookie("editorSize") != null) {
+ document.weblogEntryFormEx.text.rows = getCookie("editorSize");
+ }
+ -->
+ </script>
+
+ <div style="float:right">
+ <script type="text/javascript">
+ <!--
+ function changeSize(e,num) {
+ e.form.text.rows = e.form.text.rows + num;
+ var expires = new Date();
+ expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
+ setCookie("editorSize",e.form.text.rows,expires);
+ }
+ -->
+ </script>
+ <!-- Add buttons to make this textarea taller or shorter -->
+ <input type="button" name="taller" value=" ↓ " onclick="changeSize(this,5)" />
+ <input type="button" name="shorter" value=" ↑ " onclick="changeSize(this,-5)" />
+ </div>
+
+
+
+
Added: incubator/roller/trunk/web/weblog/editor-text.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-text.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-text.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-text.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,50 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+
+<script type="text/javascript">
+<!--
+function postWeblogEntry(publish)
+{
+ if (publish)
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+}
+// -->
+</script>
+
+ <script type="text/javascript">
+ <!--
+ if (getCookie("editorSize") != null) {
+ document.weblogEntryFormEx.text.rows = getCookie("editorSize");
+ }
+ -->
+ </script>
+
+<html:textarea property="text" cols="75" rows="20" style="width: 100%" tabindex="2"/>
+
+ <script type="text/javascript">
+ <!--
+ if (getCookie("editorSize") != null) {
+ document.weblogEntryFormEx.text.rows = getCookie("editorSize");
+ }
+ -->
+ </script>
+
+ <div style="float:right">
+ <script type="text/javascript">
+ <!--
+ function changeSize(e,num) {
+ e.form.text.rows = e.form.text.rows + num;
+ var expires = new Date();
+ expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
+ setCookie("editorSize",e.form.text.rows,expires);
+ }
+ -->
+ </script>
+ <!-- Add buttons to make this textarea taller or shorter -->
+ <input type="button" name="taller" value=" ↓ " onclick="changeSize(this,5)" />
+ <input type="button" name="shorter" value=" ↑ " onclick="changeSize(this,-5)" />
+ </div>
+
Added: incubator/roller/trunk/web/weblog/editor-wiki-js.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/editor-wiki-js.jsp?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/web/weblog/editor-wiki-js.jsp (added)
+++ incubator/roller/trunk/web/weblog/editor-wiki-js.jsp Wed Jun 8 20:18:46 2005
@@ -0,0 +1,187 @@
+
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+
+<%@ include file="/taglibs.jsp" %>
+
+<script type="text/javascript">
+<!--
+function postWeblogEntry(publish)
+{
+ if (publish)
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+}
+function convertTextArea(textArea) {
+ $text = textArea.value;
+
+ // first off, __xxx__ to strong
+ $text = $text.replace(/__([^_]*)__/g, "<strong>$1</strong>");
+
+ // next, ''xxx'' to emphasis
+ $text = $text.replace(/''([^']*)''/g, "<em>$1</em>");
+
+ // next, {{{xxx}}} to pre
+ $text = $text.replace(/\{\{\{([^\}]*)\}\}\}/g, "</p><pre>$1</pre><p>");
+
+ // next, {{xxx}} to tt
+ $text = $text.replace(/\{\{([^\}]*)\}\}/g, "<tt>$1</tt>");
+
+ // next, ==xxx== to underline
+ $text = $text.replace(/==([^=]*)==/g, "<u>$1</u>");
+
+ // newlines
+ $text = $text.replace(/-----*/g, "<hr/>");
+
+ // --xxx-- to strike-through
+ $text = $text.replace(/--([^-]*)--/g, "<s>$1</s>");
+
+ // headings
+ $text = $text.replace(/^!!!!!(.*)$/mg, "</p><h5>$1</h5><p>");
+ $text = $text.replace(/^!!!!(.*)$/mg, "</p><h4>$1</h4><p>");
+ $text = $text.replace(/^!!!(.*)$/mg, "</p><h3>$1</h3><p>");
+ $text = $text.replace(/^!!(.*)$/mg, "</p><h2>$1</h2><p>");
+ $text = $text.replace(/^!(.*)$/mg, "</p><h1>$1</h1><p>");
+
+ // Need to be able to handle nested *'s and #'s. Need to
+ // know when to put the ul and ol in, and when to close.
+ // Hard in regexp, so I'm doing it by hand
+ $text = handleList($text, "\*", "<ul>", "</ul>");
+ $text = handleList($text, "\#", "<ol>", "</ol>");
+
+ // table |..|..|.. is a row, and ||..||..||.. is a header
+ // another one that will be hard to do in pure regexp
+ $text = handleTable($text);
+
+ // def lists: ;term:definition to dl/dt/dd
+
+ // img before http means we can have links made of images
+ // img://....|...\s becomes image with alt or title
+ $text = $text.replace(/\[img(:\/\/[^|]*)\|([^\]]*)\]/g, "<img src='http$1' title='$2'>");
+ // img://....\s becomes an image
+ $text = $text.replace(/\[img(:\/\/[^\]]*)\]/g, "<img src='http$1'/>");
+ // http://....|...\s becomes an anchor
+ $text = $text.replace(/\[(http:\/\/[^|]*)\|([^\]]*)\]/g, "<a href='$1'>$2</a>");
+ $text = $text.replace(/\[(http:\/\/[^\]]*)\]/g, "<a href='$1'>$1</a>");
+
+ // textareas often stick a newline at the end
+ $text = $text.replace(/<br\/>\n+$/, "<br/>");
+
+ // lastly, all newlines to br's
+ while($text.match(/\n\n/)) {
+ $text = $text.replace(/\n\n/g, "<br/><br/>\n");
+ }
+ $text = $text.replace(/\\$/m, "<br/>\n");
+
+ // TODO:
+ // automatic <a href for http:// ?? hard. Use [...|,,,] instead?
+ // automatic <img src for img://
+ // ability to escape any matching block with \
+ // use this for comments?
+ // add help
+
+ textArea.value = $text;
+}
+
+function handleList($page, $char, $start, $end) {
+ if(! $page.match("\n"+$char)) {
+ return $page;
+ }
+ $regexpCharCount = "[^"+$char+"]";
+ $regexpCharReplace = "^"+$char+"*\s";
+ $lines = $page.split("\n");
+ $text = "";
+ $depth = 0;
+ for($i=0; $i<$lines.length; $i++) {
+ $line = $lines[$i];
+ $count = $line.search($regexpCharCount);
+ if($count < 1) {
+ if($depth != 0) {
+ for($j=0; $j<$depth; $j++) {
+ $text += $end;
+ }
+ // hack for css
+ if($depth == 1) {
+ $text += "<p>";
+ }
+ $depth = 0;
+ }
+ $text += $line;
+ $text += "\n";
+ continue;
+ }
+ $line = $line.substring($count+1);
+ if($depth < $count) {
+ // hack for css
+ if($depth == 0) {
+ $text += "</p>";
+ }
+ while($depth < $count) {
+ $depth++;
+ $text += $start+"\n";
+ }
+ $text += "<li>"+$line+"</li>\n";
+ continue;
+ }
+ if($depth > $count) {
+ while($depth > $count) {
+ $depth--;
+ $text += $end+"\n";
+ }
+ $text += "<li>"+$line+"</li>\n";
+ continue;
+ }
+ $text += "<li>"+$line+"</li>\n";
+ }
+ if($depth != 0) {
+ for($j=0; $j<$depth; $j++) {
+ $text += $end;
+ }
+ // hack for css
+ $text += "<p>";
+ }
+ return $text;
+}
+
+function handleTable($page) {
+ if(! $page.match(/^\|/)) {
+ return $page;
+ }
+ $lines = $page.split("\n");
+ $text = "";
+ $inTable = false;
+ for($i=0; $i<$lines.length; $i++) {
+ $line = $lines[$i];
+ if($line.match(/^\|\|/)) {
+ if(!$inTable) {
+ $text += "<table border='1'>\n";
+ $inTable = true;
+ }
+ $line = $line.replace(/^\|\|([^\|]*)/, "<tr><th>$1");
+ $line = $line.replace(/\|\|([^\|]*)/g, "</th><th>$1");
+ $line = $line + "</th></tr>\n";
+ } else
+ if($line.match(/^\|/)) {
+ if(!$inTable) {
+ $text += "<table border='1'>\n";
+ $inTable = true;
+ }
+ $line = $line.replace(/^\|([^\|]*)/, "<tr><td>$1");
+ $line = $line.replace(/\|([^\|]*)/g, "</td><td>$1");
+ $line = $line + "</td></tr>\n";
+ } else {
+ if($inTable) {
+ $text += "</table>\n";
+ $inTable = false;
+ }
+ }
+ $text += $line+"\n";
+ }
+ return $text;
+}
+
+// -->
+</script>
+
+(<a href="weblog/help-wiki-js.html" alt="Wiki-js help" target="_blank">wiki-js help</a>)
+
+<html:textarea property="text" cols="75" rows="20" style="width: 100%" tabindex="2" onchange="convertTextArea(this)"/>