Inline-detail-view plugin not full screen

Topics related to AppGini plugins/add-ons go here.
Post Reply
jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-06 14:26

Dear community members, I have 2 questions about inline-Detail-View plugin. If the screen is not completely large, the plugin does not respond properly. The page does not want to scroll and sometimes crashes. Can something be done about this? It is also possible to make the plugin active for 1 user. (not everyone finds it useful). Kind regards, John (the Netherlands)

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 815
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Inline-detail-view plugin not full screen

Post by jsetzer » 2020-02-07 18:57

Hi John!
It is also possible to make the plugin active for 1 user.
Please have a look at the YOURTABLENAME_init() function of your table. You will find code which has been inserted by the plugin. For example like this:

Code: Select all

function YOURTABLENAME_init(&$options, $memberInfo, &$args)
{
  /* Inserted by Inline-Detail-View Plugin on 2020-02-07 09:36:32 */
  // DO NOT DELETE THIS LINE
    require_once("plugins/inline-dv/InlineDV.php");
    $options->SeparateDV = 0;
  /* End of Inline-Detail-View Plugin code */

  return TRUE;
}
Keep the first lines which have been inserted by the plugin. Then modify the code behind that stuff. Easiest, I guess, would be toggling $options->SeparateDV conditionally:
  • If you want inline-dv:
    $options->SeparateDV = 0;
  • If you don't want inline-dv:
    $options->SeparateDV = 1;
You can implement your own conditions by group, by user or by any other criterion/criteria.

I can give you a full example with whitelist-usernames OR blacklist-usernames:

Code: Select all

...
function YOURTABLENAME_init(&$options, $memberInfo, &$args)
{
		/* Inserted by Inline-Detail-View Plugin on 2020-02-07 09:36:32 */
		// DO NOT DELETE THIS LINE
		require_once("plugins/inline-dv/InlineDV.php");
		$options->SeparateDV = 0;
		/* End of Inline-Detail-View Plugin code */

		// select inline-dv-mode:
		// blacklist     : ON for all users except users in $usernames-array
		// whitelist     : ON for all users in $usernames-array
		// off           : OFF for all users
		// any other mode: ON for all users

		$mode = 'whitelist'; // <--- CHANGE THIS { 'blacklist' | 'whitelist' | 'off' | * }

		// array of usernames
		// in blacklist-mode: these are the users who WILL NOT get inline-dv
		// in whitelist-mode: these are the users who WILL GET inline-dv
		// other modes: ignored
		$usernames = ['admin', 'user1', 'user2'];
		
		// DO NOT CHANGE THE LINES BELOW ------->
		$username = $memberInfo['username'];
		switch ($mode) {
			case 'blacklist':
				$inline_dv_enabled = !in_array($username, $usernames);		
				break;
			case 'whitelist':
				$inline_dv_enabled = in_array($username, $usernames);		
				break;
			case 'off':
				$inline_dv_enabled = false;
				break;
			default:
				$inline_dv_enabled = true;
				break;
		}
		$options->SeparateDV = !$inline_dv_enabled;// disable inline-dv for blacklist-users
		// <------------------ END

	return TRUE;
}
...
Just change YOURTABLENAME, the $mode variable and $usernames array.

I have tested this and it works well. Hope this answers your question! I welcome any feedback!

Kind regards,
Jan
Kind regards,
<js />

jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Re: Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-07 20:03

Jan, thank you very much.
With this solution, the plugin has even more value.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 815
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Inline-detail-view plugin not full screen

Post by jsetzer » 2020-02-08 06:25

Hi John,
thanks for your feedback. I will copy that tip to our website to help others
Best,
Jan
Kind regards,
<js />

jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Re: Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-08 10:14

Jan, you also have a solution for people who use a large font or lots of fields that create scroll bars.
The plugin does not respond well and the screen sometimes crashes.
(The users use the internet explorer).

Kind regards, John

jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Re: Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-08 10:40

Another addition.
The option menu on the right moves itself when scrolling.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 815
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Inline-detail-view plugin not full screen

Post by jsetzer » 2020-02-08 10:47

jplateringen wrote:
2020-02-08 10:14
Jan, you also have a solution for people who use a large font or lots of fields that create scroll bars.
The plugin does not respond well and the screen sometimes crashes.
(The users use the internet explorer).

Kind regards, John
Yes, use a compatible browser and don't play around with different font sizes but keep the standard. Internet Explorer is dead - fortunately

Too many columns: every user can hide unnecessary columns in AppGini. Use an ultra wide screen if they really need so many columns (I doubt)

Best,
Jan
Kind regards,
<js />

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 815
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Inline-detail-view plugin not full screen

Post by jsetzer » 2020-02-08 10:50

jplateringen wrote:
2020-02-08 10:40
The option menu on the right moves itself when scrolling.
I do not understand. Can you please upload a screenshot. What does it mean: "moves itself"?

Best,
Jan
Kind regards,
<js />

jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Re: Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-08 11:41

Jan, hiding columns solves the problem.
Keeping the options on the right-hand side in view is then not disturbing and sometimes even useful.

Thanks for your quick response.
Kind regards, John
Attachments
Knipsel.PNG
Knipsel.PNG (4.71 KiB) Viewed 4983 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 815
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Inline-detail-view plugin not full screen

Post by jsetzer » 2020-02-10 08:41

There is a more detailed blog-post about conditionally enabling/disabling inline-dv here:
https://appgini.bizzworxx.de/appgini-he ... dv-plugin/
Kind regards,
<js />

jplateringen
Posts: 8
Joined: 2019-08-19 09:04

Re: Inline-detail-view plugin not full screen

Post by jplateringen » 2020-02-11 15:57

The options are described very clearly here.
Thanks again Jan.

Post Reply