Added Real Objects Edit-On Pro integration.

This commit is contained in:
JT Smith 2002-05-07 01:51:07 +00:00
parent 0d32a1b901
commit 03599c4e83
16 changed files with 259 additions and 15 deletions

View file

@ -1,2 +1,7 @@
insert into webguiVersion values ('3.8.0','upgrade',unix_timestamp());
INSERT INTO settings VALUES ('richEditor','built-in');
INSERT INTO international VALUES (495,'WebGUI','English','Built-In Editor');
INSERT INTO international VALUES (496,'WebGUI','English','Editor To Use');
INSERT INTO international VALUES (494,'WebGUI','English','Real Objects Edit-On Pro');

View file

@ -49,6 +49,7 @@ use WebGUI::Utility;
$attachment->getThumbnail;
$attachment->getType;
$attachment->getURL;
$attachment->rename("thisfile.txt");
$attachment->save("formImage");
=head1 DESCRIPTION
@ -305,6 +306,24 @@ sub new {
}
#-------------------------------------------------------------------
=head2 rename ( newFilename )
Renames an attachment's filename.
=item newFilename
Define the new filename for this attachment.
=cut
sub rename {
rename $_[0]->getPath, $_[0]->{_node}->getPath.'/'.$_[1];
$_[0]->{_filename} = $_[1];
}
#-------------------------------------------------------------------
=head2 save ( formVariableName [, thumbnailSize ] )

View file

@ -1,5 +1,15 @@
package WebGUI::Form;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black Software.
#-------------------------------------------------------------------

View file

