[Lutinweb-commits] r59 - in trunk/lutinrss/src/main: resources/fckeditor webapp
Author: tchemit Date: 2008-05-19 18:28:12 +0000 (Mon, 19 May 2008) New Revision: 59 Added: trunk/lutinrss/src/main/resources/fckeditor/myfckconfig.js Modified: trunk/lutinrss/src/main/webapp/fckTest.html trunk/lutinrss/src/main/webapp/feeds.txt Log: use external configuration file fckconfig.js in order to not touch fckconfig.js... add feedrepr in feeds.txt (use lowercase attributes...) Added: trunk/lutinrss/src/main/resources/fckeditor/myfckconfig.js =================================================================== --- trunk/lutinrss/src/main/resources/fckeditor/myfckconfig.js (rev 0) +++ trunk/lutinrss/src/main/resources/fckeditor/myfckconfig.js 2008-05-19 18:28:12 UTC (rev 59) @@ -0,0 +1,65 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Editor configuration settings. + * + * Follow this link for more information: + * http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_S... + */ + +FCKConfig.Plugins.Add("rssinclude", "en,fr"); + +FCKConfig.ToolbarSets["Default"] = [ + ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], + ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], + ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], + ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], + '/', + ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], + ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], + ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Link','Unlink','Anchor'], + ['rssinclude', 'Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['TextColor','BGColor'], + ['FitWindow','ShowBlocks','-','About'] // No comma for the last row. +] ; + +// to authorize user to add a new feed +FCKConfig.RssCanAddFeed = false; + +// to authorize user to edit a known feed +FCKConfig.RssCanEditFeed = false; + +// url to render a feed +FCKConfig.RssRenderURL = '/lutinrss-2.1/RSSServlet&feedName=' ; + +// url to obtain rssinclude script +FCKConfig.RssScriptURL = '/lutinrss-2.1/RSSServlet' ; + +// url to obtain known feeds as a list of html options +FCKConfig.RssKnownFeedsURL = '/lutinrss-2.1/feeds.txt' ; + +// url to create a new feed +FCKConfig.RssAddURL = ''; + +// url to edit a known feed +FCKConfig.RssEditURL = '' ; Modified: trunk/lutinrss/src/main/webapp/fckTest.html =================================================================== --- trunk/lutinrss/src/main/webapp/fckTest.html 2008-05-19 18:26:13 UTC (rev 58) +++ trunk/lutinrss/src/main/webapp/fckTest.html 2008-05-19 18:28:12 UTC (rev 59) @@ -5,55 +5,44 @@ --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> - <head> - <title>Page de test plugin FCKEditor rss</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <link href="feed.css" rel="stylesheet" type="text/css" /> - <!--script src="/lutinrss-2.1/RSSServlet"></script--> - <script type="text/javascript" src="/fckeditor/fckeditor.js"></script> - </head> - <body> - <h1>Test plugin FCKEditor RSS (*)</h1> - <form name="EditPostView" action="#" method="GET"> - <script type="text/javascript"> - <!-- - var oFCKeditor = new FCKeditor( 'rssTest' ) ; - oFCKeditor.Height = '500px' ; - oFCKeditor.Width = '545px' ; - var content = "<div contenteditable='false' class=\"rssinclude\" name=\"rssinclude\" feedName=\"http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml\" style=\"background-color: rgb(255, 255, 0);\" nbItem=\"1\" feedRepr=\"n-n\">RSS http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml (items:1)</div><br/>"; - content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedName=\"http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml\" nbItem=\"2\" feedRepr=\"indat-natd\" style=\"background-color: rgb(255, 255, 0);\">RSS http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml (items:2)</div><br/>"; - content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedName=\"http://blog.developpez.com/xmlsrv/rss2.php?blog=42\" nbItem=\"3\" feedRepr=\"indat-natd\" style=\"background-color: rgb(255, 255, 0);\">RSS http://blog.developpez.com/xmlsrv/rss2.php?blog=42 (items:3)</div><br/>"; - content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedName=\"http://formats-ouverts.org/rss.php\" nbItem=\"4\" feedRepr=\"indat-natd\" style=\"background-color: rgb(255, 255, 0);\">RSS http://formats-ouverts.org/rss.php (items:4)</div><br/>"; - content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedName=\"http://www.h2database.com/html/newsfeed-rss.xml\" nbItem=\"5\" feedRepr=\"indat-natd\" style=\"background-color: rgb(255, 255, 0);\">RSS http://www.h2database.com/html/newsfeed-rss.xml (items:5)</div><br/>"; - content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedName=\"http://www.opensi.org/news.rss\" nbItem=\"6\" feedRepr=\"indat-natd\" style=\"background-color: rgb(255, 255, 0);\">RSS http://www.opensi.org/news.rss (items:6)</div>"; - content += "<s"+"cript src=\"/lutinrss-2.1/RSSServlet\"></scri"+"pt><hr/><p>content...</p>"; - oFCKeditor.Value = content; - oFCKeditor.Create() ; - --> - </script> - <hr/> - <input type="submit" value="envoyer"> - </form> - <p>(*) required a FCKEditor 2.6 available on / apache path (means /fckeditor points to fckeditor root directory)</p> - <p>with rssinclude plugin configured like this : - <pre> - // to authorize user to add a new feed - FCKConfig.RssCanAddFeed = false; - - // to authorize user to edit a known feed - FCKConfig.RssCanEditFeed = false; - - // url to render a feed - FCKConfig.RssRenderURL = '/lutinrss-2.1/RSSServlet&feedName='; - - // url to obtain rssinclude script - FCKConfig.RssScriptURL = '/lutinrss-2.1/RSSServlet'; - - // url to obtain known feeds as a list of html options - FCKConfig.RssKnownFeedsURL = '/lutinrss-2.1/feeds.txt'; - </pre> - </p> +<head> + <title>Page de test plugin FCKEditor rss</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <!--link href="feed.css" rel="stylesheet" type="text/css" /--> + <script type="text/javascript" src="/fckeditor/fckeditor.js"></script> + <style type="text/css">div.rssinclude { background-color: #ffff00; }</style> +</head> +<body> +<h1>Test plugin FCKEditor RSS (*)</h1> +<form name="EditPostView" action="#" method="GET"> + <script type="text/javascript"> + <!-- + var oFCKeditor = new FCKeditor( 'rssTest' ) ; + oFCKeditor.Config["CustomConfigurationsPath"] = oFCKeditor.BasePath+"/myfckconfig.js"; - - </body> + var content = "<div contenteditable='false' class=\"rssinclude\" name=\"rssinclude\" feedname=\"http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml\" nbitem=\"2\" feedrepr=\"n-n\">RSS http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml (items:2)</div><br></br>"; + //content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedname=\"http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml\" nbitem=\"2\" feedrepr=\"indat-natd\" \">RSS http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml (items:2)</div><br/>"; + //content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedname=\"http://blog.developpez.com/xmlsrv/rss2.php?blog=42\" nbitem=\"3\" feedRepr=\"indat-natd\" \">RSS http://blog.developpez.com/xmlsrv/rss2.php?blog=42 (items:3)</div><br/>"; + //content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedname=\"http://formats-ouverts.org/rss.php\" nbitem=\"4\" feedrepr=\"indat-natd\" \">RSS http://formats-ouverts.org/rss.php (items:4)</div><br/>"; + //content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedname=\"http://www.h2database.com/html/newsfeed-rss.xml\" nbitem=\"5\" feedRepr=\"indat-natd\" \">RSS http://www.h2database.com/html/newsfeed-rss.xml (items:5)</div><br/>"; + //content+="<div contenteditable='false' name=\"rssinclude\" class=\"rssinclude\" feedname=\"http://www.opensi.org/news.rss\" nbitem=\"6\" feedrepr=\"indat-natd\" \">RSS http://www.opensi.org/news.rss (items:6)</div>"; + content += "<s"+"cript src=\"/lutinrss-2.1/RSSServlet\"></scri"+"pt><hr/><p>content...</p>"; + oFCKeditor.Value = content; + oFCKeditor.Create() ; + --> + </script> + <hr/> + <input type="submit" value="envoyer"> +</form> +<p>(*) required a FCKEditor 2.6 available on / apache path (means /fckeditor points to fckeditor root directory)</p> +<p>add custom config like this code : + <pre> +var oFCKeditor = new FCKeditor( 'rssTest' ) ; +oFCKeditor.Config["CustomConfigurationsPath"] = oFCKeditor.BasePath+"/myfckconfig.js"; +oFCKeditor.Create() ; + </pre> +</p> + + +</body> </html> Modified: trunk/lutinrss/src/main/webapp/feeds.txt =================================================================== --- trunk/lutinrss/src/main/webapp/feeds.txt 2008-05-19 18:26:13 UTC (rev 58) +++ trunk/lutinrss/src/main/webapp/feeds.txt 2008-05-19 18:28:12 UTC (rev 59) @@ -1,7 +1,7 @@ -<option id="http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml" value="http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml" nbItem="1">le monde informatique</option> -<option id="http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml" value="http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml" nbItem="2">le monde</option> -<option id="http://blog.developpez.com/xmlsrv/rss2.php?blog=42" value="http://blog.developpez.com/xmlsrv/rss2.php?blog=42" nbItem="3">developpez.com</option> -<option id="http://formats-ouverts.org/rss.php" value="http://formats-ouverts.org/rss.php" nbItem="4">formats ouverts</option> -<option id="http://www.h2database.com/html/newsfeed-rss.xml" value="http://www.h2database.com/html/newsfeed-rss.xml" nbItem="5">h2</option> -<option id="http://www.opensi.org/news.rss" value="http://www.opensi.org/news.rss" nbItem="6">opensi</option> +<option value="http://www.lemondeinformatique.fr/flux-rss/open-source/rss.xml" nbitem="1" feedrepr="indat-natd">le monde informatique</option> +<option value="http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml" nbitem="2" feedrepr="indat-natd">le monde</option> +<option value="http://blog.developpez.com/xmlsrv/rss2.php?blog=42" nbitem="3" feedrepr="indat-natd">developpez.com</option> +<option value="http://formats-ouverts.org/rss.php" nbitem="4" feedrepr="indat-natd">formats ouverts</option> +<option value="http://www.h2database.com/html/newsfeed-rss.xml" nbitem="5" feedrepr="indat-natd">h2</option> +<option value="http://www.opensi.org/news.rss" nbitem="6" feedrepr="indat-natd">opensi</option>
participants (1)
-
tchemit@users.labs.libre-entreprise.org