Commit 55a8fead authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove block height option introduced in 688a5063; handled better by tinymce...

Remove block height option introduced in 688a5063

; handled better by tinymce autoresize (see bug #530656)
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 8bf60130
......@@ -72,16 +72,12 @@ class PluginBlocktypeTextbox extends SystemBlocktype {
public static function instance_config_form($instance) {
$configdata = $instance->get('configdata');
if (!$height = get_config('blockeditorheight')) {
$cfheight = param_integer('cfheight', 0);
$height = $cfheight ? $cfheight * 0.7 : 150;
}
return array(
'text' => array(
'type' => 'wysiwyg',
'title' => get_string('blockcontent', 'blocktype.textbox'),
'width' => '100%',
'height' => $height . 'px',
'height' => '150px',
'defaultvalue' => isset($configdata['text']) ? $configdata['text'] : '',
),
);
......
......@@ -295,11 +295,6 @@ function ViewManager() {
var contentDiv = getFirstElementByTagAndClassName('div', 'blockinstance-content', blockinstance);
var pd = {'id': $('viewid').value, 'change': 1};
if (config.blockeditormaxwidth) {
// Shouldn't have to pass browser window dimensions here, but can't find
// another way to get tinymce elements to use up the available height.
pd['cfheight'] = getViewportDimensions().h - 100;
}
pd[getNodeAttribute(button, 'name')] = 1;
var oldContent = contentDiv.innerHTML;
......@@ -389,7 +384,6 @@ function ViewManager() {
var w = Math.max(d.w, 500);
if (config.blockeditormaxwidth && getFirstElementByTagAndClassName('textarea', 'wysiwyg', newblock)) {
w = vpdim.w - 80;
style.height = h;
}
var tborder = parseFloat(getStyle(newblock, 'border-top-width'));
......@@ -1026,9 +1020,6 @@ function ViewManager() {
'change': 1,
'blocktype': getFirstElementByTagAndClassName('input', 'blocktype-radio', self.currentlyMovingObject).value
};
if (config.blockeditormaxwidth) {
pd['cfheight'] = getViewportDimensions().h - 100;
}
pd['action_addblocktype_column_' + whereTo['column'] + '_order_' + whereTo['order']] = true;
sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', pd, 'POST', function(data) {
var div = DIV();
......
......@@ -226,14 +226,10 @@ $cfg->leapovermnetloglevel = 0;
// This should normally be set to http://www.gravatar.com/avatar/
//$cfg->remoteavatarbaseurl = 'http://www.gravatar.com/avatar/';
// Options for width/height of wysiwyg editor in block configuration
// Option for width of wysiwyg editor in block configuration
// forms. Workaround for current lack of tinymce fullscreen button.
//
// Make the block config form expand to the full width of browser window
// whenever it contains a tinymce (also increases editor height in
// textbox blocktype):
// $cfg->blockeditormaxwidth = true;
//
// Set a fixed height in pixels for the tinymce editor (currently only
// affects the textbox blocktype):
// $cfg->blockeditorheight = 550;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment