Help with main_top layout

(15 posts) (2 voices)
  1. ajdjackson, Member

    Hi All

    I'm not sure if I should be posting this here or on a HTML forum but here goes.

    I've been pulling my hair out for a day now trying to solves this.

    I'm customizing the main_top.html page to create a basic dashboard. My dashboard consists of 3 mydbr elements. The elements all work correctly. The layout is as follows:

    A mydbr.tab element followed by 2 mydbr charts. I call the the mydbr.tab element using the html <object> tab and the charts using the <imgX> tags.

    The layout problem I'm having is with controlling the height of the mydbr.tab element. Each tab have a different number of rows returned so is variable height. What I'm hoping to do is to set a min-height in a div and when a tab is select with a greater number of rows then the height of the div is automatically increased to cater for this and push the divs containing the charts images down the page. And conversely when a tab is subsequently selected with a fewer number of rows the mydbr.tab div shrinks again pulling the img divs back up the page.

    I've tried numerous style attributes such as overflow:hidden, min-height etc but nothing seems to work. I've also tried styling the <object> tags with the same attributes but with no luck. I've only been able to get anything that looks right by explicitly setting the <object> height but once the number of rows is greater that the set height they overflow the tab element and I also get ugly scroll bars.

    Also I see by using divs in main_top the mydbr 'Report' folders' layout collapses - instead of being centered they are left positioned. I tried using an empty div with clear:both to clear the floats in my divs.

    Many thanks for any help you can give me with this.

    Jake

  2. myDBR Team, Key Master

    Hi,
    how does your main_top.html look like? If the forum sw is giving you trouble with the HTML, you can use the support email.

    --
    myDBR Team

  3. ajdjackson, Member

    Hi

    Here's what I have at the moment (I'm no HTML expert :))

    <p align="center" style="font-size:36px"><i>MIS Dashboard</i></p>
    <hr style="width:70%;border-bottom-width: 0px;">

    <object data="http://xxxxxx.com/mydbr/report.php?r=41&m=2&h=e3d41f5f8fd3bb77f55af7c1d2e120d438a61f7c&i=1&hdr=0"
    type="text/html"
    style="width:750px;height:550px; overflow:auto;"
    align="center"

    >
    </object>

    <div style="float:left; margin-left:5%;">
    <p style="font-size:18px; font-weight:500; margin-left:10%" align="left">Monthly Bookings</p>
    <imgx src="http://xxxxx.com/mydbr/report.php?r=17&m=2&h=3c7f8558d8474c5822bd3b3c48aef51492c715ed&i=1&getchart=1" alt="Booked" />
    </div>

    <div style="float:left; margin-left:5%;">
    <p style="font-size:18px; font-weight:500; margin-left:10%" align="left" >Expected Monthly Hand Overs</p>
    <imgx src="http://xxxxx.com/mydbr/report.php?r=39&m=2&h=8383cb7070e41dd76a30865e238e209a3f1fb909&i=1&getchart=1" alt="Booked" />
    </div>

    <hr style="width:70%;border-bottom-width: 0px;">

    As you can see I've had to explicitly set the height of the first element which a tab report.

    As a separate issue is it possible to hide the sidebar completely for non-admin users?

    Cheers

    Jake

  4. myDBR Team, Key Master

    Hi,
    the object tag does not resize dynamically. Easier option is to create one report which acts as your dashboard. You can then embed it to main_top.html using the supplied embed_url function and embed=1 option:

    <script type="text/javascript">
    embed_url("http://xxxxxx.com/mydbr/report.php&r=41&m=2&h=e3d41f5f8fd3bb77f55af7c1d2e120d438a61f7c&i=1&embed=1", false);
    </script>

    As a result, your dashboard report will be inserted as normal HTML element into the fron page.

    As a separate issue is it possible to hide the sidebar completely for non-admin users?

    Admin tools are not shown to non-admin users. You can hide the main_sidebar.html content using CSS div.wrapper.normal>.sidebar {display:none}. To reclaim the hidden space, use CSS as well.

    --
    myDBR Team

  5. ajdjackson, Member

    Hi

    Many thanks this worked a treated!!!!!

    Now the only issue seems to be report linking from charts within the new dashboard. No links seem to be active.

    Jake

  6. myDBR Team, Key Master

    Jake,
    run the updater and use "&embed=2" in dashboard report call. That should activate the links.

    --
    myDBR Team

  7. ajdjackson, Member

    Hi

    Yes that has activated the links.

    One last thing I've noticed is that the html preceding the <script> tag is no longer displayed and the logo at top left now reverts back to your mydbr one. This is what I've added to main_top.

    <p align="center" style="font-size:36px"><i>MIS Dashboard</i></p>
    <hr style="width:70%;border-bottom-width: 0px;">

    <script type="text/javascript">
    embed_url("http://xxxxx.com/mydbr/report.php?r=43&m=2&h=bcbf9108bc85d123abc7eab5221b77394bff890b&i=1&hdr=0&embed=2", false);
    </script>

    <hr style="width:70%;border-bottom-width: 0px;">

    To reclaim the hidden space, use CSS as well.

    Can you give me a clue on how to do this?

    Sorry for the hassle

    Many thanks

    Jake

  8. ajdjackson, Member

    Hi

    I found another issue with the above :(

    Although the links on the chart are active if I set the target as popup I do not get a popup but it displays as a 'shared_embed' (either above or below the chart.

    The popup works when I run the report directly - not from the main_top page.

    As an aside is there a way to close the 'shared-embed' ?

    Thanks again

    Jake

  9. myDBR Team, Key Master

    Jake,
    the new build will give you full functionality for dashboard reports (including popup linked target).

    The embed_url replaces the dashboard area content so you should put all the dashboard functionality to the report (put your extra wrapper HTML into report using dbr.html.

    As a separate issue is it possible to hide the sidebar completely for non-admin users?

    div.wrapper.normal>.sidebar {display:none} div.wrapper.normal>.centered>div{margin-right:0}

    --
    myDBR Team

  10. ajdjackson, Member

    Brilliant - works great!

    Many thanks

    Jake

  11. ajdjackson, Member

    Hi

    Spoke too soon.

    The main_top dashboard runs perfectly but the changes have affected running 'normal' reports in IE.

    I have a couple of parameter driven reports: I am presented with the selection screen as per usual but once I click run report I only get a blank screen. However if I click the cog-wheel to action a new selection the report is now visible underneath the parameter selections.

    In Chrome the report runs fine except once the report is shown the mydbr overall header is no longer visible so I must use the browser back button to continue.

    Cheers

    Jake

  12. myDBR Team, Key Master

    Jake,
    could you run the updater one more time to see if the problem is still there.

    --
    myDBR

  13. ajdjackson, Member

    Ok just updated.

    Normal reports are running fine now both in IE and Chrome but the main_top is back to what it was last night ie popups displaying below the linking element.

    Cheers

    Jake

  14. myDBR Team, Key Master

    OK,
    the latest build should work in all cases.

    --
    myDBR

  15. ajdjackson, Member

    Hi

    Looking good!

    Everything working as should.

    Thanks

    Jake


Reply

You must log in to post.