diff --git a/e107_admin/comment.php b/e107_admin/comment.php index b86eb463c..b4387e8bc 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $ -| $Revision: 1.16 $ -| $Date: 2009-11-09 12:23:45 $ +| $Revision: 1.17 $ +| $Date: 2009-11-09 16:54:30 $ | $Author: secretr $ +----------------------------------------------------------------------------+ */ @@ -82,7 +82,7 @@ class comments_admin_ui extends e_admin_ui 'comment_id' => array('title'=> LAN_ID, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE), 'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'width' => '5%'), 'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name - 'comment_comment' => array('title'=> "comment", 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name + 'comment_comment' => array('title'=> "comment", 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name 'comment_author_id' => array('title'=> "authorID", 'type' => 'user', 'data' => 'int', 'width' => 'auto'), // User id 'comment_author_name' => array('title'=> "authorName", 'type' => 'text', 'width' => 'auto'), // User name 'user_name' => array('title'=> "System user", 'type' => 'text', 'width' => 'auto', 'table' => 'user', 'noedit' => true), // User name diff --git a/e107_handlers/admin_handler.php b/e107_handlers/admin_handler.php index a49d64bf8..72ad5bb00 100644 --- a/e107_handlers/admin_handler.php +++ b/e107_handlers/admin_handler.php @@ -1945,7 +1945,7 @@ class e_admin_ui extends e_admin_controller_ui public function ListObserver() { $this->getTreeModel()->setParam('db_query', $this->_modifyListQry())->load(); - $this->addTitle('List'); + $this->addTitle('List'); // FIXME - get captions from dispatch list //var_dump($_POST, $this->getParam('enable_triggers')); } @@ -2043,6 +2043,26 @@ class e_admin_ui extends e_admin_controller_ui $this->CreateSubmitTrigger(); } + /** + * Edit - send JS to page Header + * @return + */ + function EditHeader() + { + // TODO - make it part of e_from::textarea/bbarea(), invoke it on className (not all textarea elements) + e107::getJs()->requireCoreLib('core/admin.js') + ->footerInline(" + \$\$('textarea').each(function(textarea) { + //auto options + var options = {}, autoopt = '__' + textarea.name + '_opt', autooptel = textarea.next('input[name=autoopt]'); + if(autooptel) { + options['max_length'] = parseInt(autooptel.value); + } + new e107Admin.Nicearea(textarea, options); + }); + "); + } + /** * Generic Edit page * @return string @@ -2094,6 +2114,26 @@ class e_admin_ui extends e_admin_controller_ui } + /** + * Create - send JS to page Header + * @return + */ + function CreateHeader() + { + // TODO - make it part of e_from::textarea/bbarea(), invoke it on className (not all textarea elements) + e107::getJs()->requireCoreLib('core/admin.js') + ->footerInline(" + \$\$('textarea').each(function(textarea) { + //auto options + var options = {}, autoopt = '__' + textarea.name + '_opt', autooptel = textarea.next('input[name=autoopt]'); + if(autooptel) { + options['max_length'] = parseInt(autooptel.value); + } + new e107Admin.Nicearea(textarea, options); + }); + "); + } + /** * * @return @@ -2765,7 +2805,7 @@ class e_admin_form_ui extends e_form 'head_query' => $request->buildQueryString('field=[FIELD]&asc=[ASC]&from=[FROM]', false), // without field, asc and from vars, REQUIRED 'np_query' => $request->buildQueryString(array(), false, 'from'), // without from var, REQUIRED for next/prev functionality 'legend' => $controller->getPluginTitle(), // hidden by default - 'form_pre' => $this->renderFilter($tp->post_toForm(array($controller->getQuery('searchquery'), $controller->getQuery('filter_options')), $controller->getMode().'/'.$controller->getAction())), // needs to be visible when a search returns nothing + 'form_pre' => $this->renderFilter($tp->post_toForm(array($controller->getQuery('searchquery'), $controller->getQuery('filter_options'))), $controller->getMode().'/'.$controller->getAction()), // needs to be visible when a search returns nothing 'form_post' => '', // markup to be added after closing form element 'fields' => $controller->getFields(), // see e_admin_ui::$fields 'fieldpref' => $controller->getFieldPref(), // see e_admin_ui::$fieldpref @@ -2790,9 +2830,6 @@ class e_admin_form_ui extends e_form } $l = explode('/', $location); - //FIXME - this data is incorrect and always returns 'main/xxxx'. - echo "Debug: LOCATION = ".$location; - $text = "