You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by so...@apache.org on 2006/06/12 01:24:58 UTC
svn commit: r413547 [8/15] - in /lenya/branches/revolution/1.3.x: ./
src/java/org/apache/lenya/cms/cocoon/components/modules/input/
src/java/org/apache/lenya/cms/cocoon/components/source/
src/java/org/apache/lenya/cms/cocoon/components/source/impl/ src...
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/ru.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/ru.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/ru.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/ru.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,63 @@
+// I18N constants
+
+// LANG: "ru", ENCODING: UTF-8 | ISO-8859-1
+// Author: Yulya Shtyryakova, <yu...@vdcom.ru>
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+ // the following should be the filename without .js extension
+ // it will be used for automatically load plugin language.
+ lang: "ru",
+
+ tooltips: {
+ bold: "ÐолÑжиÑнÑй",
+ italic: "ÐаклоннÑй",
+ underline: "ÐодÑеÑкнÑÑÑй",
+ strikethrough: "ÐеÑеÑеÑкнÑÑÑй",
+ subscript: "Ðижний индекÑ",
+ superscript: "ÐеÑÑ
ний индекÑ",
+ justifyleft: "Ðо Ð»ÐµÐ²Ð¾Ð¼Ñ ÐºÑаÑ",
+ justifycenter: "Ðо ÑенÑÑÑ",
+ justifyright: "Ðо пÑÐ°Ð²Ð¾Ð¼Ñ ÐºÑаÑ",
+ justifyfull: "Ðо ÑиÑине",
+ insertorderedlist: "ÐÑмеÑованнÑй лиÑÑ",
+ insertunorderedlist: "ÐаÑкиÑованнÑй лиÑÑ",
+ outdent: "УменÑÑиÑÑ Ð¾ÑÑÑÑп",
+ indent: "УвелиÑиÑÑ Ð¾ÑÑÑÑп",
+ forecolor: "Ð¦Ð²ÐµÑ ÑÑиÑÑа",
+ hilitecolor: "Ð¦Ð²ÐµÑ Ñона",
+ horizontalrule: "ÐоÑизонÑалÑнÑй ÑазделиÑелÑ",
+ createlink: "ÐÑÑавиÑÑ Ð³Ð¸Ð¿ÐµÑÑÑÑлкÑ",
+ insertimage: "ÐÑÑавиÑÑ Ð¸Ð·Ð¾Ð±Ñажение",
+ inserttable: "ÐÑÑавиÑÑ ÑаблиÑÑ",
+ htmlmode: "ÐоказаÑÑ Html-код",
+ popupeditor: "УвелиÑиÑÑ ÑедакÑоÑ",
+ about: "Ð ÑедакÑоÑе",
+ showhelp: "ÐомоÑÑ",
+ textindicator: "ТекÑÑий ÑÑилÑ",
+ undo: "ÐÑмениÑÑ",
+ redo: "ÐовÑоÑиÑÑ",
+ cut: "ÐÑÑезаÑÑ",
+ copy: "ÐопиÑоваÑÑ",
+ paste: "ÐÑÑавиÑÑ"
+ },
+
+ buttons: {
+ "ok": "OK",
+ "cancel": "ÐÑмена"
+ },
+
+ msg: {
+ "Path": "ÐÑÑÑ",
+ "TEXT_MODE": "ÐÑ Ð² Ñежиме оÑобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Html-кода. нажмиÑе ÐºÐ½Ð¾Ð¿ÐºÑ [<>], ÑÑÐ¾Ð±Ñ Ð¿ÐµÑеклÑÑиÑÑÑÑ Ð² визÑалÑнÑй Ñежим."
+ }
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/ru.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/se.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/se.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/se.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/se.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,38 @@
+// Swedish version for htmlArea v3.0 - Alpha Release
+// - translated by pat<pa...@engvall.nu>
+// term´s and licenses are equal to htmlarea!
+
+HTMLArea.I18N = {
+
+ // the following should be the filename without .js extension
+ // it will be used for automatically load plugin language.
+ lang: "se",
+
+ tooltips: {
+ bold: "Fet",
+ italic: "Kursiv",
+ underline: "Understruken",
+ strikethrough: "Genomstruken",
+ subscript: "Nedsänkt",
+ superscript: "Upphöjd",
+ justifyleft: "Vänsterjustera",
+ justifycenter: "Centrera",
+ justifyright: "Högerjustera",
+ justifyfull: "Marginaljustera",
+ orderedlist: "Numrerad lista",
+ unorderedlist: "Punktlista",
+ outdent: "Minska indrag",
+ indent: "Öka indrag",
+ forecolor: "Textfärg",
+ backcolor: "Bakgrundsfärg",
+ horizontalrule: "Vågrät linje",
+ createlink: "Infoga länk",
+ insertimage: "Infoga bild",
+ inserttable: "Infoga tabell",
+ htmlmode: "Visa källkod",
+ popupeditor: "Visa i eget fönster",
+ about: "Om denna editor",
+ help: "Hjälp",
+ textindicator: "Nuvarande stil"
+ }
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/se.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/si.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/si.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/si.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/si.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,63 @@
+// I18N constants
+
+// LANG: "si", ENCODING: ISO-8859-2
+// Author: Tomaz Kregar, x_tomo_x@email.si
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+ // the following should be the filename without .js extension
+ // it will be used for automatically load plugin language.
+ lang: "si",
+
+ tooltips: {
+ bold: "Krepko",
+ italic: "Le¾eèe",
+ underline: "Podèrtano",
+ strikethrough: "Preèrtano",
+ subscript: "Podpisano",
+ superscript: "Nadpisano",
+ justifyleft: "Poravnaj levo",
+ justifycenter: "Na sredino",
+ justifyright: "Poravnaj desno",
+ justifyfull: "Porazdeli vsebino",
+ orderedlist: "O¹tevilèevanje",
+ unorderedlist: "Oznaèevanje",
+ outdent: "Zmanj¹aj zamik",
+ indent: "Poveèaj zamik",
+ forecolor: "Barva pisave",
+ hilitecolor: "Barva ozadja",
+ horizontalrule: "Vodoravna èrta",
+ createlink: "Vstavi hiperpovezavo",
+ insertimage: "Vstavi sliko",
+ inserttable: "Vstavi tabelo",
+ htmlmode: "Preklopi na HTML kodo",
+ popupeditor: "Poveèaj urejevalnik",
+ about: "Vizitka za urejevalnik",
+ showhelp: "Pomoè za urejevalnik",
+ textindicator: "Trenutni slog",
+ undo: "Razveljavi zadnjo akcijo",
+ redo: "Uveljavi zadnjo akcijo",
+ cut: "Izre¾i",
+ copy: "Kopiraj",
+ paste: "Prilepi"
+ },
+
+ buttons: {
+ "ok": "V redu",
+ "cancel": "Preklièi"
+ },
+
+ msg: {
+ "Path": "Pot",
+ "TEXT_MODE": "Si v tekstovnem naèinu. Uporabi [<>] gumb za prklop nazaj na WYSIWYG."
+ }
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/si.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/vn.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/vn.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/vn.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/vn.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,51 @@
+// I18N constants : Vietnamese
+// LANG: "en", ENCODING: UTF-8
+// Author: Nguyá»
n Äình Nam, <hn...@yahoo.com>
+
+HTMLArea.I18N = {
+
+ // the following should be the filename without .js extension
+ // it will be used for automatically load plugin language.
+ lang: "vn",
+
+ tooltips: {
+ bold: "Äáºm",
+ italic: "Nghiêng",
+ underline: "Gạch Chân",
+ strikethrough: "Gạch Xóa",
+ subscript: "Viết Xuá»ng DÆ°á»i",
+ superscript: "Viết Lên Trên",
+ justifyleft: "CÄn Trái",
+ justifycenter: "CÄn Giữa",
+ justifyright: "CÄn Phải",
+ justifyfull: "CÄn Äá»u",
+ orderedlist: "Danh Sách Có Thứ Tự",
+ unorderedlist: "Danh Sách Phi Thứ Tự",
+ outdent: "Lùi Ra Ngoà i",
+ indent: "Thụt Và o Trong",
+ forecolor: "Mà u Chữ",
+ backcolor: "Mà u Ná»n",
+ horizontalrule: "Dòng Kẻ Ngang",
+ createlink: "Tạo Liên Kết",
+ insertimage: "Chèn Ảnh",
+ inserttable: "Chèn Bảng",
+ htmlmode: "Chế Äá» Mã HTML",
+ popupeditor: "Phóng To à Soạn Thảo",
+ about: "Tá»± Giá»i Thiá»u",
+ showhelp: "Giúp Äỡ",
+ textindicator: "Äá»nh Dạng Hiá»n Thá»i",
+ undo: "Undo",
+ redo: "Redo",
+ cut: "Cắt",
+ copy: "Copy",
+ paste: "Dán"
+ },
+ buttons: {
+ "ok": "OK",
+ "cancel": "Hủy"
+ },
+ msg: {
+ "Path": "ÄÆ°á»ng Dẫn",
+ "TEXT_MODE": "Bạn Äang á» chế Äá» text. Sá» dụng nút [<>] Äá» chuyá»n lại chế Äá» WYSIWIG."
+ }
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/lang/vn.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/license.txt
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/license.txt?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/license.txt (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/license.txt Sun Jun 11 16:24:48 2006
@@ -0,0 +1,30 @@
+htmlArea License (based on BSD license)
+Copyright (c) 2002-2004, interactivetools.com, inc.
+Copyright (c) 2003-2004 dynarch.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1) Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+2) Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3) Neither the name of interactivetools.com, inc. nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/license.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/make-release.pl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/make-release.pl?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/make-release.pl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/make-release.pl Sun Jun 11 16:24:48 2006
@@ -0,0 +1,263 @@
+#! /usr/bin/perl -w
+# $Id: make-release.pl,v 1.1 2004/02/06 10:10:07 ugo Exp $
+
+# Script for creating a distribution archive. Based on make-release.pl from
+# jscalendar.
+
+# Author: Mihai Bazon, http://dynarch.com/mishoo
+# NO WARRANTIES WHATSOEVER. READ GNU LGPL.
+
+# This file requires HTML::Mason; this module is used for automatic
+# substitution of the version/release number as well as for selection of the
+# changelog (at least in the file release-notes.html). It might not work
+# without HTML::Mason.
+
+use strict;
+# use diagnostics;
+use HTML::Mason;
+use File::Find;
+use XML::Parser;
+use Data::Dumper;
+
+my $verbosity = 1;
+
+my $tmpdir = '/tmp';
+
+my $config = parseXML("project-config.xml");
+speak(3, Data::Dumper::Dumper($config));
+
+my ($project, $version, $release, $basename);
+
+$project = $config->{project}{ATTR}{title};
+$version = $config->{project}{version}{DATA};
+$release = $config->{project}{release}{DATA};
+$basename = "$project-$version";
+$basename .= "-$release" if ($release);
+
+speak(1, "Project: $basename");
+
+## create directory tree
+my ($basedir);
+{
+ # base directory
+ $basedir = "$tmpdir/$basename";
+ if (-d $basedir) {
+ speak(-1, "$basedir already exists, removing... >:-]\n");
+ system "rm -rf $basedir";
+ }
+}
+
+process_directory();
+
+## make the ZIP file
+chdir "$basedir/..";
+speak(1, "Making ZIP file /tmp/$basename.zip");
+system ("zip -r $basename.zip $basename > /dev/null");
+system ("ls -la /tmp/$basename.zip");
+
+## remove the basedir
+system("rm -rf $basedir");
+
+## back
+#chdir $cwd;
+
+
+
+### SUBROUTINES
+
+# handle _one_ file
+sub process_one_file {
+ my ($attr, $target) = @_;
+
+ $target =~ s/\/$//;
+ $target .= '/';
+ my $destination = $target.$attr->{REALNAME};
+
+ # copy file first
+ speak(1, " copying $attr->{REALNAME}");
+ system "cp $attr->{REALNAME} $destination";
+
+ my $masonize = $attr->{masonize} || '';
+ if ($masonize =~ /yes|on|1/i) {
+ speak(1, " > masonizing to $destination...");
+ my $args = $attr->{args} || '';
+ my @vars = split(/\s*,\s*/, $args);
+ my %args = ();
+ foreach my $i (@vars) {
+ $args{$i} = eval '$'.$i;
+ speak(1, " > argument: $i => $args{$i}");
+ }
+ my $outbuf;
+ my $interp = HTML::Mason::Interp->new ( comp_root => $target,
+ out_method => \$outbuf );
+ $interp->exec("/$attr->{REALNAME}", %args);
+ open (FILE, "> $destination");
+ print FILE $outbuf;
+ close (FILE);
+ }
+}
+
+# handle some files
+sub process_files {
+ my ($files, $target) = @_;
+
+ # proceed with the explicitely required files first
+ my %options = ();
+ foreach my $i (@{$files}) {
+ $options{$i->{ATTR}{name}} = $i->{ATTR};
+ }
+
+ foreach my $i (@{$files}) {
+ my @expanded = glob "$i->{ATTR}{name}";
+ foreach my $file (@expanded) {
+ $i->{ATTR}{REALNAME} = $file;
+ if (defined $options{$file}) {
+ unless (defined $options{$file}->{PROCESSED}) {
+ speak(1, "EXPLICIT FILE: $file");
+ $options{$file}->{REALNAME} = $file;
+ process_one_file($options{$file}, $target);
+ $options{$file}->{PROCESSED} = 1;
+ }
+ } else {
+ speak(2, "GLOB: $file");
+ process_one_file($i->{ATTR}, $target);
+ $options{$file} = 2;
+ }
+ }
+ }
+}
+
+# handle _one_ directory
+sub process_directory {
+ my ($dir, $path) = @_;
+ my $cwd = '..'; # ;-)
+
+ (defined $dir) || ($dir = '.');
+ (defined $path) || ($path = '');
+ speak(2, "DIR: $path$dir");
+ $dir =~ s/\/$//;
+ $dir .= '/';
+
+ unless (-d $dir) {
+ speak(-1, "DIRECTORY '$dir' NOT FOUND, SKIPPING");
+ return 0;
+ }
+
+ # go where we have stuff to do
+ chdir $dir;
+
+ my $target = $basedir;
+ ($path =~ /\S/) && ($target .= "/$path");
+ ($dir ne './') && ($target .= $dir);
+
+ speak(1, "*** Creating directory: $target");
+ mkdir $target;
+
+ unless (-f 'makefile.xml') {
+ speak(-1, "No makefile.xml in this directory");
+ chdir $cwd;
+ return 0;
+ }
+ my $config = parseXML("makefile.xml");
+ speak(3, Data::Dumper::Dumper($config));
+
+ my $tmp = $config->{files}{file};
+ if (defined $tmp) {
+ my $files;
+ if (ref($tmp) eq 'ARRAY') {
+ $files = $tmp;
+ } else {
+ $files = [ $tmp ];
+ }
+ process_files($files, $target);
+ }
+
+ $tmp = $config->{files}{dir};
+ if (defined $tmp) {
+ my $subdirs;
+ if (ref($tmp) eq 'ARRAY') {
+ $subdirs = $tmp;
+ } else {
+ $subdirs = [ $tmp ];
+ }
+ foreach my $i (@{$subdirs}) {
+ process_directory($i->{ATTR}{name}, $path.$dir);
+ }
+ }
+
+ # get back to our previous location
+ chdir $cwd;
+}
+
+# this does all the XML parsing shit we'll need for our little task
+sub parseXML {
+ my ($filename) = @_;
+ my $rethash = {};
+
+ my @tagstack;
+
+ my $handler_start = sub {
+ my ($parser, $tag, @attrs) = @_;
+ my $current_tag = {};
+ $current_tag->{NAME} = $tag;
+ $current_tag->{DATA} = '';
+ push @tagstack, $current_tag;
+ if (scalar @attrs) {
+ my $attrs = {};
+ $current_tag->{ATTR} = $attrs;
+ while (scalar @attrs) {
+ my $name = shift @attrs;
+ my $value = shift @attrs;
+ $attrs->{$name} = $value;
+ }
+ }
+ };
+
+ my $handler_char = sub {
+ my ($parser, $data) = @_;
+ if ($data =~ /\S/) {
+ $tagstack[$#tagstack]->{DATA} .= $data;
+ }
+ };
+
+ my $handler_end = sub {
+ my $current_tag = pop @tagstack;
+ if (scalar @tagstack) {
+ my $tmp = $tagstack[$#tagstack]->{$current_tag->{NAME}};
+ if (defined $tmp) {
+ ## better build an array, there are more elements with this tagname
+ if (ref($tmp) eq 'ARRAY') {
+ ## oops, the ARRAY is already there, just add the new element
+ push @{$tmp}, $current_tag;
+ } else {
+ ## create the array "in-place"
+ $tagstack[$#tagstack]->{$current_tag->{NAME}} = [ $tmp, $current_tag ];
+ }
+ } else {
+ $tagstack[$#tagstack]->{$current_tag->{NAME}} = $current_tag;
+ }
+ } else {
+ $rethash->{$current_tag->{NAME}} = $current_tag;
+ }
+ };
+
+ my $parser = new XML::Parser
+ ( Handlers => { Start => $handler_start,
+ Char => $handler_char,
+ End => $handler_end } );
+ $parser->parsefile($filename);
+
+ return $rethash;
+}
+
+# print somethign according to the level of verbosity
+# receives: verbosity_level and message
+# prints message if verbosity_level >= $verbosity (global)
+sub speak {
+ my ($v, $t) = @_;
+ if ($v < 0) {
+ print STDERR "\033[1;31m!! $t\033[0m\n";
+ } elsif ($verbosity >= $v) {
+ print $t, "\n";
+ }
+}
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/make-release.pl
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.{js,html,css,cgi}" />
+ <file name="license.txt" />
+ <file name="release-notes.html" masonize="yes" />
+ <file name="index.html" masonize="yes" />
+ <file name="ChangeLog" />
+
+ <dir name="lang" />
+ <dir name="plugins" />
+ <dir name="popups" />
+ <dir name="images" />
+ <dir name="examples" />
+
+ <shell dir="dest"><![CDATA[
+ find . -type d -exec chmod 755 {} \; ;
+ find . -type f -exec chmod 644 {} \; ;
+ find . -type f -name "*.cgi" -exec chmod 755 {} \; ;
+ ]]></shell>
+</files>
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/css.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/css.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/css.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/css.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,116 @@
+// Simple CSS (className) plugin for the editor
+// Sponsored by http://www.miro.com.au
+// Implementation by Mihai Bazon, http://dynarch.com/mishoo.
+//
+// (c) dynarch.com 2003
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+//
+// $Id: css.js 30938 2004-07-29 19:08:16Z vgritsenko $
+
+function CSS(editor, params) {
+ this.editor = editor;
+ var cfg = editor.config;
+ var toolbar = cfg.toolbar;
+ var self = this;
+ var i18n = CSS.I18N;
+ var plugin_config = params[0];
+ var combos = plugin_config.combos;
+
+ var first = true;
+ for (var i = combos.length; --i >= 0;) {
+ var combo = combos[i];
+ var id = "CSS-class" + i;
+ var css_class = {
+ id : id,
+ options : combo.options,
+ action : function(editor) { self.onSelect(editor, this, combo.context, combo.updatecontextclass); },
+ refresh : function(editor) { self.updateValue(editor, this); },
+ context : combo.context
+ };
+ cfg.registerDropdown(css_class);
+
+ // prepend to the toolbar
+ toolbar[1].splice(0, 0, first ? "separator" : "space");
+ toolbar[1].splice(0, 0, id);
+ if (combo.label)
+ toolbar[1].splice(0, 0, "T[" + combo.label + "]");
+ first = false;
+ }
+};
+
+CSS._pluginInfo = {
+ name : "CSS",
+ version : "1.0",
+ developer : "Mihai Bazon",
+ developer_url : "http://dynarch.com/mishoo/",
+ c_owner : "Mihai Bazon",
+ sponsor : "Miro International",
+ sponsor_url : "http://www.miro.com.au",
+ license : "htmlArea"
+};
+
+CSS.prototype.onSelect = function(editor, obj, context, updatecontextclass) {
+ var tbobj = editor._toolbarObjects[obj.id];
+ var index = tbobj.element.selectedIndex;
+ var className = tbobj.element.value;
+
+ // retrieve parent element of the selection
+ var parent = editor.getParentElement();
+ var surround = true;
+
+ var is_span = (parent && parent.tagName.toLowerCase() == "span");
+ var update_parent = (context && updatecontextclass && parent && parent.tagName.toLowerCase() == context);
+
+ if (update_parent) {
+ parent.className = className;
+ editor.updateToolbar();
+ return;
+ }
+
+ if (is_span && index == 0 && !/\S/.test(parent.style.cssText)) {
+ while (parent.firstChild) {
+ parent.parentNode.insertBefore(parent.firstChild, parent);
+ }
+ parent.parentNode.removeChild(parent);
+ editor.updateToolbar();
+ return;
+ }
+
+ if (is_span) {
+ // maybe we could simply change the class of the parent node?
+ if (parent.childNodes.length == 1) {
+ parent.className = className;
+ surround = false;
+ // in this case we should handle the toolbar updation
+ // ourselves.
+ editor.updateToolbar();
+ }
+ }
+
+ // Other possibilities could be checked but require a lot of code. We
+ // can't afford to do that now.
+ if (surround) {
+ // shit happens ;-) most of the time. this method works, but
+ // it's dangerous when selection spans multiple block-level
+ // elements.
+ editor.surroundHTML("<span class='" + className + "'>", "</span>");
+ }
+};
+
+CSS.prototype.updateValue = function(editor, obj) {
+ var select = editor._toolbarObjects[obj.id].element;
+ var parent = editor.getParentElement();
+ if (typeof parent.className != "undefined" && /\S/.test(parent.className)) {
+ var options = select.options;
+ var value = parent.className;
+ for (var i = options.length; --i >= 0;) {
+ var option = options[i];
+ if (value == option.value) {
+ select.selectedIndex = i;
+ return;
+ }
+ }
+ }
+ select.selectedIndex = 0;
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/css.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/en.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/en.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/en.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/en.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,2 @@
+// none yet; this file is a stub.
+CSS.I18N = {};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/en.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.js" />
+</files>
+
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/lang/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.{js,html,cgi,css}" />
+
+ <dir name="lang" />
+</files>
+
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/CSS/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/1.pl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/1.pl?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/1.pl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/1.pl Sun Jun 11 16:24:48 2006
@@ -0,0 +1,38 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+my $file = 'context-menu.js';
+my $outfile = $file.'-i18n';
+my $langfile = 'en.js';
+
+open FILE, "<$file";
+#open OUTFILE, ">$outfile";
+#open LANGFILE, ">$langfile";
+my %texts = ();
+while (<FILE>) {
+ if (/"(.*?)"/) {
+ my $inline = $_;
+ chomp $inline;
+ my $key = $1;
+ my $val = $1;
+ print "Key: [$key]: ";
+ my $line = <STDIN>;
+ if (defined $line) {
+ chomp $line;
+ if ($line =~ /(\S+)/) {
+ $key = $1;
+ print "-- using $key\n";
+ }
+ $texts{$val} = $key;
+ } else {
+ print " -- skipped...\n";
+ }
+ }
+}
+#close LANGFILE;
+#close OUTFILE;
+close FILE;
+
+print "\n\n\n";
+print '"', join("\"\n\"", sort keys %texts), '"', "\n";
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/1.pl
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/context-menu.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/context-menu.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/context-menu.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/context-menu.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,416 @@
+// Context Menu Plugin for HTMLArea-3.0
+// Sponsored by www.americanbible.org
+// Implementation by Mihai Bazon, http://dynarch.com/mishoo/
+//
+// (c) dynarch.com 2003.
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+//
+// $Id: context-menu.js 30938 2004-07-29 19:08:16Z vgritsenko $
+
+HTMLArea.loadStyle("menu.css", "ContextMenu");
+
+function ContextMenu(editor) {
+ this.editor = editor;
+};
+
+ContextMenu._pluginInfo = {
+ name : "ContextMenu",
+ version : "1.0",
+ developer : "Mihai Bazon",
+ developer_url : "http://dynarch.com/mishoo/",
+ c_owner : "dynarch.com",
+ sponsor : "American Bible Society",
+ sponsor_url : "http://www.americanbible.org",
+ license : "htmlArea"
+};
+
+ContextMenu.prototype.onGenerate = function() {
+ var self = this;
+ var doc = this.editordoc = this.editor._iframe.contentWindow.document;
+ HTMLArea._addEvents(doc, ["contextmenu"],
+ function (event) {
+ return self.popupMenu(HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event);
+ });
+ this.currentMenu = null;
+};
+
+ContextMenu.prototype.getContextMenu = function(target) {
+ var self = this;
+ var editor = this.editor;
+ var config = editor.config;
+ var menu = [];
+ var tbo = this.editor.plugins.TableOperations;
+ if (tbo) tbo = tbo.instance;
+ var i18n = ContextMenu.I18N;
+
+ var selection = editor.hasSelectedText();
+ if (selection)
+ menu.push([ i18n["Cut"], function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ],
+ [ i18n["Copy"], function() { editor.execCommand("copy"); }, null, config.btnList["copy"][1] ]);
+ menu.push([ i18n["Paste"], function() { editor.execCommand("paste"); }, null, config.btnList["paste"][1] ]);
+
+ var currentTarget = target;
+ var elmenus = [];
+
+ var link = null;
+ var table = null;
+ var tr = null;
+ var td = null;
+ var img = null;
+
+ function tableOperation(opcode) {
+ tbo.buttonPress(editor, opcode);
+ };
+
+ for (; target; target = target.parentNode) {
+ var tag = target.tagName;
+ if (!tag)
+ continue;
+ tag = tag.toLowerCase();
+ switch (tag) {
+ case "img":
+ img = target;
+ elmenus.push(null,
+ [ i18n["Image Properties"],
+ function() {
+ editor._insertImage(img);
+ },
+ i18n["Show the image properties dialog"],
+ config.btnList["insertimage"][1] ]
+ );
+ break;
+ case "a":
+ link = target;
+ elmenus.push(null,
+ [ i18n["Modify Link"],
+ function() { editor.execCommand("createlink", true); },
+ i18n["Current URL is"] + ': ' + link.href,
+ config.btnList["createlink"][1] ],
+
+ [ i18n["Check Link"],
+ function() { window.open(link.href); },
+ i18n["Opens this link in a new window"] ],
+
+ [ i18n["Remove Link"],
+ function() {
+ if (confirm(i18n["Please confirm that you want to unlink this element."] + "\n" +
+ i18n["Link points to:"] + " " + link.href)) {
+ while (link.firstChild)
+ link.parentNode.insertBefore(link.firstChild, link);
+ link.parentNode.removeChild(link);
+ }
+ },
+ i18n["Unlink the current element"] ]
+ );
+ break;
+ case "td":
+ td = target;
+ if (!tbo) break;
+ elmenus.push(null,
+ [ i18n["Cell Properties"],
+ function() { tableOperation("TO-cell-prop"); },
+ i18n["Show the Table Cell Properties dialog"],
+ config.btnList["TO-cell-prop"][1] ]
+ );
+ break;
+ case "tr":
+ tr = target;
+ if (!tbo) break;
+ elmenus.push(null,
+ [ i18n["Row Properties"],
+ function() { tableOperation("TO-row-prop"); },
+ i18n["Show the Table Row Properties dialog"],
+ config.btnList["TO-row-prop"][1] ],
+
+ [ i18n["Insert Row Before"],
+ function() { tableOperation("TO-row-insert-above"); },
+ i18n["Insert a new row before the current one"],
+ config.btnList["TO-row-insert-above"][1] ],
+
+ [ i18n["Insert Row After"],
+ function() { tableOperation("TO-row-insert-under"); },
+ i18n["Insert a new row after the current one"],
+ config.btnList["TO-row-insert-under"][1] ],
+
+ [ i18n["Delete Row"],
+ function() { tableOperation("TO-row-delete"); },
+ i18n["Delete the current row"],
+ config.btnList["TO-row-delete"][1] ]
+ );
+ break;
+ case "table":
+ table = target;
+ if (!tbo) break;
+ elmenus.push(null,
+ [ i18n["Table Properties"],
+ function() { tableOperation("TO-table-prop"); },
+ i18n["Show the Table Properties dialog"],
+ config.btnList["TO-table-prop"][1] ],
+
+ [ i18n["Insert Column Before"],
+ function() { tableOperation("TO-col-insert-before"); },
+ i18n["Insert a new column before the current one"],
+ config.btnList["TO-col-insert-before"][1] ],
+
+ [ i18n["Insert Column After"],
+ function() { tableOperation("TO-col-insert-after"); },
+ i18n["Insert a new column after the current one"],
+ config.btnList["TO-col-insert-after"][1] ],
+
+ [ i18n["Delete Column"],
+ function() { tableOperation("TO-col-delete"); },
+ i18n["Delete the current column"],
+ config.btnList["TO-col-delete"][1] ]
+ );
+ break;
+ case "body":
+ elmenus.push(null,
+ [ i18n["Justify Left"],
+ function() { editor.execCommand("justifyleft"); }, null,
+ config.btnList["justifyleft"][1] ],
+ [ i18n["Justify Center"],
+ function() { editor.execCommand("justifycenter"); }, null,
+ config.btnList["justifycenter"][1] ],
+ [ i18n["Justify Right"],
+ function() { editor.execCommand("justifyright"); }, null,
+ config.btnList["justifyright"][1] ],
+ [ i18n["Justify Full"],
+ function() { editor.execCommand("justifyfull"); }, null,
+ config.btnList["justifyfull"][1] ]
+ );
+ break;
+ }
+ }
+
+ if (selection && !link)
+ menu.push(null, [ i18n["Make link"],
+ function() { editor.execCommand("createlink", true); },
+ i18n["Create a link"],
+ config.btnList["createlink"][1] ]);
+
+ for (var i in elmenus)
+ menu.push(elmenus[i]);
+
+ menu.push(null,
+ [ i18n["Remove the"] + " <" + currentTarget.tagName + "> " + i18n["Element"],
+ function() {
+ if (confirm(i18n["Please confirm that you want to remove this element:"] + " " + currentTarget.tagName)) {
+ var el = currentTarget;
+ var p = el.parentNode;
+ p.removeChild(el);
+ if (HTMLArea.is_gecko) {
+ if (p.tagName.toLowerCase() == "td" && !p.hasChildNodes())
+ p.appendChild(editor._doc.createElement("br"));
+ editor.forceRedraw();
+ editor.focusEditor();
+ editor.updateToolbar();
+ if (table) {
+ var save_collapse = table.style.borderCollapse;
+ table.style.borderCollapse = "collapse";
+ table.style.borderCollapse = "separate";
+ table.style.borderCollapse = save_collapse;
+ }
+ }
+ }
+ },
+ i18n["Remove this node from the document"] ]);
+ return menu;
+};
+
+ContextMenu.prototype.popupMenu = function(ev) {
+ var self = this;
+ var i18n = ContextMenu.I18N;
+ if (this.currentMenu)
+ this.currentMenu.parentNode.removeChild(this.currentMenu);
+ function getPos(el) {
+ var r = { x: el.offsetLeft, y: el.offsetTop };
+ if (el.offsetParent) {
+ var tmp = getPos(el.offsetParent);
+ r.x += tmp.x;
+ r.y += tmp.y;
+ }
+ return r;
+ };
+ function documentClick(ev) {
+ ev || (ev = window.event);
+ if (!self.currentMenu) {
+ alert(i18n["How did you get here? (Please report!)"]);
+ return false;
+ }
+ var el = HTMLArea.is_ie ? ev.srcElement : ev.target;
+ for (; el != null && el != self.currentMenu; el = el.parentNode);
+ if (el == null)
+ self.closeMenu();
+ //HTMLArea._stopEvent(ev);
+ //return false;
+ };
+ var keys = [];
+ function keyPress(ev) {
+ ev || (ev = window.event);
+ HTMLArea._stopEvent(ev);
+ if (ev.keyCode == 27) {
+ self.closeMenu();
+ return false;
+ }
+ var key = String.fromCharCode(HTMLArea.is_ie ? ev.keyCode : ev.charCode).toLowerCase();
+ for (var i = keys.length; --i >= 0;) {
+ var k = keys[i];
+ if (k[0].toLowerCase() == key)
+ k[1].__msh.activate();
+ }
+ };
+ self.closeMenu = function() {
+ self.currentMenu.parentNode.removeChild(self.currentMenu);
+ self.currentMenu = null;
+ HTMLArea._removeEvent(document, "mousedown", documentClick);
+ HTMLArea._removeEvent(self.editordoc, "mousedown", documentClick);
+ if (keys.length > 0)
+ HTMLArea._removeEvent(self.editordoc, "keypress", keyPress);
+ if (HTMLArea.is_ie)
+ self.iePopup.hide();
+ };
+ var target = HTMLArea.is_ie ? ev.srcElement : ev.target;
+ var ifpos = getPos(self.editor._iframe);
+ var x = ev.clientX + ifpos.x;
+ var y = ev.clientY + ifpos.y;
+
+ var div;
+ var doc;
+ if (!HTMLArea.is_ie) {
+ doc = document;
+ } else {
+ // IE stinks
+ var popup = this.iePopup = window.createPopup();
+ doc = popup.document;
+ doc.open();
+ doc.write("<html><head><style type='text/css'>@import url(" + _editor_url + "plugins/ContextMenu/menu.css); html, body { padding: 0px; margin: 0px; overflow: hidden; border: 0px; }</style></head><body unselectable='yes'></body></html>");
+ doc.close();
+ }
+ div = doc.createElement("div");
+ if (HTMLArea.is_ie)
+ div.unselectable = "on";
+ div.oncontextmenu = function() { return false; };
+ div.className = "htmlarea-context-menu";
+ if (!HTMLArea.is_ie)
+ div.style.left = div.style.top = "0px";
+ doc.body.appendChild(div);
+
+ var table = doc.createElement("table");
+ div.appendChild(table);
+ table.cellSpacing = 0;
+ table.cellPadding = 0;
+ var parent = doc.createElement("tbody");
+ table.appendChild(parent);
+
+ var options = this.getContextMenu(target);
+ for (var i = 0; i < options.length; ++i) {
+ var option = options[i];
+ var item = doc.createElement("tr");
+ parent.appendChild(item);
+ if (HTMLArea.is_ie)
+ item.unselectable = "on";
+ else item.onmousedown = function(ev) {
+ HTMLArea._stopEvent(ev);
+ return false;
+ };
+ if (!option) {
+ item.className = "separator";
+ var td = doc.createElement("td");
+ td.className = "icon";
+ var IE_IS_A_FUCKING_SHIT = '>';
+ if (HTMLArea.is_ie) {
+ td.unselectable = "on";
+ IE_IS_A_FUCKING_SHIT = " unselectable='on' style='height=1px'> ";
+ }
+ td.innerHTML = "<div" + IE_IS_A_FUCKING_SHIT + "</div>";
+ var td1 = td.cloneNode(true);
+ td1.className = "label";
+ item.appendChild(td);
+ item.appendChild(td1);
+ } else {
+ var label = option[0];
+ item.className = "item";
+ item.__msh = {
+ item: item,
+ label: label,
+ action: option[1],
+ tooltip: option[2] || null,
+ icon: option[3] || null,
+ activate: function() {
+ self.closeMenu();
+ self.editor.focusEditor();
+ this.action();
+ }
+ };
+ label = label.replace(/_([a-zA-Z0-9])/, "<u>$1</u>");
+ if (label != option[0])
+ keys.push([ RegExp.$1, item ]);
+ label = label.replace(/__/, "_");
+ var td1 = doc.createElement("td");
+ if (HTMLArea.is_ie)
+ td1.unselectable = "on";
+ item.appendChild(td1);
+ td1.className = "icon";
+ if (item.__msh.icon)
+ td1.innerHTML = "<img align='middle' src='" + item.__msh.icon + "' />";
+ var td2 = doc.createElement("td");
+ if (HTMLArea.is_ie)
+ td2.unselectable = "on";
+ item.appendChild(td2);
+ td2.className = "label";
+ td2.innerHTML = label;
+ item.onmouseover = function() {
+ this.className += " hover";
+ self.editor._statusBarTree.innerHTML = this.__msh.tooltip || ' ';
+ };
+ item.onmouseout = function() { this.className = "item"; };
+ item.oncontextmenu = function(ev) {
+ this.__msh.activate();
+ if (!HTMLArea.is_ie)
+ HTMLArea._stopEvent(ev);
+ return false;
+ };
+ item.onmouseup = function(ev) {
+ var timeStamp = (new Date()).getTime();
+ if (timeStamp - self.timeStamp > 500)
+ this.__msh.activate();
+ if (!HTMLArea.is_ie)
+ HTMLArea._stopEvent(ev);
+ return false;
+ };
+ //if (typeof option[2] == "string")
+ //item.title = option[2];
+ }
+ }
+
+ if (!HTMLArea.is_ie) {
+ var dx = x + div.offsetWidth - window.innerWidth + 4;
+ var dy = y + div.offsetHeight - window.innerHeight + 4;
+ if (dx > 0) x -= dx;
+ if (dy > 0) y -= dy;
+ div.style.left = x + "px";
+ div.style.top = y + "px";
+ } else {
+ // determine the size (did I mention that IE stinks?)
+ var foobar = document.createElement("div");
+ foobar.className = "htmlarea-context-menu";
+ foobar.innerHTML = div.innerHTML;
+ document.body.appendChild(foobar);
+ var w = foobar.offsetWidth;
+ var h = foobar.offsetHeight;
+ document.body.removeChild(foobar);
+ this.iePopup.show(ev.screenX, ev.screenY, w, h);
+ }
+
+ this.currentMenu = div;
+ this.timeStamp = (new Date()).getTime();
+
+ HTMLArea._addEvent(document, "mousedown", documentClick);
+ HTMLArea._addEvent(this.editordoc, "mousedown", documentClick);
+ if (keys.length > 0)
+ HTMLArea._addEvent(this.editordoc, "keypress", keyPress);
+
+ HTMLArea._stopEvent(ev);
+ return false;
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/context-menu.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/de.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/de.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/de.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/de.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,59 @@
+// I18N constants
+
+// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
+
+// translated: <]{MJ}[> i@student.ethz.ch
+
+
+ContextMenu.I18N = {
+ // Items that appear in menu. Please note that an underscore (_)
+ // character in the translation (right column) will cause the following
+ // letter to become underlined and be shortcut for that menu option.
+
+ "Cut" : "Ausschneiden",
+ "Copy" : "Kopieren",
+ "Paste" : "Einfügen",
+ "Image Properties" : "_Bild Einstellungen...",
+ "Modify Link" : "_Link ändern...",
+ "Check Link" : "Link testen...",
+ "Remove Link" : "Link entfernen...",
+ "Cell Properties" : "Z_ellen Einstellungen...",
+ "Row Properties" : "Ze_ilen Einstellungen...",
+ "Insert Row Before" : "Zeile einfügen v_or Position",
+ "Insert Row After" : "Zeile einfügen n_ach Position",
+ "Delete Row" : "Zeile löschen",
+ "Table Properties" : "_Tabellen Einstellungen...",
+ "Insert Column Before" : "Spalte einfügen vo_r Position",
+ "Insert Column After" : "Spalte einfügen na_ch Position",
+ "Delete Column" : "Spalte löschen",
+ "Justify Left" : "Links ausrichten",
+ "Justify Center" : "Zentriert",
+ "Justify Right" : "Rechts ausrichten",
+ "Justify Full" : "Blocksatz",
+ "Make link" : "Lin_k erstellen...",
+ "Remove the" : "",
+ "Element" : "Element entfernen...",
+
+ // Other labels (tooltips and alert/confirm box messages)
+
+ "Please confirm that you want to remove this element:" : "Wollen sie dieses Element wirklich entfernen ?",
+ "Remove this node from the document" : "Dieses Element aus dem Dokument entfernen",
+ "How did you get here? (Please report!)" : "How did you get here? (Please report!)",
+ "Show the image properties dialog" : "Fenster für die Bild-Einstellungen anzeigen",
+ "Modify URL" : "URL ändern",
+ "Current URL is" : "Aktuelle URL ist",
+ "Opens this link in a new window" : "Diesen Link in neuem Fenster öffnen",
+ "Please confirm that you want to unlink this element." : "Wollen sie diesen Link wirklich entfernen ?",
+ "Link points to:" : "Link zeigt auf:",
+ "Unlink the current element" : "Link auf Element entfernen",
+ "Show the Table Cell Properties dialog" : "Zellen-Einstellungen anzeigen",
+ "Show the Table Row Properties dialog" : "Zeilen-Einstellungen anzeigen",
+ "Insert a new row before the current one" : "Zeile einfügen vor der aktuellen Position",
+ "Insert a new row after the current one" : "Zeile einfügen nach der aktuellen Position",
+ "Delete the current row" : "Zeile löschen",
+ "Show the Table Properties dialog" : "Show the Table Properties dialog",
+ "Insert a new column before the current one" : "Spalte einfügen vor der aktuellen Position",
+ "Insert a new column after the current one" : "Spalte einfügen nach der aktuellen Position",
+ "Delete the current column" : "Spalte löschen",
+ "Create a link" : "Link erstellen"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/de.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/el.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/el.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/el.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/el.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,57 @@
+// I18N constants
+
+// LANG: "el", ENCODING: UTF-8 | ISO-8859-7
+// Author: Dimitris Glezos, dimitris@glezos.com
+
+ContextMenu.I18N = {
+ // Items that appear in menu. Please note that an underscore (_)
+ // character in the translation (right column) will cause the following
+ // letter to become underlined and be shortcut for that menu option.
+
+ "Cut" : "ÎÏοκοÏή",
+ "Copy" : "ÎνÏιγÏαÏή",
+ "Paste" : "ÎÏικÏλληÏη",
+ "Image Properties" : "ÎδιÏÏηÏÎµÏ ÎικÏναÏ...",
+ "Modify Link" : "ΤÏοÏοÏοίηÏη ÏÏ
νδÎÏμοÏ
...",
+ "Check Link" : "ÎλεγÏÎ¿Ï ÏÏ
νδÎÏμÏν...",
+ "Remove Link" : "ÎιαγÏαÏή ÏÏ
νδÎÏμοÏ
...",
+ "Cell Properties" : "ÎδιÏÏηÏÎµÏ ÎºÎµÎ»Î¹Î¿Ï...",
+ "Row Properties" : "ÎδιÏÏηÏÎµÏ Î³ÏαμμήÏ...",
+ "Insert Row Before" : "ÎιÏαγÏγή γÏÎ±Î¼Î¼Î®Ï ÏÏιν",
+ "Insert Row After" : "ÎιÏαγÏγή γÏÎ±Î¼Î¼Î®Ï Î¼ÎµÏά",
+ "Delete Row" : "ÎιαγÏαÏή γÏαμμήÏ",
+ "Table Properties" : "ÎδιÏÏηÏÎµÏ Ïίνακα...",
+ "Insert Column Before" : "ÎιÏαγÏγή ÏÏÎ®Î»Î·Ï ÏÏιν",
+ "Insert Column After" : "ÎιÏαγÏγή ÏÏÎ®Î»Î·Ï Î¼ÎµÏά",
+ "Delete Column" : "ÎιαγÏαÏή ÏÏήληÏ",
+ "Justify Left" : "ΣÏοίÏηÏη ÎÏιÏÏεÏά",
+ "Justify Center" : "ΣÏοίÏηÏη ÎÎνÏÏο",
+ "Justify Right" : "ΣÏοίÏηÏη Îεξιά",
+ "Justify Full" : "ΠλήÏÎ·Ï Î£ÏοίÏηÏη",
+ "Make link" : "ÎημιοÏ
Ïγία ÏÏ
νδÎÏμοÏ
...",
+ "Remove the" : "ÎÏαίÏεÏη",
+ "Element" : "ÏÏοιÏείοÏ
...",
+
+ // Other labels (tooltips and alert/confirm box messages)
+
+ "Please confirm that you want to remove this element:" : "ÎίÏÏε βÎÎ²Î±Î¹Î¿Ï ÏÏÏ Î¸ÎλεÏε να αÏαιÏÎÏεÏε Ïο ÏÏοιÏείο ",
+ "Remove this node from the document" : "ÎÏαίÏεÏη αÏ
ÏÎ¿Ï ÏοÏ
κÏμβοÏ
αÏÏ Ïο ÎγγÏαÏο",
+ "How did you get here? (Please report!)" : "Î ÏÏ Î®ÏθαÏε μÎÏÏι εδÏ; (ΠαÏακαλοÏμε αναÏÎÏεÏε Ïο!)",
+ "Show the image properties dialog" : "ÎμÏάνιÏη διαλÏγοÏ
με ÏÎ¹Ï ÎδιÏÏηÏÎµÏ ÎµÎ¹ÎºÏναÏ",
+ "Modify URL" : "ΤÏοÏοÏοίηÏη URL",
+ "Current URL is" : "Το ÏÏÎÏÏν URL είναι",
+ "Opens this link in a new window" : "Îνοίγει αÏ
ÏÏ Ïον ÏÏνδεÏμο Ïε Îνα νÎο ÏαÏάθÏ
Ïο",
+ "Please confirm that you want to unlink this element." : "ÎίÏÏε βÎÎ²Î±Î¹Î¿Ï ÏÏÏ Î¸ÎλεÏε να αÏαιÏÎÏεÏε Ïον ÏÏνδεÏμο αÏÏ Î±Ï
ÏÏ Ïο ÏÏοιÏείο:",
+ "Link points to:" : "Î ÏÏÎ½Î´ÎµÎ¼Î¿Ï Î¿Î´Î·Î³ÎµÎ¯ εδÏ:",
+ "Unlink the current element" : "ÎÏαίÏεÏη ÏÏ
νδÎÏμοÏ
αÏÏ Ïο ÏαÏÏν ÏÏοιÏείο",
+ "Show the Table Cell Properties dialog" : "ÎμÏάνιÏη διαλÏγοÏ
με ÏÎ¹Ï ÎδιÏÏηÏÎµÏ ÎºÎµÎ»Î¹Î¿Ï Î Î¯Î½Î±ÎºÎ±",
+ "Show the Table Row Properties dialog" : "ÎμÏάνιÏη διαλÏγοÏ
με ÏÎ¹Ï ÎδιÏÏηÏÎµÏ Î³ÏÎ±Î¼Î¼Î®Ï Î Î¯Î½Î±ÎºÎ±",
+ "Insert a new row before the current one" : "ÎιÏαγÏγή Î¼Î¹Î±Ï Î½ÎÎ±Ï Î³ÏÎ±Î¼Î¼Î®Ï ÏÏιν Ïην εÏιλεγμÎνη",
+ "Insert a new row after the current one" : "ÎιÏαγÏγή Î¼Î¹Î±Ï Î½ÎÎ±Ï Î³ÏÎ±Î¼Î¼Î®Ï Î¼ÎµÏά Ïην εÏιλεγμÎνη",
+ "Delete the current row" : "ÎιαγÏαÏή εÏιλεγμÎÎ½Î·Ï Î³ÏαμμήÏ",
+ "Show the Table Properties dialog" : "ÎμÏάνιÏη διαλÏγοÏ
με ÏÎ¹Ï ÎδιÏÏηÏÎµÏ Î Î¯Î½Î±ÎºÎ±",
+ "Insert a new column before the current one" : "ÎιÏαγÏγή νÎÎ±Ï ÏÏÎ®Î»Î·Ï ÏÏιν Ïην εÏιλεγμÎνη",
+ "Insert a new column after the current one" : "ÎιÏαγÏγή νÎÎ±Ï ÏÏÎ®Î»Î·Ï Î¼ÎµÏά Ïην εÏιλεγμÎνη",
+ "Delete the current column" : "ÎιαγÏαÏή εÏιλεγμÎÎ½Î·Ï ÏÏήληÏ",
+ "Create a link" : "ÎημιοÏ
Ïγία ÏÏ
νδÎÏμοÏ
"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/el.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/en.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/en.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/en.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/en.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,66 @@
+// I18N constants
+
+// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
+// Author: Mihai Bazon, http://dynarch.com/mishoo
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+ContextMenu.I18N = {
+ // Items that appear in menu. Please note that an underscore (_)
+ // character in the translation (right column) will cause the following
+ // letter to become underlined and be shortcut for that menu option.
+
+ "Cut" : "Cut",
+ "Copy" : "Copy",
+ "Paste" : "Paste",
+ "Image Properties" : "_Image Properties...",
+ "Modify Link" : "_Modify Link...",
+ "Check Link" : "Chec_k Link...",
+ "Remove Link" : "_Remove Link...",
+ "Cell Properties" : "C_ell Properties...",
+ "Row Properties" : "Ro_w Properties...",
+ "Insert Row Before" : "I_nsert Row Before",
+ "Insert Row After" : "In_sert Row After",
+ "Delete Row" : "_Delete Row",
+ "Table Properties" : "_Table Properties...",
+ "Insert Column Before" : "Insert _Column Before",
+ "Insert Column After" : "Insert C_olumn After",
+ "Delete Column" : "De_lete Column",
+ "Justify Left" : "Justify Left",
+ "Justify Center" : "Justify Center",
+ "Justify Right" : "Justify Right",
+ "Justify Full" : "Justify Full",
+ "Make link" : "Make lin_k...",
+ "Remove the" : "Remove the",
+ "Element" : "Element...",
+
+ // Other labels (tooltips and alert/confirm box messages)
+
+ "Please confirm that you want to remove this element:" : "Please confirm that you want to remove this element:",
+ "Remove this node from the document" : "Remove this node from the document",
+ "How did you get here? (Please report!)" : "How did you get here? (Please report!)",
+ "Show the image properties dialog" : "Show the image properties dialog",
+ "Modify URL" : "Modify URL",
+ "Current URL is" : "Current URL is",
+ "Opens this link in a new window" : "Opens this link in a new window",
+ "Please confirm that you want to unlink this element." : "Please confirm that you want to unlink this element.",
+ "Link points to:" : "Link points to:",
+ "Unlink the current element" : "Unlink the current element",
+ "Show the Table Cell Properties dialog" : "Show the Table Cell Properties dialog",
+ "Show the Table Row Properties dialog" : "Show the Table Row Properties dialog",
+ "Insert a new row before the current one" : "Insert a new row before the current one",
+ "Insert a new row after the current one" : "Insert a new row after the current one",
+ "Delete the current row" : "Delete the current row",
+ "Show the Table Properties dialog" : "Show the Table Properties dialog",
+ "Insert a new column before the current one" : "Insert a new column before the current one",
+ "Insert a new column after the current one" : "Insert a new column after the current one",
+ "Delete the current column" : "Delete the current column",
+ "Create a link" : "Create a link"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/en.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.js" />
+</files>
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/nl.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/nl.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/nl.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/nl.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,66 @@
+// I18N constants
+
+// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
+// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+ContextMenu.I18N = {
+ // Items that appear in menu. Please note that an underscore (_)
+ // character in the translation (right column) will cause the following
+ // letter to become underlined and be shortcut for that menu option.
+
+ "Cut" : "Knippen",
+ "Copy" : "Kopiëren",
+ "Paste" : "Plakken",
+ "Image Properties" : "Eigenschappen afbeelding...",
+ "Modify Link" : "Hyperlin_k aanpassen...",
+ "Check Link" : "Controleer hyperlin_k...",
+ "Remove Link" : "Ve_rwijder hyperlink...",
+ "Cell Properties" : "C_eleigenschappen...",
+ "Row Properties" : "Rijeigenscha_ppen...",
+ "Insert Row Before" : "Rij invoegen boven",
+ "Insert Row After" : "Rij invoegen onder",
+ "Delete Row" : "Rij _verwijderen",
+ "Table Properties" : "_Tabeleigenschappen...",
+ "Insert Column Before" : "Kolom invoegen voor",
+ "Insert Column After" : "Kolom invoegen na",
+ "Delete Column" : "Kolom verwijderen",
+ "Justify Left" : "Links uitlijnen",
+ "Justify Center" : "Centreren",
+ "Justify Right" : "Rechts uitlijnen",
+ "Justify Full" : "Uitvullen",
+ "Make link" : "Maak hyperlin_k...",
+ "Remove the" : "Verwijder het",
+ "Element" : "element...",
+
+ // Other labels (tooltips and alert/confirm box messages)
+
+ "Please confirm that you want to remove this element:" : "Is het werkelijk de bedoeling dit element te verwijderen:",
+ "Remove this node from the document" : "Verwijder dit punt van het document",
+ "How did you get here? (Please report!)" : "Hoe kwam je hier? (A.U.B. doorgeven!)",
+ "Show the image properties dialog" : "Laat het afbeeldingseigenschappen dialog zien",
+ "Modify URL" : "Aanpassen URL",
+ "Current URL is" : "Huidig URL is",
+ "Opens this link in a new window" : "Opend deze hyperlink in een nieuw venster",
+ "Please confirm that you want to unlink this element." : "Is het werkelijk de bedoeling dit element te unlinken.",
+ "Link points to:" : "Hyperlink verwijst naar:",
+ "Unlink the current element" : "Unlink het huidige element",
+ "Show the Table Cell Properties dialog" : "Laat de tabel celeigenschappen dialog zien",
+ "Show the Table Row Properties dialog" : "Laat de tabel rijeigenschappen dialog zien",
+ "Insert a new row before the current one" : "Voeg een nieuwe rij in boven de huidige",
+ "Insert a new row after the current one" : "Voeg een nieuwe rij in onder de huidige",
+ "Delete the current row" : "Verwijder de huidige rij",
+ "Show the Table Properties dialog" : "Laat de tabel eigenschappen dialog zien",
+ "Insert a new column before the current one" : "Voeg een nieuwe kolom in voor de huidige",
+ "Insert a new column after the current one" : "Voeg een nieuwe kolom in na de huidige",
+ "Delete the current column" : "Verwijder de huidige kolom",
+ "Create a link" : "Maak een hyperlink"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/lang/nl.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.{js,html,cgi,css}" />
+
+ <dir name="lang" />
+</files>
+
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/menu.css
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/menu.css?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/menu.css (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/menu.css Sun Jun 11 16:24:48 2006
@@ -0,0 +1,64 @@
+/* styles for the ContextMenu /HTMLArea */
+/* The ContextMenu plugin is (c) dynarch.com 2003. */
+/* Distributed under the same terms as HTMLArea itself */
+
+div.htmlarea-context-menu {
+ position: absolute;
+ border: 1px solid #aca899;
+ padding: 2px;
+ background-color: #fff;
+ cursor: default;
+ z-index: 1000;
+}
+
+div.htmlarea-context-menu table {
+ font: 11px tahoma,verdana,sans-serif;
+ border-collapse: collapse;
+}
+
+div.htmlarea-context-menu tr.item td.icon img {
+ width: 18px;
+ height: 18px;
+}
+
+div.htmlarea-context-menu tr.item td.icon {
+ padding: 0px 3px;
+ height: 18px;
+ background-color: #cdf;
+}
+
+div.htmlarea-context-menu tr.item td.label {
+ padding: 1px 10px 1px 3px;
+}
+
+div.htmlarea-context-menu tr.separator td {
+ padding: 2px 0px;
+}
+
+div.htmlarea-context-menu tr.separator td div {
+ border-top: 1px solid #aca899;
+ overflow: hidden;
+ position: relative;
+}
+
+div.htmlarea-context-menu tr.separator td.icon {
+ background-color: #cdf;
+}
+
+div.htmlarea-context-menu tr.separator td.icon div {
+/* margin-left: 3px; */
+ border-color: #fff;
+}
+
+div.htmlarea-context-menu tr.separator td.label div {
+ margin-right: 3px;
+}
+
+div.htmlarea-context-menu tr.item.hover {
+ background-color: #316ac5;
+ color: #fff;
+}
+
+div.htmlarea-context-menu tr.item.hover td.icon {
+ background-color: #619af5;
+}
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/ContextMenu/menu.css
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/full-page.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/full-page.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/full-page.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/full-page.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,143 @@
+// FullPage Plugin for HTMLArea-3.0
+// Implementation by Mihai Bazon. Sponsored by http://thycotic.com
+//
+// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
+// This notice MUST stay intact for use (see license.txt).
+//
+// A free WYSIWYG editor replacement for <textarea> fields.
+// For full source code and docs, visit http://www.interactivetools.com/
+//
+// Version 3.0 developed by Mihai Bazon for InteractiveTools.
+// http://dynarch.com/mishoo
+//
+// $Id: full-page.js 30938 2004-07-29 19:08:16Z vgritsenko $
+
+function FullPage(editor) {
+ this.editor = editor;
+
+ var cfg = editor.config;
+ cfg.fullPage = true;
+ var tt = FullPage.I18N;
+ var self = this;
+
+ cfg.registerButton("FP-docprop", tt["Document properties"], editor.imgURL("docprop.gif", "FullPage"), false,
+ function(editor, id) {
+ self.buttonPress(editor, id);
+ });
+
+ // add a new line in the toolbar
+ cfg.toolbar[0].splice(0, 0, "separator");
+ cfg.toolbar[0].splice(0, 0, "FP-docprop");
+};
+
+FullPage._pluginInfo = {
+ name : "FullPage",
+ version : "1.0",
+ developer : "Mihai Bazon",
+ developer_url : "http://dynarch.com/mishoo/",
+ c_owner : "Mihai Bazon",
+ sponsor : "Thycotic Software Ltd.",
+ sponsor_url : "http://thycotic.com",
+ license : "htmlArea"
+};
+
+FullPage.prototype.buttonPress = function(editor, id) {
+ var self = this;
+ switch (id) {
+ case "FP-docprop":
+ var doc = editor._doc;
+ var links = doc.getElementsByTagName("link");
+ var style1 = '';
+ var style2 = '';
+ for (var i = links.length; --i >= 0;) {
+ var link = links[i];
+ if (/stylesheet/i.test(link.rel)) {
+ if (/alternate/i.test(link.rel))
+ style2 = link.href;
+ else
+ style1 = link.href;
+ }
+ }
+ var title = doc.getElementsByTagName("title")[0];
+ title = title ? title.innerHTML : '';
+ var init = {
+ f_doctype : editor.doctype,
+ f_title : title,
+ f_body_bgcolor : HTMLArea._colorToRgb(doc.body.style.backgroundColor),
+ f_body_fgcolor : HTMLArea._colorToRgb(doc.body.style.color),
+ f_base_style : style1,
+ f_alt_style : style2,
+
+ editor : editor
+ };
+ editor._popupDialog("plugin://FullPage/docprop", function(params) {
+ self.setDocProp(params);
+ }, init);
+ break;
+ }
+};
+
+FullPage.prototype.setDocProp = function(params) {
+ var txt = "";
+ var doc = this.editor._doc;
+ var head = doc.getElementsByTagName("head")[0];
+ var links = doc.getElementsByTagName("link");
+ var style1 = null;
+ var style2 = null;
+ for (var i = links.length; --i >= 0;) {
+ var link = links[i];
+ if (/stylesheet/i.test(link.rel)) {
+ if (/alternate/i.test(link.rel))
+ style2 = link;
+ else
+ style1 = link;
+ }
+ }
+ function createLink(alt) {
+ var link = doc.createElement("link");
+ link.rel = alt ? "alternate stylesheet" : "stylesheet";
+ head.appendChild(link);
+ return link;
+ };
+
+ if (!style1 && params.f_base_style)
+ style1 = createLink(false);
+ if (params.f_base_style)
+ style1.href = params.f_base_style;
+ else if (style1)
+ head.removeChild(style1);
+
+ if (!style2 && params.f_alt_style)
+ style2 = createLink(true);
+ if (params.f_alt_style)
+ style2.href = params.f_alt_style;
+ else if (style2)
+ head.removeChild(style2);
+
+ for (var i in params) {
+ var val = params[i];
+ switch (i) {
+ case "f_title":
+ var title = doc.getElementsByTagName("title")[0];
+ if (!title) {
+ title = doc.createElement("title");
+ head.appendChild(title);
+ } else while (node = title.lastChild)
+ title.removeChild(node);
+ if (!HTMLArea.is_ie)
+ title.appendChild(doc.createTextNode(val));
+ else
+ doc.title = val;
+ break;
+ case "f_doctype":
+ this.editor.setDoctype(val);
+ break;
+ case "f_body_bgcolor":
+ doc.body.style.backgroundColor = val;
+ break;
+ case "f_body_fgcolor":
+ doc.body.style.color = val;
+ break;
+ }
+ }
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/full-page.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/docprop.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/docprop.gif?rev=413547&view=auto
==============================================================================
Binary file - no diff available.
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/docprop.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.{gif,jpg,jpeg}" />
+</files>
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/img/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/en.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/en.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/en.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/en.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,25 @@
+// I18N for the FullPage plugin
+
+// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
+// Author: Mihai Bazon, http://dynarch.com/mishoo
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+FullPage.I18N = {
+ "Alternate style-sheet:": "Alternate style-sheet:",
+ "Background color:": "Background color:",
+ "Cancel": "Cancel",
+ "DOCTYPE:": "DOCTYPE:",
+ "Document properties": "Document properties",
+ "Document title:": "Document title:",
+ "OK": "OK",
+ "Primary style-sheet:": "Primary style-sheet:",
+ "Text color:": "Text color:"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/en.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.js" />
+</files>
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/ro.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/ro.js?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/ro.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/ro.js Sun Jun 11 16:24:48 2006
@@ -0,0 +1,25 @@
+// I18N for the FullPage plugin
+
+// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
+// Author: Mihai Bazon, http://dynarch.com/mishoo
+
+// FOR TRANSLATORS:
+//
+// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+// (at least a valid email address)
+//
+// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+// (if this is not possible, please include a comment
+// that states what encoding is necessary.)
+
+FullPage.I18N = {
+ "Alternate style-sheet:": "Template CSS alternativ:",
+ "Background color:": "Culoare de fundal:",
+ "Cancel": "RenunÅ£Ä",
+ "DOCTYPE:": "DOCTYPE:",
+ "Document properties": "ProprietÄÅ£ile documentului",
+ "Document title:": "Titlul documentului:",
+ "OK": "AcceptÄ",
+ "Primary style-sheet:": "Template CSS principal:",
+ "Text color:": "Culoare text:"
+};
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/lang/ro.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/makefile.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/makefile.xml?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/makefile.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/makefile.xml Sun Jun 11 16:24:48 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<files>
+ <file name="*.{js,html,cgi,css}" />
+
+ <dir name="lang" />
+ <dir name="img" />
+ <dir name="popups" />
+</files>
+
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/makefile.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/popups/docprop.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/popups/docprop.html?rev=413547&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/popups/docprop.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/popups/docprop.html Sun Jun 11 16:24:48 2006
@@ -0,0 +1,131 @@
+<html>
+
+<head>
+ <title>Document properties</title>
+
+<script type="text/javascript" src="../../../popups/popup.js"></script>
+
+<script type="text/javascript">
+
+FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-)
+window.resizeTo(400, 100);
+
+ var accepted = {
+ f_doctype : true,
+ f_title : true,
+ f_body_bgcolor : true,
+ f_body_fgcolor : true,
+ f_base_style : true,
+ f_alt_style : true
+ };
+
+var editor = null;
+function Init() {
+ __dlg_translate(FullPage.I18N);
+ __dlg_init();
+ var params = window.dialogArguments;
+ for (var i in params) {
+ if (i in accepted) {
+ var el = document.getElementById(i);
+ el.value = params[i];
+ }
+ }
+ editor = params.editor;
+ document.getElementById("f_title").focus();
+ document.getElementById("f_title").select();
+};
+
+function onOK() {
+ var required = {
+ };
+ 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.value;
+ }
+ __dlg_close(param);
+ return false;
+};
+
+function onCancel() {
+ __dlg_close(null);
+ return false;
+};
+
+</script>
+
+<style type="text/css">
+html, body {
+ background: ButtonFace;
+ color: ButtonText;
+ font: 11px Tahoma,Verdana,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+body { padding: 5px; }
+table {
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
+button { width: 70px; }
+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 {
+ margin-top: 1em; border-top: 1px solid #999;
+ padding: 2px; text-align: right;
+}
+</style>
+
+ </head>
+
+ <body onload="Init()">
+
+ <div class="title"><span>Document properties</span></div>
+
+ <table style="width: 100%">
+ <tr>
+ <td class="label"><span>Document title:</span></td>
+ <td><input type="text" id="f_title" style="width: 100%" /></td>
+ </tr>
+ <tr>
+ <td class="label"><span>DOCTYPE:</span></td>
+ <td><input type="text" id="f_doctype" style="width: 100%" /></td>
+ </tr>
+ <tr>
+ <td class="label"><span>Primary style-sheet:</span></td>
+ <td><input type="text" id="f_base_style" style="width: 100%" /></td>
+ </tr>
+ <tr>
+ <td class="label"><span>Alternate style-sheet:</span></td>
+ <td><input type="text" id="f_alt_style" style="width: 100%" /></td>
+ </tr>
+ <tr>
+ <td class="label"><span>Background color:</span></td>
+ <td><input type="text" id="f_body_bgcolor" size="7" /></td>
+ </tr>
+ <tr>
+ <td class="label"><span>Text color:</span></td>
+ <td><input type="text" id="f_body_fgcolor" size="7" /></td>
+ </tr>
+ </table>
+
+ <div id="buttons">
+ <button type="button" name="ok" onclick="return onOK();"><span>OK</span></button>
+ <button type="button" name="cancel" onclick="return onCancel();"><span>Cancel</span></button>
+ </div>
+
+ </body>
+</html>
Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/form/htmlarea/plugins/FullPage/popups/docprop.html
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org