15 |
* $Id$ |
* $Id$ |
16 |
* |
* |
17 |
* $Log$ |
* $Log$ |
18 |
|
* Revision 1.15 2003/04/06 04:46:33 joko |
19 |
|
* renamed linking function |
20 |
|
* mozilla fixes |
21 |
|
* |
22 |
|
* Revision 1.14 2003/04/04 21:19:21 joko |
23 |
|
* modified exception handling (enhanced, purged redundant code) |
24 |
|
* |
25 |
|
* Revision 1.13 2003/04/04 02:37:14 jonen |
26 |
|
* _query[action] == write |
27 |
|
* |
28 |
|
* Revision 1.12 2003/03/29 08:00:48 joko |
29 |
|
* modified ErrorBoxing |
30 |
|
* |
31 |
* Revision 1.11 2003/03/28 06:45:26 joko |
* Revision 1.11 2003/03/28 06:45:26 joko |
32 |
* VERBOSE mode |
* VERBOSE mode |
33 |
* |
* |
691 |
switch ($this->_query[metatype]) { |
switch ($this->_query[metatype]) { |
692 |
case 'data': |
case 'data': |
693 |
$command = 'queryData'; |
$command = 'queryData'; |
694 |
|
|
695 |
//$command = 'getObjects'; // FIXME!!! |
//$command = 'getObjects'; // FIXME!!! |
696 |
//$this->_locator->set_option('metadata.command', $command); |
//$this->_locator->set_option('metadata.command', $command); |
697 |
/* |
/* |
725 |
$query_args[classname] = $this->_query[classname]; |
$query_args[classname] = $this->_query[classname]; |
726 |
break; |
break; |
727 |
} |
} |
728 |
|
if($this->_query[action] == 'write') { |
729 |
|
$query_args[action] = $this->_query[action]; |
730 |
|
$query_args[data] = $this->_query[data]; |
731 |
|
} |
732 |
$args = array( |
$args = array( |
733 |
'data_type' => $this->_query[abstract_type], |
'data_type' => $this->_query[abstract_type], |
734 |
'query_args' => $query_args |
'query_args' => $query_args |
739 |
case 'schema': |
case 'schema': |
740 |
//print "Testing schema:" . "<br>"; |
//print "Testing schema:" . "<br>"; |
741 |
$command = 'querySchema'; |
$command = 'querySchema'; |
742 |
|
$args = array( $this->_query[filter] ); |
743 |
break; |
break; |
744 |
} |
} |
745 |
|
|
807 |
|
|
808 |
// trace |
// trace |
809 |
//if (constants::get('VERBOSE') && $this->_debug[notice]) { |
//if (constants::get('VERBOSE') && $this->_debug[notice]) { |
810 |
if (constants::get('VERBOSE')) { |
if (constants::get('VERBOSE') or constants::get('ERRORS_ONLY')) { |
811 |
//print "_result = " . Dumper($this->_result); |
//print "_result = " . Dumper($this->_result); |
812 |
//print "<div><b><font color=\"darkgreen\">Debug:</font></b> DataSource::Generic->_result_count = <b>" . $this->_result_count . "</b></div>"; |
//print "<div><b><font color=\"darkgreen\">Debug:</font></b> DataSource::Generic->_result_count = <b>" . $this->_result_count . "</b></div>"; |
813 |
$this->draw_status_box(); |
$this->draw_status_box(); |
823 |
|
|
824 |
$boxcount++; |
$boxcount++; |
825 |
|
|
826 |
// box client code (javascript) |
$box = container(); |
827 |
$code_js = " |
|
|
<script language=\"javascript\"> |
|
|
function toggle_vis(id) { |
|
|
elem = eval('document.all.' + id); |
|
|
status = elem.style.getAttribute('display'); |
|
|
if (status == 'none') { |
|
|
elem.style.setAttribute('display', 'block'); |
|
|
} else { |
|
|
elem.style.setAttribute('display', 'none'); |
|
|
} |
|
|
} |
|
|
</script> |
|
|
"; |
|
|
//$script = html_script($code_js); |
|
|
//print $script->render(); |
|
|
print $code_js; |
|
|
|
|
828 |
// box style |
// box style |
829 |
$style = container( |
$style = container( |
830 |
html_style("text/css", '.boxlabel_darkgreen { color: darkgreen; font-weight:bold; }'), |
html_style("text/css", '.boxlabel_darkgreen { color: darkgreen; font-weight:bold; }'), |
831 |
html_style("text/css", '.box_dsg { background: #20ab39; color: white; border: 2px black groove; width:640px; padding:10px; margin:40px; }') |
html_style("text/css", '.box_dsg { background: #20ab39; color: white; border: 2px black groove; width:640px; padding:10px; margin:40px; }') |
832 |
); |
); |
833 |
print $style->render(); |
$box->add( $style ); |
834 |
|
|
835 |
// box content |
// box content |
836 |
$statusbox = html_div('box_dsg'); |
$statusbox = html_div('box_dsg'); |
838 |
$locatorbox = html_div('box_dsg'); |
$locatorbox = html_div('box_dsg'); |
839 |
$locatorbox->set_id("locatorbox_$boxcount"); |
$locatorbox->set_id("locatorbox_$boxcount"); |
840 |
$locatorbox->add( Dumper($this->_locator) ); |
$locatorbox->add( Dumper($this->_locator) ); |
|
//$locatorbox->set_style('visibility:false;'); |
|
|
$locatorbox->set_style('display:none;'); |
|
841 |
|
|
842 |
$statusbox->add( html_span('boxlabel_darkgreen', "Locator:"), html_a("javascript:toggle_vis('locatorbox_$boxcount');", '[show]'), $locatorbox, html_br() ); |
// FIXME: ie/mozilla? |
843 |
|
//$locatorbox->set_style('display:none;'); |
844 |
|
//$locatorbox->set_style('visibility:hidden;'); |
845 |
|
// already duplicate inside Tracer!!! |
846 |
|
$locatorbox->set_style('visibility:hidden; position:absolute; z-index:1; margin-top:30px; padding:5px;'); |
847 |
|
|
848 |
|
$statusbox->add( html_span('boxlabel_darkgreen', "Locator:"), link::js_function( 'toggleVisibility', array("locatorbox_$boxcount"), '[show]'), $locatorbox, html_br() ); |
849 |
$call = $this->_locator->get_call(); |
$call = $this->_locator->get_call(); |
850 |
$statusbox->add( html_span('boxlabel_darkgreen', "Method:"), $call[method], html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Method:"), $call[method], html_br() ); |
851 |
if (sizeof($call[args])) { |
if (sizeof($call[args])) { |
852 |
$statusbox->add( html_span('boxlabel_darkgreen', "Arguments:"), Dumper($call[args]), html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Arguments:"), Dumper($call[args]), html_br() ); |
853 |
} |
} |
854 |
$statusbox->add( html_span('boxlabel_darkgreen', "Count:"), $this->get_result_count(), html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Count:"), $this->get_result_count(), html_br() ); |
855 |
print $statusbox->render(); |
$box->add( $statusbox ); |
856 |
|
|
857 |
|
//print $box->render(); |
858 |
|
trace( $box ); |
859 |
|
|
860 |
} |
} |
861 |
|
|