如何使用引导程序主题在数据视图中设置 2 个自定义图标 [英] How to set a 2 custom icon in dataview with bootstrap theme
本文介绍了如何使用引导程序主题在数据视图中设置 2 个自定义图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了与
<xp:panel xp:key="icon"><xp:div id="div1"><xp:this.styleClass><![CDATA[#{javascript:return "glyphicon glyphicon-arrow-up pull-left"}]]></xp:this.styleClass><xp:eventHandler event="onclick" submit="true"refreshMode="完成"><xp:this.action><![CDATA[#{javascript://Do stuff here}]]></xp:this.action></xp:eventHandler></xp:div><xp:div id="div2"><xp:this.styleClass><![CDATA[#{javascript:return "glyphicon glyphicon-arrow-down pull-right"}]]></xp:this.styleClass><xp:eventHandler event="onclick" submit="true"refreshMode="完成"><xp:this.action><![CDATA[#{javascript://Do stuff here}]]></xp:this.action></xp:eventHandler></xp:div></xp:面板></xe:this.facets>
解决方案
由于这些是 div,它们将默认为 display: block
.我建议添加类似 style="display: inline"
到 <xp:div/>
或将它们更改为 <xp:panel tagName="i"/>
.
I have the same problem as in this post with one additional complication. I need to put two icons in my dataView, and have them horizontal not vertical.
I can get the icons in there but they do not look correct, as I need them to be horizontally aligned:
<xe:this.facets>
<xp:panel xp:key="icon">
<xp:div id="div1">
<xp:this.styleClass>
<![CDATA[#{javascript:return "glyphicon glyphicon-arrow-up pull-left"}]]>
</xp:this.styleClass>
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript://Do stuff here}]]></xp:this.action>
</xp:eventHandler>
</xp:div>
<xp:div id="div2">
<xp:this.styleClass>
<![CDATA[#{javascript:return "glyphicon glyphicon-arrow-down pull-right"}]]>
</xp:this.styleClass>
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript://Do stuff here}]]></xp:this.action>
</xp:eventHandler>
</xp:div>
</xp:panel>
</xe:this.facets>
解决方案
Since those are divs, they're going to be display: block
by default. I'd suggest either adding something like style="display: inline"
to the <xp:div/>
s or changing them to <xp:panel tagName="i"/>
.
这篇关于如何使用引导程序主题在数据视图中设置 2 个自定义图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文