From cd1f5f557fd007461f292de5a0cfbfe371ff1b4c Mon Sep 17 00:00:00 2001 From: avl Date: Thu, 2 Oct 2008 17:20:16 +0300 Subject: [PATCH] Fix HTML Editor Multiple Instance --- ipf/admin/media/css/changelists.css | 3 +- ipf/admin/model.php | 2 +- ipf/admin/templates/admin/items.html | 32 ++++++++++++++++- ipf/form/widget/htmlinput.php | 54 ++++++++++++++++------------ 4 files changed, 64 insertions(+), 27 deletions(-) diff --git a/ipf/admin/media/css/changelists.css b/ipf/admin/media/css/changelists.css index e8e51fa..8d57e55 100644 --- a/ipf/admin/media/css/changelists.css +++ b/ipf/admin/media/css/changelists.css @@ -1,5 +1,4 @@ -#changelist { position:relative; width:100%;} -#changelist table { width:100%; } +#changelist { position:relative;} .change-list .filtered table { border-right:1px solid #ddd; } .change-list .filtered { min-height:400px; _height:400px; } .change-list .filtered { background:white url(../img/changelist-bg.gif) top right repeat-y !important; } diff --git a/ipf/admin/model.php b/ipf/admin/model.php index c4c7db8..a2f0b14 100644 --- a/ipf/admin/model.php +++ b/ipf/admin/model.php @@ -256,7 +256,7 @@ class IPF_Admin_Model{ $this->ListItemsQuery(); $this->ListItemsHeader(); - $currentPage = (int)$request->GET['page']; + $currentPage = (int)@$request->GET['page']; $pager = new IPF_ORM_Pager_LayoutArrows( new IPF_ORM_Pager($this->q, $currentPage, $this->perPage), diff --git a/ipf/admin/templates/admin/items.html b/ipf/admin/templates/admin/items.html index e46722f..718b8c1 100644 --- a/ipf/admin/templates/admin/items.html +++ b/ipf/admin/templates/admin/items.html @@ -8,7 +8,24 @@

{$page_title}

-
+
+ + + +
@@ -30,8 +47,21 @@

{$pager->display()|safe} {$pager->getPager()->getNumResults()} {$classname}

+ + + + + + + + + + + + + {/block} diff --git a/ipf/form/widget/htmlinput.php b/ipf/form/widget/htmlinput.php index 1dffaba..10958c1 100644 --- a/ipf/form/widget/htmlinput.php +++ b/ipf/form/widget/htmlinput.php @@ -5,6 +5,8 @@ class IPF_Form_Widget_HTMLInput extends IPF_Form_Widget public $mode = 'textareas'; public $theme = 'simple'; public $include_tinymce = true; + + static $js_include = False; public function __construct($attrs=array()) { @@ -46,31 +48,37 @@ class IPF_Form_Widget_HTMLInput extends IPF_Form_Widget $final_attrs = $this->buildAttrs(array('name' => $name), $extra_attrs); // The special include for tinyMCE + $out = ''; - if ($this->include_tinymce) { - $out .= ''."\n"; + + if (!IPF_Form_Widget_HTMLInput::$js_include){ + IPF_Form_Widget_HTMLInput::$js_include = true; + $out .= ''."\n"; + $out .=''; + + } - $out .=''; + // buttons: code, separator pastetext, pasteword, //plugins : "inlinepopups, paste, table, fullscreen, preview, print, charmap, separator, ", -- 2.49.0