Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Romans Malinovskis committed May 19, 2012
1 parent 8516337 commit f6ff496
Show file tree
Hide file tree
Showing 12 changed files with 3,698 additions and 12 deletions.
2 changes: 1 addition & 1 deletion atk4
Submodule atk4 updated 326 files
2 changes: 2 additions & 0 deletions lib/Inspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function initButtons(){
function showChildren($sorc,$dest){
foreach($sorc->elements as $key=>$obj){
if($obj instanceof jQuery_Chain)continue;
if(!is_object($obj))continue;
$node=$dest->add('TreeNode')->useObject($obj);
if($obj->elements)$this->showChildren($obj,$node);
}
Expand All @@ -68,6 +69,7 @@ function defaultTemplate(){
}
class TreeNode extends View {
function useObject($obj){
if(!is_object($obj))throw $this->exception('not object');
$this->template->set('name',$obj->name);
$this->template->set('class',get_class($obj));
if($obj instanceof Page){
Expand Down
18 changes: 18 additions & 0 deletions page/myformat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
class page_myformat extends Page {
function init(){
parent::init();
$this->api->dbConnect();
$m=$this->add('Model_Employee');
$m->getField('salary')->display(array('grid'=>'myfield'));
$this->add('MVCGrid')->setModel($m);
}
}

if(!class_exists('Grid',false)){
class Grid extends Grid_Basic {
function format_myfield($field){
$this->current_row[$field]='CUSTOM FORMAT';
}
}
}
2 changes: 2 additions & 0 deletions page/salesphotos.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ function init(){
}
class Model_Sections extends SomeModel {
}
if(!class_exists('Grid',false)){
class Grid extends Grid_Basic {
function format_referenece(){
}
}
}
Loading

0 comments on commit f6ff496

Please sign in to comment.