Annotation of /mambo/branches/4.6/administrator/components/com_languages/toolbar.languages.php
Parent Directory
|
Revision Log
Revision 149 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: toolbar.languages.php,v 1.1 2005/07/22 01:52:34 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Languages | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | csouza | 149 | class ToolBar |
| 12 : | { | ||
| 13 : | |||
| 14 : | var $map = array(); | ||
| 15 : | var $name = null; | ||
| 16 : | var $request = null; | ||
| 17 : | |||
| 18 : | 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 : | root | 1 | |
| 34 : | |||
| 35 : | |||
| 36 : | csouza | 149 | class languagesToolbar extends ToolBar { |
| 37 : | |||
| 38 : | var $map = array('new' => 'edit'); | ||
| 39 : | |||
| 40 : | function edit() { | ||
| 41 : | mosMenuBar::startTable(); | ||
| 42 : | 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 : | root | 1 | |
| 66 : | csouza | 149 | $toolbar = new languagesToolbar('languages'); |
| 67 : | $toolbar->display(); | ||
| 68 : | |||
| 69 : | root | 1 | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

