简体   繁体   English

在Liferay中创建进度条

[英]Create Progress Bar in Liferay

I am looking to create a progress bar in Liferay, hopefully inside the Dynamic List Display plugin but not necessarily. 我希望在Liferay中创建一个进度条,希望在动态列表显示插件中,但不一定。 The data for the progress bar will be coming from the List though. 然而,进度条的数据将来自列表。 Any suggestions? 有什么建议么?

You can do it easily with AlloyUI in Liferay 6.2. 您可以使用Liferay 6.2中的AlloyUI轻松完成。 You need a placeholder for the progressbar - something like this: 您需要一个占位符作为进度条 - 如下所示:

<div id="myProgressBar" style="width:100%;height:20px;"></div>

And then you can create it with javascript like this: 然后你可以用这样的javascript创建它:

<aui:script use="aui-base,aui-progressbar">
var progressBar = new A.ProgressBar({
        boundingBox: '#myProgressBar',
        label: '<%=percentage%>%',
        orientation: 'horizontal',
        value: '<%=percentage%>',
    }).render();
</aui:script>

You can read more about the progress bar config options here: http://alloyui.com/api/classes/A.ProgressBar.html 您可以在此处阅读有关进度条配置选项的更多信息: http//alloyui.com/api/classes/A.ProgressBar.html

And some samples here: http://alloyui.com/versions/2.0.x/tutorials/progress-bar/ 这里有一些示例: http//alloyui.com/versions/2.0.x/tutorials/progress-bar/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM