From: <ken...@us...> - 2009-01-28 19:42:03
|
Revision: 1169 http://andro.svn.sourceforge.net/andro/?rev=1169&view=rev Author: kendowns Date: 2009-01-28 19:42:00 +0000 (Wed, 28 Jan 2009) Log Message: ----------- three things 1) Hardcoded hack to only show 7 tabs in 'conventional' profile. This must be replaced with something that works better, but lets me go ahead with the one customer that has too many tabs. 2) Put the "x6exit" input onto all x6 pages. If you pass in &x6exit=Y, then when user hits ESC on the screen the window will close. 3) Modified HTML Form() command to put out enctype=multipart..., eventually to use for media uploads. Modified Paths: -------------- trunk/andro/lib/androX6.php Modified: trunk/andro/lib/androX6.php =================================================================== --- trunk/andro/lib/androX6.php 2009-01-28 19:40:07 UTC (rev 1168) +++ trunk/andro/lib/androX6.php 2009-01-28 19:42:00 UTC (rev 1169) @@ -36,6 +36,9 @@ # context from screen to screen. # $this->hld = aFromGp('hld_'); + + # If the x6exit variable was passed in, put it out + hidden('x6exit',gp('x6exit','N')); } # =================================================================== @@ -95,7 +98,7 @@ $row0 = aFromGP('x6v_'); $row1 = aFromgp('x6inp_'.$table_id.'_'); $row = array_merge($row0,$row1); - if(a($row,'skey',0)==0) unset($row['skey']); + if(arr($row,'skey',0)==0) unset($row['skey']); # KFD 12/20/08, prevent ui saves if dd does not allow them if(!isset($row['skey'])) { @@ -111,8 +114,15 @@ x6Error("Updates not allowed from this screen"); return; } - } + } + + # Add in values from parent + if(gp('tableIdPar',false)) { + $vals2 = $this->fetchParent(); + $row = array_merge($row,$vals2); + } + # KFD 12/8/08, More generalized code to allow for # inserts before or after a row. # @@ -306,12 +316,7 @@ $vals2 = array(); } else { - $ddpar = ddTable(gp('tableIdPar')); - $pks = $ddpar['pks']; - $stab = ddView(gp('tableIdPar')); - $skey = SQLFN(gp('skeyPar')); - $vals2 = SQL_OneRow("SELECT $pks FROM $stab WHERE skey = $skey"); - if(!$vals2) $vals2=array(); + $vals2 = $this->fetchParent(); $vals = array_merge($vals,$vals2); # KFD 12/27/08, if the sortdesc flag has been set on any @@ -619,7 +624,7 @@ foreach($dd['flat'] as $colname=>$colinfo) { if(strtolower($colinfo['automation_id'])=='queuepos') { $queuepos = $colname; - jqDocReady("u.bb.vgfSet('queuepos_$table_id','$colname')"); + jqDocReady("x6bb.fwSet('queuepos_$table_id','$colname')"); break; } } @@ -904,11 +909,17 @@ $tabKids = $detail->addTabs('kids_'.$table_id,$hempty,$options); $tabKids->ul->hp['xOffset'] = 2; $tab = $tabKids->addTab("Hide"); + $idx = 0; foreach($dd['fk_children'] as $child=>$info) { - # KFD 1/2/08. If x6display is 'none', skip it + # KFD 1/2/09. If x6display is 'none', skip it if(trim(arr($info,'x6display',''))=='none') continue; - $top->addTableController($child); + # KFD 1/28/09, Hardcoded hack to limit entries. + # Will have to come out eventually. + if($idx++ > 6) continue; + + $tc = $top->addTableController($child); + $tc->hp['x6tablepar'] = $table_id; $tab = $tabKids->addTab($info['description']); $tab->ap['x6tablePar'] = $table_id; $tab->ap['x6table' ] = $child; @@ -1044,6 +1055,16 @@ } } + function fetchParent() { + $ddpar = ddTable(gp('tableIdPar')); + $pks = $ddpar['pks']; + $stab = ddView(gp('tableIdPar')); + $skey = SQLFN(gp('skeyPar')); + $vals2 = SQL_OneRow("SELECT $pks FROM $stab WHERE skey = $skey"); + if(!$vals2) $vals2=array(); + return $vals2; + } + # Makes a generic grid. First created 11/3/08 so we can add # cells to it for a browseFetch and then pluck out the tbody html function gridGeneric(&$grid,$dd,$tabPar='',$vals2=array()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |