From 7ef1ea179a8e58ca5c9251cdc087f7a91475ed75 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sat, 11 Aug 2012 11:15:05 +0000 Subject: [PATCH] More CustomPage fixes. --- e107_admin/cpage.php | 14 +++++++++++--- e107_files/jslib/core/all.jquery.js | 6 ++++-- e107_handlers/form_handler.php | 13 ++++++++----- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 112f40a4d..1257103d8 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -27,6 +27,11 @@ require_once('../class2.php'); if (!getperms("5|J")) { header('location:'.e_ADMIN.'admin.php'); exit; } +e107::css('inline'," + +.e-wysiwyg { height: 400px } +"); + include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); $e_sub_cat = 'custom'; @@ -603,7 +608,7 @@ class page_admin_ui extends e_admin_ui $id = "#page_".$c; $pageCap = "Page ".($c); - $text .= "
  • {$pageCap}
  • "; + $text .= "
  • {$pageCap}
  • "; $c++; } $text .= ""; @@ -616,14 +621,17 @@ class page_admin_ui extends e_admin_ui $text .= "
    \n"; $text .= "
    Title: ".$frm->text('page_subtitle['.$c.']', $titles[($c)], 250)."
    \n"; $text .= $frm->bbarea($nm, $curval, $help_mod,$help_tagid,$size,$counter); + $text .= "
    "; + // $text .= 'name='.$nm."
    page=".$page."
    help_mode=". $help_mod."
    htlp_tagid=".$help_tagid."
    size=".$size; $c++; } - + + $text .= ""; + $text .= ""; - $text .= ""; return $text; } diff --git a/e107_files/jslib/core/all.jquery.js b/e107_files/jslib/core/all.jquery.js index be66d4b38..c051bd477 100644 --- a/e107_files/jslib/core/all.jquery.js +++ b/e107_files/jslib/core/all.jquery.js @@ -136,14 +136,16 @@ $(document).ready(function() $( ".e-tabs" ).tabs(); }); + $('.e-tabs-add').on("click", function(){ var url = $(this).attr('data-url'); - var count = parseInt($("#e-tab-count").val()) + 1; - + var ct = parseInt($("#e-tab-count").val()); + var count = ct + 1; // alert(count); //return false; if($("#tab-container").tabs("add",url +'&count='+count,"Page "+count)) { + $("#tab-container").tabs('select', ct); $("#e-tab-count").val(count); } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index a431392be..2d5c30490 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -707,18 +707,21 @@ class e_form //width should be explicit set by current admin theme switch($size) { - case 'medium': - $rows = '10'; - break; - case 'small': $rows = '7'; + $height = "style='height:250px'"; // inline required for wysiwyg + break; + + case 'medium': + $rows = '10'; + $height = "style='height:375px'"; // inline required for wysiwyg break; case 'large': default: $rows = '15'; $size = 'large'; + $height = "style='height:500px'"; // inline required for wysiwyg break; } @@ -728,7 +731,7 @@ class e_form $help_tagid = $this->name2id($name)."--preview"; - $options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; + $options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' {$height}"; $counter = vartrue($options['counter'],false);