Diff of /mambo/branches/4.6/administrator/components/com_languages/toolbar.languages.php
Parent Directory
|
Revision Log
|
Patch
| revision 148, Thu Jan 19 10:54:19 2006 UTC | revision 149, Thu Jan 19 13:29:35 2006 UTC | |
|---|---|---|
| # | Line 8 | Line 8 |
| 8 | * Mambo is Free Software | * Mambo is Free Software |
| 9 | */ | */ |
| 10 | ||
| 11 | /** ensure this file is being included by a parent file */ | class ToolBar |
| 12 | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | { |
| 13 | ||
| 14 | require_once( $mainframe->getPath( 'toolbar_html' ) ); | var $map = array(); |
| 15 | var $name = null; | |
| 16 | var $request = null; | |
| 17 | ||
| 18 | switch ($task) { | function ToolBar() |
| 19 | { | |
| 20 | $this->request = $_REQUEST; | |
| 21 | } | |
| 22 | function display($method = null) | |
| 23 | { | |
| 24 | $task = isset($this->request['task']) ? $this->request['task'] : '_default'; | |
| 25 | if (is_null($method))$method = $task; | |
| 26 | if (in_array($method, array_keys($this->map)))$method = $this->map[$method]; | |
| 27 | if ($method && strlen($method) > 2 && method_exists($this, $method)) | |
| 28 | return $this->$method(); | |
| 29 | return false; | |
| 30 | } | |
| 31 | function _default(){} | |
| 32 | } | |
| 33 | ||
| 34 | ||
| 35 | ||
| 36 | class languagesToolbar extends ToolBar { | |
| 37 | ||
| 38 | case "edit_source": | var $map = array('new' => 'edit'); |
| TOOLBAR_languages::_EDIT_SOURCE(); | ||
| break; | ||
| 39 | ||
| 40 | default: | function edit() { |
| 41 | TOOLBAR_languages::_DEFAULT(); | mosMenuBar::startTable(); |
| 42 | break; | mosMenuBar::save( 'save' ); |
| 43 | mosMenuBar::spacer(); | |
| 44 | mosMenuBar::cancel(); | |
| 45 | mosMenuBar::spacer(); | |
| 46 | mosMenuBar::help( '453.screen.languages.edit' ); | |
| 47 | mosMenuBar::endTable(); | |
| 48 | } | } |
| 49 | ||
| 50 | function _default() | |
| 51 | { | |
| 52 | mosMenuBar::startTable(); | |
| 53 | mosMenuBar::publishList(); | |
| 54 | mosMenuBar::spacer(); | |
| 55 | mosMenuBar::addNew('extract'); | |
| 56 | mosMenuBar::spacer(); | |
| 57 | mosMenuBar::editListX( 'edit' ); | |
| 58 | mosMenuBar::spacer(); | |
| 59 | mosMenuBar::deleteList(); | |
| 60 | mosMenuBar::spacer(); | |
| 61 | mosMenuBar::help( '453.screen.languages.main' ); | |
| 62 | mosMenuBar::endTable(); | |
| 63 | } | |
| 64 | } | |
| 65 | ||
| 66 | $toolbar = new languagesToolbar('languages'); | |
| 67 | $toolbar->display(); | |
| 68 | ||
| 69 | ?> | ?> |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

