1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Admin Custom-Pages "new page" bugfix.

This commit is contained in:
CaMer0n 2012-07-22 11:14:29 +00:00
parent c99343955e
commit 384b123475
3 changed files with 14 additions and 6 deletions

View File

@ -109,7 +109,6 @@ else
*/
class page_admin extends e_admin_dispatcher
{
@ -223,6 +222,13 @@ class page_admin_ui extends e_admin_ui
function init()
{
if(varset($_GET['mode'])=='dialog' && varset($_GET['action'])=='dialog') // New Page bbcode in tabs.
{
$this->dialogPage();
}
if($this->getQuery('iframe') == 1)
{
@ -284,10 +290,11 @@ class page_admin_ui extends e_admin_ui
function dialogPage() // FIXME - remove table-rendering when using 'return' ??
{
$count = varset($_GET['count']);
$frm = e107::getForm();
$text .= "<fieldset id='e-tab-empty'>\n";
$text .= "<div>Title: ".$frm->text('page_subtitle[]', '', 250)."</div>\n";
$text .= $frm->bbarea('data[]', '', 'page','help','large');
$text .= $frm->bbarea('data_'.intval($count), '', 'page','help','large');
$text .= "</fieldset>";
echo $text;
exit;
@ -720,7 +727,7 @@ class page_admin_ui extends e_admin_ui
// return;
}
// echo $newData;
$page_text = $tp->toDB($newData);

View File

@ -57,8 +57,9 @@ class bbcode_shortcodes extends e_shortcode
function bb_newpage($id)
{
// $data = "[table]\n[tr]\n\t[td]Cell 1[/td]\n\t[td]Cell 2[/td]\n[/tr]\n[/table]"; // works with jquery, but not onclick.
$data = "[newpage]";
$event = $this->getEvent('addtext',$data,LANHELP_34,1);
// $data = "[newpage]";
// $event = $this->getEvent('addtext',$data,LANHELP_34,1);
$event = '';
$text = "<a {$event} class='e-bb e-tabs-add' id='{$id}' data-url='".e_SELF."?mode=dialog&action=dialog&iframe=1' data-function='add' href='#{$this->var['tagid']}' data-bbcode='{$data}'>";
$text .= "<img class='bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/newpage.png' alt='' title='".LANHELP_34."' /></a>";
return $text;

View File

@ -142,7 +142,7 @@ $(document).ready(function()
// alert(count);
//return false;
if($("#tab-container").tabs("add",url + '?iframe=1',"Page "+count))
if($("#tab-container").tabs("add",url +'&count='+count,"Page "+count))
{
$("#e-tab-count").val(count);
}