Location: PHPKode > projects > AModules3 > amodules-3.0.1/samples/09-inline-edit/main.php
<?php
/*
 * Created on 23.05.2006 by *Camper*
 */
include '../../trunk/loader.php';

class IESample extends ApiAdmin{
	public $logger;
	
	function init(){
		parent::init();
		$this->dbConnect();
		$this->logger=$this->add('Logger');

		$this->template->del('Content');
		$this->template->del('Locator');
		$this->template->del('Menu');
		$this->template->del('LeftSidebar');
		$this->template->del('RightSidebar');
		$this->template->del('InfoWindow');
	}
	function page_Index($p){
		$p->api->frame('RightSidebar', 'About', null, 'width=300')->add('Text', null, 'content')
			->set("<p>This is inline edit sample</p><p>This sample shows:</p>" .
					"<p>1. Inline appearing: click on a field to see this wonder</p>" .
					"<p>2. Inline hiding: click on another row inline or on expander</p>" .
					"<p>3. Inline submit: change a value in the field and click OK</p>" .
					"<p>4. Quick column edit: after value changing press TAB instead of ok button</p>");
		$grid=$p->add('Grid', null, 'Content');
		$grid
			->addColumn('text', 'name', 'Name (Simple text)')
			->addColumn('expander', 'extends', 'Extends (expander)')
			->addColumn('inline', 'declaration', 'Declaration (inline)')
			->addColumn('inline', 'type', 'Type (inline)')
			->addColumn('inline', 'line', 'Line (inline)')
			
			->setSource('table1')
		;
		$grid->tab_aware=true;
		$paginator=$grid->add('Paginator', null, 'paginator');
	}
	function page_Index_extends($p){
		$p->add('Text', null, 'Content')->set('Here should be a content of expander');
	}
}
$api=new IESample('ie_sample');
$api->main();
Return current item: AModules3