@ -303,7 +303,7 @@ sub file {
$subtext = shift;
$extras = shift;
$size = shift || $session{setting}{textBoxSize} || 30;
$output = '<input type="file" name="'.$name.'" size="'..'" '.$extras.'>';
$output = '<input type="file" name="'.$name.'" size="'.$size.'" '.$extras.'>';
$output .= _subtext($subtext);
$output = _tableFormRow($label,$output);
$class->{_data} .= $output;
@ -473,19 +473,29 @@ sub HTMLArea {
$output = '<script language="JavaScript">function fixChars(element) {element.value = element.value.replace(/~V/mg,"-");}</script>';
$value =~ s/\</\&lt\;/g;
$value =~ s/\>/\&gt\;/g;
$output .= '<script language="JavaScript">
var formObj;
var extrasDir="'.$session{setting}{lib}.'";
function openEditWindow(obj) {
formObj = obj;
if (navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE")+5,1)>=5)
window.open("'.$session{setting}{lib}.'/ieEdit.html","editWindow","width=490,height=400,resizable=1");
else
window.open("'.$session{setting}{lib}.'/nonIeEdit.html","editWindow","width=500,height=410");
}
function setContent(content) {
formObj.value = content;
} </script>';
if ($session{setting}{richEditor} eq "edit-on-pro") {
$output .= '<script language="JavaScript">
var formObj;
function openEditWindow(obj) {
formObj = obj;
window.open("'.$session{setting}{lib}.'/eopro.html","editWindow","width=720,height=450,resizable=1");
}
</script>';
} else {
$output .= '<script language="JavaScript">
var formObj;
var extrasDir="'.$session{setting}{lib}.'";
function openEditWindow(obj) {
formObj = obj;
if (navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE")+5,1)>=5)
window.open("'.$session{setting}{lib}.'/ieEdit.html","editWindow","width=490,height=400,resizable=1");
else
window.open("'.$session{setting}{lib}.'/nonIeEdit.html","editWindow","width=500,height=410");
}
function setContent(content) {
formObj.value = content;
} </script>';
}
$output .= '<input type="button" onClick="openEditWindow(this.form.'.$name.')" value="'.
WebGUI::International::get(171).'" style="font-size: 8pt;"><br>';
$output .= '<textarea name="'.$name.'" cols="'.$columns.'" rows="'.$rows.'" wrap="'.$wrap.

View file

@ -165,10 +165,11 @@ sub www_editMailSettingsSave {
#-------------------------------------------------------------------
sub www_editMiscSettings {
my ($output, %notFoundPage, %criticalError, %htmlFilter, $f);
my ($output, %notFoundPage, %criticalError, %htmlFilter, %editor, $f);
%htmlFilter = ('none'=>WebGUI::International::get(420), 'most'=>WebGUI::International::get(421), 'all'=>WebGUI::International::get(419));
%criticalError = ('debug'=>WebGUI::International::get(414), 'friendly'=>WebGUI::International::get(415));
%notFoundPage = (1=>WebGUI::International::get(136), 4=>WebGUI::International::get(137));
%editor = ('built-in'=>WebGUI::International::get(495), 'edit-on-pro'=>WebGUI::International::get(494));
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpIcon(24);
$output .= '<h1>'.WebGUI::International::get(140).'</h1>';
@ -183,6 +184,7 @@ sub www_editMiscSettings {
$f->integer("textAreaRows",WebGUI::International::get(463),$session{setting}{textAreaRows});
$f->integer("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols});
$f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize});
$f->select("richEditor",\%editor,WebGUI::International::get(496),[$session{setting}{richEditor}]);
$f->submit;
$output .= $f->print;
} else {
@ -203,6 +205,7 @@ sub www_editMiscSettingsSave {
_saveSetting("textAreaRows");
_saveSetting("textAreaCols");
_saveSetting("textBoxSize");
_saveSetting("richEditor");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();

View file

@ -1,5 +1,18 @@
package WebGUI::Shortcut;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black Software.
#-------------------------------------------------------------------

View file

@ -1,5 +1,15 @@
package WebGUI::Template;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black Software.
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::Default;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "Default";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::LeftColumn;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "LeftColumn";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::News;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "News";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::OneOverThree;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "OneOverThree";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::RightColumn;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "RightColumn";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::SideBySide;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "SideBySide";
#-------------------------------------------------------------------

View file

@ -1,5 +1,14 @@
package WebGUI::Template::ThreeOverOne;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
our $namespace = "ThreeOverOne";
#-------------------------------------------------------------------

View file

@ -1,5 +1,18 @@
package WebGUI::Widget;
#####################################################################
#####################################################################
# NOTICE: Use of this subsystem is depricated and is not recommended.
#####################################################################
#####################################################################
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black Software.
#-------------------------------------------------------------------

98
www/extras/eopro.html Normal file
View file

@ -0,0 +1,98 @@
<HTML>
<HEAD>
<TITLE>edit-on Pro</TITLE>
<SCRIPT language="JavaScript">
function functSet()
{
// Put the contents from the TEXTAREA field into the editor
//document.myEditor.setHTMLData( "" , document.myForm.myTextArea.value );
}
function functGet()
{
// Get the contents of the editor and copy them into the TEXTAREA field
//document.myForm.myTextArea.value = document.myEditor.getHTMLData( "" );
window.blur();
window.opener.focus();
window.opener.formObj.value = document.myEditor.getHTMLData( "" );
window.close();
}
// This callback function is called after the applet has successfully initialized
function onEditorLoaded(editorapplet)
{
//editorapplet.setHTMLData("http://","<p>Some <b>bold</b> Text</p>");
editorapplet.setHTMLData("http://",window.opener.formObj.value);
};
// This callback function is called after the applet has successfully finished loading HTML dat
function onDataLoaded(editorapplet)
{
//editorapplet.insertHTMLData("http://","<p>Some more <b>bold</b> Text</p>");
};
</SCRIPT>
</HEAD>
<BODY bgcolor="#EEEEEE">
<form>
<APPLET code="EditorApplet" codeBase="./eopro/" id="myEditor" name="myEditor"
archive="edit-on-pro-signed.jar,ssce.jar" width="700" height="400" VIEWASTEXT MAYSCRIPT>
<PARAM NAME="cabbase" VALUE="edit-on-pro-signed.cab,ssce.cab">
<PARAM NAME="locale" VALUE="en_US"> <!-- Change this to change UI language e.g de_DE, fr_FR, es_ES -->
<PARAM NAME="help" VALUE="eophelp/en_US/help_en_US.htm"> <!-- This is relative to CODEBASE, can be changed according to UI language -->
<PARAM NAME="toolbarurl" VALUE="toolbar-sample.xml"> <!-- This is relative to CODEBASE -->
<PARAM NAME="spellcheckproperties" VALUE="sc-americanenglish.txt"> <!-- This is relative to CODEBASE -->
<!-- <PARAM NAME="imageroot" VALUE="http://localhost"> Optional - Set this to the reference base of relative image SRCs -->
<!-- <PARAM NAME="imageproxyurl" VALUE="/cgi-bin/imageproxy.cgi?"> Optional - Set this if you use an unsigned CAB/JAR and want to insert remote images-->
<PARAM NAME="sourceview" VALUE="true">
<PARAM NAME="sourceviewwordwrap" VALUE="true">
<PARAM NAME="startupscreenbackgroundcolor" value="#EEEEEE">
<PARAM NAME="defaultfontcolor" VALUE="black">
<PARAM NAME="defaultbackgroundcolor" VALUE="white">
<PARAM NAME="defaultlinkcolor" VALUE="blue">
<PARAM NAME="defaultfontsize" VALUE="10">
<PARAM NAME="defaultfontface" VALUE="Serif">
<PARAM NAME="bodyonly" VALUE="true">
<PARAM NAME="textmode" VALUE="false">
<PARAM NAME="xhtmlmode" VALUE="true">
<PARAM NAME="inserttext_html" VALUE="TRUE">
<PARAM NAME="gethtmldataurl" VALUE=""> <!-- Absolute URL or relative to DOCBASE -->
<PARAM NAME="sethtmldataurl" VALUE=""> <!-- Absolute URL or relative to DOCBASE -->
<PARAM NAME="simpletable" VALUE="true">
<PARAM NAME="tableNBSPfill" VALUE="true">
<PARAM NAME="table_numrows" VALUE="3">
<PARAM NAME="table_numcols" VALUE="4">
<PARAM NAME="table_overallwidth" VALUE="100%">
<PARAM NAME="table_rowheight" VALUE="10">
<PARAM NAME="table_colwidth" VALUE="25%">
<PARAM NAME="ONEDITORLOADED" VALUE="onEditorLoaded">
<PARAM NAME="ONDATALOADED" VALUE="onDataLoaded">
</APPLET>
<input type="button" value="Done Editing" onClick="functGet()"></form>
</BODY>
</HTML>