no label when expand with dv.compact(); with the step-by-step example

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
chrisagon
Posts: 18
Joined: 2016-10-13 19:38
Location: Paris, France
Contact:

no label when expand with dv.compact(); with the step-by-step example

Post by chrisagon » 2020-03-20 10:30

Hello,
I am trying to use dv.compact function like the step-by-step ewample.
My trouble is : we have no label when we clicked on the "show" button. The buttons are greater, but without label.
And I have changed nothing like the step-by-step example.

Code: Select all

// create an instance of AppGiniDetailView class
var dv = new AppGiniDetailView();

// create a variable "container" for easier handling of new action buttons
var container = dv.ActionButtons();

// create a group named "Options"
var group = container.addGroup("Options");

// add two buttons for toggling the compact-mode with no text but icons "minus"/"plus"
group.addButton("Hide", function () { dv.compact(); }, null, "minus");
group.addButton("Show", function () { dv.compact(false); }, null, "plus");

// execute the compact function to get smaller buttons and wider children-tabs.
dv.compact();
What I have missed ?
Chrisagon.

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

Re: no label when expand with dv.compact(); with the step-by-step example

Post by jsetzer » 2020-03-20 10:52

Hi,

the example you have mentioned is for demonstration purposes, only. On first call of compact() method, the buttons' texts will be removed and set as tool tip text (on mouse hover). The texts will only be visible on small devices afterwards.

Just asking:
Do you need to toggle the widths of the buttons in a real world scenario? Or is it just for testing?

If you really need this, you can add the following line of code after dv.compact(false):

Code: Select all

    $j(".appginihelper-compact-button > .visible-xs").removeClass("visible-xs");
Your code for the additional Show-button should look like this now:

Code: Select all

group.addButton("Show", function () {
    dv.compact(false);
    $j(".appginihelper-compact-button > .visible-xs").removeClass("visible-xs");
}, null, "plus");

Result

NGsFbMJH2e.gif
NGsFbMJH2e.gif (50.47 KiB) Viewed 3052 times

Hope it works for you. Please give me some feedback.

I am going to find a built-in solution for next version (probably after upcoming April 2020 version).

Best,
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

chrisagon
Posts: 18
Joined: 2016-10-13 19:38
Location: Paris, France
Contact:

[SOLVED] no label when expand with dv.compact(); with the step-by-step example

Post by chrisagon » 2020-03-22 10:39

Thank you, it works fine now.
It is for a demo.
The best use is for responsive display.
Chrisagon.

David Soul
Veteran Member
Posts: 31
Joined: 2018-01-04 18:32
Location: Vancouver, Canada
Contact:

Re: no label when expand with dv.compact(); with the step-by-step example

Post by David Soul » 2020-04-29 07:00

Hi Jan,

I just came looking for exactly this use-case and was happy to find the solution here.

Real-world use is:
1) where I'm going to have some interns working on database entry work and it will be useful (at least for first few days) and
2) for responsive display as mentioned by Chris for end-user display - I'm planning on using one of the buttons to feed a concatenated result from the detail record being viewed to the Global Search facility and seeing the full name will be useful to the public viewers on first use of the interface.

Work is for a Canadian Charity and the result I'm getting with AppGini and Your plugin simply would not have been in the world of possibilities given our limited resources without your plugin product - Thank You.
David HC Soul

Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility

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

Re: no label when expand with dv.compact(); with the step-by-step example

Post by jsetzer » 2020-12-18 14:26

You are welcome! I hope you are making good progress with your charity project! Take care!
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply