Skip to content

Commit

Permalink
Bug fixed ZK-3074 : Listbox doesn't extends it width with hflex="min"…
Browse files Browse the repository at this point in the history
… and predefined height
  • Loading branch information
shenliow committed Jun 15, 2016
1 parent 8c50957 commit 5dd722e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ZK 8.0.3
ZK-3198: org.zkoss.zul.tree.initRodSize = "-1" no longer disable ROD in tree on ZK8
ZK-3189: DropUpload causes NPE when filesize is close to or equal maxsize.
ZK-2601: Format "#00" breaks Spinner when value is 0
ZK-3074: Listbox doesn't extends it width with hflex="min" and predefined height

* Upgrade Notes

Expand Down
32 changes: 32 additions & 0 deletions zktest/src/archive/test2/B80-ZK-3074.zul
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
B80-ZK-3074.zul
Purpose:
Description:
History:
Tue, Jun 14, 2016 12:36:45 PM, Created by Sefi
Copyright (C) Potix Corporation. All Rights Reserved.
-->
<zk>
<zscript><![CDATA[
String[] data = new String[500];
for (int i = 0; i < 500; i++) data[i] = (i*i*i).toString();
ListModelList myModel = new ListModelList(data);
DefaultTreeNode[] nodes = new DefaultTreeNode[data.length];
for (int i = 0; i < data.length; i++) nodes[i] = new DefaultTreeNode(data[i]);
TreeModel treeModel = new DefaultTreeModel( new DefaultTreeNode(null, nodes));
]]></zscript>
<label multiline="true">
1.load the zul
2.the Listbox should extend its width to eliminate the horizontal
</label>
<listbox height="250px" model="${myModel}" hflex="min"/>
<grid height="250px" model="${myModel}" hflex="min"/>
<tree height="250px" model="${treeModel}" hflex="min"/>
</zk>
1 change: 1 addition & 0 deletions zktest/src/archive/test2/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2211,6 +2211,7 @@ B80-ZK-3221.zul=A,E,Dragdrop,width
##zats##B80-ZK-3198.zul=A,E,Tree,Rod
B80-ZK-3189.zul=A,E,Dropupload
##zats##B80-ZK-2601.zul=A,E,Spinner,Format
##ztl##B80-ZK-3074.zul=A,E,Listbox,hflex,min,scrollbar

##
# Features - 3.0.x version
Expand Down
4 changes: 4 additions & 0 deletions zul/src/archive/web/js/zul/mesh/MeshWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,8 @@ zul.mesh.MeshWidget = zk.$extends(zul.Widget, {
if (head)
head.style.height = '';
} else {
//ZK-3074
sz.height += zk(this.ebody).hasHScroll() ? jq.scrollbarHeight() : 0;
return this.$supers('setFlexSize_', arguments);
}
}
Expand All @@ -1084,6 +1086,8 @@ zul.mesh.MeshWidget = zk.$extends(zul.Widget, {
if (head)
head.style.width = '';
} else {
//ZK-3074
sz.width += zk(this.ebody).hasVScroll() ? jq.scrollbarWidth() : 0;
return this.$supers('setFlexSize_', arguments);
}
}
Expand Down

0 comments on commit 5dd722e

Please sign in to comment.