diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index feea27f0e..3bbdf099d 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -1,4 +1,5 @@
7.7.17
+ - fixed #10667: cannot change size of template editor
- fixed #10654: Story Archive: Search not working properly
- fixed #10692: Unprivileged users can stop spectre
- fixed search indexer concatenates keywords to content.
diff --git a/lib/WebGUI/Form/Codearea.pm b/lib/WebGUI/Form/Codearea.pm
index 24d329393..03577b148 100644
--- a/lib/WebGUI/Form/Codearea.pm
+++ b/lib/WebGUI/Form/Codearea.pm
@@ -133,40 +133,43 @@ Renders a code area field.
=cut
sub toHtml {
- my $self = shift;
- my $output = "";
-
- # Do our superclass's job
+ my $self = shift;
+ my ($style, $url, $stow) = $self->session->quick(qw(style url stow));
+
my $value = $self->fixMacros($self->fixTags($self->fixSpecialCharacters(scalar $self->getOriginalValue)));
- my $width = $self->get('width') || 400;
- my $height = $self->get('height') || 150;
- my ($style, $url) = $self->session->quick(qw(style url));
- my $styleAttribute = "width: ".$width."px; height: ".$height."px; ".$self->get("style");
- $style->setRawHeadTags(qq||);
- $output = '';
+ my $width = $self->get('width') || 400;
+ my $height = $self->get('height') || 150;
+ my $id = $self->get('id');
+ my $name = $self->get('name');
+ my $extras = $self->get('extras');
+ my $syntax = $self->get('syntax');
+ my $styleAttr = $self->get('style');
- # Vars for JS below
- my $id = $self->get( "id" );
- my $syntax = $self->get( "syntax" );
- my $editareaPath = $self->session->url->extras( 'editarea' );
-
- $self->session->style->setScript($editareaPath . '/edit_area/edit_area_full.js',{type=>"text/javascript"});
- $output .= qq~
-
- ~;
-
- return $output;
+ $style->setLink($url->extras("yui/build/resize/assets/skins/sam/resize.css"), {type=>"text/css", rel=>"stylesheet"});
+ $style->setScript($url->extras("yui/build/utilities/utilities.js"), {type=>"text/javascript"});
+ $style->setScript($url->extras("yui/build/resize/resize-min.js"), {type=>"text/javascript"});
+ $style->setScript($url->extras('editarea/edit_area/edit_area_full.js'), {type=>"text/javascript"});
+ my $out = <<"END_HTML";
+
+
+
+
+END_HTML
+ return $out;
}
-
1;
diff --git a/lib/WebGUI/Form/Textarea.pm b/lib/WebGUI/Form/Textarea.pm
index 5b9b647ee..3e25ff8fc 100644
--- a/lib/WebGUI/Form/Textarea.pm
+++ b/lib/WebGUI/Form/Textarea.pm
@@ -143,61 +143,44 @@ sub toHtml {
my $width = $self->get('width') || 400;
my $height = $self->get('height') || 150;
my ($style, $url, $stow) = $self->session->quick(qw(style url stow));
- my $out = ''
- ;
+ my $sizeStyle = ' width: ' . $width . 'px; height: ' . $height . 'px;';
+ my $out
+ = '';
- # Add the maxlength script
- $style->setScript(
- $url->extras( 'yui/build/yahoo-dom-event/yahoo-dom-event.js' ),
- { type => 'text/javascript' },
- );
- $style->setScript(
- $url->extras( 'yui-webgui/build/form/textarea.js' ),
- { type => 'text/javascript' },
- );
-
- # Make sure we load the css for this plugin only once per id.
- unless ( $stow->get( 'textareaStyleLoaded_' . $self->get('id') ) ) {
- my $styleAttribute = "width: ".$width."px; height: ".$height."px; ".$self->get("style");
- $style->setRawHeadTags(qq||);
- $stow->set( 'textareaStyleLoaded_' . $self->get('id'), 1 );
- }
- # Make sure we add the max length js only once for all texatareas.
- unless ( $stow->get( 'texareaHeadTagsLoaded' ) ) {
- $style->setRawHeadTags( q|
-
- | );
-
- $stow->set( 'texareaHeadTagsLoaded', 1 );
- }
-
- if ($self->get("resizable")) {
- $style->setLink($url->extras("resize.css"), {type=>"text/css", rel=>"stylesheet"});
- $style->setLink($url->extras("resize-skin.css"), {type=>"text/css", rel=>"stylesheet"});
+ if ($self->get("resizable")) {
+ $style->setLink($url->extras("yui/build/resize/assets/skins/sam/resize.css"), {type=>"text/css", rel=>"stylesheet"});
$style->setScript($url->extras("yui/build/utilities/utilities.js"), {type=>"text/javascript"});
- $style->setScript($url->extras("yui/build/resize/resize.js"), {type=>"text/javascript"});
- $out = qq|
-
- $out
-
-
-
- |;
- }
- return $out;
+ $style->setScript($url->extras("yui/build/resize/resize-min.js"), {type=>"text/javascript"});
+ $out = sprintf <<'END_HTML', $self->get('id'), $out, $sizeStyle;
+%2$s
+
+END_HTML
+ }
+ elsif ($self->get('maxlength')) {
+ $style->setScript(
+ $url->extras( 'yui/build/yahoo-dom-event/yahoo-dom-event.js' ),
+ { type => 'text/javascript' },
+ );
+ }
+ if ($self->get('maxlength')) {
+ # Add the maxlength script
+ $style->setScript(
+ $url->extras( 'yui-webgui/build/form/textarea.js' ),
+ { type => 'text/javascript' },
+ );
+ }
+ return $out;
}
#-------------------------------------------------------------------
diff --git a/www/extras/layout_sprite.png b/www/extras/layout_sprite.png
deleted file mode 100644
index d6fce3c7a..000000000
Binary files a/www/extras/layout_sprite.png and /dev/null differ
diff --git a/www/extras/resize-skin.css b/www/extras/resize-skin.css
deleted file mode 100644
index 860a57092..000000000
--- a/www/extras/resize-skin.css
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-Copyright (c) 2008, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.5.0
-*/
-/* Give the handle a background color */
-.yui-resize .yui-resize-handle {
- /*background-color: #0000FF;*/
-}
-/* Give the active handle a different color */
-.yui-resize .yui-resize-handle-active {
- background-color: #7D98B8;
- zoom: 1;
-}
-/* Give a border to the 8-way knob style handles */
-.yui-resize-knob .yui-resize-handle {
- border: 1px solid #808080;
-}
-/* Show the active handle when hovered */
-.yui-resize-hover .yui-resize-handle-active {
- opacity: 1;
- filter: alpha(opacity=100);
-}
-
-/* Style the resize proxy */
-.yui-resize-proxy {
- border: 1px dashed #426FD9;
-}
-
-/* Style the status box similar to a tooltip */
-.yui-resize-status {
- border: 1px solid #A6982B;
- border-top: 1px solid #D4C237;
- background-color: #FFEE69
-}
-
-
-/* Style the content of the status box */
-.yui-resize-status strong, .yui-resize-status em {
- float: left;
- display: block;
- clear: both;
- padding: 1px;
- text-align: center;
-}
-
-/* Setup the gripper */
-.yui-resize .yui-resize-handle-inner-r,
-.yui-resize .yui-resize-handle-inner-l {
- background: transparent url( layout_sprite.png) no-repeat 0 -5px;
- height: 16px;
- width: 5px;
- position: absolute;
- top: 45%;
-}
-
-/* Setup the gripper */
-.yui-resize .yui-resize-handle-inner-t,
-.yui-resize .yui-resize-handle-inner-b {
- background: transparent url(layout_sprite.png) no-repeat -20px 0;
- height: 5px;
- width: 16px;
- position: absolute;
- left: 50%;
-}
-
-/* Bottom Right Gripper */
-.yui-resize .yui-resize-handle-br {
- background-image: url( layout_sprite.png );
- background-repeat: no-repeat;
- background-position: -22px -62px;
-}
-
-/* Top Right Gripper */
-.yui-resize .yui-resize-handle-tr {
- background-image: url( layout_sprite.png );
- background-repeat: no-repeat;
- background-position: -22px -42px;
-}
-
-/* Top Left Gripper */
-.yui-resize .yui-resize-handle-tl {
- background-image: url( layout_sprite.png );
- background-repeat: no-repeat;
- background-position: -22px -82px;
-}
-
-/* Bottom Left Gripper */
-.yui-resize .yui-resize-handle-bl {
- background-image: url( layout_sprite.png );
- background-repeat: no-repeat;
- background-position: -22px -23px;
-}
-
-/* Remove the background image from the 8-way knobs */
-.yui-resize-knob .yui-resize-handle-t,
-.yui-resize-knob .yui-resize-handle-r,
-.yui-resize-knob .yui-resize-handle-b,
-.yui-resize-knob .yui-resize-handle-l,
-.yui-resize-knob .yui-resize-handle-tl,
-.yui-resize-knob .yui-resize-handle-tr,
-.yui-resize-knob .yui-resize-handle-bl,
-.yui-resize-knob .yui-resize-handle-br,
-.yui-resize-knob .yui-resize-handle-inner-t,
-.yui-resize-knob .yui-resize-handle-inner-r,
-.yui-resize-knob .yui-resize-handle-inner-b,
-.yui-resize-knob .yui-resize-handle-inner-l,
-.yui-resize-knob .yui-resize-handle-inner-tl,
-.yui-resize-knob .yui-resize-handle-inner-tr,
-.yui-resize-knob .yui-resize-handle-inner-bl,
-.yui-resize-knob .yui-resize-handle-inner-br {
- background-image: none;
-}
diff --git a/www/extras/resize.css b/www/extras/resize.css
deleted file mode 100644
index 0ac44cbf3..000000000
--- a/www/extras/resize.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-Copyright (c) 2008, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.5.0
-*/
-.yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-resize .yui-resize-handle{background-color:#F2F2F2;}.yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-resize-proxy{border:1px dashed #426FD9;}.yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69}.yui-resize-status strong,.yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-resize .yui-resize-handle-inner-r,.yui-resize .yui-resize-handle-inner-l{background:transparent url( layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-resize .yui-resize-handle-inner-t,.yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-resize .yui-resize-handle-br{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -62px;}.yui-resize .yui-resize-handle-tr{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -42px;}.yui-resize .yui-resize-handle-tl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -82px;}.yui-resize .yui-resize-handle-bl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -23px;}.yui-resize-knob .yui-resize-handle-t,.yui-resize-knob .yui-resize-handle-r,.yui-resize-knob .yui-resize-handle-b,.yui-resize-knob .yui-resize-handle-l,.yui-resize-knob .yui-resize-handle-tl,.yui-resize-knob .yui-resize-handle-tr,.yui-resize-knob .yui-resize-handle-bl,.yui-resize-knob .yui-resize-handle-br,.yui-resize-knob .yui-resize-handle-inner-t,.yui-resize-knob .yui-resize-handle-inner-r,.yui-resize-knob .yui-resize-handle-inner-b,.yui-resize-knob .yui-resize-handle-inner-l,.yui-resize-knob .yui-resize-handle-inner-tl,.yui-resize-knob .yui-resize-handle-inner-tr,.yui-resize-knob .yui-resize-handle-inner-bl,.yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}
diff --git a/www/extras/yui-webgui/build/form/textarea.js b/www/extras/yui-webgui/build/form/textarea.js
index e90035696..8e8194b93 100644
--- a/www/extras/yui-webgui/build/form/textarea.js
+++ b/www/extras/yui-webgui/build/form/textarea.js
@@ -36,4 +36,5 @@ WebGUI.Form.Textarea.setMaxLength
}
}
+YAHOO.util.Event.onDOMReady( function () { WebGUI.Form.Textarea.setMaxLength() } );