Page 1 of 1

Inline-detail-view plugin not full screen

Posted: 2020-02-06 14:26
by jplateringen
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)

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-07 18:57
by jsetzer
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

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-07 20:03
by jplateringen
Jan, thank you very much.
With this solution, the plugin has even more value.

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 06:25
by jsetzer
Hi John,
thanks for your feedback. I will copy that tip to our website to help others
Best,
Jan

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 10:14
by jplateringen
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

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 10:40
by jplateringen
Another addition.
The option menu on the right moves itself when scrolling.

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 10:47
by jsetzer
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

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 10:50
by jsetzer
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

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-08 11:41
by jplateringen
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

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-10 08:41
by jsetzer
There is a more detailed blog-post about conditionally enabling/disabling inline-dv here:
https://appgini.bizzworxx.de/appgini-he ... dv-plugin/

Re: Inline-detail-view plugin not full screen

Posted: 2020-02-11 15:57
by jplateringen
The options are described very clearly here.
Thanks again Jan.