r3749 - in trunk/pollen-ui-struts2/src/main/webapp: WEB-INF/jsp/poll js
Author: tchemit Date: 2012-11-21 02:05:19 +0100 (Wed, 21 Nov 2012) New Revision: 3749 Url: http://chorem.org/repositories/revision/pollen/3749 Log: fixes #159: [Poll] Impossible de mettre de code html dans la description du sondage fixes #85: [Comment] Permettre l'ajout de liens dans les commentaires refs #846: Use nice text rich editor for description in forms Added: trunk/pollen-ui-struts2/src/main/webapp/js/ckeditor.config.js Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp 2012-11-20 23:59:00 UTC (rev 3748) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollForm.jsp 2012-11-21 01:05:19 UTC (rev 3749) @@ -121,8 +121,12 @@ <s:textfield key="poll.title" label="%{getText('pollen.common.title')}" required="true" size="80"/> + <s:url var="configUrl" value='/js/ckeditor.config.js'/> + <sjr:ckeditor key="poll.description" rows="10" cols="80" width="800" - label="%{getText('pollen.common.description')}" /> + toolbar="PollenToolbar" customConfig="%{configUrl}" + editorLocal="%{safeLanguage}" + label="%{getText('pollen.common.description')}" /> <%--s:textarea key="poll.description" rows="3" cols="54" label="%{getText('pollen.common.description')}"/--%> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp 2012-11-20 23:59:00 UTC (rev 3748) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp 2012-11-21 01:05:19 UTC (rev 3749) @@ -23,8 +23,9 @@ <%@ page contentType="text/html" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <div id="pollInformationTop"> - <div style="white-space:pre-wrap; text-align: start;"> - <s:property value="poll.description"/> + <%--<div style="white-space:pre-wrap; text-align: start;">--%> + <div> + <s:property value="poll.description" escapeHtml="false"/> </div> <fieldset> <legend><s:text name="pollen.common.aboutPoll"/></legend> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-11-20 23:59:00 UTC (rev 3748) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-11-21 01:05:19 UTC (rev 3749) @@ -397,17 +397,13 @@ validate="true"> <s:textfield key="commentAuthor" required="true" size="78" label="%{getText('pollen.common.commentAuthor')}"/> - <sjr:ckeditor - key="commentText" - required="true" - value="" - rows="3" - cols="54" - width="500" + + <s:url var="configUrl" value='/js/ckeditor.config.js'/> + <sjr:ckeditor key="commentText" required="true" + value="" rows="3" cols="54" width="500" label="%{getText('pollen.common.commentText')}" - toolbar="Basic" - editorLocal="fr" - /> + toolbar="PollenToolbar" customConfig="%{configUrl}" + editorLocal="%{safeLanguage}" /> <div class="cleanBoth"> <s:submit action="addComment/%{pollUri}" key="pollen.action.addComment" align="center"/> Added: trunk/pollen-ui-struts2/src/main/webapp/js/ckeditor.config.js =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/js/ckeditor.config.js (rev 0) +++ trunk/pollen-ui-struts2/src/main/webapp/js/ckeditor.config.js 2012-11-21 01:05:19 UTC (rev 3749) @@ -0,0 +1,38 @@ +/* + * #%L + * Pollen :: UI (struts2) + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2012 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +CKEDITOR.editorConfig = function (config) { + config.toolbar = 'PollenToolbar'; + + config.toolbar_PollenToolbar = + [ +// ['Cut', 'Copy', 'Paste', 'PasteText', /*'PasteFromWord'*/, '-', 'Undo', 'Redo', '-', 'Scayt'], +// [ 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'], + ['Styles', 'Format'], + ['Bold', 'Italic', 'Strike', 'Underline','Strike','Subscript','Superscript'], + ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'], +// '/', + ['Table', 'HorizontalRule', 'Smiley', 'SpecialChar'/*, 'PageBreak'*/], + ['Link', 'Unlink', 'Anchor'] + ]; + +}; \ No newline at end of file Property changes on: trunk/pollen-ui-struts2/src/main/webapp/js/ckeditor.config.js ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native
participants (1)
-
tchemit@users.chorem.org