XPages - 具有Panes Autohieght的Dojo手风琴容器

时间:2016-01-28 12:43:47

标签: xpages accordion

我有Pane的Dojo手风琴。无论我做了什么,我无法解决我的问题。 Accordion Pane的高度始终与Accordion Pane的最大高度相同。

我只是希望它根据它的内容足够高。我的意思是自动高。

2 个答案:

答案 0 :(得分:1)

将此CSS添加到您的XPage或主题:

.dijitSelected .dijitAccordionContainer-child {
    height: auto !important;
}

Dojo手风琴的窗格以正确的高度打开。

使用主题" Bootstrap3.2.0"或者,因为手风琴按照预期的方式开箱即用。

答案 1 :(得分:0)

我做了一些调查,我认为可以通过在每个<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <form id='id_form' action='signup.php' method='post'> <label for='name'>Your Name:</label> <input type='text' id='name' name='name' value=''/> <span class='name'></span> <br /> <label for='username'>Username:</label> <input type='text' id='username' name='username' value=''/> <span class='username'></span> <br /> <input id="test" type="submit" value="Submit" /> </form> <script> $('#test').click(function(){ if ($('#name').val()=='') { $('.name').append(' Name is required') return false } else { return true } if ($('#username').val()=='') { $('.username').append(' Username is required') return false } else { return true } }) $('#name').click(function(){ $('.name').html('') }) $('#username').click(function(){ $('.username').html('') }) </script> 上设置CSS高度属性height:auto !important;来解决问题但是如果打开/关闭手风琴窗格,则高度属性将是覆盖:(

XPage来源:

xe:basicContainerNode

Firebug屏幕截图:

加载XPage后:

enter image description here

窗格打开/关闭后

enter image description here

相关问题