Skip to content

Commit

Permalink
Merge branch 'master' into refine-5018
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen authored Dec 18, 2023
2 parents 3e65571 + 2d1401a commit 4647552
Show file tree
Hide file tree
Showing 45 changed files with 135 additions and 319 deletions.
1 change: 0 additions & 1 deletion zk/src/main/java/org/zkoss/zk/ui/Components.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
* @author tomyeh
*/
public class Components {
private static final Logger log = LoggerFactory.getLogger(Components.class);
private static final Logger _zklog = LoggerFactory.getLogger("org.zkoss.zk.log");

protected Components() {
Expand Down
2 changes: 1 addition & 1 deletion zksandbox/src/main/webapp/zksandbox.properties
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ t5=c4, /toolbar/tooltip.zul, /img/Centigrade-Widget-Icons/TooltipsAndPop
##
# Category 5 Data and Report
##
d1=c5, /data/databinding.zul, /img/Centigrade-Widget-Icons/DataBinding-24x24.png, Data Binding
#d1=c5, /data/databinding.zul, /img/Centigrade-Widget-Icons/DataBinding-24x24.png, Data Binding
#d21=c5, /data/flashchart.zul, /img/Centigrade-Widget-Icons/Chart-24x24.png, Flash Chart, ignoreMobile
d2=c5, /data/chart.zul, /img/Centigrade-Widget-Icons/Chart-24x24.png, Chart
d3=c5, /data/jreport.zul, /img/Centigrade-Widget-Icons/JasperReports-24x24.png, JasperReports, ignoreMobile
Expand Down
4 changes: 3 additions & 1 deletion zktest/src/main/webapp/bind/issue/B00807GroupModel.zul
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
<group label="@load(each[0].category)"/>
</template>
<template name="foot">
<groupfoot spans="2" sclass="foodFooter" label="@load(each)"/>
<groupfoot sclass="foodFooter">
<cell colspan="2"><label value="@load(each)"></label></cell>
</groupfoot>
</template>
</grid>
</vlayout>
Expand Down
4 changes: 3 additions & 1 deletion zktest/src/main/webapp/bind/issue/B00967GroupModel.zul
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
<group label="@load(each[0].category)"/>
</template>
<template name="model:groupfoot">
<groupfoot spans="2" sclass="foodFooter" label="@load(each)"/>
<groupfoot sclass="foodFooter">
<cell colspan="2"><label value="@load(each)"></label></cell>
</groupfoot>
</template>
</grid>
</vlayout>
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test/booksuggest.zul
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ xmlns:zk="http://www.zkoss.org/2005/zk">
<head>
<title>Native Complete Page</title>
<zkhead/>
<script type="text/javascript" src="/zktest/zkau/web/js/zk.zuml.wpd" charset="UTF-8">
<script src="/zktest/zkau/web/js/zk.zuml.wpd" charset="UTF-8">
</script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test/dateFormat.zul
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Copyright (C) 2011 Potix Corporation. All Rights Reserved.
-->
<zk xmlns:w="client">
<window>
<script type="text/javascript">
<script>
function setText(txt, wgt) {
var inp = wgt.getInputNode();
inp.value = txt;
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test/listbox-custom.zul
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Copyright (C) 2007 Potix Corporation. All Rights Reserved.
}}IS_RIGHT
-->
<window title="Customize Look and Feel">
<script type="text/javascript">
<script>
function Selectable_bgcolor(row) {
return row.className.endsWith("sel") ? "orange": "yellow";
}
Expand Down
6 changes: 3 additions & 3 deletions zktest/src/main/webapp/test2/B100-ZK-5468-Cascader.zul
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ class ListTreeModel extends org.zkoss.zul.AbstractTreeModel {
public void add(Object data) {
List root = (List) getRoot();
root.add(data);
fireEvent(root, root.size() - 1, root.size() - 1, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), root.size() - 1, root.size() - 1);
}
public void add(int index, Object data) {
List root = (List) getRoot();
root.add(index, data);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), index, index);
}
public void remove(int index) {
List root = (List) getRoot();
root.remove(index);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED, getPath(root), index, index);
}
public int size() {
return getRoot().size();
Expand Down
6 changes: 3 additions & 3 deletions zktest/src/main/webapp/test2/B100-ZK-5468-Organigram.zul
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ class ListTreeModel extends org.zkoss.zul.AbstractTreeModel {
public void add(Object data) {
List root = (List) getRoot();
root.add(data);
fireEvent(root, root.size() - 1, root.size() - 1, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), root.size() - 1, root.size() - 1);
}
public void add(int index, Object data) {
List root = (List) getRoot();
root.add(index, data);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), index, index);
}
public void remove(int index) {
List root = (List) getRoot();
root.remove(index);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED, getPath(root), index, index);
}
public int size() {
return getRoot().size();
Expand Down
6 changes: 3 additions & 3 deletions zktest/src/main/webapp/test2/B100-ZK-5468-Tree.zul
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ Copyright (C) 2023 Potix Corporation. All Rights Reserved.
public void add(Object data) {
List root = (List) getRoot();
root.add(data);
fireEvent(root, root.size() - 1, root.size() - 1, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), root.size() - 1, root.size() - 1);
}
public void add(int index, Object data) {
List root = (List) getRoot();
root.add(index, data);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_ADDED, getPath(root), index, index);
}
public void remove(int index) {
List root = (List) getRoot();
root.remove(index);
fireEvent(root, index, index, org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED);
fireEvent(org.zkoss.zul.event.TreeDataEvent.INTERVAL_REMOVED, getPath(root), index, index);
}
public int size() {
return getRoot().size();
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B30-1997828.zul
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Copyright (C) 2008 Potix Corporation. All Rights Reserved.
-->
<window title="Customizable Tooltips" border="normal" width="360px">
Please click the image, then you should see the popup component.
<toolbarbutton src="/test2/img/icon_email.png" popup="any"/>
<toolbarbutton image="/test2/img/icon_email.png" popup="any"/>
<popup id="any">
<vbox>
ZK simply rich.
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B30-2446682.zul
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<attribute name="onClick"><![CDATA[
Object composer = new org.zkoss.zktest.test2.B2446682();
//Events.addEventListeners(win, composer);
Components.addForwards(win, composer);
org.zkoss.zk.ui.util.ConventionWires.addForwards(win, composer);
]]></attribute>
</button>
</window>
Expand Down
20 changes: 10 additions & 10 deletions zktest/src/main/webapp/test2/B35-2086302.zul
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,37 @@ Copyright (C) 2008 Potix Corporation. All Rights Reserved.
<north maxsize="300" size="50%" border="0" splittable="true"
collapsible="true">
<borderlayout id="bl2">
<west size="25%" border="none" flex="true" maxsize="250"
<west size="25%" border="none" maxsize="250"
splittable="true" collapsible="true">
<div id="w2" style="background:#B8D335">
<div id="w2" style="background:#B8D335" vflex="1" hflex="1">
<label value="25%" style="color:white;font-size:50px"/>
</div>
</west>
<center border="none" flex="true">
<div id="c2" style="background:#E6D92C">
<center border="none">
<div id="c2" style="background:#E6D92C" vflex="1" hflex="1">
<label value="25%" style="color:white;font-size:50px"/>
</div>
</center>
<east size="50%" border="none" flex="true">
<label id="e2" value="Here is a non-border"
<east size="50%" border="none">
<label id="e2" value="Here is a non-border" vflex="1" hflex="1"
style="color:gray;font-size:30px"/>
</east>
</borderlayout>
</north>
<center border="0">
<borderlayout id="bl3">
<west maxsize="600" size="30%" flex="true" border="0"
<west maxsize="600" size="30%" border="0"
splittable="true" collapsible="true">
<div id="w3" style="background:#E6D92C">
<div id="w3" style="background:#E6D92C" vflex="1" hflex="1">
<label value="30%" style="color:white;font-size:50px"/>
</div>
</west>
<center>
<label id="c3" value="Here is a border"
style="color:gray;font-size:30px"/>
</center>
<east size="30%" flex="true" border="0" collapsible="true">
<div id="e3" style="background:#B8D335">
<east size="30%" border="0" collapsible="true">
<div id="e3" style="background:#B8D335" vflex="1" hflex="1">
<label value="30%" style="color:white;font-size:50px"/>
</div>
</east>
Expand Down
16 changes: 8 additions & 8 deletions zktest/src/main/webapp/test2/B36-3051305.zul
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
<listbox id="left" height="500px" width="250px" onDrop="move(event.dragged)" droppable="listbox"
oddRowSclass="non-odd" mold="paging" pageSize="5">
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Forge" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Forge" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Mobile" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Mobile" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK GWT" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK GWT" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSF" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSF" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSP" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSP" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Spring" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Spring" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK" />
</listitem>
<listitem draggable="listbox" >
<listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Studio" />
<listcell image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Studio" />
</listitem>
</listbox>
<grid height="500px" width="250px" onDrop="move(event.dragged)" droppable="grid"
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B50-2918527.zul
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Click the button, the "textbox" below should move to center
<button label="Click Me">
<attribute name="onClick">
div.setAlign("center");
div.setStyle("text-align:center");
</attribute>
</button>
<div id="div">
Expand Down
5 changes: 2 additions & 3 deletions zktest/src/main/webapp/test2/B50-2946333.zul
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Copyright (C) 2009 Potix Corporation. All Rights Reserved.
-->
<zk>
<borderlayout >
<north id="north" title="Processes" splittable="true" height="50%"
flex="true">
<hbox>
<north id="north" title="Processes" splittable="true" height="50%">
<hbox vflex="1" hflex="1">
Please click each button and the layout should be displayed correctly.
<button label="25%" onClick="north.height = self.label" />
<button label="50%" onClick="north.height = self.label" />
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B50-2951825.zul
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<window title="Test" border="normal">
<vbox hflex="1" vflex="1" style="margin:10px" id="cntbox">
<div id="cntdiv" hflex="1" height="175px">You shouldn't see any JavaScript error.</div>
<script type="text/javascript">alert("hello");</script>
<script>alert("hello");</script>
</vbox>
</window>
</zk>
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B50-3052381.zul
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copyright (C) 2010 Potix Corporation. All Rights Reserved.
<li>The week names shall be the same with calendar</li>
</ul>
]]></html>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
zk.afterLoad('zul.db,zk.fmt', function() {
var d = new Date();
for(var i = 0; i < 7; i++) {
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B50-3296607.zul
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Copyright (C) 2011 Potix Corporation. All Rights Reserved.
-->
<zk xmlns:w="client">
<script type="text/javascript">
<script>
function setText(txt, id) {
var db = zk.Widget.$(id),
inp = db.getInputNode();
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B50-ZK-700.zul
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Copyright (C) 2011 Potix Corporation. All Rights Reserved.
-->
<zk>
<script type="text/javascript">
<script>
function showSize () {
var hmain = jq('$main').height();
var h1 = jq('$div').height();
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B60-ZK-765.zul
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</vbox>
<button id="btnTwo" label="show index" w:onClick="showindex()"/>
<button id="btnThree" label="show selected" w:onClick="showselected()"/>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
showindex = function(){
var msg = zk.Widget.$('$msg');
var listbox = zk.Widget.$('$listbox');
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B65-ZK-1692.zul
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<zk xmlns:w="client">
If you see "true" in the log window, it is a bug.
<script type="text/javascript">zk.load('zul.wnd');</script>
<script>zk.load('zul.wnd');</script>
<button label="Create Widget">
<attribute w:name="onBind"><![CDATA[
if (!this._win) {
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B65-ZK-1913.zul
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Click the button, it will show true.
<button label="Button" onClick="@command('toggltServerPush')"/>
<label id="msg"/>
<script type="text/javascript" defer="true"><![CDATA[
<script defer="true"><![CDATA[
var arr = [
"cmsp.start",
"cmsp.stop"];
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B65-ZK-1918.zul
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class Serialization1 extends SelectorComposer {
</zscript>
If you cannot see any Java Exception, that bug has fixed.
<window apply="Serialization1">
<script type="text/javascript"><![CDATA[
<script><![CDATA[
function dummy() {
// nothing to do
}
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B65-ZK-2105.zul
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<button id="startLongOp" label="Click" />
<separator/>
<label id="msg"/>
<script type="text/javascript" defer="true"><![CDATA[
<script defer="true"><![CDATA[
zk.afterMount(function () {
var oldFn = zAu.cmd0.script,
arr = ["cpsp.start", "cpsp.stop"],
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2394.zul
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
1. click the button
2. you should see zk.log shows two "Yes" to indicate the table width is the same with colgroup width
</label>
<script type="text/javascript"><![CDATA[
<script><![CDATA[

function getWidth() {
var hdcolwidth = jq('.z-grid-header>table tr').width();
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2422.zul
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<zk>
<window id="mainWin" width="100%" height="100%" >
<script type="text/javascript"><![CDATA[
<script><![CDATA[
zk.afterMount(function () {
zk.beforeUnload(function() {
console.log("invoke beforeUnload")
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2568.zul
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Copyright (C) Potix Corporation. All Rights Reserved.
1. click the button
2. zk.log should not be '2' (two undefined instead)
</label>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
function getColSpan() {
var colspan = jq('.z-group-inner').attr('colSpan');
zk.log(colspan);
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2656.zul
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Copyright (C) Potix Corporation. All Rights Reserved.
</window>
<!-- Load the script -->
<script src="http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js" type="text/javascript"></script>
<script type="text/javascript">
<script>
zk.afterMount(function() {
zk.log('A', jq("@datebox input")[0]); //does not work in ZK 7
zk.log('B', jq("@datebox > input")[0]); //does not work in ZK 7
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2679.zul
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Copyright (C) Potix Corporation. All Rights Reserved.
3.1 click menuitem
4. you won't see "invoke beforeUnload" log message
</label>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
zk.afterMount(function () {
zk.beforeUnload(function() {
zk.log("invoke beforeUnload")
Expand Down
2 changes: 1 addition & 1 deletion zktest/src/main/webapp/test2/B70-ZK-2825.zul
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Copyright (C) Potix Corporation. All Rights Reserved.
-->
<zk>
<script type="text/javascript" defer="true"><![CDATA[
<script defer="true"><![CDATA[
var arr = ['0', '1', '2'], content = '';
for (var i in arr) {
content += i + '\n';
Expand Down
Loading

0 comments on commit 4647552

Please sign in to comment.