store selected columns info
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
var history_array = []; // Global array to store history objects
|
var history_array = []; // Global array to store history objects
|
||||||
|
var select_field = [];
|
||||||
var g_index;
|
var g_index;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -983,15 +983,20 @@ function Close_option()
|
|||||||
document.getElementById('pmd_optionse').style.visibility = "hidden";
|
document.getElementById('pmd_optionse').style.visibility = "hidden";
|
||||||
}
|
}
|
||||||
|
|
||||||
function Select_all(id_this)
|
function Select_all(id_this,owner)
|
||||||
{
|
{
|
||||||
var parent= document.form1;
|
var parent= document.form1;
|
||||||
|
var len = owner.length + 8;
|
||||||
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,(7 + id_this.length)) == 'select_' + id_this) {
|
if (parent.elements[i].type == "checkbox" && parent.elements[i].id.substring(0,(7 + 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;
|
||||||
else
|
store_column(parent.elements[i].id.substring(len),owner);
|
||||||
|
}
|
||||||
|
else {
|
||||||
parent.elements[i].checked = false;
|
parent.elements[i].checked = false;
|
||||||
|
store_column(parent.elements[i].id.substring(len),owner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Re_load();
|
Re_load();
|
||||||
@@ -1009,6 +1014,25 @@ function Table_onover(id_this,val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This function stores selected column information in select_field[]
|
||||||
|
* In case column is checked it add else it deletes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function store_column(id_this,owner) {
|
||||||
|
var i = 0;
|
||||||
|
if (document.getElementById('select_' + owner + '.' + id_this).checked == true) {
|
||||||
|
select_field.push(id_this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for(i; i < select_field.length ;i++) {
|
||||||
|
if ( select_field[i] == id_this ) {
|
||||||
|
select_field.splice(i,1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function builds object and adds them to history_array
|
* This function builds object and adds them to history_array
|
||||||
* first it does a few checks on each object, then makes an object(where,rename,groupby,aggregate,orderby)
|
* first it does a few checks on each object, then makes an object(where,rename,groupby,aggregate,orderby)
|
||||||
|
@@ -204,7 +204,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
|||||||
echo '<td class="select_all">';
|
echo '<td class="select_all">';
|
||||||
echo '<input type="checkbox" value="select_all_'.htmlspecialchars($t_n_url).'" style="margin: 0px;" ';
|
echo '<input type="checkbox" value="select_all_'.htmlspecialchars($t_n_url).'" style="margin: 0px;" ';
|
||||||
echo 'id="select_all_'.htmlspecialchars($t_n_url).'" title="select all" ';
|
echo 'id="select_all_'.htmlspecialchars($t_n_url).'" title="select all" ';
|
||||||
echo 'onclick="Select_all(\''. htmlspecialchars($t_n_url). '\')" ></td>';
|
echo 'onclick="Select_all(\''. htmlspecialchars($t_n_url) .'\',\''.htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]).'\')"></td>';
|
||||||
}?>
|
}?>
|
||||||
<td class="small_tab" onmouseover="this.className='small_tab2';"
|
<td class="small_tab" onmouseover="this.className='small_tab2';"
|
||||||
onmouseout="this.className='small_tab';"
|
onmouseout="this.className='small_tab';"
|
||||||
@@ -272,8 +272,9 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
|||||||
if(isset($_REQUEST['query'])) {
|
if(isset($_REQUEST['query'])) {
|
||||||
echo '<td class="select_all">';
|
echo '<td class="select_all">';
|
||||||
echo '<input value="'.htmlspecialchars($t_n_url).urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'"';
|
echo '<input value="'.htmlspecialchars($t_n_url).urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'"';
|
||||||
echo 'type="checkbox" id="select_'.htmlspecialchars($t_n_url).urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" ';
|
echo 'type="checkbox" id="select_'.htmlspecialchars($t_n_url).'.'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" ';
|
||||||
echo 'style="margin: 0px;" title="select_'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" onclick="" ></td>';
|
echo 'style="margin: 0px;" title="select_'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'" ';
|
||||||
|
echo 'onclick="store_column(\''.urlencode($GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]).'.'.urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]).'\',\''.htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]).'\')"></td>';
|
||||||
}?>
|
}?>
|
||||||
<td width="10px" colspan="3"
|
<td width="10px" colspan="3"
|
||||||
id="<?php echo $t_n_url.".".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>">
|
id="<?php echo $t_n_url.".".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]) ?>">
|
||||||
|
Reference in New Issue
Block a user