1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

More CustomPage fixes.

This commit is contained in:
CaMer0n 2012-08-11 11:15:05 +00:00
parent 7e0ccc3c7a
commit 7ef1ea179a
3 changed files with 23 additions and 10 deletions

View File

@ -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 .= "<li><a href='{$id}'>{$pageCap}</a></li>";
$text .= "<li><a href='{$id}' >{$pageCap}</a></li>";
$c++;
}
$text .= "</ul>";
@ -616,14 +621,17 @@ class page_admin_ui extends e_admin_ui
$text .= "<fieldset id='{$id}'>\n";
$text .= "<div>Title: ".$frm->text('page_subtitle['.$c.']', $titles[($c)], 250)."</div>\n";
$text .= $frm->bbarea($nm, $curval, $help_mod,$help_tagid,$size,$counter);
$text .= "</fieldset>";
// $text .= 'name='.$nm."<br />page=".$page."<br />help_mode=". $help_mod."<br />htlp_tagid=".$help_tagid."<br />size=".$size;
$c++;
}
$text .= "<button class='e-bb e-tabs-add' data-target='$name' data-url='".e_SELF."?mode=dialog&action=dialog&iframe=1' data-function='add' href='#' data-bbcode=''><span>New Page</span></button>";
$text .= "<input type='hidden' id='e-tab-count' value='".count($pages)."' />";
$text .= "<button class='e-bb e-tabs-add e-wysiwyg-add' data-url='".e_SELF."?mode=dialog&action=dialog&iframe=1' data-function='add' href='#' data-bbcode=''><span>New Page</span></button>";
return $text;
}

View File

@ -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);
}

View File

@ -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);