tinymce bug fixes and a new function in Utility.pm
This commit is contained in:
parent
7578859801
commit
873ce1c62e
42 changed files with 449 additions and 194 deletions
|
|
@ -168,6 +168,7 @@ sub getOperations {
|
|||
'moveTreePageDown' => 'WebGUI::Operation::Page',
|
||||
'moveTreePageLeft' => 'WebGUI::Operation::Page',
|
||||
'moveTreePageRight' => 'WebGUI::Operation::Page',
|
||||
'richEditPageTree' => 'WebGUI::Operation::Page',
|
||||
'editProfile' => 'WebGUI::Operation::Profile',
|
||||
'editProfileSave' => 'WebGUI::Operation::Profile',
|
||||
'viewProfile' => 'WebGUI::Operation::Profile',
|
||||
|
|
|
|||
|
|
@ -493,13 +493,12 @@ sub _htmlAreaCreateTree {
|
|||
my ($name, $description, $url, $image, $indent, $target, $delete) = @_;
|
||||
if($delete) {
|
||||
$delete = qq/<a href="javascript:deleteCollateral('$delete')" title="delete $name">/;
|
||||
$delete .= '<img align="bottom" border="0" src="'.$session{config}{extrasURL}.
|
||||
'/toolbar/default/delete.gif" width="16" heigth="17"></a>';
|
||||
$delete .= deleteIcon()."</a>";
|
||||
}
|
||||
$target = ' target="'.$target.'" ' if ($target);
|
||||
$output .= '<tr><td align="left" valign="bottom" width="100%">';
|
||||
$output .= ('<img src="'.$session{config}{extrasURL}.'/htmlArea/images/indent.gif" width="17" heigth="17">') x$indent;
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/htmlArea/images/'.$image.'" align="bottom" alt="'.$name.'">';
|
||||
$output .= ('<img src="'.$session{config}{extrasURL}.'/tinymce/images/indent.gif" width="17" heigth="17">') x$indent;
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/tinymce/images/'.$image.'" align="bottom" alt="'.$name.'">';
|
||||
$output .= '<a title="'.$description.'" href="'.$url.'" '.$target.'><b>'.$name.'</b></a></td>';
|
||||
$output .= '<td class="delete" align="right" valign="bottom">'.$delete.'</td></tr>';
|
||||
return $output;
|
||||
|
|
@ -566,7 +565,7 @@ sub www_htmlAreaviewCollateral {
|
|||
$output .= '<table align="center" border="0" cellspacing="0" cellpadding="2" width="100%" height="100%">';
|
||||
if($session{form}{cid} eq "" || ! WebGUI::Grouping::isInGroup(4)) {
|
||||
$output .= '<tr><td align="center" valign="middle" width="100%" height="100%">';
|
||||
$output .= '<p align="center"><br><img src="'.$session{config}{extrasURL}.'/htmlArea/images/icon.gif"
|
||||
$output .= '<p align="center"><br><img src="'.$session{config}{extrasURL}.'/tinymce/images/icon.gif"
|
||||
border="0"></p>';
|
||||
$output .= '<P align=center><STRONG>WebGUI Image Manager<BR>for TinyMCE</STRONG></P>';
|
||||
$output .= '</td></tr></table>';
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use strict;
|
|||
use Tie::IxHash;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomizeArray
|
||||
our @EXPORT = qw(&isBetween &makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomizeArray
|
||||
&sortHashDescending &sortHash &isIn &makeCommaSafe &makeArrayCommaSafe &randint &round);
|
||||
|
||||
|
||||
|
|
@ -75,6 +75,41 @@ sub commify {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 isBetween ( value, first, second )
|
||||
|
||||
Returns true if value is between two other values (inclusive). Otherwise returns false.
|
||||
|
||||
=head3 value
|
||||
|
||||
An integer to compare against first and second.
|
||||
|
||||
=head3 first
|
||||
|
||||
An integer to compare value against.
|
||||
|
||||
=head3 second
|
||||
|
||||
Another integer to compare value against.
|
||||
|
||||
=cut
|
||||
|
||||
sub isBetween {
|
||||
my $value = shift;
|
||||
my $first = shift;
|
||||
my $second = shift;
|
||||
if ($first > $second) {
|
||||
my $temp = $first;
|
||||
$first = $second;
|
||||
$second = $temp;
|
||||
}
|
||||
if ($value >= $first && $value <= $second) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 isIn ( value, list )
|
||||
|
||||
Returns a boolean value as to whether the value is in the array.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue