minor bugsfixed documentation added
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -623,7 +623,6 @@ function Small_tab(t, re_load)
|
|||||||
var id = document.getElementById('id_tbody_' + t);
|
var id = document.getElementById('id_tbody_' + t);
|
||||||
var id_this = document.getElementById('id_hide_tbody_' + t);
|
var id_this = document.getElementById('id_hide_tbody_' + t);
|
||||||
var id_t = document.getElementById(t);
|
var id_t = document.getElementById(t);
|
||||||
|
|
||||||
id_t.style.width = id_t.offsetWidth + 'px';
|
id_t.style.width = id_t.offsetWidth + 'px';
|
||||||
if (id_this.innerHTML == "v") {
|
if (id_this.innerHTML == "v") {
|
||||||
//---CROSS
|
//---CROSS
|
||||||
@@ -649,7 +648,6 @@ function Select_tab(t)
|
|||||||
//----------
|
//----------
|
||||||
var id_t = document.getElementById(t);
|
var id_t = document.getElementById(t);
|
||||||
window.scrollTo(parseInt(id_t.style.left) - 300, parseInt(id_t.style.top) - 300);
|
window.scrollTo(parseInt(id_t.style.left) - 300, parseInt(id_t.style.top) - 300);
|
||||||
|
|
||||||
setTimeout(function(){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800);
|
setTimeout(function(){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800);
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -970,73 +968,75 @@ function getColorByTarget( target )
|
|||||||
|
|
||||||
function Click_option(id_this,column_name,table_name)
|
function Click_option(id_this,column_name,table_name)
|
||||||
{
|
{
|
||||||
var left = Glob_X - (document.getElementById(id_this).offsetWidth>>1);
|
var left = Glob_X - (document.getElementById(id_this).offsetWidth>>1);
|
||||||
document.getElementById(id_this).style.left = left + 'px';
|
document.getElementById(id_this).style.left = left + 'px';
|
||||||
// var top = Glob_Y - document.getElementById(id_this).offsetHeight - 10;
|
// var top = Glob_Y - document.getElementById(id_this).offsetHeight - 10;
|
||||||
document.getElementById(id_this).style.top = (screen.height / 4) + 'px';
|
document.getElementById(id_this).style.top = (screen.height / 4) + 'px';
|
||||||
document.getElementById(id_this).style.visibility = "visible";
|
document.getElementById(id_this).style.visibility = "visible";
|
||||||
document.getElementById('option_col_name').innerHTML = '<strong>Options For "' +column_name+ '" column</strong>';
|
document.getElementById('option_col_name').innerHTML = '<strong>Options For "' +column_name+ '" column</strong>';
|
||||||
col_name = column_name;
|
col_name = column_name;
|
||||||
tab_name = table_name;
|
tab_name = table_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Close_option()
|
function Close_option()
|
||||||
{
|
{
|
||||||
document.getElementById('pmd_optionse').style.visibility = "hidden";
|
document.getElementById('pmd_optionse').style.visibility = "hidden";
|
||||||
}
|
}
|
||||||
|
|
||||||
function Select_all(id_this,owner)
|
function Select_all(id_this,owner)
|
||||||
{
|
{
|
||||||
var parent= document.form1;
|
var parent= document.form1;
|
||||||
downer =owner;
|
downer =owner;
|
||||||
var i;
|
var i;
|
||||||
var tab = [];
|
var tab = [];
|
||||||
for(i = 0; i < parent.elements.length; i++) {
|
for(i = 0; i < parent.elements.length; i++) {
|
||||||
if (parent.elements[i].type == "checkbox" && parent.elements[i].id.substring(0,(9 + id_this.length)) == 'select_' + id_this + '._') {
|
if (parent.elements[i].type == "checkbox" && parent.elements[i].id.substring(0,(9 + id_this.length)) == 'select_' + id_this + '._') {
|
||||||
if(document.getElementById('select_all_' + id_this).checked == true) {
|
if(document.getElementById('select_all_' + id_this).checked == true) {
|
||||||
parent.elements[i].checked = true;
|
parent.elements[i].checked = true;
|
||||||
parent.elements[i].disabled = true;
|
parent.elements[i].disabled = true;
|
||||||
var temp = '`' + id_this.substring(owner.length +1) + '`.*';
|
var temp = '`' + id_this.substring(owner.length +1) + '`.*';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
parent.elements[i].checked = false;
|
parent.elements[i].checked = false;
|
||||||
parent.elements[i].disabled = false;
|
parent.elements[i].disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(document.getElementById('select_all_' + id_this).checked == true) {
|
if(document.getElementById('select_all_' + id_this).checked == true) {
|
||||||
select_field.push('`' + id_this.substring(owner.length +1) + '`.*');
|
select_field.push('`' + id_this.substring(owner.length +1) + '`.*');
|
||||||
tab = id_this.split(".");
|
tab = id_this.split(".");
|
||||||
from_array.push(tab[1]);
|
from_array.push(tab[1]);
|
||||||
|
}
|
||||||
}
|
else {
|
||||||
else {
|
for (i =0; i < select_field.length; i++) {
|
||||||
for (i =0; i < select_field.length; i++) {
|
if (select_field[i] == ('`' + id_this.substring(owner.length +1) + '`.*')) {
|
||||||
if (select_field[i] == ('`' + id_this.substring(owner.length +1) + '`.*')) {
|
select_field.splice(i,1);
|
||||||
select_field.splice(i,1);
|
}
|
||||||
|
}
|
||||||
}
|
for(k =0 ;k < from_array.length;k++){
|
||||||
}
|
if(from_array[k] == id_this){
|
||||||
for(k =0 ;k < from_array.length;k++){
|
from_array.splice(k,1);
|
||||||
if(from_array[k] == id_this){
|
break;
|
||||||
from_array.splice(k,1);
|
}
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
Re_load();
|
||||||
}
|
|
||||||
Re_load();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Table_onover(id_this,val)
|
function Table_onover(id_this,val,buil)
|
||||||
{
|
{
|
||||||
if(!val) {
|
if(!val) {
|
||||||
document.getElementById("id_zag_" + id_this).className="tab_zag_2";
|
document.getElementById("id_zag_" + id_this).className="tab_zag_2";
|
||||||
document.getElementById("id_zag_" + id_this + "_2").className="tab_zag_2";
|
if(buil) {
|
||||||
}
|
document.getElementById("id_zag_" + id_this + "_2").className="tab_zag_2";
|
||||||
else {
|
}
|
||||||
document.getElementById("id_zag_" + id_this).className="tab_zag";
|
}
|
||||||
document.getElementById("id_zag_" + id_this + "_2").className="tab_zag";
|
else {
|
||||||
}
|
document.getElementById("id_zag_" + id_this).className="tab_zag";
|
||||||
|
if(buil) {
|
||||||
|
document.getElementById("id_zag_" + id_this + "_2").className="tab_zag";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function stores selected column information in select_field[]
|
/* This function stores selected column information in select_field[]
|
||||||
@@ -1044,26 +1044,26 @@ function Table_onover(id_this,val)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function store_column(id_this,owner,col) {
|
function store_column(id_this,owner,col) {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var k = 0;
|
var k = 0;
|
||||||
if (document.getElementById('select_' + owner + '.' + id_this + '._' + col).checked == true) {
|
if (document.getElementById('select_' + owner + '.' + id_this + '._' + col).checked == true) {
|
||||||
select_field.push('`' + id_this + '`.`' + col +'`');
|
select_field.push('`' + id_this + '`.`' + col +'`');
|
||||||
from_array.push(id_this);
|
from_array.push(id_this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(i; i < select_field.length ;i++) {
|
for(i; i < select_field.length ;i++) {
|
||||||
if (select_field[i] == ('`' + id_this + '`.`' + col +'`')) {
|
if (select_field[i] == ('`' + id_this + '`.`' + col +'`')) {
|
||||||
select_field.splice(i,1);
|
select_field.splice(i,1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(k =0 ;k < from_array.length;k++){
|
for(k =0 ;k < from_array.length;k++){
|
||||||
if(from_array[k] == id_this){
|
if(from_array[k] == id_this){
|
||||||
from_array.splice(k,1);
|
from_array.splice(k,1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1080,67 +1080,66 @@ function store_column(id_this,owner,col) {
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
function add_object() {
|
function add_object() {
|
||||||
var rel = document.getElementById('rel_opt');
|
var rel = document.getElementById('rel_opt');
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
var init = history_array.length;
|
var init = history_array.length;
|
||||||
if (rel.value != '--') {
|
if (rel.value != '--') {
|
||||||
if (document.getElementById('Query').value == "") {
|
if (document.getElementById('Query').value == "") {
|
||||||
document.getElementById('hint').innerHTML = "value/subQuery is empty" ;
|
document.getElementById('hint').innerHTML = "value/subQuery is empty" ;
|
||||||
document.getElementById('hint').style.visibility = "visible";
|
document.getElementById('hint').style.visibility = "visible";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var p = document.getElementById('Query');
|
var p = document.getElementById('Query');
|
||||||
var where_obj = new where(rel.value,p.value);//make where object
|
var where_obj = new where(rel.value,p.value);//make where object
|
||||||
history_array.push(new history(col_name,where_obj,tab_name,h_tabs[downer + '.' + tab_name],"Where"));
|
history_array.push(new history(col_name,where_obj,tab_name,h_tabs[downer + '.' + tab_name],"Where"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
rel.value = '--';
|
rel.value = '--';
|
||||||
p.value = "";
|
p.value = "";
|
||||||
}
|
}
|
||||||
if (document.getElementById('new_name').value !="") {
|
if (document.getElementById('new_name').value !="") {
|
||||||
var rename_obj = new rename(document.getElementById('new_name').value);//make Rename object
|
var rename_obj = new rename(document.getElementById('new_name').value);//make Rename object
|
||||||
history_array.push(new history(col_name,rename_obj,tab_name,h_tabs[downer + '.' + tab_name],"Rename"));
|
history_array.push(new history(col_name,rename_obj,tab_name,h_tabs[downer + '.' + tab_name],"Rename"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
document.getElementById('new_name').value = "" ;
|
document.getElementById('new_name').value = "" ;
|
||||||
}
|
}
|
||||||
if (document.getElementById('operator').value != '---') {
|
if (document.getElementById('operator').value != '---') {
|
||||||
var aggregate_obj = new aggregate(document.getElementById('operator').value) ;
|
var aggregate_obj = new aggregate(document.getElementById('operator').value) ;
|
||||||
history_array.push(new history(col_name,aggregate_obj,tab_name,h_tabs[downer + '.' + tab_name],"Aggregate"));
|
history_array.push(new history(col_name,aggregate_obj,tab_name,h_tabs[downer + '.' + tab_name],"Aggregate"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
document.getElementById('operator').value = '---';
|
document.getElementById('operator').value = '---';
|
||||||
//make aggregate operator
|
//make aggregate operator
|
||||||
}
|
}
|
||||||
if (document.getElementById('groupby').checked == true ) {
|
if (document.getElementById('groupby').checked == true ) {
|
||||||
history_array.push(new history(col_name,'GroupBy',tab_name,h_tabs[downer + '.' +tab_name],"GroupBy"));
|
history_array.push(new history(col_name,'GroupBy',tab_name,h_tabs[downer + '.' +tab_name],"GroupBy"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
document.getElementById('groupby').checked = false;
|
document.getElementById('groupby').checked = false;
|
||||||
//make groupby
|
//make groupby
|
||||||
}
|
}
|
||||||
if (document.getElementById('h_rel_opt').value != '--') {
|
if (document.getElementById('h_rel_opt').value != '--') {
|
||||||
if (document.getElementById('having').value == "") {
|
if (document.getElementById('having').value == "") {
|
||||||
document.getElementById('hint').innerHTML = "value/subQuery is empty" ;
|
document.getElementById('hint').innerHTML = "value/subQuery is empty" ;
|
||||||
document.getElementById('hint').style.visibility = "visible";
|
document.getElementById('hint').style.visibility = "visible";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var p = document.getElementById('having');
|
var p = document.getElementById('having');
|
||||||
var where_obj = new having(document.getElementById('h_rel_opt').value,p.value,document.getElementById('h_operator').value);//make where object
|
var where_obj = new having(document.getElementById('h_rel_opt').value,p.value,document.getElementById('h_operator').value);//make where object
|
||||||
history_array.push(new history(col_name,where_obj,tab_name,h_tabs[downer + '.' + tab_name],"Having"));
|
history_array.push(new history(col_name,where_obj,tab_name,h_tabs[downer + '.' + tab_name],"Having"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
document.getElementById('h_rel_opt').value = '--';
|
document.getElementById('h_rel_opt').value = '--';
|
||||||
document.getElementById('h_operator').value = '---';
|
document.getElementById('h_operator').value = '---';
|
||||||
p.value = ""; //make having
|
p.value = ""; //make having
|
||||||
}
|
}
|
||||||
if (document.getElementById('orderby').checked == true) {
|
if (document.getElementById('orderby').checked == true) {
|
||||||
history_array.push(new history(col_name,'OrderBy',tab_name,h_tabs[downer + '.' + tab_name],"OrderBy"));
|
history_array.push(new history(col_name,'OrderBy',tab_name,h_tabs[downer + '.' + tab_name],"OrderBy"));
|
||||||
sum = sum + 1;
|
sum = sum + 1;
|
||||||
document.getElementById('orderby').checked = false;
|
document.getElementById('orderby').checked = false;
|
||||||
//make orderby
|
//make orderby
|
||||||
}
|
}
|
||||||
document.getElementById('hint').innerHTML = sum + "object created" ;
|
document.getElementById('hint').innerHTML = sum + "object created" ;
|
||||||
document.getElementById('hint').style.visibility = "visible";
|
document.getElementById('hint').style.visibility = "visible";
|
||||||
//output sum new objects created
|
//output sum new objects created
|
||||||
var existingDiv = document.getElementById('ab');
|
var existingDiv = document.getElementById('ab');
|
||||||
existingDiv.innerHTML = display(init,history_array.length);
|
existingDiv.innerHTML = display(init,history_array.length);
|
||||||
Close_option();
|
Close_option();
|
||||||
panel(0);
|
panel(0);
|
||||||
|
|
||||||
}
|
}
|
@@ -114,11 +114,14 @@ echo $script_tabs . $script_contr . $script_display_field;
|
|||||||
class="M_butt" target="_self"
|
class="M_butt" target="_self"
|
||||||
><img src="pmd/images/pdf.png" alt="key" width="20" height="20"
|
><img src="pmd/images/pdf.png" alt="key" width="20" height="20"
|
||||||
title="<?php echo __('Import/Export coordinates for PDF schema'); ?>" /></a
|
title="<?php echo __('Import/Export coordinates for PDF schema'); ?>" /></a
|
||||||
><a href="#" onClick="build_query('SQL Query on Database', 0)" onmousedown="return false;"
|
>
|
||||||
class="M_butt" target="_self"
|
<?php if($_REQUEST['query']){
|
||||||
><img src="pmd/images/query_builder.png" alt="key" width="20" height="20"
|
echo '<a href="#" onClick="build_query(\'SQL Query on Database\', 0)" onmousedown="return false;"
|
||||||
title="<?php echo __('Build Query'); ?>" /></a
|
class="M_butt" target="_self">';
|
||||||
><a href="javascript:Top_menu_right(document.getElementById('key_Left_Right'));"
|
echo '<img src="pmd/images/query_builder.png" alt="key" width="20" height="20" title="';
|
||||||
|
echo __('Build Query');
|
||||||
|
echo '"/></a>'; }?>
|
||||||
|
<a href="javascript:Top_menu_right(document.getElementById('key_Left_Right'));"
|
||||||
onmousedown="return false;" class="M_butt last" target="_self">
|
onmousedown="return false;" class="M_butt last" target="_self">
|
||||||
<img src="pmd/images/2rightarrow_m.png" id="key_Left_Right" alt=">"
|
<img src="pmd/images/2rightarrow_m.png" id="key_Left_Right" alt=">"
|
||||||
title="<?php echo __('Move Menu'); ?>" /></a>
|
title="<?php echo __('Move Menu'); ?>" /></a>
|
||||||
@@ -227,9 +230,9 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
|||||||
onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');">
|
onclick="Start_tab_upd('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>');">
|
||||||
<img src="pmd/images/exec_small.png" alt="" /></td>
|
<img src="pmd/images/exec_small.png" alt="" /></td>
|
||||||
<td nowrap="nowrap" id="id_zag_<?php echo $t_n_url ?>" class="tab_zag"
|
<td nowrap="nowrap" id="id_zag_<?php echo $t_n_url ?>" class="tab_zag"
|
||||||
onmousedown="cur_click=document.getElementById('<?php echo $t_n_url ?>');"
|
onmousedown="cur_click=document.getElementById('<?php echo $t_n_url ?>');"/
|
||||||
onmouseover="Table_onover('<?php echo $t_n_url ?>',0)"
|
onmouseover="Table_onover('<?php echo $t_n_url ?>',0,<?php echo (isset($_REQUEST['query'])? 1 : 0 )?> )"
|
||||||
onmouseout="Table_onover('<?php echo $t_n_url ?>',1)">
|
onmouseout="Table_onover('<?php echo $t_n_url ?>',1,<?php echo (isset($_REQUEST['query']) ? 1 : 0 )?>)">
|
||||||
<span class='owner'>
|
<span class='owner'>
|
||||||
<?php
|
<?php
|
||||||
echo $GLOBALS['PMD_OUT']["OWNER"][$i];
|
echo $GLOBALS['PMD_OUT']["OWNER"][$i];
|
||||||
@@ -238,9 +241,9 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
|||||||
?></td>
|
?></td>
|
||||||
<?php
|
<?php
|
||||||
if(isset($_REQUEST['query'])) {
|
if(isset($_REQUEST['query'])) {
|
||||||
echo '<td class="tab_zag" onmouseover="Table_onover(\''.htmlspecialchars($t_n_url).'\',0)" id="id_zag_'.htmlspecialchars($t_n_url).'_2"';
|
echo '<td class="tab_zag" onmouseover="Table_onover(\''.htmlspecialchars($t_n_url).'\',0,1)" id="id_zag_'.htmlspecialchars($t_n_url).'_2"';
|
||||||
echo 'onmousedown="cur_click=document.getElementById(\''.htmlspecialchars($t_n_url).'\');"';
|
echo 'onmousedown="cur_click=document.getElementById(\''.htmlspecialchars($t_n_url).'\');"';
|
||||||
echo 'onmouseout="Table_onover(\''.htmlspecialchars($t_n_url).'\',1)">';
|
echo 'onmouseout="Table_onover(\''.htmlspecialchars($t_n_url).'\',1,1)">';
|
||||||
}?>
|
}?>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -810,15 +813,16 @@ if($_REQUEST['query']) {
|
|||||||
echo '<div id="filter"></div>';
|
echo '<div id="filter"></div>';
|
||||||
echo '<div id="box">';
|
echo '<div id="box">';
|
||||||
echo '<span id="boxtitle"></span>';
|
echo '<span id="boxtitle"></span>';
|
||||||
echo '<form method="GET" action="" target="_parent">';
|
echo '<form method="post" action="pmd_general" target="_parent">';
|
||||||
echo '<textarea cols="80" name="sql_query" id="textSqlquery" rows="15"></textarea><div id="tblfooter">';
|
echo '<textarea cols="80" name="sql_query" id="textSqlquery" rows="15"></textarea><div id="tblfooter">';
|
||||||
echo ' <input type="submit" name="submit" class="btn">';
|
echo ' <input type="submit" name="submit_sql" class="btn">';
|
||||||
echo ' <input type="button" name="cancel" value="Cancel" onClick="closebox()" class="btn">';
|
echo ' <input type="button" name="cancel" value="Cancel" onClick="closebox()" class="btn">';
|
||||||
echo '</div></p>';
|
echo '</div></p>';
|
||||||
echo '</form></div>';
|
echo '</form></div>';
|
||||||
|
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
|
|
||||||
<!-- cache images -->
|
<!-- cache images -->
|
||||||
<img src="pmd/images/2leftarrow_m.png" width="0" height="0" alt="" />
|
<img src="pmd/images/2leftarrow_m.png" width="0" height="0" alt="" />
|
||||||
<img src="pmd/images/rightarrow1.png" width="0" height="0" alt="" />
|
<img src="pmd/images/rightarrow1.png" width="0" height="0" alt="" />
|
||||||
|
Reference in New Issue
Block a user