What is coming up or was just introduced in Stable and Development version of Agile Toolkit/?> download, development version, stable version, changes, updates, changelog, recent changes/?>
Default Form template used to contain <?form_body?> tag. That's the place in the form.html template, where fields are located. It's now been renamed into standard <?Content?> tag making addition of other elements into form body much easier:
$f->add('H2')->set('appears after last field'); /?>Properly aligns not only the money, but also the title
$grid=$page->add('Grid'); $grid->addColumn('text','name'); $grid->addColumn('money','salary'); $grid->setStaticSource(array( array('name'=>'John','salary'=>'2000'), array('name'=>'Peter','salary'=>'4200'), array('name'=>'Minus','salary'=>'-200'), )); /?>Setting debug mode on DSQL object will output breakdown of parameters
$str=$page->api->db->dsql()->debug() ->table('foo') ->field('bar') ->where('x>',123) ->limit(10) ->select(); /?>Introducing new way of producing exception in Agile Toolkit. Calling exception() method will return object of the right exception class. For example calling $db->exception() will properly return database-related exceptino and might also include some object-related information, while exception generated in model, would generate validity exception.
Be sure to not include any variables into 1st argument to exception, this string will be localized. Instead specify relevant arguments by calling addMoreInfo() throw $this->exception('Something went wrong') ->addMoreInfo('niceinfo',$info); /?>
use 4nd argument of array('grid_stripped') to use this new template. Remember that you can always add your own templates to further ehance look of your objects.
$grid=$page->add('Grid',null,null,array('grid_striped')); $grid->addColumn('text','name'); $grid->addColumn('money','salary'); $grid->setStaticSource(array( array('name'=>'John','salary'=>'2000'), array('name'=>'Peter','salary'=>'4200'), array('name'=>'Minus','salary'=>'-200'), )); /?>use 4nd argument of array('grid_stripped') to use this new template. Remember that you can always add your own templates to further ehance look of your objects.
$form=$page->add('Form'); $form->addField('autocomplete','test') ->setValueList( array('John','Peter','Jane')); /?>By default your Agile Toolkit application uses full width of the screen. If you want to have true 960gs, then you should add the following to your Api's init() method.
$this->template->del('fullscreen'); /?>To change format, add $config['locale']['timestamp']='Y-m-d'; or $config['locale']['datetime'].
$grid=$page->add('Grid'); $grid->addColumn('timestamp','ts'); $grid->addColumn('datetime','dt'); $grid->setStaticSource(array( array('ts'=>date('Y/m/d'),'dt'=>date('Y/m/d')), )); /?>Many components rely on Grid component. Often a developer would want to make system-wide changes to the Grid component. Push mechanism allows for all the components to use the new version. Push is implementing by redefining "Grid" class. By default it's defined like this:
class Grid extends Grid_Basic{} /?>All of the documentation, addons and user code must use "Grid" and not "Grid_Basic". This allows you to define this class locally inside your lib/Grid.php and redefine some of the methods there.
You can use <?_link?> or any other field tag as a template for "link" column, in setTemplate().
$grid=$page->add('Grid'); $grid->addColumn('text','name'); $grid->addColumn('link','details'); $grid->addColumn('link','proflie') ->setTemplate('xx'); $grid->setStaticSource(array( array('id'=>1,'name'=>'John', 'details'=>'John Details'), array('id'=>2,'name'=>'Peter', 'details'=>'Peter Details'), )); /?>This menu operates entirely on templates.
// Regular $menu=$page->add('Menu'); $menu->addMenuItem('hello'); $menu->addMenuItem('world'); // Lightweight $menu=$page->add('Menu_Light',null,null,array('mymenu')); // items are defined in mymenu.html /?>Look into your index.php file. It might still be using "jui" theme. We suggest to remove argument alltogether or set to "elephant" for the older look of Agile Toolkit. $api=new Frontend('myapp'); $api->main(); /?>