Added Real Objects Edit-On Pro integration.
This commit is contained in:
parent
0d32a1b901
commit
03599c4e83
16 changed files with 259 additions and 15 deletions
|
|
@ -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 ] )
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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/\</\<\;/g;
|
||||
$value =~ s/\>/\>\;/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.
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::Default;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "Default";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::LeftColumn;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "LeftColumn";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::News;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "News";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::OneOverThree;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "OneOverThree";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::RightColumn;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "RightColumn";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::SideBySide;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "SideBySide";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package WebGUI::Template::ThreeOverOne;
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# NOTICE: Use of this subsystem is depricated and is not recommended.
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
||||
|
||||
our $namespace = "ThreeOverOne";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue