Changing the Filter Tab

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Changing the Filter Tab

Post by kanklovitch » 2020-04-08 15:37

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
Attachments
FILTER.jpg
FILTER.jpg (36.2 KiB) Viewed 5511 times

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Changing the Filter Tab

Post by pbottcher » 2020-04-08 21:39

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'));
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 02:08

Sorry Sir
I am not sure where to put that code.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Changing the Filter Tab

Post by onoehring » 2020-04-09 07:17

Hi,

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

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 13:22

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

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Changing the Filter Tab

Post by onoehring » 2020-04-09 13:41

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

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 14:14

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.

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Changing the Filter Tab

Post by xbox2007 » 2020-04-09 16:44

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'));	
});

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 16:50

Excellent, that worked. Now is there any chance at all of making the text red and bold??

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Changing the Filter Tab

Post by xbox2007 » 2020-04-09 17:03

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>'));
});



kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 17:19

Incredible, that is exactly what I want. You guys are just so generous with your time and knowledge.
Thank you.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 18:13

Oh oh, I developed a problem guys. After I created all the js files for each table all these menu selections disappear.
Attachments
menu-disapper.jpg
menu-disapper.jpg (41.15 KiB) Viewed 5444 times

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 18:20

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
Attachments
menu1.jpg
menu1.jpg (25.06 KiB) Viewed 5443 times

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Changing the Filter Tab

Post by xbox2007 » 2020-04-09 20:23

i check
you can use same code but you add code to footer-extras.php

but will make change for All Tables

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Changing the Filter Tab

Post by xbox2007 » 2020-04-09 20:37

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

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 20:53

I am getting the same problem, my menu selections disappear in the detail screen.

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Changing the Filter Tab

Post by xbox2007 » 2020-04-09 21:00

last code work with me without any problem

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 21:12

This is what I get. I called for the parent table in the php script.
Attachments
child_tables.jpg
child_tables.jpg (59.25 KiB) Viewed 5431 times
parent_table.jpg
parent_table.jpg (76.05 KiB) Viewed 5431 times

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Changing the Filter Tab

Post by pbottcher » 2020-04-09 21:17

Hi,

can you post the code you have in your js file and what file you are using.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 21:29

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.
Attachments
footer-extras.jpg
footer-extras.jpg (44.81 KiB) Viewed 5428 times

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Changing the Filter Tab

Post by pbottcher » 2020-04-09 21:32

you can just copy paste it into the textbox here.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 21:36

<?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();
}

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Changing the Filter Tab

Post by pbottcher » 2020-04-09 21:38

ok,

what do you have in the Town_filter.php
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 21:40

The menus seam to be are working but I don't have the red bold text. I will check again.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Changing the Filter Tab

Post by kanklovitch » 2020-04-09 21:42

I am ok with the Town_filter. Do you still want to see it?

Post Reply