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 2006/10/08 21:54:16 UTC
svn commit: r454197 [12/29] - in /incubator/roller/trunk/web:
WEB-INF/classes/ roller-ui/authoring/editors/
roller-ui/authoring/editors/xinha/ roller-ui/authoring/editors/xinha/conf/
roller-ui/authoring/editors/xinha/contrib/ roller-ui/authoring/editor...
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/ExtendedFileManager/thumbs.php
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/ExtendedFileManager/thumbs.php?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/ExtendedFileManager/thumbs.php (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/ExtendedFileManager/thumbs.php Sun Oct 8 12:53:13 2006
@@ -0,0 +1,85 @@
+<?php
+/**
+ * On the fly Thumbnail generation.
+ * Creates thumbnails given by thumbs.php?img=/relative/path/to/image.jpg
+ * relative to the base_dir given in config.inc.php
+ * Authors: Wei Zhuo, Afru, Krzysztof Kotowicz
+ * Version: Updated on 08-01-2005 by Afru
+ * Version: Updated on 21-06-2006 by Krzysztof Kotowicz
+ * Package: ExtendedFileManager (EFM 1.1.1)
+ * http://www.afrusoft.com/htmlarea
+ */
+if(isset($_REQUEST['mode'])) $insertMode=$_REQUEST['mode'];
+if(!isset($insertMode)) $insertMode="image";
+
+require_once('config.inc.php');
+require_once('Classes/ExtendedFileManager.php');
+require_once('../ImageManager/Classes/Thumbnail.php');
+
+//check for img parameter in the url
+if(!isset($_GET['img']))
+ exit();
+
+$manager = new ExtendedFileManager($IMConfig,$insertMode);
+
+//get the image and the full path to the image
+$image = rawurldecode($_GET['img']);
+$fullpath = Files::makeFile($manager->getImagesDir(),$image);
+
+//not a file, so exit
+if(!is_file($fullpath))
+ exit();
+
+$imgInfo = @getImageSize($fullpath);
+
+//Not an image, send default thumbnail
+if(!is_array($imgInfo))
+{
+ //show the default image, otherwise we quit!
+ $default = $manager->getDefaultThumb();
+ if($default)
+ {
+ header('Location: '.$default);
+ exit();
+ }
+}
+//if the image is less than the thumbnail dimensions
+//send the original image as thumbnail
+if ($imgInfo[0] <= $IMConfig['thumbnail_width']
+ && $imgInfo[1] <= $IMConfig['thumbnail_height'])
+ {
+ header('Location: '.$manager->getFileURL($image));
+ exit();
+ }
+
+//Check for thumbnails
+$thumbnail = $manager->getThumbName($fullpath);
+if(is_file($thumbnail))
+{
+ //if the thumbnail is newer, send it
+ if(filemtime($thumbnail) >= filemtime($fullpath))
+ {
+ header('Location: '.$manager->getThumbURL($image));
+ exit();
+ }
+}
+
+//creating thumbnails
+$thumbnailer = new Thumbnail($IMConfig['thumbnail_width'],$IMConfig['thumbnail_height']);
+$thumbnailer->createThumbnail($fullpath, $thumbnail);
+
+//Check for NEW thumbnails
+if(is_file($thumbnail))
+{
+ //send the new thumbnail
+ header('Location: '.$manager->getThumbURL($image));
+ exit();
+}
+else
+{
+ //show the default image, otherwise we quit!
+ $default = $manager->getDefaultThumb();
+ if($default)
+ header('Location: '.$default);
+}
+?>
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filter.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filter.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filter.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filter.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,68 @@
+// Filter plugin for HTMLArea
+// Implementation by Udo Schmal & Schaffrath NeueMedien
+// Original Author - Udo Schmal
+//
+// (c) Udo Schmal & Schaffrath NeueMedien 2004
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+function Filter(editor) {
+ this.editor = editor;
+ var cfg = editor.config;
+ var self = this;
+ // register the toolbar buttons provided by this plugin
+ cfg.registerButton({
+ id: "filter",
+ tooltip : this._lc("Filter"),
+ image : editor.imgURL("ed_filter.gif", "Filter"),
+ textMode : false,
+ action : function(editor) {
+ self.buttonPress(editor);
+ }
+ });
+ if (!cfg.Filters)
+ cfg.Filters = ["Paragraph","Word"];
+ for (var i = 0; i < editor.config.Filters.length; i++) {
+ self.add(editor.config.Filters[i]);
+ }
+ cfg.addToolbarElement("filter", "removeformat", 1);
+}
+
+Filter._pluginInfo =
+{
+ name : "Filter",
+ version : "1.0",
+ developer : "Udo Schmal (gocher)",
+ developer_url : "",
+ sponsor : "L.N.Schaffrath NeueMedien",
+ sponsor_url : "http://www.schaffrath-neuemedien.de/",
+ c_owner : "Udo Schmal & Schaffrath-NeueMedien",
+ license : "htmlArea"
+};
+
+Filter.prototype.add = function(filterName) {
+ if(eval('typeof ' + filterName) == 'undefined') {
+ var filter = _editor_url + "plugins/filter/filters/" + filterName + ".js";
+ var head = document.getElementsByTagName("head")[0];
+ var evt = HTMLArea.is_ie ? "onreadystatechange" : "onload";
+ var script = document.createElement("script");
+ script.type = "text/javascript";
+ script.src = filter;
+ script[evt] = function() {
+ if(HTMLArea.is_ie && !/loaded|complete/.test(window.event.srcElement.readyState)) return;
+ }
+ head.appendChild(script);
+ //document.write("<script type='text/javascript' src='" + plugin_file + "'></script>");
+ }
+};
+
+Filter.prototype._lc = function(string) {
+ return HTMLArea._lc(string, 'Filter');
+};
+
+Filter.prototype.buttonPress = function(editor) {
+ var html = editor.getInnerHTML();
+ for (var i = 0; i < editor.config.Filters.length; i++) {
+ html = eval(editor.config.Filters[i])(html);
+ }
+ editor.setHTML(html);
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/paragraph.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/paragraph.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/paragraph.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/paragraph.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,6 @@
+Paragraph = function(html) {
+ html = html.replace(/<\s*p[^>]*>/gi, '');
+ html = html.replace(/<\/\s*p\s*>/gi, '');
+ html = html.trim();
+ return html;
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/word.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/word.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/word.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/filters/word.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,53 @@
+Word = function(html) {
+ // Remove HTML comments
+ html = html.replace(/<!--[\w\s\d@{}:.;,'"%!#_=&|?~()[*+\/\-\]]*-->/gi, "" );
+ html = html.replace(/<!--[^\0]*-->/gi, '');
+ // Remove all HTML tags
+ html = html.replace(/<\/?\s*HTML[^>]*>/gi, "" );
+ // Remove all BODY tags
+ html = html.replace(/<\/?\s*BODY[^>]*>/gi, "" );
+ // Remove all META tags
+ html = html.replace(/<\/?\s*META[^>]*>/gi, "" );
+ // Remove all SPAN tags
+ html = html.replace(/<\/?\s*SPAN[^>]*>/gi, "" );
+ // Remove all FONT tags
+ html = html.replace(/<\/?\s*FONT[^>]*>/gi, "");
+ // Remove all IFRAME tags.
+ html = html.replace(/<\/?\s*IFRAME[^>]*>/gi, "");
+ // Remove all STYLE tags & content
+ html = html.replace(/<\/?\s*STYLE[^>]*>(.|[\n\r\t])*<\/\s*STYLE\s*>/gi, "" );
+ // Remove all TITLE tags & content
+ html = html.replace(/<\s*TITLE[^>]*>(.|[\n\r\t])*<\/\s*TITLE\s*>/gi, "" );
+ // Remove javascript
+ html = html.replace(/<\s*SCRIPT[^>]*>[^\0]*<\/\s*SCRIPT\s*>/gi, "");
+ // Remove all HEAD tags & content
+ html = html.replace(/<\s*HEAD[^>]*>(.|[\n\r\t])*<\/\s*HEAD\s*>/gi, "" );
+ // Remove Class attributes
+ html = html.replace(/<\s*(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
+ // Remove Style attributes
+ html = html.replace(/<\s*(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
+ // Remove Lang attributes
+ html = html.replace(/<\s*(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
+ // Remove XML elements and declarations
+ html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
+ // Remove Tags with XML namespace declarations: <o:p></o:p>
+ html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
+ // Replace the
+ html = html.replace(/ /, " " );
+
+ // Transform <p><br /></p> to <br>
+ //html = html.replace(/<\s*p[^>]*>\s*<\s*br\s*\/>\s*<\/\s*p[^>]*>/gi, "<br>");
+ html = html.replace(/<\s*p[^>]*><\s*br\s*\/?>\s*<\/\s*p[^>]*>/gi, "<br>");
+
+ // Remove <P>
+ html = html.replace(/<\s*p[^>]*>/gi, "");
+
+ // Replace </p> with <br>
+ html = html.replace(/<\/\s*p[^>]*>/gi, "<br>");
+
+ // Remove any <br> at the end
+ html = html.replace(/(\s*<br>\s*)*$/, "");
+
+ html = html.trim();
+ return html;
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/img/ed_filter.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/img/ed_filter.gif?view=auto&rev=454197
==============================================================================
Binary file - no diff available.
Propchange: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Filter/img/ed_filter.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/find-replace.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/find-replace.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/find-replace.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/find-replace.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,42 @@
+/*---------------------------------------*\
+ Find and Replace Plugin for HTMLArea-3.0
+ -----------------------------------------
+ author: Cau guanabara
+ e-mail: caugb@ibest.com.br
+\*---------------------------------------*/
+
+function FindReplace(editor) {
+this.editor = editor;
+var cfg = editor.config;
+var self = this;
+cfg.registerButton("FR-findreplace", this._lc("Find and Replace"),
+ editor.imgURL("ed_find.gif", "FindReplace"), false,
+ function(editor) { self.buttonPress(editor); });
+cfg.addToolbarElement(["FR-findreplace","separator"], ["formatblock","fontsize","fontname"], -1);
+}
+
+FindReplace.prototype.buttonPress = function(editor) {
+FindReplace.editor = editor;
+var sel = editor.getSelectedHTML();
+ if(/\w/.test(sel)) {
+ sel = sel.replace(/<[^>]*>/g,"");
+ sel = sel.replace(/ /g,"");
+ }
+var param = /\w/.test(sel) ? {fr_pattern: sel} : null;
+editor._popupDialog("plugin://FindReplace/find_replace", null, param);
+};
+
+FindReplace._pluginInfo = {
+ name : "FindReplace",
+ version : "1.0 - beta",
+ developer : "Cau Guanabara",
+ developer_url : "mailto:caugb@ibest.com.br",
+ c_owner : "Cau Guanabara",
+ sponsor : "Independent production",
+ sponsor_url : "http://www.netflash.com.br/gb/HA3-rc1/examples/find-replace.html",
+ license : "htmlArea"
+};
+
+FindReplace.prototype._lc = function(string) {
+ return HTMLArea._lc(string, 'FindReplace');
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/fr_engine.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/fr_engine.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/fr_engine.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/fr_engine.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,149 @@
+/*---------------------------------------*\
+ Find and Replace Plugin for HTMLArea-3.0
+ -----------------------------------------
+ author: Cau guanabara
+ e-mail: caugb@ibest.com.br
+\*---------------------------------------*/
+
+var FindReplace = window.opener.FindReplace;
+var editor = FindReplace.editor;
+var is_mo = window.opener.HTMLArea.is_gecko;
+var tosearch = '';
+var pater = null;
+var buffer = null;
+var matches = 0;
+var replaces = 0;
+var fr_spans = new Array();
+function _lc(string) {
+ return(window.opener.HTMLArea._lc(string, 'FindReplace'));
+}
+function execSearch(params) {
+var ihtml = editor._doc.body.innerHTML;
+ if(buffer == null)
+ buffer = ihtml;
+
+ if(params['fr_pattern'] != tosearch) {
+ if(tosearch != '')
+ clearDoc();
+ tosearch = params['fr_pattern'];
+ }
+
+ if(matches == 0) {
+ er = params['fr_words'] ? "/(?!<[^>]*)(\\b"+params['fr_pattern']+"\\b)(?![^<]*>)/g" :
+ "/(?!<[^>]*)("+params['fr_pattern']+")(?![^<]*>)/g";
+ if(!params['fr_matchcase'])
+ er += "i";
+
+ pater = eval(er);
+
+ var tago = '<span id=frmark>';
+ var tagc = '</span>';
+ var newHtml = ihtml.replace(pater,tago+"$1"+tagc);
+
+ editor.setHTML(newHtml);
+
+ var getallspans = editor._doc.body.getElementsByTagName("span");
+ for (var i = 0; i < getallspans.length; i++)
+ if(/^frmark/.test(getallspans[i].id))
+ fr_spans.push(getallspans[i]);
+ }
+
+spanWalker(params['fr_pattern'],params['fr_replacement'],params['fr_replaceall']);
+}
+
+function spanWalker(pattern,replacement,replaceall) {
+var foundtrue = false;
+clearMarks();
+
+ for (var i = matches; i < fr_spans.length; i++) {
+ var elm = fr_spans[i];
+ foundtrue = true;
+ if(!(/[0-9]$/.test(elm.id))) {
+ matches++;
+ disab('fr_clear',false);
+ elm.id = 'frmark_'+matches;
+ elm.style.color = 'white';
+ elm.style.backgroundColor = 'highlight';
+ elm.style.fontWeight = 'bold';
+ elm.scrollIntoView(false);
+ if(/\w/.test(replacement)) {
+ if(replaceall || confirm(_lc("Substitute this occurrence?"))) {
+ elm.firstChild.replaceData(0,elm.firstChild.data.length,replacement);
+ replaces++;
+ disab('fr_undo',false);
+ }
+ if(replaceall) {
+ clearMarks();
+ continue;
+ }
+ }
+ break;
+ }
+ }
+ var last = (i >= fr_spans.length - 1);
+ if(last || !foundtrue) { // EOF
+ var message = _lc("Done")+':\n\n';
+ if(matches > 0) {
+ if(matches == 1) message += matches+' '+_lc("found item");
+ else message += matches+' '+_lc("found items");
+ if(replaces > 0) {
+ if(replaces == 1) message += ',\n'+replaces+' '+_lc("replaced item");
+ else message += ',\n'+replaces+' '+_lc("replaced items");
+ }
+ hiliteAll();
+ disab('fr_hiliteall',false);
+ } else { message += '"'+pattern+'" '+_lc("not found"); }
+ alert(message+'.');
+ }
+}
+
+function clearDoc() {
+var doc = editor._doc.body.innerHTML;
+var er = /(<span\s+[^>]*id=.?frmark[^>]*>)([^<>]*)(<\/span>)/gi;
+editor._doc.body.innerHTML = doc.replace(er,"$2");
+pater = null;
+tosearch = '';
+fr_spans = new Array();
+matches = 0;
+replaces = 0;
+disab("fr_hiliteall,fr_clear",true);
+}
+
+function clearMarks() {
+var getall = editor._doc.body.getElementsByTagName("span");
+ for (var i = 0; i < getall.length; i++) {
+ var elm = getall[i];
+ if(/^frmark/.test(elm.id)) {
+ var objStyle = editor._doc.getElementById(elm.id).style;
+ objStyle.backgroundColor = "";
+ objStyle.color = "";
+ objStyle.fontWeight = "";
+ }
+ }
+}
+
+function hiliteAll() {
+var getall = editor._doc.body.getElementsByTagName("span");
+ for (var i = 0; i < getall.length; i++) {
+ var elm = getall[i];
+ if(/^frmark/.test(elm.id)) {
+ var objStyle = editor._doc.getElementById(elm.id).style;
+ objStyle.backgroundColor = "highlight";
+ objStyle.color = "white";
+ objStyle.fontWeight = "bold";
+ }
+ }
+}
+
+function resetContents() {
+ if(buffer == null) return;
+var transp = editor._doc.body.innerHTML;
+editor._doc.body.innerHTML = buffer;
+buffer = transp;
+}
+
+function disab(elms,toset) {
+var names = elms.split(/[,; ]+/);
+ for(var i = 0; i < names.length; i++)
+ document.getElementById(names[i]).disabled = toset;
+}
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/img/ed_find.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/img/ed_find.gif?view=auto&rev=454197
==============================================================================
Binary file - no diff available.
Propchange: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/img/ed_find.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/de.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/de.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/de.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/de.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// translated: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de
+{
+ // messages
+ "Substitute this occurrence?": "Treffer ersetzen?",
+ "Enter the text you want to find": "Geben Sie einen Text ein den Sie finden möchten",
+ "Inform a replacement word": "Geben sie einen Text zum ersetzen ein",
+ "found items": "alle Treffer",
+ "replaced items": "ersetzte Treffer",
+ "found item": "Treffer",
+ "replaced item": "ersetzter Treffer",
+ "not found": "kein Teffer",
+ // window
+ "Find and Replace": "Suchen und ersetzen",
+ "Search for:": "Suchen nach:",
+ "Replace with:": "Ersetzen durch:",
+ "Options": "Optionen",
+ "Whole words only": "Ganze Wörter",
+ "Case sensitive search": "GroÃ-/Kleinschreibung",
+ "Substitute all occurrences": "alle Treffer ersetzen",
+ "Clear": "Nächstes ersetzen",
+ "Highlight": "Hervorheben",
+ "Undo": "Rückgängig",
+ "Next": "Nächster",
+ "Done": "Fertig"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/fr.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/fr.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/fr.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/fr.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,26 @@
+// I18N constants
+// LANG: "fr", ENCODING: UTF-8
+{
+ // messages
+ "Substitute this occurrence?": "Remplacer cette occurrence ?",
+ "Enter the text you want to find": "Texte à trouver",
+ "Inform a replacement word": "Indiquez un mot de remplacement",
+ "found items": "éléments trouvés",
+ "replaced items": "éléments remplacés",
+ "found item": "élément trouvé",
+ "replaced item": "élément remplacé",
+ "not found": "non trouvé",
+ // window
+ "Find and Replace": "Chercher et Remplacer",
+ "Search for:": "Chercher",
+ "Replace with:": "Remplacer par",
+ "Options": "Options",
+ "Whole words only": "Mots entiers seulement",
+ "Case sensitive search": "Recherche sensible à la casse",
+ "Substitute all occurrences": "Remplacer toutes les occurences",
+ "Clear": "Effacer",
+ "Highlight": "Surligner",
+ "Undo": "Annuler",
+ "Next": "Suivant",
+ "Done": "Fin"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/nb.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/nb.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/nb.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/nb.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "nb", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
+{
+ // messages
+ "Substitute this occurrence?": "Vennligst bekreft at du vil erstatte?",
+ "Enter the text you want to find": "Skriv inn teksten du ønsker å finne",
+ "Inform a replacement word": "Vennligst skriv inn et erstatningsord / setning",
+ "found items": "forekomster funnet i søket",
+ "replaced items": "forekomster erstattet",
+ "found item": "Treff",
+ "replaced item": "erstattet treff",
+ "not found": "ikke funnet",
+ // window
+ "Find and Replace": "Søk og erstatt",
+ "Search for:": "Søk etter:",
+ "Replace with:": "Erstatt med:",
+ "Options": "Valg",
+ "Whole words only": "Bare hele ord",
+ "Case sensitive search": "Skille mellom store og små bokstaver",
+ "Substitute all occurrences": "Erstatt alle treff",
+ "Clear": "Tøm",
+ "Highlight": "Uthev",
+ "Undo": "Tilbake",
+ "Next": "Neste",
+ "Done": "Ferdig"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/no.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/no.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/no.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/no.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "no", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
+{
+ // messages
+ "Substitute this occurrence?": "Vennligst bekreft at du vil erstatte?",
+ "Enter the text you want to find": "Skriv inn teksten du ønsker å finne",
+ "Inform a replacement word": "Vennligst skriv inn et erstatningsord / setning",
+ "found items": "forekomster funnet i søket",
+ "replaced items": "forekomster erstattet",
+ "found item": "Treff",
+ "replaced item": "erstattet treff",
+ "not found": "ikke funnet",
+ // window
+ "Find and Replace": "Søk og erstatt",
+ "Search for:": "Søk etter:",
+ "Replace with:": "Erstatt med:",
+ "Options": "Valg",
+ "Whole words only": "Bare hele ord",
+ "Case sensitive search": "Skille mellom store og små bokstaver",
+ "Substitute all occurrences": "Erstatt alle treff",
+ "Clear": "Tøm",
+ "Highlight": "Uthev",
+ "Undo": "Tilbake",
+ "Next": "Neste",
+ "Done": "Ferdig"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pl.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pl.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pl.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pl.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "pl", ENCODING: UTF-8
+// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
+{
+ // messages
+ "Substitute this occurrence?": "ZamieniÄ to wystÄ
pienie?",
+ "Enter the text you want to find": "Podaj tekst, jaki chcesz wyszukaÄ",
+ "Inform a replacement word": "Podaj tekst do zamiany",
+ "found items": "znalezionych",
+ "replaced items": "zamienionych",
+ "found item": "znaleziony",
+ "replaced item": "zamieniony",
+ "not found": "nie znaleziony",
+ // window
+ "Find and Replace": "Znajdź i zamieÅ",
+ "Search for:": "Szukaj:",
+ "Replace with:": "ZamieÅ na:",
+ "Options": "Opcje",
+ "Whole words only": "CaÅe sÅowa",
+ "Case sensitive search": "Wg wielkoÅci liter",
+ "Substitute all occurrences": "ZamieÅ wszystkie wystÄ
pienia",
+ "Clear": "WyczyÅÄ",
+ "Highlight": "PodÅwietl",
+ "Undo": "Cofnij",
+ "Next": "NastÄpny",
+ "Done": "Gotowe"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pt_br.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pt_br.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pt_br.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/pt_br.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "pt-br"
+// Author: Cau guanabara (independent developer), caugb@ibest.com.br
+{
+ // mensagens
+ "Substitute this occurrence?": "Substituir?",
+ "Enter the text you want to find": "Digite um termo para a busca",
+ "Inform a replacement word": "Informe um termo para a substituição",
+ "found items": "itens localizados",
+ "replaced items": "itens substituÃdos",
+ "found item": "item localizado",
+ "replaced item": "item substituÃdo",
+ "not found": "não encontrado",
+ // janela
+ "Find and Replace": "Localizar e Substituir",
+ "Search for:": "Localizar:",
+ "Replace with:": "Substituir por:",
+ "Options": "Opções",
+ "Whole words only": "Apenas palavras inteiras",
+ "Case sensitive search": "Diferenciar caixa alta/baixa",
+ "Substitute all occurrences": "Substituir todas",
+ "Highlight": "Remarcar",
+ "Clear": "Limpar",
+ "Undo": "Desfazer",
+ "Next": "Próxima",
+ "Done": "ConcluÃdo"
+};
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/ru.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/ru.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/ru.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/ru.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,28 @@
+// I18N constants
+// LANG: "ru", ENCODING: UTF-8
+// Author: Andrei Blagorazumov, a@fnr.ru
+
+{
+ // messages
+ "Substitute this occurrence?": "ÐамениÑÑ ÑÑо вÑ
ождение?",
+ "Enter the text you want to find": "ÐведиÑе ÑекÑÑ, коÑоÑÑй Ð²Ñ Ñ
оÑиÑе найÑи",
+ "Inform a replacement word": "ÐоказаÑÑ Ð·Ð°Ð¼ÐµÑаÑÑее Ñлово",
+ "found items": "найÑи",
+ "replaced items": "замененнÑе",
+ "found item": "найÑи",
+ "replaced item": "замененнаÑ",
+ "not found": "не найдено",
+ // window
+ "Find and Replace": "ÐайÑи и замениÑÑ",
+ "Search for:": "ÐайÑи",
+ "Replace with:": "ÐамениÑÑ Ñ",
+ "Options": "ÐпÑии",
+ "Whole words only": "ТолÑко Ñлова Ñеликом",
+ "Case sensitive search": "ÐоиÑк Ñ ÑÑеÑом ÑегиÑÑÑа",
+ "Substitute all occurrences": "ÐамениÑÑ Ð²Ñе вÑ
ождениÑ",
+ "Clear": "ÐÑиÑÑиÑÑ",
+ "Highlight": "ÐÑделиÑÑ",
+ "Undo": "ÐÑмениÑÑ",
+ "Next": "След.",
+ "Done": "OK"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/sv.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/sv.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/sv.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/sv.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,27 @@
+// I18N constants
+// LANG: "sv" (Swedish), ENCODING: UTF-8
+// translated: Erik Dalén, <da...@jpl.se>
+{
+ // messages
+ "Substitute this occurrence?": "Ersätt denna?",
+ "Enter the text you want to find": "Skriv in text du vill söka",
+ "Inform a replacement word": "Skriv in ett ersättningsord",
+ "found items": "förekomster funna i sökningen",
+ "replaced items": "förekomster erstatta",
+ "found item": "Träff",
+ "replaced item": "erstatt träff",
+ "not found": "inte funnet",
+ // window
+ "Find and Replace": "Sök och ersätt",
+ "Search for:": "Sök efter:",
+ "Replace with:": "Ersätt med:",
+ "Options": "Välj",
+ "Whole words only": "Bara hela ord",
+ "Case sensitive search": "Skilj mellan stora och små bokstäver",
+ "Substitute all occurrences": "Erstatt alla träffar",
+ "Clear": "Töm",
+ "Highlight": "Markera",
+ "Undo": "Tillbaka",
+ "Next": "Nästa",
+ "Done": "Färdig"
+};
Propchange: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/lang/sv.js
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/popups/find_replace.html
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/popups/find_replace.html?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/popups/find_replace.html (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FindReplace/popups/find_replace.html Sun Oct 8 12:53:13 2006
@@ -0,0 +1,162 @@
+<html>
+<head>
+ <title>Find and Replace</title>
+<!--
+/*---------------------------------------*\
+ Find and Replace Plugin for HTMLArea-3.0
+ -----------------------------------------
+ author: Cau guanabara
+ e-mail: caugb@ibest.com.br
+\*---------------------------------------*/
+-->
+<script type="text/javascript" src="../fr_engine.js"></script>
+<script type="text/javascript" src="../../../popups/popup.js"></script>
+<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
+
+<script type="text/javascript">
+
+window.resizeTo(335, 250);
+
+var accepted = {
+ 'fr_pattern' : true,
+ 'fr_replacement' : true,
+ 'fr_words' : true,
+ 'fr_matchcase' : true,
+ 'fr_replaceall' : true
+ };
+
+function Init() {
+__dlg_translate('FindReplace');
+__dlg_init();
+
+disab("fr_undo,fr_clear,fr_hiliteall",true);
+
+var params = window.dialogArguments;
+ if(params) {
+ document.getElementById('fr_pattern').value = params["fr_pattern"];
+ document.getElementById('fr_replacement').focus();
+ } else {
+ document.getElementById('fr_pattern').focus();
+ }
+
+document.body.onkeypress = __dlg_key_press;
+}
+
+function onCancel() {
+ clearDoc();
+ __dlg_close(null);
+ return false;
+}
+
+function onOK() {
+ var required = {'fr_pattern' : _lc("Enter the text you want to find")};
+ for (var i in required) {
+ var el = document.getElementById(i);
+ if (!el.value) {
+ alert(required[i]);
+ el.focus();
+ return false;
+ }
+ }
+
+ var param = {};
+ for (var i in accepted) {
+ var el = document.getElementById(i);
+ param[i] = el.type == 'checkbox' ? el.checked : el.value;
+ }
+ execSearch(param);
+ return false;
+}
+
+function __dlg_key_press(ev) {
+ev || (ev = window.event);
+ switch(ev.keyCode) {
+ case 13:
+ document.getElementById('fr_go').click();
+ document.getElementById('fr_pattern').focus();
+ break;
+ case 27:
+ clearDoc();
+ window.close();
+ return false;
+ }
+return true;
+}
+
+</script>
+
+<style type="text/css">
+table .label { text-align: right; width: 12em; }
+.title {
+background: #ddf;
+color: #000;
+font-weight: bold;
+font-size: 120%;
+padding: 3px 10px;
+margin-bottom: 10px;
+border-bottom: 1px solid black;
+letter-spacing: 2px;
+}
+.buttons { border-top: 1px solid #999; padding: 2px; text-align: right; }
+.hrstyle { border-width: 1px; border-color: #666; width: 95%; padding: 2px; }
+</style>
+ </head>
+ <body class="dialog" onload="Init()">
+<form action="" method="get">
+ <div class="title" style="width: 310px">Find and Replace</div>
+ <table border="0" style="width: 100%; padding: 2px;"><!---->
+ <tbody>
+ <tr>
+ <td width="29%" align="right" valign="bottom">Search for:</td>
+ <td width="71%" colspan="2" valign="bottom">
+ <input id="fr_pattern" type="text" style="width: 200px" onFocus="this.select();">
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Replace with:</td>
+ <td colspan="2">
+ <input id="fr_replacement" type="text" style="width: 200px" onFocus="this.select();">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3"><table width="100%" border="0" cellpadding="1" cellspacing="0">
+ <tr>
+ <td width="78%" style="padding: 2px">
+ <FIELDSET style="width:90%; padding: 5px">
+ <LEGEND><span>Options</span></LEGEND>
+ <input id="fr_words" type="checkbox" checked onClick="clearDoc();">
+ <span onClick="e = document.getElementById('fr_words');
+ e.click(); e.focus();" style="cursor:default">
+ <span>Whole words only</span></span><br />
+ <input id="fr_matchcase" type="checkbox" onClick="clearDoc();">
+ <span onClick="e = document.getElementById('fr_matchcase');
+ e.click(); e.focus();" style="cursor:default">
+ <span>Case sensitive search</span></span><br />
+ <input id="fr_replaceall" type="checkbox" onClick="
+ if(document.getElementById('fr_replacement').value == '') {
+ alert(_lc('Inform a replacement word'));
+ return false;
+ }
+ clearDoc();">
+ <span onClick="e = document.getElementById('fr_replaceall');
+ e.click(); e.focus();" style="cursor:default">
+ <span>Substitute all occurrences</span></span>
+ </FIELDSET></td>
+<td width="22%" align="center" valign="bottom" style="text-align: right; padding: 4px">
+<button type="button" id="fr_clear" onClick="clearMarks()">Clear</button>
+<div class="space"></div>
+<button type="button" id="fr_hiliteall" onClick="hiliteAll()">Highlight</button>
+<div class="space"></div>
+<button type="button" id="fr_undo" onClick="resetContents();">Undo</button>
+</td>
+ </tr>
+ </table></td>
+ </tr>
+ </tbody>
+ </table>
+<div style="border-top: 1px solid #999; padding: 2px; padding: 5px; text-align: right; height: 20px"><button type="button" id="fr_go" onclick="return onOK();">Next</button>
+<button type="button" name="cancel" onclick="return onCancel();">Done</button>
+</div>
+</form>
+</body>
+</html>
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/README
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/README?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/README (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/README Sun Oct 8 12:53:13 2006
@@ -0,0 +1,32 @@
+Form Operations Plugin
+----------------------
+
+Usage:
+ 1. Follow the standard procedure for loading a plugin.
+ 2. You may configure the plugin by setting the following configuration variables, or leave them as the defaults.
+
+ xinha_config.FormOperations.multiple_field_format
+ = 'php'
+ this will cause checkbox and "multiple" select fields to have []
+ appended to thier field names silently
+ = 'unmodified'
+ field names will not be silently modified
+
+ xinha_config.FormOperations.allow_edit_form
+ = true
+ the user will be able to edit the action, and method of forms
+ = false
+ neither action, nor method is editable
+
+ xinha_config.FormOperations.default_form_action
+ = 'whatever you want'
+ the default form action to set when inserting a form. The standard one is a php file in the Form Operations directory which will email the form post to enquiries@<server hostname here>
+
+ xinha_config.FormOperations.default_form_html
+ = '<form>whatever you want here</form>'
+ the default html to insert when inserting a form. The standard one is a basic contact form. If you would like to specify an external file which contains the HTML for the form, you may do so via
+ = HTMLArea._geturlcontent('http://absolute/url/to/file.html')
+ see default_form.html for a suitable example, pay attention to the form tag.
+
+
+
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/default_form.html
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/default_form.html?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/default_form.html (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/default_form.html Sun Oct 8 12:53:13 2006
@@ -0,0 +1,36 @@
+<form>
+ <table class="contact_form">
+ <caption>Contact Us</caption>
+ <tbody>
+ <tr>
+ <th>Your name:</th>
+ <td><input type="text" name="Name" value="" /></td>
+ </tr>
+ <tr>
+ <th>Your email:</th>
+ <td><input type="text" name="Email" value="" /></td>
+ </tr>
+ <tr>
+ <th>Message Subject:</th>
+ <td><input type="text" name="Subject" value="" /></td>
+ </tr>
+ <tr>
+ <th>What are your hobbies?</th>
+ <td>
+ <input type="checkbox" value="Marbles" name="Hobbies[]" /> Marbles <br />
+ <input type="checkbox" value="Conkers" name="Hobbies[]" /> Conkers <br />
+ <input type="checkbox" value="Jacks" name="Hobbies[]" /> Jacks
+ </td>
+ </tr>
+ <tr>
+ <th>Message Body:</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <textarea name="Message"> </textarea>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <input type="submit" value="Send" /> <input type="reset" value="Reset" />
+</form>
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/form-operations.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/form-operations.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/form-operations.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/form-operations.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,756 @@
+
+ /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
+ -- FormOperations Plugin
+ --
+ -- $HeadURL: http://gogo@svn.xinha.python-hosting.com/trunk/htmlarea.js $
+ -- $LastChangedDate: 2005-05-25 09:30:03 +1200 (Wed, 25 May 2005) $
+ -- $LastChangedRevision: 193 $
+ -- $LastChangedBy: gogo $
+ --------------------------------------------------------------------------*/
+
+HTMLArea.Config.prototype.FormOperations =
+{
+ // format for fields where multiple values may be selected
+ // 'php' => FieldName[]
+ // 'unmodified' => FieldName
+ 'multiple_field_format': 'php',
+ 'allow_edit_form' : false,
+ 'default_form_action' : _editor_url + 'plugins/FormOperations/formmail.php',
+ 'default_form_html' : HTMLArea._geturlcontent(_editor_url + 'plugins/FormOperations/default_form.html')
+};
+
+FormOperations._pluginInfo =
+{
+ name : "FormOperations",
+ version : "1.0",
+ developer: "James Sleeman",
+ developer_url: "http://www.gogo.co.nz/",
+ c_owner : "Gogo Internet Services",
+ license : "htmlArea",
+ sponsor : "Gogo Internet Services",
+ sponsor_url : "http://www.gogo.co.nz/"
+};
+
+function FormOperations(editor)
+{
+ this.editor = editor;
+ this.panel = false;
+ this.html = false;
+ this.ready = false;
+ this.activeElement = null;
+ this._preparePanel();
+
+
+ editor.config.pageStyleSheets.push(_editor_url + 'plugins/FormOperations/iframe.css');
+
+ var toolbar =
+ [
+ 'separator',
+ 'insert_form',
+ 'insert_text_field',
+ 'insert_textarea_field',
+ 'insert_select_field',
+ 'insert_cb_field',
+ 'insert_rb_field',
+ 'insert_button'
+ ];
+
+ this.editor.config.toolbar.push(toolbar);
+
+ function pasteAndSelect(htmlTag)
+ {
+ var id = HTMLArea.uniq('fo');
+ htmlTag = htmlTag.replace(/^<([^ \/>]+)/i, '<$1 id="'+id+'"');
+ editor.insertHTML(htmlTag);
+ var el = editor._doc.getElementById(id);
+ el.setAttribute('id', '');
+ editor.selectNodeContents(el);
+ editor.updateToolbar();
+ return el;
+ }
+
+ var buttonsImage = editor.imgURL('buttons.gif', 'FormOperations');
+
+ FormOperations.prototype._lc = function(string) {
+ return HTMLArea._lc(string, 'FormOperations');
+ };
+
+ this.editor.config.btnList.insert_form =
+ [ this._lc("Insert a Form."),
+ [buttonsImage, 0, 0],
+ false,
+ function()
+ {
+ var form = null;
+ if(editor.config.FormOperations.default_form_html)
+ {
+ form = pasteAndSelect(editor.config.FormOperations.default_form_html);
+ }
+ else
+ {
+ form = pasteAndSelect('<form> </form>');
+ }
+
+ if(editor.config.FormOperations.default_form_action && !form.action)
+ {
+ form.action = editor.config.FormOperations.default_form_action;
+ }
+ }
+ ];
+
+ this.editor.config.btnList.insert_text_field =
+ [ this._lc("Insert a text, password or hidden field."),
+ [buttonsImage, 1, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<input type="text" />');
+ },
+ 'form'
+ ];
+
+ this.editor.config.btnList.insert_textarea_field =
+ [ this._lc("Insert a multi-line text field."),
+ [buttonsImage, 2, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<textarea> </textarea>');
+ },
+ 'form'
+ ];
+
+ this.editor.config.btnList.insert_select_field =
+ [ this._lc("Insert a select field."),
+ [buttonsImage, 3, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<select> <option value="">Please Select...</option> </select>');
+ },
+ 'form'
+ ];
+
+ this.editor.config.btnList.insert_cb_field =
+ [ this._lc("Insert a check box."),
+ [buttonsImage, 4, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<input type="checkbox" />');
+ },
+ 'form'
+ ];
+
+ this.editor.config.btnList.insert_rb_field =
+ [ this._lc("Insert a radio button."),
+ [buttonsImage, 5, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<input type="radio" />');
+ },
+ 'form'
+ ];
+
+ this.editor.config.btnList.insert_button =
+ [ this._lc("Insert a submit/reset button."),
+ [buttonsImage, 6, 0],
+ false,
+ function()
+ {
+ pasteAndSelect('<input type="submit" value="Send" />');
+ },
+ 'form'
+ ];
+}
+
+FormOperations.prototype.onGenerate = function()
+{
+ // Gecko does not register click events on select lists inside the iframe
+ // so the only way of detecting that is to do an event on mouse move.
+ if( HTMLArea.is_gecko)
+ {
+ var editor = this.editor;
+ var doc = this.editor._doc;
+ HTMLArea._addEvents
+ (doc, ["mousemove"],
+ function (event) {
+ return editor._editorEvent(event);
+ });
+ }
+};
+
+FormOperations.prototype._preparePanel = function ()
+{
+ var fo = this;
+ if(this.html == false)
+ {
+
+ HTMLArea._getback(_editor_url + 'plugins/FormOperations/panel.html',
+ function(txt)
+ {
+ fo.html = txt;
+ fo._preparePanel();
+ }
+ );
+ return false;
+ }
+
+ if(typeof HTMLArea.Dialog == 'undefined')
+ {
+ HTMLArea._loadback
+ (_editor_url + 'inline-dialog.js', function() { fo._preparePanel(); } );
+ return false;
+ }
+
+ if(typeof HTMLArea.PanelDialog == 'undefined')
+ {
+ HTMLArea._loadback
+ (_editor_url + 'panel-dialog.js', function() { fo._preparePanel(); } );
+ return false;
+ }
+
+
+
+ this.panel = new HTMLArea.PanelDialog(this.editor,'bottom',this.html,'FormOperations');
+ this.panel.hide();
+ this.ready = true;
+};
+
+FormOperations.prototype.onUpdateToolbar = function()
+{
+ if(!this.ready) return true;
+ var activeElement = this.editor._activeElement(this.editor._getSelection());
+ if(activeElement != null)
+ {
+ if(activeElement == this.activeElement) return true;
+
+ var tag = activeElement.tagName.toLowerCase();
+
+ this.hideAll();
+ if(tag === 'form')
+ {
+ if(this.editor.config.FormOperations.allow_edit_form)
+ {
+ this.showForm(activeElement);
+ }
+ else
+ {
+ this.panel.hide();
+ this.activeElement = null;
+ this.panel.hide();
+ return true;
+ }
+ }
+ else
+ {
+
+ if(this.editor.config.FormOperations.allow_edit_form && typeof activeElement.form != 'undefined' && activeElement.form)
+ {
+ this.showForm(activeElement.form);
+ }
+
+ switch(tag)
+ {
+ case 'form':
+ {
+ this.showForm(activeElement);
+ }
+ break;
+
+ case 'input':
+ {
+ switch(activeElement.getAttribute('type').toLowerCase())
+ {
+ case 'text' :
+ case 'password':
+ case 'hidden' :
+ {
+ this.showText(activeElement);
+ }
+ break;
+
+ case 'radio' :
+ case 'checkbox':
+ {
+ this.showCbRd(activeElement);
+ }
+ break;
+
+ case 'submit' :
+ case 'reset' :
+ case 'button' :
+ {
+ this.showButton(activeElement);
+ }
+ break;
+ }
+ }
+ break;
+
+ case 'textarea':
+ {
+ this.showTextarea(activeElement);
+ }
+ break;
+
+ case 'select':
+ {
+ this.showSelect(activeElement);
+ }
+ break;
+
+ default:
+ {
+ this.activeElement = null;
+ this.panel.hide();
+ return true;
+ }
+ }
+ }
+
+ this.panel.show();
+
+ //this.editor.scrollToElement(activeElement);
+ this.activeElement = activeElement;
+ return true;
+ }
+ else
+ {
+ this.activeElement = null;
+ this.panel.hide();
+ return true;
+ }
+};
+
+
+FormOperations.prototype.hideAll = function()
+{
+ this.panel.getElementById('fs_form').style.display = 'none';
+ this.panel.getElementById('fs_text').style.display = 'none';
+ this.panel.getElementById('fs_textarea').style.display = 'none';
+ this.panel.getElementById('fs_select').style.display = 'none';
+ this.panel.getElementById('fs_cbrd').style.display = 'none';
+ this.panel.getElementById('fs_button').style.display = 'none';
+};
+
+FormOperations.prototype.showForm = function(form)
+{
+ this.panel.getElementById('fs_form').style.display = '';
+ var vals =
+ {
+ 'action' : form.action,
+ 'method' : form.method.toUpperCase()
+ }
+ this.panel.setValues(vals);
+ var f = form;
+ this.panel.getElementById('action').onkeyup = function () { f.action = this.value; };
+ this.panel.getElementById('method').onchange = function () { f.method = this.options[this.selectedIndex].value; };
+};
+
+FormOperations.prototype.showText = function (input)
+{
+ this.panel.getElementById('fs_text').style.display = '';
+
+ var vals =
+ {
+ 'text_name' : this.deformatName(input, input.name),
+ 'text_value' : input.value,
+ 'text_type' : input.type.toLowerCase(),
+ 'text_width' : input.style.width ? parseFloat(input.style.width.replace(/[^0-9.]/, '')) : '',
+ 'text_width_units': input.style.width ? input.style.width.replace(/[0-9.]/, '').toLowerCase() : 'ex',
+ 'text_maxlength' : input.maxlength ? input.maxlength : ''
+ }
+ this.panel.setValues(vals);
+
+ var i = input;
+ var fo = this;
+
+ this.panel.getElementById('text_name').onkeyup = function () { i.name = fo.formatName(i, this.value); }
+ this.panel.getElementById('text_value').onkeyup = function () { i.value = this.value; }
+ this.panel.getElementById('text_type').onchange = function ()
+ {
+ if(!HTMLArea.is_ie)
+ {
+ i.type = this.options[this.selectedIndex].value;
+ }
+ else
+ {
+ // IE does not permit modifications of the type of a form field once it is set
+ // We therefor have to destroy and recreate it. I swear, if I ever
+ // meet any of the Internet Explorer development team I'm gonna
+ // kick them in the nuts!
+ var tmpContainer = fo.editor._doc.createElement('div');
+ if(!/type=/.test(i.outerHTML))
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/<INPUT/i, '<input type="'+ this.options[this.selectedIndex].value + '"');
+ }
+ else
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/type="?[a-z]+"?/i, 'type="' + this.options[this.selectedIndex].value + '"');
+ }
+ var newElement = HTMLArea.removeFromParent(tmpContainer.childNodes[0]);
+ i.parentNode.insertBefore(newElement, i);
+ HTMLArea.removeFromParent(i);
+ input = i = newElement;
+ }
+ }
+
+ var w = this.panel.getElementById('text_width');
+ var wu = this.panel.getElementById('text_width_units');
+
+ this.panel.getElementById('text_width').onkeyup =
+ this.panel.getElementById('text_width_units').onchange =
+ function ()
+ {
+ if(!w.value || isNaN(parseFloat(w.value)))
+ {
+ i.style.width = '';
+ }
+ i.style.width = parseFloat(w.value) + wu.options[wu.selectedIndex].value;
+ }
+
+ this.panel.getElementById('text_maxlength').onkeyup = function () { i.maxlength = this.value; }
+};
+
+FormOperations.prototype.showCbRd = function (input)
+{
+ this.panel.getElementById('fs_cbrd').style.display = '';
+ var vals =
+ {
+ 'cbrd_name' : this.deformatName(input, input.name),
+ 'cbrd_value' : input.value,
+ 'cbrd_checked' : input.checked ? 1 : 0,
+ 'cbrd_type' : input.type.toLowerCase()
+ };
+ this.panel.setValues(vals);
+
+ var i = input;
+ var fo = this;
+ this.panel.getElementById('cbrd_name').onkeyup = function () { i.name = fo.formatName(i, this.value); }
+ this.panel.getElementById('cbrd_value').onkeyup = function () { i.value = this.value; }
+ this.panel.getElementById('cbrd_type').onchange = function ()
+ {
+ if(!HTMLArea.is_ie)
+ {
+ i.type = this.options[this.selectedIndex].value;
+ }
+ else
+ {
+ // IE does not permit modifications of the type of a form field once it is set
+ // We therefor have to destroy and recreate it. I swear, if I ever
+ // meet any of the Internet Explorer development team I'm gonna
+ // kick them in the nuts!
+ var tmpContainer = fo.editor._doc.createElement('div');
+ if(!/type=/.test(i.outerHTML))
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/<INPUT/i, '<input type="'+ this.options[this.selectedIndex].value + '"');
+ }
+ else
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/type="?[a-z]+"?/i, 'type="' + this.options[this.selectedIndex].value + '"');
+ }
+ var newElement = HTMLArea.removeFromParent(tmpContainer.childNodes[0]);
+ i.parentNode.insertBefore(newElement, i);
+ HTMLArea.removeFromParent(i);
+ input = i = newElement;
+ }
+ }
+ this.panel.getElementById('cbrd_checked').onclick = function () { i.checked = this.checked; }
+};
+
+FormOperations.prototype.showButton = function (input)
+{
+ this.panel.getElementById('fs_button').style.display = '';
+ var vals =
+ {
+ 'button_name' : this.deformatName(input, input.name),
+ 'button_value' : input.value,
+ 'button_type' : input.type.toLowerCase()
+ };
+ this.panel.setValues(vals);
+
+ var i = input;
+ var fo = this;
+ this.panel.getElementById('button_name').onkeyup = function () { i.name = fo.formatName(i, this.value); };
+ this.panel.getElementById('button_value').onkeyup = function () { i.value = this.value; };
+ this.panel.getElementById('button_type').onchange = function ()
+ {
+ if(!HTMLArea.is_ie)
+ {
+ i.type = this.options[this.selectedIndex].value;
+ }
+ else
+ {
+ // IE does not permit modifications of the type of a form field once it is set
+ // We therefor have to destroy and recreate it. I swear, if I ever
+ // meet any of the Internet Explorer development team I'm gonna
+ // kick them in the nuts!
+ var tmpContainer = fo.editor._doc.createElement('div');
+ if(!/type=/.test(i.outerHTML))
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/<INPUT/i, '<input type="'+ this.options[this.selectedIndex].value + '"');
+ }
+ else
+ {
+ tmpContainer.innerHTML = i.outerHTML.replace(/type="?[a-z]+"?/i, 'type="' + this.options[this.selectedIndex].value + '"');
+ }
+ var newElement = HTMLArea.removeFromParent(tmpContainer.childNodes[0]);
+ i.parentNode.insertBefore(newElement, i);
+ HTMLArea.removeFromParent(i);
+ input = i = newElement;
+ }
+ };
+};
+
+FormOperations.prototype.showTextarea = function (input)
+{
+ this.panel.getElementById('fs_textarea').style.display = '';
+ var vals =
+ {
+ 'textarea_name' : this.deformatName(input, input.name),
+ 'textarea_value' : input.value,
+ 'textarea_width' : input.style.width ? parseFloat(input.style.width.replace(/[^0-9.]/, '')) : '',
+ 'textarea_width_units' : input.style.width ? input.style.width.replace(/[0-9.]/, '').toLowerCase() : 'ex',
+ 'textarea_height' : input.style.height ? parseFloat(input.style.height.replace(/[^0-9.]/, '')) : '',
+ 'textarea_height_units': input.style.height ? input.style.height.replace(/[0-9.]/, '').toLowerCase() : 'ex'
+ };
+
+ this.panel.setValues(vals);
+
+ var i = input;
+ var fo = this;
+ this.panel.getElementById('textarea_name').onkeyup = function () { i.name = fo.formatName(i, this.value); };
+ this.panel.getElementById('textarea_value').onkeyup = function () { i.value = i.innerHTML = this.value; };
+
+ var w = this.panel.getElementById('textarea_width');
+ var wu = this.panel.getElementById('textarea_width_units');
+
+ this.panel.getElementById('textarea_width').onkeyup =
+ this.panel.getElementById('textarea_width_units').onchange =
+ function ()
+ {
+ if(!w.value || isNaN(parseFloat(w.value)))
+ {
+ i.style.width = '';
+ }
+ i.style.width = parseFloat(w.value) + wu.options[wu.selectedIndex].value;
+ };
+
+ var h = this.panel.getElementById('textarea_height');
+ var hu = this.panel.getElementById('textarea_height_units');
+
+ this.panel.getElementById('textarea_height').onkeyup =
+ this.panel.getElementById('textarea_height_units').onchange =
+ function ()
+ {
+ if(!h.value || isNaN(parseFloat(h.value)))
+ {
+ i.style.height = '';
+ }
+ i.style.height = parseFloat(h.value) + hu.options[hu.selectedIndex].value;
+ };
+
+};
+
+FormOperations.prototype.showSelect = function (input)
+{
+ this.panel.getElementById('fs_select').style.display = '';
+ var vals =
+ {
+ 'select_name' : this.deformatName(input, input.name),
+ 'select_multiple' : input.multiple ? 1 : 0,
+ 'select_width' : input.style.width ? parseFloat(input.style.width.replace(/[^0-9.]/, '')) : '',
+ 'select_width_units' : input.style.width ? input.style.width.replace(/[0-9.]/, '').toLowerCase() : 'ex',
+ 'select_height' : input.style.height ? parseFloat(input.style.height.replace(/[^0-9.]/, '')) : (input.size && input.size > 0 ? input.size : 1),
+ 'select_height_units': input.style.height ? input.style.height.replace(/[0-9.]/, '').toLowerCase() : 'items'
+ };
+
+ this.panel.setValues(vals);
+
+ var i = input;
+ var fo = this;
+ this.panel.getElementById('select_name').onkeyup = function () { i.name = fo.formatName(i, this.value); };
+ this.panel.getElementById('select_multiple').onclick = function () { i.multiple = this.checked; };
+
+ var w = this.panel.getElementById('select_width');
+ var wu = this.panel.getElementById('select_width_units');
+
+ this.panel.getElementById('select_width').onkeyup =
+ this.panel.getElementById('select_width_units').onchange =
+ function ()
+ {
+ if(!w.value || isNaN(parseFloat(w.value)))
+ {
+ i.style.width = '';
+ }
+ i.style.width = parseFloat(w.value) + wu.options[wu.selectedIndex].value;
+ };
+
+ var h = this.panel.getElementById('select_height');
+ var hu = this.panel.getElementById('select_height_units');
+
+ this.panel.getElementById('select_height').onkeyup =
+ this.panel.getElementById('select_height_units').onchange =
+ function ()
+ {
+ if(!h.value || isNaN(parseFloat(h.value)))
+ {
+ i.style.height = '';
+ return;
+ }
+
+ if(hu.selectedIndex == 0)
+ {
+ i.style.height = '';
+ i.size = parseInt(h.value);
+ }
+ else
+ {
+ i.style.height = parseFloat(h.value) + hu.options[hu.selectedIndex].value;
+ }
+ };
+
+
+ var fo_sel = this.panel.getElementById('select_options');
+ this.arrayToOpts(this.optsToArray(input.options), fo_sel.options);
+
+ this.panel.getElementById('add_option').onclick =
+ function()
+ {
+ var txt = prompt("Enter the name for new option.");
+ if(txt == null) return;
+ var newOpt = new Option(txt);
+ var opts = fo.optsToArray(fo_sel.options);
+ if(fo_sel.selectedIndex >= 0)
+ {
+ opts.splice(fo_sel.selectedIndex, 0, newOpt);
+ }
+ else
+ {
+ opts.push(newOpt);
+ }
+ fo.arrayToOpts(opts, input.options);
+ fo.arrayToOpts(opts, fo_sel.options);
+ };
+
+ this.panel.getElementById('del_option').onclick =
+ function()
+ {
+ var opts = fo.optsToArray(fo_sel.options);
+ var newOpts = [ ];
+ for(var i = 0; i < opts.length; i++)
+ {
+ if(opts[i].selected) continue;
+ newOpts.push(opts[i]);
+ }
+ fo.arrayToOpts(newOpts, input.options);
+ fo.arrayToOpts(newOpts, fo_sel.options);
+ };
+
+ this.panel.getElementById('up_option').onclick =
+ function()
+ {
+ if(!(fo_sel.selectedIndex > 0)) return;
+ var opts = fo.optsToArray(fo_sel.options);
+ var move = opts.splice(fo_sel.selectedIndex, 1).pop();
+ opts.splice(fo_sel.selectedIndex - 1, 0, move);
+ fo.arrayToOpts(opts, input.options);
+ fo.arrayToOpts(opts, fo_sel.options);
+ };
+
+ this.panel.getElementById('down_option').onclick =
+ function()
+ {
+ if(fo_sel.selectedIndex == fo_sel.options.length - 1) return;
+ var opts = fo.optsToArray(fo_sel.options);
+ var move = opts.splice(fo_sel.selectedIndex, 1).pop();
+ opts.splice(fo_sel.selectedIndex+1, 0, move);
+ fo.arrayToOpts(opts, input.options);
+ fo.arrayToOpts(opts, fo_sel.options);
+ };
+
+ this.panel.getElementById('select_options').onchange =
+ function()
+ {
+ fo.arrayToOpts(fo.optsToArray(fo_sel.options), input.options);
+ };
+};
+
+FormOperations.prototype.optsToArray = function(o)
+{
+ var a = [ ];
+ for(var i = 0; i < o.length; i++)
+ {
+ a.push(
+ {
+ 'text' : o[i].text,
+ 'value' : o[i].value,
+ 'defaultSelected' : o[i].defaultSelected,
+ 'selected' : o[i].selected
+ }
+ );
+ }
+ return a;
+};
+
+FormOperations.prototype.arrayToOpts = function(a, o)
+{
+ for(var i = o.length -1; i >= 0; i--)
+ {
+ o[i] = null;
+ }
+
+ for(var i = 0; i < a.length; i++)
+ {
+ o[i] = new Option(a[i].text, a[i].value, a[i].defaultSelected, a[i].selected);
+ }
+};
+
+FormOperations.prototype.formatName = function(input, name)
+{
+
+ // Multiple name
+ var mname = name;
+ switch(this.editor.config.FormOperations.multiple_field_format)
+ {
+ case 'php':
+ {
+ mname += '[]';
+ }
+ break;
+
+ case 'unmodified':
+ {
+ // Leave as is.
+ }
+ break;
+
+ default:
+ {
+ throw("Unknown multiple field format " + this.editor.config.FormOperations.multiple_field_format);
+ }
+ }
+
+ if
+ (
+ (input.tagName.toLowerCase() == 'select' && input.multiple)
+ || (input.tagName.toLowerCase() == 'input' && input.type.toLowerCase() == 'checkbox')
+ )
+ {
+ name = mname;
+ }
+
+ return name;
+};
+
+FormOperations.prototype.deformatName = function(input, name)
+{
+ if(this.editor.config.FormOperations.multiple_field_format == 'php')
+ {
+ name = name.replace(/\[\]$/, '');
+ }
+
+ return name;
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/formmail.php
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/formmail.php?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/formmail.php (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/formmail.php Sun Oct 8 12:53:13 2006
@@ -0,0 +1,95 @@
+<?php
+
+ $send_to = 'Website Enquiries <enquiries@' . preg_replace('/^www./', '', $_SERVER['HTTP_HOST']) . '>';
+
+ $emailfield = NULL;
+ $subjectfield = NULL;
+ $namefield = NULL;
+
+ $when_done_goto = isset($_REQUEST['when_done_goto']) ? $_REQUEST['when_done_goto'] : NULL;
+
+ if($_POST)
+ {
+ unset($_POST['when_done_goto']);
+ $message = '';
+ $longestKey = 0;
+ foreach(array_keys($_POST) as $key)
+ {
+ $longestKey = max(strlen($key), $longestKey);
+ }
+ $longestKey = max($longestKey, 15);
+
+ foreach($_POST as $Var => $Val)
+ {
+ if(!$emailfield)
+ {
+ if(preg_match('/(^|\s)e-?mail(\s|$)/i', $Var))
+ {
+ $emailfield = $Var;
+ }
+ }
+
+ if(!$subjectfield)
+ {
+ if(preg_match('/(^|\s)subject(\s|$)/i', $Var))
+ {
+ $subjectfield = $Var;
+ }
+ }
+
+ if(!$namefield)
+ {
+ if(preg_match('/(^|\s)from(\s|$)/i', $Var) || preg_match('/(^|\s)name(\s|$)/i', $Var))
+ {
+ $namefield = $Var;
+ }
+ }
+
+ if(is_array($Val))
+ {
+ $Val = implode(', ', $Val);
+ }
+
+ $message .= $Var;
+ if(strlen($Var) < $longestKey)
+ {
+ $message .= str_repeat('.', $longestKey - strlen($Var));
+ }
+ $message .= ':';
+ if((64 - max(strlen($Var), $longestKey) < strlen($Val)) || preg_match('/\r?\n/', $Val))
+ {
+ $message .= "\r\n ";
+ $message .= preg_replace('/\r?\n/', "\r\n ", wordwrap($Val, 62));
+ }
+ else
+ {
+ $message .= ' ' . $Val . "\r\n";
+ }
+ }
+
+ $subject = $subjectfield ? $_POST[$subjectfield] : 'Enquiry';
+ $email = $emailfield ? $_POST[$emailfield] : $send_to;
+ if($namefield)
+ {
+ $from = $_POST[$namefield] . ' <' . $email . '>';
+ }
+ else
+ {
+ $from = 'Website Visitor' . ' <' . $email . '>';
+ }
+
+ mail($send_to, $subject, $message, "From: $from");
+
+ if(!$when_done_goto)
+ {
+ ?>
+ <html><head><title>Message Sent</title></head><body><h1>Message Sent</h1></body></html>
+ <?php
+ }
+ else
+ {
+ header("location: $when_done_goto");
+ exit;
+ }
+ }
+?>
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/iframe.css
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/iframe.css?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/iframe.css (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/iframe.css Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+form { border: 1px red dotted; }
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/img/buttons.gif
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/img/buttons.gif?view=auto&rev=454197
==============================================================================
Binary file - no diff available.
Propchange: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/img/buttons.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/de.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/de.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/de.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/de.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// translated: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de
+{
+ "Insert a Form.": "Email Form einfügen.",
+ "Insert a text, password or hidden field.": "Passwort oder unsichtbares Feld einfügen.",
+ "Insert a multi-line text field.": "Mehrzeiliges Textfeld einfügen.",
+ "Insert a select field.": "Auswahlfeld einfügen.",
+ "Insert a check box.": "Häkchenfeld einfügen",
+ "Insert a radio button.": "Optionsfeld einfügen",
+ "Insert a submit/reset button.": "Senden/zurücksetzen Schaltfläche"
+};
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/fr.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/fr.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/fr.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/fr.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,11 @@
+// I18N constants
+// LANG: "fr", ENCODING: UTF-8
+{
+ "Insert a Form.": "Insérer un formulaire",
+ "Insert a text, password or hidden field.": "Insérer un texte, un mot de passe ou un champ invisible",
+ "Insert a multi-line text field.": "Insérer un champ texte à lignes multiples",
+ "Insert a select field.": "Insérer une boite de sélection",
+ "Insert a check box.": "Insérer une case à cocher",
+ "Insert a radio button.": "Insérer un bouton radio",
+ "Insert a submit/reset button.": "Insérer un bouton de soumission/annulation"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/nb.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/nb.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/nb.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/nb.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "nb", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
+{
+ "Insert a Form.": "Sett inn skjema",
+ "Insert a text, password or hidden field.": "Sett inn formfelt",
+ "Insert a multi-line text field.": "Sett inn tekstfelt med flere linjer",
+ "Insert a select field.": "Sett inn valgboks/ netrekksboks",
+ "Insert a check box.": "Hakeboks",
+ "Insert a radio button.": "Sett inn en radioknapp",
+ "Insert a submit/reset button.": "Sett inn send-/nullstill knapp for skjemaet"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/no.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/no.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/no.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/lang/no.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "no", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
+{
+ "Insert a Form.": "Sett inn skjema",
+ "Insert a text, password or hidden field.": "Sett inn formfelt",
+ "Insert a multi-line text field.": "Sett inn tekstfelt med flere linjer",
+ "Insert a select field.": "Sett inn valgboks/ netrekksboks",
+ "Insert a check box.": "Hakeboks",
+ "Insert a radio button.": "Sett inn en radioknapp",
+ "Insert a submit/reset button.": "Sett inn send-/nullstill knapp for skjemaet"
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/panel.html
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/panel.html?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/panel.html (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/FormOperations/panel.html Sun Oct 8 12:53:13 2006
@@ -0,0 +1,212 @@
+<h1 name="[h1]" id="[h1]"><l10n>Form Editor</l10n></h1>
+ <fieldset name="[fs_form]" id="[fs_form]">
+ <legend>Form</legend>
+ <table>
+ <tr>
+ <th><label>Action:</label></th>
+ <td><input type="text" size="25" name="[action]" id="[action]" /></td>
+
+ <th><label>Method:</label></th>
+ <td><select name="[method]" id="[method]"><option value="POST">POST</option><option value="GET">GET</option></select></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset name="[fs_text]" id="[fs_text]">
+ <legend>Text Field</legend>
+
+ <table>
+ <tr>
+ <th>Name:</th>
+ <td>
+ <input type="text" name="[text_name]" id="[text_name]" size="25" />
+ </td>
+ <th> </th>
+ <td> </td>
+ </tr>
+ <tr>
+ <th>Type:</th>
+ <td>
+ <select name="[text_type]" id="[text_type]">
+ <option value="text">normal text field</option>
+ <option value="password">password</option>
+ <option value="hidden">hidden field</option>
+ </select>
+ </td>
+ <th>Initial Value:</th>
+ <td>
+ <input type="text" name="[text_value]" id="[text_value]" size="25" />
+ </td>
+ </tr>
+ <tr>
+ <th>Width:</th>
+ <td>
+ <input type="text" name="[text_width]" id="[text_width]" size="5" />
+ <select name="[text_width_units]" id="[text_width_units]">
+ <option value="em">chars</option>
+ <option value="px">px</option
+ >
+ <option value="%">%</option>
+ </select>
+ </td>
+ <th>Max Length:</th>
+ <td>
+ <input type="text" name="[text_maxlength]" id="[text_maxlength]" size="5" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset name="[fs_cbrd]" id="[fs_cbrd]">
+ <legend>Check Box/Radio Button</legend>
+ <table>
+ <tr>
+ <th>Name:</th>
+ <td>
+ <input type="text" name="[cbrd_name]" id="[cbrd_name]" size="25" />
+ </td>
+ <th>Value:</th>
+ <td>
+ <input type="text" name="[cbrd_value]" id="[cbrd_value]" size="25" />
+ </td>
+ </tr>
+ <tr>
+ <th>Type:</th>
+ <td>
+ <select name="[cbrd_type]" id="[cbrd_type]">
+ <option value="checkbox">Check Box ("Select Many")</option>
+ <option value="radio">Radio Button ("Select One")</option>
+ </select>
+ </td>
+ <th>Selected by default:</th>
+ <td><input type="checkbox" name="[cbrd_checked]" id="[cbrd_checked]" value="1" /></td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <p class="help">
+ Tip: Check boxes (select many) and radio buttons (select one only) that are choices for a single question should have the same Name to work correctly.
+ </p>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset name="[fs_button]" id="[fs_button]">
+ <legend>Button</legend>
+ <table>
+ <tr>
+ <th>Name:</th>
+ <td>
+ <input type="text" name="[button_name]" id="[button_name]" size="25" />
+ </td>
+ <th>Label:</th>
+ <td>
+ <input type="text" name="[button_value]" id="[button_value]" size="25" />
+ </td>
+ </tr>
+ <tr>
+ <th>Type:</th>
+ <td>
+ <select name="[button_type]" id="[button_type]">
+ <option value="submit">Submit</option>
+ <option value="reset">Reset</option>
+ </select>
+ </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ </table>
+ </fieldset>
+
+
+ <fieldset name="[fs_textarea]" id="[fs_textarea]">
+ <legend>Multi-line Field</legend>
+ <table>
+ <tr>
+ <th>Name:</th>
+ <td><input type="text" name="[textarea_name]" id="[textarea_name]" size="25" /></td>
+
+ <th>Initial Value</th>
+ </tr>
+
+ <tr>
+ <th>Width:</th>
+ <td>
+ <input type="text" name="[textarea_width]" id="[textarea_width]" size="5" />
+ <select name="[textarea_width_units]" id="[textarea_width_units]">
+ <option value="em">chars</option>
+ <option value="px">px</option>
+ <option value="%">%</option>
+ </select>
+ </td>
+ <td rowspan="2"><textarea name="[textarea_value]" cols="40" rows="4" id="[textarea_value]"></textarea></td>
+ </tr>
+
+ <tr>
+ <th>Height:</th>
+ <td>
+ <input type="text" name="[textarea_height]" id="[textarea_height]" size="5" />
+ <select name="[textarea_height_units]" id="[textarea_height_units]">
+ <option value="em">chars</option>
+ <option value="px">px</option>
+ </select>
+ </td>
+ </tr>
+
+ </table>
+ </fieldset>
+
+ <fieldset name="[fs_select]" id="[fs_select]">
+ <legend>Drop-Down/List Field</legend>
+
+<table>
+ <tr>
+ <th>Name:</th>
+ <td>
+ <input type="text" name="[select_name]" id="[select_name]" size="25" />
+ </td>
+ <th colspan="2">Options</th>
+ </tr>
+ <tr>
+ <th>May Choose Multiple:</th>
+ <td>
+ <input type="checkbox" name="[select_multiple]" id="[select_multiple]" size="25" value="1" />
+ </td>
+ <td rowspan="3">
+ <select name="[select_options]" size="5" id="[select_options]" >
+ </select>
+ </td>
+ <td rowspan="3">
+ <input name="button" type="button" id="[add_option]" value="Add" />
+ <br>
+ <input name="button2" type="button" id="[del_option]" value="Delete" />
+ <br>
+ <input name="button2" type="button" id="[up_option]" value="Move Up" />
+ <br>
+ <input name="button2" type="button" id="[down_option]" value="Move Down" />
+ </td>
+ </tr>
+ <tr>
+ <th>Width:</th>
+ <td>
+ <input type="text" name="[select_width]" id="[select_width]" size="5" />
+ <select name="[select_width_units]" id="[select_width_units]">
+ <option value="em">chars</option>
+ <option value="px">px</option>
+ <option value="%">%</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th>Height:</th>
+ <td>
+ <input type="text" name="[select_height]" id="[select_height]" size="5" />
+ <select name="[select_height_units]" id="[select_height_units]">
+ <option value="items">items</option>
+ <option value="px">px</option>
+ </select>
+ </td>
+ </tr>
+</table>
+ </fieldset>
+</div>
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Forms/forms.css
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Forms/forms.css?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Forms/forms.css (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/plugins/Forms/forms.css Sun Oct 8 12:53:13 2006
@@ -0,0 +1,3 @@
+form {
+ border: 1px dotted red;
+}