Page 1 of 2

Changing the Filter Tab

Posted: 2020-04-08 15:37
by kanklovitch
Hi Guys
I asked this question in a different section but I didn't get an answer, I hope it is ok to ask it here.
I am building an application where many users are are not understanding Filter and are just going straight to Search. I need to draw more attention to the Filter tab. Also it would be extremely helpful if I could have a comment right on the form to inform users what to do.

Thanks

Re: Changing the Filter Tab

Posted: 2020-04-08 21:39
by pbottcher
Hi,

you can try

Code: Select all

$j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html($j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html().replace('Filter', 'Search'));

Re: Changing the Filter Tab

Posted: 2020-04-09 02:08
by kanklovitch
Sorry Sir
I am not sure where to put that code.

Re: Changing the Filter Tab

Posted: 2020-04-09 07:17
by onoehring
Hi,

probably in your /hooks/tablename-tv.js ... did you try?
Olaf

Re: Changing the Filter Tab

Posted: 2020-04-09 13:22
by kanklovitch
Hi Olaf
I don't see a mytablename.js file anywhere. I do have a mytablename_filter.php file in my hooks folder. Perhaps that is where I will find a solution, I will spend some time trying to understand it and will let you know.

Thanks

Re: Changing the Filter Tab

Posted: 2020-04-09 13:41
by onoehring
Hi,

look in your hooks folder. There you should find such a file - if not: Just create a new file with that name and paste pbötchers code into that.
Olaf

Re: Changing the Filter Tab

Posted: 2020-04-09 14:14
by kanklovitch
In my hooks folder I have this file, events.php, I created a new file called events-tv.js , pasted the code into it and saved it in the hooks folder. Nothing changes when I open the events page.The same tab with the icon, and the word Filter in black text.

Re: Changing the Filter Tab

Posted: 2020-04-09 16:44
by xbox2007
hello , can you try this one

Code: Select all

$j(function(){
	$j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html($j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html().replace('Filter', 'Search'));	
});

Re: Changing the Filter Tab

Posted: 2020-04-09 16:50
by kanklovitch
Excellent, that worked. Now is there any chance at all of making the text red and bold??

Re: Changing the Filter Tab

Posted: 2020-04-09 17:03
by xbox2007
please check this

Code: Select all

$j(function(){
	$j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html($j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html().replace('Filter', '<b><font color="red">Search</b></font>'));
});



Re: Changing the Filter Tab

Posted: 2020-04-09 17:19
by kanklovitch
Incredible, that is exactly what I want. You guys are just so generous with your time and knowledge.
Thank you.

Re: Changing the Filter Tab

Posted: 2020-04-09 18:13
by kanklovitch
Oh oh, I developed a problem guys. After I created all the js files for each table all these menu selections disappear.

Re: Changing the Filter Tab

Posted: 2020-04-09 18:20
by kanklovitch
I just checked when I create a js file for just one of the tables all the menu selections disappear for that one table but are all available for the other tables

Re: Changing the Filter Tab

Posted: 2020-04-09 20:23
by xbox2007
i check
you can use same code but you add code to footer-extras.php

but will make change for All Tables

Re: Changing the Filter Tab

Posted: 2020-04-09 20:37
by xbox2007
can you check this code on footer-extras.php

Code: Select all

<?php
	$script_name = basename($_SERVER['PHP_SELF']);
	if($script_name == 'cust_view.php'){
?>
<script>

	$j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html($j('.btn-group-lg.visible-xs, .btn-group-lg.visible-md').find('#Filter').html().replace('Filter', '<b><font color="red">Search'));

</script>
<?php
	}
?>
change cust_view.php for your table name

Re: Changing the Filter Tab

Posted: 2020-04-09 20:53
by kanklovitch
I am getting the same problem, my menu selections disappear in the detail screen.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:00
by xbox2007
last code work with me without any problem

Re: Changing the Filter Tab

Posted: 2020-04-09 21:12
by kanklovitch
This is what I get. I called for the parent table in the php script.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:17
by pbottcher
Hi,

can you post the code you have in your js file and what file you are using.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:29
by kanklovitch
I am not sure how to post the Town.php file which is the parent table. It's just the file that was created when I started the application. Sorry I am still learning.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:32
by pbottcher
you can just copy paste it into the textbox here.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:36
by kanklovitch
<?php
// For help on using hooks, please refer to https://bigprof.com/appgini/help/workin ... tion/hooks

function Town_init(&$options, $memberInfo, &$args) {
/* Inserted by Search Page Maker for AppGini on 2020-03-31 07:18:51 */
$options->FilterPage = 'hooks/Town_filter.php';
/* End of Search Page Maker for AppGini code */


return TRUE;
}

function Town_header($contentType, $memberInfo, &$args) {
$header='';

switch($contentType) {
case 'tableview':
$header='';
break;

case 'detailview':
$header='';
break;

case 'tableview+detailview':
$header='';
break;

case 'print-tableview':
$header='';
break;

case 'print-detailview':
$header='';
break;

case 'filters':
$header='';
break;
}

return $header;
}

function Town_footer($contentType, $memberInfo, &$args) {
$footer='';

switch($contentType) {
case 'tableview':
$footer='';
break;

case 'detailview':
$footer='';
break;

case 'tableview+detailview':
$footer='';
break;

case 'print-tableview':
$footer='';
break;

case 'print-detailview':
$footer='';
break;

case 'filters':
$footer='';
break;
}

return $footer;
}

function Town_before_insert(&$data, $memberInfo, &$args) {

return TRUE;
}

function Town_after_insert($data, $memberInfo, &$args) {

return TRUE;
}

function Town_before_update(&$data, $memberInfo, &$args) {

return TRUE;
}

function Town_after_update($data, $memberInfo, &$args) {

return TRUE;
}

function Town_before_delete($selectedID, &$skipChecks, $memberInfo, &$args) {

return TRUE;
}

function Town_after_delete($selectedID, $memberInfo, &$args) {

}

function Town_dv($selectedID, $memberInfo, &$html, &$args) {

}

function Town_csv($query, $memberInfo, &$args) {

return $query;
}
function Town_batch_actions(&$args) {

return array();
}

Re: Changing the Filter Tab

Posted: 2020-04-09 21:38
by pbottcher
ok,

what do you have in the Town_filter.php

Re: Changing the Filter Tab

Posted: 2020-04-09 21:40
by kanklovitch
The menus seam to be are working but I don't have the red bold text. I will check again.

Re: Changing the Filter Tab

Posted: 2020-04-09 21:42
by kanklovitch
I am ok with the Town_filter. Do you still want to see it?