Top Frame Height

Discussion in 'Customization & Integration Showcase and Discussion' started by AaronMcH, May 4, 2016.

  1. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    I'm making some customisations to OBAS and I want to change the height of the top frame in the frameset, however it seems the rows attribute is set dynamically on page load to "85,*" so regardless of what I set it to in the template file it is changed, how would I change this value?

    Thanks
    Aaron
     
  2. dkolvakh

    dkolvakh Odin Team

    Messages:
    348
    Hello.

    What layout do you want to customize - CP or PCC/RCC?
     
  3. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi thanks for the reply, just the CP.
     
  4. dkolvakh

    dkolvakh Odin Team

    Messages:
    348
    Hello.

    There is a template named /var/opt/hspc-root/skins/panel/template/HSPC/CP/Visual/top_frame.tmpl which contain call to the JS function "setTopFrameHeight", this is a place you should use to resize top frame height.
    Please do a proper customization and do not modify original template, to not miss changes after upgrade.
     
  5. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi thanks for the info, we have actually made a custom skin for customisation.
     
  6. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Just a follow-up but I'd like to suggest that the default template be changed to instead of this code:

    setTopFrameHeight(document.getElementById("top-wrapper").offsetHeight);

    It be changed to

    setTopFrameHeight(document.getElementById("top-wrapper").outerHeight());

    As outerHeight() takes account of margins, which in our case we were using, where as offsetHeight does not.

    Thanks
    Aaron
     
  7. dkolvakh

    dkolvakh Odin Team

    Messages:
    348
    Seems it is valid in jQuery and for window object, not for all elements:

    outerHeight.png
     
  8. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Ah my mistake, I have reverted back to using heightOffset and setting a padding instead of margin.
     

Share This Page