From: <cod...@go...> - 2009-05-27 16:47:50
|
Author: ke...@se... Date: Wed May 27 09:47:20 2009 New Revision: 1363 Modified: trunk/andro/lib/androLib.php trunk/andro/lib/androX6.php Log: Allow programmer to override details panes on conventional profiles for main table and also for children. Programmer creates function of this form. class x6table extends androX6 { function <table>_detail($divDetail) { $divInner = $divDetail->removeInner(); ....now code up a new detail } } Fixes issue 21 Status: verified Modified: trunk/andro/lib/androLib.php ============================================================================== --- trunk/andro/lib/androLib.php (original) +++ trunk/andro/lib/androLib.php Wed May 27 09:47:20 2009 @@ -3350,6 +3350,15 @@ } } + # KFD 5/27/09 Google #21 Part of allowing override of a detail pane + # is to build one normally, then let the user wipe it + # out and start over. + function removeInner() { + $this->children[1]->children = array(); + $this->children[1]->setHtml(''); + return $this->children[1]; + } + function makeComplete($table_id,$height,$parTable) { # The complete track is much more involved, adds # buttons and a status bar at bottom. Modified: trunk/andro/lib/androX6.php ============================================================================== --- trunk/andro/lib/androX6.php (original) +++ trunk/andro/lib/androX6.php Wed May 27 09:47:20 2009 @@ -1001,7 +1001,12 @@ $divDetail->ap['xTabSelector'] = $tabs->ul->hp['id']; $divDetail->ap['xTabIndex'] = 1; $divDetail->ap['x6profile'] = 'conventional'; - $detail->hp['x6objectFocusId'] = $divDetail->hp['id']; + $detail->hp['x6objectFocusId'] = $divDetail->hp['id']; + # KFD 5/27/09 Google #21 Allow user to override the detail + if(method_exists($this,$table_id.'_detail')) { + $method = $table_id.'_detail'; + $this->$method($divDetail); + } # The div kids is a tabbar of child tables. Notice that we # put nothing into them. They are loaded dynamically when @@ -1032,6 +1037,12 @@ if($info['x6childwrites']=='detail') { # Create the basic detail $modal = new androHTMLDetail($child,true,700,$table_id); + # KFD 5/27/09 Google #21 Allow user to override + if(method_exists($this,$child.'_detail')) { + $method = $child.'_detail'; + $this->$method($modal); + } + # Now see if we need to add buttons if(file_exists(fsDirtop()."application/x6$child.php")) { |