';" +
"if (typeof header == 'undefined') {s=s+'
'+this.defaultMessage+'';} " +
"else {s=s+'
'+header+'';" +
"if (typeof description=='string' && description.length > 0) {s=s+'
'+description+'';}" +
@@ -161,7 +161,9 @@ public class HelpController
}
public void setupFieldTooltip() {
- Clients.response("helpControllerFieldTooltip", new AuScript(htmlToolTip, "var w=zk.Widget.$('#"+htmlToolTip.getUuid()+"');zWatch.listen({onFieldTooltip: w});"));
+ Clients.response("helpControllerFieldTooltip",
+ new AuScript(htmlToolTip, "(function(){let w=zk.Widget.$('#"+htmlToolTip.getUuid()
+ +"');zWatch.listen({onFieldTooltip: w});})()"));
}
/**
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
index 043511980f..3daf899190 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
@@ -260,17 +260,17 @@ public class StatusBarPanel extends Panel implements EventListener
, IStat
popup.setStyle(popupStyle);
if (getRoot() == null || !getRoot().isVisible() ) return;
- String script = "var d = zk.Widget.$('" + popup.getUuid() + "').$n();";
+ String script = "(function(){let d = zk.Widget.$('" + popup.getUuid() + "').$n();";
script += "d.style.display='block';d.style.visibility='hidden';";
- script += "var dhs = document.defaultView.getComputedStyle(d, null).getPropertyValue('height');";
- script += "var dh = parseInt(dhs, 10);";
- script += "var r = zk.Widget.$('" + getRoot().getUuid() + "').$n();";
- script += "var rhs = document.defaultView.getComputedStyle(r, null).getPropertyValue('height');";
- script += "var rh = parseInt(rhs, 10);";
- script += "var p = jq('#"+getRoot().getUuid()+"').zk.cmOffset();";
+ script += "let dhs = document.defaultView.getComputedStyle(d, null).getPropertyValue('height');";
+ script += "let dh = parseInt(dhs, 10);";
+ script += "let r = zk.Widget.$('" + getRoot().getUuid() + "').$n();";
+ script += "let rhs = document.defaultView.getComputedStyle(r, null).getPropertyValue('height');";
+ script += "let rh = parseInt(rhs, 10);";
+ script += "let p = jq('#"+getRoot().getUuid()+"').zk.cmOffset();";
script += "d.style.top=(rh-dh-5)+'px';";
script += "d.style.left=(p[0]+1)+'px';";
- script += "d.style.visibility='visible';";
+ script += "d.style.visibility='visible';})()";
AuScript aus = new AuScript(popup, script);
Clients.response(aus);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
index 1f1f384468..0cb6caf7da 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
@@ -137,12 +137,12 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree
init();
}
- private static final String onComboSelectEchoScript = "var combo=zk('@combo').$();"
- + "var panel=zk('@this').$();"
- + "var comboitem=zk('@item').$();"
- + "var popupheight=combo.getPopupNode_().offsetHeight;"
- + "var evt = new zk.Event(panel, 'onComboSelectEcho', [comboitem.uuid, popupheight], {toServer: true});"
- + "zAu.send(evt);";
+ private static final String onComboSelectEchoScript = "(function(){let combo=zk('@combo').$();"
+ + "let panel=zk('@this').$();"
+ + "let comboitem=zk('@item').$();"
+ + "let popupheight=combo.getPopupNode_().offsetHeight;"
+ + "let evt = new zk.Event(panel, 'onComboSelectEcho', [comboitem.uuid, popupheight], {toServer: true});"
+ + "zAu.send(evt);})()";
protected void init()
{
@@ -267,9 +267,9 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree
tree.getSelectedItem().focus();
});
this.insertBefore(moveItemBox, layout);
- String script = "var w=zk.Widget.$('#" + moveItemBox.getUuid() + "'); ";
- script += "var e=jq('#" + layout.getUuid() + "'); ";
- script += "w.setWidth(e.css('width')); ";
+ String script = "(function(){let w=zk.Widget.$('#" + moveItemBox.getUuid() + "'); ";
+ script += "let e=jq('#" + layout.getUuid() + "'); ";
+ script += "w.setWidth(e.css('width'));})() ";
Clients.response(new AuScript(script));
ti.focus();
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
index 84b47efe7e..ca37f00d9d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
@@ -140,7 +140,7 @@ public class WindowContainer extends AbstractUIPart implements EventListener
cancelCaptureButton.setVisible(true);
cancelCaptureButton.setEnabled(true);
mainLayout.setVisible(false);
- String script = "var wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
- script = script + "var cancelBtn=zk.Widget.$('#"+cancelCaptureButton.getUuid()+"');";
+ String script = "(function(){let wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
+ script = script + "let cancelBtn=zk.Widget.$('#"+cancelCaptureButton.getUuid()+"');";
script = script + "jq(wgt).photobooth(); ";
script = script + "jq(wgt).bind( 'image', function( event, dataUrl ){ cancelBtn.setVisible(false);zAu.send(new zk.Event(wgt, 'onCaptureImage', dataUrl, {toServer:true})); });";
+ script = script + "})()";
Clients.evalJavaScript(script);
}
else if (e.getName().equals("onCaptureImage"))
@@ -302,8 +303,8 @@ public class WImageDialog extends Window implements EventListener
m_mImage.setBinaryData(imageData);
fileNameTextbox.setValue(defaultNameForCaptureImage);
}
- String script = "var wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
- script = script + "jq(wgt).data( 'photobooth').destroy(); ";
+ String script = "(function(){let wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
+ script = script + "jq(wgt).data( 'photobooth').destroy();})() ";
Clients.evalJavaScript(script);
}
else if (e.getTarget() == cancelCaptureButton)
@@ -311,8 +312,8 @@ public class WImageDialog extends Window implements EventListener
captureDiv.setVisible(false);
cancelCaptureButton.setVisible(false);
mainLayout.setVisible(true);
- String script = "var wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
- script = script + "jq(wgt).data( 'photobooth').destroy(); ";
+ String script = "(function(){let wgt = zk.Widget.$('#"+captureDiv.getUuid()+"');";
+ script = script + "jq(wgt).data( 'photobooth').destroy();})() ";
Clients.evalJavaScript(script);
}
else if (e.getName().equals("onSave"))
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java
index 9b769ff129..eb096e4383 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java
@@ -221,8 +221,8 @@ public class WTextEditorDialog extends Window implements EventListener{
text = textBox.getText();
detach();
} else {
- String script = "var w=zk('#"+editor.getUuid()+"').$();var d=w.getEditor().getData();var t=zk('#" +
- this.getUuid()+"').$();var e=new zk.Event(t,'onEditorCallback',d,{toServer:true});zAu.send(e);";
+ String script = "(function(){let w=zk('#"+editor.getUuid()+"').$();let d=w.getEditor().getData();let t=zk('#" +
+ this.getUuid()+"').$();let e=new zk.Event(t,'onEditorCallback',d,{toServer:true});zAu.send(e);})()";
Clients.response(new AuScript(script));
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java
index aa62cd2132..8e24775856 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java
@@ -1691,21 +1691,23 @@ public class ZkReportViewer extends Window implements EventListener, ITab
private void showBusyMask(Window window) {
getParent().appendChild(getMask());
- StringBuilder script = new StringBuilder("var w=zk.Widget.$('#");
+ StringBuilder script = new StringBuilder("(function(){let w=zk.Widget.$('#");
script.append(getParent().getUuid()).append("');");
if (window != null) {
- script.append("var d=zk.Widget.$('#").append(window.getUuid()).append("');w.busy=d;");
+ script.append("let d=zk.Widget.$('#").append(window.getUuid()).append("');w.busy=d;");
} else {
script.append("w.busy=true;");
}
+ script.append("})()");
Clients.response(new AuScript(script.toString()));
}
public void hideBusyMask() {
if (mask != null && mask.getParent() != null) {
mask.detach();
- StringBuilder script = new StringBuilder("var w=zk.Widget.$('#");
+ StringBuilder script = new StringBuilder("(function(){let w=zk.Widget.$('#");
script.append(getParent().getUuid()).append("');w.busy=false;");
+ script.append("})()");
Clients.response(new AuScript(script.toString()));
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/zkoss/addon/chosenbox/Chosenbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/zkoss/addon/chosenbox/Chosenbox.java
index ca9a73f78e..dcfe9fd28e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/zkoss/addon/chosenbox/Chosenbox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/zkoss/addon/chosenbox/Chosenbox.java
@@ -812,8 +812,8 @@ public class Chosenbox extends HtmlBasedComponent {
objects, null, null, null, index, 0));
if (selItems.size() < (getSubListModel() != null ? getSubListModel().getSize() : getModel().getSize())) {
StringBuilder script = new StringBuilder();
- script.append("var w=zk.Widget.$('#").append(getUuid()).append("');");
- script.append("w.$n('inp').focus();");
+ script.append("(function(){let w=zk.Widget.$('#").append(getUuid()).append("');");
+ script.append("w.$n('inp').focus();})()");
Executions.schedule(getDesktop(), e -> {setOpen(true);Clients.evalJavaScript(script.toString());}, new Event("onPostSelect"));
}
_onSelectTimestamp = System.currentTimeMillis();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/adempiere/local/storage/token.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/adempiere/local/storage/token.js
index be577bd350..f0a8826fd1 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/adempiere/local/storage/token.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/adempiere/local/storage/token.js
@@ -13,7 +13,7 @@
*****************************************************************************/
window.adempiere = {};
-var adempiere = window.adempiere;
+let adempiere = window.adempiere;
adempiere.isSupportSavePass=typeof(Storage) !== "undefined";
adempiere.saveUserToken = function (key, hash, sessionId)
@@ -29,15 +29,15 @@ adempiere.findUserToken = function (cmpid, key)
if (!adempiere.isSupportSavePass)
return;
- var sid = localStorage[key+".sid"];
- var hash = localStorage[key+".hash"];
+ let sid = localStorage[key+".sid"];
+ let hash = localStorage[key+".hash"];
if (sid == null || sid == "" || hash == null || hash == ""){
return
}
- var widget = zk.Widget.$(cmpid);
- var event = new zk.Event(widget, 'onUserToken', {sid: sid, hash: hash}, {toServer: true});
+ let widget = zk.Widget.$(cmpid);
+ let event = new zk.Event(widget, 'onUserToken', {sid: sid, hash: hash}, {toServer: true});
zAu.send(event);
};
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/Chosenbox.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/Chosenbox.js
index 7a5784f203..1ed4e7a128 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/Chosenbox.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/Chosenbox.js
@@ -25,7 +25,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
}, 350);
}
- var Chosenbox =
+ let Chosenbox =
chosenbox.Chosenbox = zk.$extends(zul.Widget, {
$init : function(props) {
@@ -55,7 +55,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
* tabindex
*/
tabindex : function(tabindex) {
- var n = this.$n('inp');
+ let n = this.$n('inp');
if (n)
n.tabindex = tabindex || '';
},
@@ -72,7 +72,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
* selectedIndex
*/
selectedIndex : function(v, opts) {
- var options, sel;
+ let options, sel;
this._clearSelection();
if ((sel = this.$n('sel')) && v >= 0) {
options = jq(sel).children();
@@ -99,7 +99,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
* disabled
*/
disabled : function(disabled) {
- var n = this.$n('inp');
+ let n = this.$n('inp');
if (n)
n.disabled = disabled ? 'disabled' : '';
},
@@ -135,7 +135,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
* name the name of this component.
*/
name : function(name) {
- var n = this.$n('inp');
+ let n = this.$n('inp');
if (n)
n.name = name;
},
@@ -231,7 +231,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
* this component.
*/
separator : function(v) {
- var separatorCode = this._separatorCode;
+ let separatorCode = this._separatorCode;
separatorCode.length = 0;
// save keycode for special symble
// handle the code of special char because
@@ -288,7 +288,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
open : null
},
setListContent : function(v) {
- var sel, out, oldHlite, value;
+ let sel, out, oldHlite, value;
if (sel = this.$n('sel')) {
if (oldHlite = jq(this.$n('sel'))
.find(
@@ -317,27 +317,27 @@ it will be useful, but WITHOUT ANY WARRANTY.
}
},
_renderItems : function(out, content) {
- var s = $eval(content ? content : this._items)
+ let s = $eval(content ? content : this._items)
|| [], zcls = this.getZclass();
- for (var i = 0, j = s.length; i < j; i++) {
+ for (let i = 0, j = s.length; i < j; i++) {
out.push('',
zUtl.encodeXML(s[i]), '
');
}
return out;
},
getZclass : function() {
- var zcls = this._zclass;
+ let zcls = this._zclass;
return zcls != null ? zcls : "z-chosenbox";
},
// update the selected items, the old selection will be
// cleared at first
setChgSel : function(val) { // called from the server
this._clearSelection();
- var sel, options;
+ let sel, options;
if (sel = this.$n('sel')) { // select each item
options = jq(sel).children();
- var s = $eval(val), renderByServer = this._renderByServer, item, value;
- for (var i = 0; i < s.length; i++) {
+ let s = $eval(val), renderByServer = this._renderByServer, item, value;
+ for (let i = 0; i < s.length; i++) {
value = s[i];
if (item = this._getItemByValue(value))
this._doSelect(item);
@@ -350,7 +350,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
bind_ : function() {
this.$supers(Chosenbox, 'bind_', arguments);
- var n = this.$n(), inp = this.$n('inp');
+ let n = this.$n(), inp = this.$n('inp');
this.domListen_(inp, 'onFocus', 'doFocus_')
.domListen_(inp, 'onBlur', 'doBlur_');
@@ -361,19 +361,19 @@ it will be useful, but WITHOUT ANY WARRANTY.
this._fixWidth(n);
//fix selection
if (this._selItems && this._selItems.length > 0) {
- var s = this._selItems;
+ let s = this._selItems;
this._selItems = [];
- for (var i = 0; i < s.length; i++) {
- var value = s[i];
+ for (let i = 0; i < s.length; i++) {
+ let value = s[i];
if (item = this._getItemByValue(value))
this._doSelect(item);
else
this._selectItemDirectly(value);
}
} else if (this._chgSel) {
- var s = this._chgSel;
+ let s = this._chgSel;
this._chgSel = null;
- for (var i = 0; i < s.length; i++) {
+ for (let i = 0; i < s.length; i++) {
value = s[i];
if (item = this._getItemByValue(value))
this._doSelect(item);
@@ -387,7 +387,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
this.setOpen(true);
},
unbind_ : function() {
- var inp = this.$n('inp');
+ let inp = this.$n('inp');
this.domUnlisten_(inp, 'onFocus', 'doFocus_')
.domUnlisten_(inp, 'onBlur', 'doBlur_');
zWatch.unlisten({
@@ -418,24 +418,24 @@ it will be useful, but WITHOUT ANY WARRANTY.
this.getZclass() + '-focus');
},
doMouseOver_ : function(evt) {
- var target = evt.domTarget;
+ let target = evt.domTarget;
// mouseover option
if (jq(target).hasClass(
this.getZclass() + '-option'))
this._hliteOpt(target, true);
},
doMouseOut_ : function(evt) {
- var target = evt.domTarget;
+ let target = evt.domTarget;
// mouseout option
if (jq(target).hasClass(
this.getZclass() + '-option-over'))
this._hliteOpt(target, false);
},
_hliteOpt : function(target, highlight) {
- var zcls = this.getZclass() + '-option-over';
+ let zcls = this.getZclass() + '-option-over';
if (highlight) {
// clear old first
- var oldHlite = jq(this.$n('sel'))
+ let oldHlite = jq(this.$n('sel'))
.find(
'.' + this.getZclass()
+ '-option-over')[0];
@@ -451,7 +451,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
else if (key == 'down')
this._moveOptionFocus('next');
else {
- var inp = this.$n('inp'), pos = zk(inp)
+ let inp = this.$n('inp'), pos = zk(inp)
.getSelectionRange(), label = jq(
this.$n()).find(
'.' + this.getZclass()
@@ -472,7 +472,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
// focus previous or next visible option,
// depends on dir
_moveOptionFocus : function(dir) {
- var sel = this.$n('sel'), $sel = jq(sel), oldHlite = $sel
+ let sel = this.$n('sel'), $sel = jq(sel), oldHlite = $sel
.find('.' + this.getZclass()
+ '-option-over')[0], newHlite, next = dir == 'next', prev = dir == 'prev';
if (next && !this._open) // default focus first
@@ -511,7 +511,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
// focus previous or next label,
// depends on dir
_moveLabelFocus : function(label, dir) {
- var zcls = this.getZclass() + '-sel-item-focus', newLabel, prev = dir == 'prev', next = dir == 'next';
+ let zcls = this.getZclass() + '-sel-item-focus', newLabel, prev = dir == 'prev', next = dir == 'next';
if (label) {
jq(label).removeClass(zcls);
newLabel = prev ? label.previousSibling
@@ -527,14 +527,14 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// called after press backspace or del and release
_deleteLabel : function(key, evt) {
- var inp = this.$n('inp'), pos = zk(inp)
+ let inp = this.$n('inp'), pos = zk(inp)
.getSelectionRange(), label;
// only works if cursor is at the begining of input
if (pos[0] == 0 && pos[1] == 0) {
- var zcls = this.getZclass() + '-sel-item-focus';
+ let zcls = this.getZclass() + '-sel-item-focus';
if (label = jq(this.$n()).find('.' + zcls)[0]) {
- var dir = (label.previousSibling && key == 'backspace') ? 'prev'
+ let dir = (label.previousSibling && key == 'backspace') ? 'prev'
: 'next';
this._moveLabelFocus(label, dir);
this._doDeselect(label, {
@@ -550,14 +550,14 @@ it will be useful, but WITHOUT ANY WARRANTY.
}
},
_removeLabelFocus : function() {
- var zcls = this.getZclass() + '-sel-item-focus', label = jq(
+ let zcls = this.getZclass() + '-sel-item-focus', label = jq(
this.$n()).find('.' + zcls)[0];
if (label)
jq(label).removeClass(zcls);
},
// called after press enter and release
_doEnterPressed : function(evt) {
- var $sel, hlited, old;
+ let $sel, hlited, old;
// clear timer and fix display before process
if (old = this.fixDisplay)
clearTimeout(old);
@@ -577,7 +577,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
&& (hlited = $sel.find('.'
+ this.getZclass()
+ '-option-over')[0])) {
- var options = $sel.children();
+ let options = $sel.children();
this._doSelect(hlited, {
sendOnSelect : true
});
@@ -591,7 +591,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
doClick_ : function(evt) {
if (!this.isDisabled()) {
- var target = evt.domTarget, $target = jq(target), inp = this
+ let target = evt.domTarget, $target = jq(target), inp = this
.$n('inp'), zcls = this.getZclass();
this._removeLabelFocus();
if (inp.value == this._emptyMessage)
@@ -616,7 +616,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
sendOnOpen : true
});
} else {
- var label = target, zcls = this.getZclass()
+ let label = target, zcls = this.getZclass()
+ '-sel-item';
if ($target.hasClass(zcls)
|| (label = $target.parent('.'
@@ -637,7 +637,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
// select an item
_doSelect : function(target, opts) {
this._hliteOpt(target, false);
- var value = target.innerHTML;
+ let value = target.innerHTML;
if (this._selItems.indexOf(value) == -1) {
this._createLabel(value);
target.style.display = 'none'; // hide selected
@@ -660,7 +660,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// deselect an item
_doDeselect : function(selectedItem, opts) {
- var value = jq(selectedItem).find(
+ let value = jq(selectedItem).find(
'.' + this.getZclass() + '-sel-item-cnt')[0].innerHTML, element = this
._getItemByValue(value), _selItems = this._selItems;
if (this._open)
@@ -682,8 +682,8 @@ it will be useful, but WITHOUT ANY WARRANTY.
this._startFixDisplay();
},
_getItemByValue : function(value) {
- var options = jq(this.$n('sel')).children(), item;
- for (var i = 0; i < options.length; i++)
+ let options = jq(this.$n('sel')).children(), item;
+ for (let i = 0; i < options.length; i++)
if ((item = options[i])
&& item.innerHTML == value)
return item;
@@ -692,7 +692,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// create label for selected item
_createLabel : function(value) {
- var span = document.createElement("span"), content = document
+ let span = document.createElement("span"), content = document
.createElement("div"), delbtn = document
.createElement("div"), wgt = this, zcls = this
.getZclass();
@@ -717,7 +717,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// clear all selected items
_clearSelection : function(opts) {
- var n = this.$n(), inp = this.$n('inp'), c, // selected
+ let n = this.$n(), inp = this.$n('inp'), c, // selected
// item
del;
if (n)
@@ -731,21 +731,21 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// fire onSelectevent to server
fireSelectEvent : function() {
- var data = [], selItems = this._selItems; // selected
+ let data = [], selItems = this._selItems; // selected
// item
- for (var i = 0; i < selItems.length; i++)
+ for (let i = 0; i < selItems.length; i++)
data.push(selItems[i]);
this.fire('onSelect', data);
},
// fire onSearch event
_fireOnSearch : function(value) {
- var data = [];
+ let data = [];
data.push(value);
this.fire('onSearch', data);
},
// fire onSearching event
_fireOnSearching : function(value) {
- var data = [];
+ let data = [];
data.push(value);
this.fire('onSearching', data);
},
@@ -762,7 +762,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
doKeyDown_ : function(evt) {
- var keyCode = evt.keyCode;
+ let keyCode = evt.keyCode;
switch (keyCode) {
case 8:// backspace
this._deleteLabel('backspace', evt);
@@ -802,7 +802,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
this._removeLabelFocus();
},
doKeyUp_ : function(evt) {
- var keyCode = evt.keyCode, opts = {
+ let keyCode = evt.keyCode, opts = {
hliteFirst : true
};
switch (keyCode) {
@@ -831,7 +831,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
startOnSearching(this);
},
_isSeparator : function(keyCode) {
- var separator = this._separator, separatorCode = this._separatorCode;
+ let separator = this._separator, separatorCode = this._separatorCode;
return (separatorCode && separatorCode
.indexOf(keyCode) != -1)
|| ((keyCode >= 48 && keyCode <= 122)
@@ -842,7 +842,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
.fromCharCode(keyCode)) != -1);
},
_updateInput : function(evt) {
- var inp = evt ? evt.domTarget : this.$n('inp'), txcnt = this
+ let inp = evt ? evt.domTarget : this.$n('inp'), txcnt = this
.$n('txcnt'), wgt = this;
// check every 100ms while input
@@ -855,7 +855,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
if (!this.isDisabled())
this._open = open;
if (this.$n('pp')) {
- var pp = this.$n('pp');
+ let pp = this.$n('pp');
if (open)
this.open(this.$n(), pp, opts);
else
@@ -863,7 +863,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
}
},
open : function(n, pp, opts) {
- var ppstyle = pp.style;
+ let ppstyle = pp.style;
this._fixWidth(n);
this._fixsz(pp);
@@ -875,7 +875,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
ppstyle.zIndex = n.style.zIndex;
ppstyle.display = 'block';
if (opts) {
- var inp = this.$n();
+ let inp = this.$n();
zk(pp).position(inp, "after_start");
}
@@ -908,7 +908,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
this._clearListContent();
},
_fixsz : function(pp) {
- var ppstyle = pp.style, maxh = this._ppMaxHeight;
+ let ppstyle = pp.style, maxh = this._ppMaxHeight;
ppstyle.height = 'auto';
ppstyle.left = "-10000px";
ppstyle.display = "block";
@@ -920,7 +920,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// calculate the width for input field
_fixInputWidth : function() {
- var n = this.$n(), inp = this.$n('inp'), txcnt = this
+ let n = this.$n(), inp = this.$n('inp'), txcnt = this
.$n('txcnt'), oldh = jq(n).height(), width, max = parseInt(this._width) - 10;
// copy value to hidden txcnt
txcnt.innerHTML = inp.value;
@@ -942,7 +942,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
this._fixDisplay(opts);
else { // replace old if exist and hold a while
// while input
- var wgt = this, old;
+ let wgt = this, old;
if (old = this.fixDisplay)
clearTimeout(old);
this.fixDisplay = setTimeout(function() {
@@ -954,10 +954,10 @@ it will be useful, but WITHOUT ANY WARRANTY.
_fixDisplay : function(opts) {
if (!this._open)
return;
- var fromServer = opts && opts.fromServer;
+ let fromServer = opts && opts.fromServer;
if (!this._renderByServer
|| (opts && opts.fromServer)) {
- var str = this.$n('inp').value, oldhlite = jq(
+ let str = this.$n('inp').value, oldhlite = jq(
this.$n('sel'))
.find(
'.' + this.getZclass()
@@ -976,7 +976,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// fix the display content of options
_fixSelDisplay : function(hliteFirst, str, fromServer) {
- var pp = this.$n('pp'), $pp = jq(pp), maxh = this._ppMaxHeight, ppstyle = pp.style, selItems = this._selItems, options = jq(
+ let pp = this.$n('pp'), $pp = jq(pp), maxh = this._ppMaxHeight, ppstyle = pp.style, selItems = this._selItems, options = jq(
this.$n('sel')).children(), found = false, // unselected
// match
// item
@@ -1034,7 +1034,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// fix the display of no-result text block
_fixEmptyDisplay : function(type, str, found, exist) {
- var ecls = this.getZclass() + '-empty-creatable', empty = this
+ let ecls = this.getZclass() + '-empty-creatable', empty = this
.$n('empty');
if (type
&& (type.showBlank || type.showExistance
@@ -1054,7 +1054,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
// item
// and
// creatable
- var createMsg = this._createMessage;
+ let createMsg = this._createMessage;
if (createMsg)
createMsg = zUtl.encodeXML(
createMsg.replace(/\{0\}/g,
@@ -1066,7 +1066,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
jq(empty).addClass(ecls);
} else { // show no-result text if
// nothing can be selected
- var empMsg = this._noResultsText;
+ let empMsg = this._noResultsText;
if (empMsg)
empMsg = zUtl.encodeXML(
empMsg.replace(/\{0\}/g,
@@ -1086,7 +1086,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
},
// show emptyMessage or clear input
_fixEmptyMessage : function(force) {
- var inp;
+ let inp;
if ((!this._open || force)
&& (inp = this.$n('inp'))) {
@@ -1099,7 +1099,7 @@ it will be useful, but WITHOUT ANY WARRANTY.
}
},
domAttrs_ : function() {
- var v;
+ let v;
return this.$supers('domAttrs_', arguments)
+ (this.isDisabled() ? ' disabled="disabled"'
: '')
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/mold/chosenbox.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/mold/chosenbox.js
index ef2da6eefe..ccc11e46d3 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/mold/chosenbox.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/chosenbox/mold/chosenbox.js
@@ -13,7 +13,7 @@ This program is distributed under LGPL Version 3.0 in the hope that
it will be useful, but WITHOUT ANY WARRANTY.
*/
function (out) {
- var zcls = this.getZclass(),
+ let zcls = this.getZclass(),
uid = this.uuid;
out.push('',
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
index bd746c7fe4..05a9216fe7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
@@ -1,16 +1,16 @@
(function() {
jawwa.atmosphere.startServerPush = function(dtid, timeout) {
- var dt = zk.Desktop.$(dtid);
+ let dt = zk.Desktop.$(dtid);
if (dt._serverpush)
dt._serverpush.stop();
//change to true to enable trace of execution
- var trace = false;
- var spush = new jawwa.atmosphere.ServerPush(dt, timeout, trace);
+ let trace = false;
+ let spush = new jawwa.atmosphere.ServerPush(dt, timeout, trace);
spush.start();
};
jawwa.atmosphere.stopServerPush = function(dtid) {
- var dt = zk.Desktop.$(dtid);
+ let dt = zk.Desktop.$(dtid);
if (dt._serverpush)
dt._serverpush.stop();
};
@@ -37,7 +37,7 @@
this.ajaxOptions.timeout = this.timeout;
this.ajaxOptions.url = zk.ajaxURI("/comet", {au: true,desktop:this.desktop.id,ignoreSession:true}),
this.trace = trace;
- var me = this;
+ let me = this;
this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) {
if (me.trace)
console.log("error: " + textStatus + " dtid: " + me.desktop.id + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
@@ -67,7 +67,7 @@
},
_schedule: function() {
if (this.failures < 3) {
- var d = this.delay;
+ let d = this.delay;
if (this._req && (this._req.status == 0 || this._req.status == 400))
d = 500;
this._req = null;
@@ -83,7 +83,7 @@
if (this.trace)
console.log("_send"+ " dtid: " + this.desktop.id);
- var jqxhr = $.ajax(this.ajaxOptions);
+ let jqxhr = $.ajax(this.ajaxOptions);
this._req = jqxhr;
zAu.cmd0.echo(this.desktop);
},
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calc.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calc.js
index d9f48ce218..5e8e40bdca 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calc.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calc.js
@@ -10,7 +10,7 @@ function Calc()
function validateDown(displayTextId, calcTextId, integral, separatorKey, e, processDotKeypad)
{
- var key;
+ let key;
if(window.event)
key = e.keyCode; //IE
else
@@ -31,8 +31,8 @@ function Calc()
{
try
{
- var id = "$".concat(calcTextId);
- var calcText = jq(id)[0];
+ let id = "$".concat(calcTextId);
+ let calcText = jq(id)[0];
calcText.value = "";
}
catch (err)
@@ -44,9 +44,9 @@ function Calc()
{
try
{
- var id = "$".concat(calcTextId);
- var calcText = jq(id)[0];
- var val = calcText.value;
+ let id = "$".concat(calcTextId);
+ let calcText = jq(id)[0];
+ let val = calcText.value;
if (val != "")
{
val = val.substring(0, val.length - 1);
@@ -62,15 +62,15 @@ function Calc()
function evaluate(displayTextId, calcTextId, separator)
{
// console.log("evaluate: " + displayTextId + " / " + calcTextId + " / " + separator);
- var newValue = "error";
+ let newValue = "error";
try
{
- var id = "$".concat(calcTextId);
- var calcText = jq(id)[0];
- var value = calcText.value;
+ let id = "$".concat(calcTextId);
+ let calcText = jq(id)[0];
+ let value = calcText.value;
if (separator != '.')
{
- var re = new RegExp("[" + separator + "]", "g");
+ let re = new RegExp("[" + separator + "]", "g");
value = value.replace(re,'.');
}
value = value
@@ -82,7 +82,7 @@ function Calc()
.replace(/0/g, '') // throw away the rest of the zeros
.replace(/z/g, '0'); // turn sentinels back to zeros
newValue = value;
- var result = "" + eval(value);
+ let result = "" + eval(value);
if (separator != '.')
{
result = result.replace(/\./, separator);
@@ -90,7 +90,7 @@ function Calc()
calcText.value = result;
id = "$".concat(displayTextId);
- var displayText = jq(id)[0];
+ let displayText = jq(id)[0];
if (!displayText.readOnly && calcText.value != 'undefined')
{
@@ -106,18 +106,18 @@ function Calc()
function append(calcTextId, val)
{
- var id = "$".concat(calcTextId);
- var calcText = jq(id)[0];
+ let id = "$".concat(calcTextId);
+ let calcText = jq(id)[0];
calcText.value += val;
calcText.focus();
}
function appendOnCursor(calcTextId, val)
{
- var id = "$".concat(calcTextId);
- var calcText = jq(id)[0];
- var position = calcText.selectionStart;
- var newValue = calcText.value.substring(0, position) + val + calcText.value.substring(position);
+ let id = "$".concat(calcTextId);
+ let calcText = jq(id)[0];
+ let position = calcText.selectionStart;
+ let newValue = calcText.value.substring(0, position) + val + calcText.value.substring(position);
calcText.value = newValue;
calcText.setSelectionRange(position+1, position+1);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calendar.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calendar.js
new file mode 100644
index 0000000000..5304cf77eb
--- /dev/null
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/calendar.js
@@ -0,0 +1,35 @@
+zk.afterLoad('calendar', function() {
+ zk.override(calendar.Event.prototype, "calculate_", function() {
+ if (typeof this.event === "undefined" || this.event == null) {
+ return;
+ }
+ this.$calculate_.apply(this, arguments);
+ });
+
+ zk.override(calendar.Event.prototype, "unbind_", function() {
+ let node = this.$n();
+ if (typeof node === "undefined") {
+ return;
+ }
+ if (typeof this.$unbind_ === "undefined") {
+ return;
+ }
+ this.$unbind_.apply(this, arguments);
+ });
+
+ zk.override(calendar.CalendarsMonth.prototype, "onSize", function() {
+ let cmp = this.$n();
+ if (typeof cmp === "undefined" || cmp == null) {
+ return;
+ }
+ this.$onSize.apply(this, arguments);
+ });
+
+ zk.override(calendar.CalendarsDefault.prototype, "onSize", function() {
+ let cmp = this.$n();
+ if (typeof cmp === "undefined" || cmp == null) {
+ return;
+ }
+ this.$onSize.apply(this, arguments);
+ });
+});
\ No newline at end of file
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/input.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/input.js
new file mode 100644
index 0000000000..9ed95eb354
--- /dev/null
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/input.js
@@ -0,0 +1,129 @@
+zk.afterLoad(function() {
+ zk.$package('id.zk');
+
+ id.zk.Extend = zk.$extends(zk.Object, {}, {
+ fakeOnchange: function(wgt) {
+ // just sent fake event when control is textfield and value is not yet sync to server
+ if ((wgt.$instanceof(zul.inp.Textbox) || wgt.$instanceof(zul.inp.Decimalbox)) && wgt.$n().value != wgt.getText())
+ zAu.send(new zk.Event(zk.Widget.$(wgt), 'onChange', {
+ "value": wgt.$n().value
+ }));
+
+ else if (zk.$import("ckez.CKeditor") != undefined && wgt.$instanceof(ckez.CKeditor)) { //https://www.zkoss.org/javadoc/latest/jsdoc/_global_/zk.html#$import(_global_.String)
+ // CKEditor extend from zul.Widget not from wget zul.inp.InputWidget
+ // so some behavior is not same standard input
+ // this code bring from ckez.CKeditor.onBlur
+ let editor = wgt._editor;
+
+ if (wgt._tidChg) {
+ clearInterval(wgt._tidChg);
+ wgt._tidChg = null;
+ }
+
+ if (!editor.document)
+ editor.document = editor.element.getDocument();
+
+ if (wgt.$class._checkEditorDirty(editor)) { // Issue #13
+ let val = editor.getData();
+ wgt._value = val; //save for onRestore
+ //ZKCK-16, 17 use sendAhead to make sure onChange always happens first
+ wgt.fire('onChange', {
+ value: val
+ });
+ editor.resetDirty();
+ }
+ }
+ },
+
+ fireOnInitEdit: function(wgt) {
+ // sent even to indicate field is start edit, this event sent new value to server but now don't use this data.
+ if (wgt.$instanceof(zul.inp.Textbox))
+ zAu.send(new zk.Event(zk.Widget.$(wgt), 'onInitEdit', {
+ "value": wgt.$n().value
+ }));
+ }
+ });
+});
+
+zk.afterLoad('zul.inp', function() {
+
+ // should filter out for only component inside standard window or component wish fire this event,
+ // or ever rise other event like start editting to distinguish with true onChange event
+ zk.override(zul.inp.InputWidget.prototype, "doInput_", function(evt) {
+ this.$doInput_(evt);
+
+ if (this.get("isOnStardardWindow") == 'false' || this.get("isChangeEventWhenEditing") != true) {
+ return; // don't waste time to check component don't lay on standard window
+ }
+
+ let domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout"); // return a array
+ if (domElemOfLayout.length == 0) {
+ this.set("isOnStardardWindow", "false"); // next time don't waste time to check this component
+ // in case, you move this component to a standard window, please update this properties at client by javascript Widget.set ()
+ // or at server by java function component.setWidgetOverride
+ } else {
+ let winLayoutWg = zk.Widget.$(domElemOfLayout);
+ if (winLayoutWg == null) {
+ ; // do nothing, this case rare happen because ".adwindow-layout" always is a component
+ } else {
+ let isEditting = winLayoutWg.get("isEditting");
+ // winLayoutWg should cache to improve perfomance
+ if (isEditting == "false") {
+ winLayoutWg.set("isEditting", "true");
+ id.zk.Extend.fireOnInitEdit(this); //fire change event to move to edit
+ }
+ }
+ }
+ });
+
+ zk.override(zk.Widget.prototype, "onAutofill", function(evt) {
+ id.zk.Extend.fakeOnchange(this); //fire change event to move to edit
+ });
+
+ zk.override(zul.inp.Textbox.prototype, "bind_", function(dt, skipper, after) {
+ if (!this.$bind_)
+ return;
+
+ this.$bind_(dt, skipper, after);
+
+ let txtid = this.getId()
+ if (txtid != "txtUserId" && txtid != "txtPassword") {
+ return;
+ }
+
+ this.domListen_(this.$n(), "onChange", "onAutofill");
+ });
+
+ zk.override(zul.inp.Textbox.prototype, "unbind_", function(dt, skipper) {
+ if (!this.$unbind_)
+ return;
+
+ this.$unbind_(dt, skipper);
+
+ let txtid = this.getId()
+ if (txtid != "txtUserId" && txtid != "txtPassword") {
+ return;
+ }
+
+ this.domUnlisten_(this.$n(), "onChange", "onAutofill"); //unlisten
+ });
+
+ zk.override(zul.inp.Combobox.prototype, "doKeyDown_", function(evt) {
+ // avoid confuse of idempiere shortcut key and function key of combobox
+ if ((evt.altKey || evt.ctrlKey || evt.shiftKey) &&
+ (evt.keyCode == 33 || evt.keyCode == 34 || evt.keyCode == 35 || evt.keyCode == 36 || evt.keyCode == 38 || evt.keyCode == 40 || evt.keyCode == 37 || evt.keyCode == 39)) { //page up | page down | end | home | up | down | left | write
+
+ if (this.isOpen()) //close drop down if already open. it will let combobox select current item, it's consistent with lost focus
+ this.close({
+ sendOnOpen: true
+ });
+
+ return;
+ // TODO:current idempiere use alt + down/up to move child parrent tab, but combobox also use it to open, close drop down
+ // at the moment, idempiere shortcut is more useful, so just get it work
+ } else {
+ this.$doKeyDown_(evt);
+ }
+
+ });
+});
\ No newline at end of file
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/layout.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/layout.js
index 3e9a8a9fca..c69decbae6 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/layout.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/layout.js
@@ -3,7 +3,7 @@ if (typeof window.idempiere === 'undefined')
window.idempiere.scrollToRow = function(uuid){
try {
- var cmp = zk.Widget.$(uuid);
+ let cmp = zk.Widget.$(uuid);
if (cmp) {
cmp.scrollIntoView();
cmp.focus();
@@ -16,9 +16,9 @@ window.idempiere.scrollToRow = function(uuid){
//overload for recalculate width of grid frozen scroll
//base on _onSizeLater(wgt) from Frozen.js
window.idempiere.syncScrollFrozen = function(wgt){
- var parent = wgt.parent;
+ let parent = wgt.parent;
if (parent.eheadtbl && parent._nativebar) {
- var cells = parent._getFirstRowCells(parent.eheadrows),
+ let cells = parent._getFirstRowCells(parent.eheadrows),
head = parent.head,
totalcols = cells.length - jq(head).find(head.$n('bar')).length,
columns = wgt._columns,
@@ -30,8 +30,8 @@ window.idempiere.syncScrollFrozen = function(wgt){
return;
}
- for (var i = columns; i < totalcols; i++) {
- var n = cells[i],
+ for (let i = columns; i < totalcols; i++) {
+ let n = cells[i],
hdWgt = zk.Widget.$(n),
isVisible = hdWgt && hdWgt.isVisible();
if (!isVisible)
@@ -44,24 +44,24 @@ window.idempiere.syncScrollFrozen = function(wgt){
}
}
- for (var i = 0; i < columns; i++)
+ for (let i = 0; i < columns; i++)
leftWidth += cells[i].offsetWidth;
parent._deleteFakeRow(parent.eheadrows);
wgt.$n('cave').style.width = jq.px0(leftWidth);
- var scroll = wgt.$n('scrollX'),
+ let scroll = wgt.$n('scrollX'),
width = parent.$n('body').offsetWidth;
// B70-ZK-2074: Resize forzen's width as meshwidget's body.
parent.$n('frozen').style.width = jq.px0(width);
width -= leftWidth;
scroll.style.width = jq.px0(width);
- var rightWidth = 0;
- var toScroll = 0;
- for (var i = columns; i < cells.length; i++){
- var hdWgt = zk.Widget.$(cells[i]);
- var isVisible = hdWgt && hdWgt.isVisible();
+ let rightWidth = 0;
+ let toScroll = 0;
+ for (let i = columns; i < cells.length; i++){
+ let hdWgt = zk.Widget.$(cells[i]);
+ let isVisible = hdWgt && hdWgt.isVisible();
if (!isVisible)
continue;
if (cells[i].offsetWidth==0) {
@@ -74,10 +74,10 @@ window.idempiere.syncScrollFrozen = function(wgt){
rightWidth += cells[i].offsetWidth;
}
}
- for (var i = columns; i < cells.length; i++){
- var ow=cells[i].offsetWidth;
+ for (let i = columns; i < cells.length; i++){
+ let ow=cells[i].offsetWidth;
if (ow==0) {
- var hdWgt = zk.Widget.$(cells[i]);
+ let hdWgt = zk.Widget.$(cells[i]);
if (hdWgt._origWd && hdWgt._origWd.indexOf('px')>0)
ow = parseInt(hdWgt._origWd,10);
else if (hdWgt._hflexWidth && hdWgt._hflexWidth > 0)
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/mesh.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/mesh.js
new file mode 100644
index 0000000000..46b09f83ca
--- /dev/null
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/mesh.js
@@ -0,0 +1,56 @@
+zk.afterLoad('zul.mesh', function() {
+
+ zk.override(zul.mesh.Paging.prototype, "bind_", function() {
+ this.$bind_.apply(this, arguments);
+ if (this._totalSize == 0x7fffffff) {
+ jq(".z-paging-text", this).text(" / ?");
+ }
+ });
+
+ zk.override(zul.mesh.Paging.prototype, "infoText_",
+ function() {
+ //this.$infoText_.apply(this, arguments);
+ let acp = this._activePage,
+ psz = this._pageSize,
+ tsz = this._totalSize,
+
+ lastItem = (acp + 1) * psz,
+ dash = '';
+
+ if ('os' != this.getMold())
+ dash = ' - ' + (lastItem > tsz ? tsz : lastItem);
+
+ if (this._totalSize == 0x7fffffff)
+ tsz = "?";
+
+ return '[ ' + (acp * psz + 1) + dash + ' / ' + tsz + ' ]';
+ });
+
+ let _xFrozen = {};
+ zk.override(zul.mesh.Frozen.prototype, _xFrozen, {
+ _doScrollNow: function() {
+ let result = _xFrozen._doScrollNow.apply(this, arguments);
+ /*Patch: add class to non-visible columns*/
+ let mesh = this.parent;
+ if (mesh.head) {
+ let totalCols = mesh.head.nChildren,
+ hdcol = mesh.ehdfaker.firstChild;
+
+ for (let faker, i = 0; hdcol && i < totalCols; hdcol = hdcol.nextSibling, i++) {
+ if (hdcol.style.width.indexOf('0.001px') != -1 || hdcol.style.width.indexOf('0px') != -1) {
+ jq(zk.$(hdcol).$n()).addClass("hiddencol");
+ } else {
+ jq(zk.$(hdcol).$n()).removeClass("hiddencol");
+ }
+ }
+ }
+ return result;
+ }
+ });
+
+ zk.override(zul.mesh.MeshWidget.prototype, "clearCache", function() {
+ this.$clearCache();
+ if (this.eheadrows) this.eheadrows = null;
+ if (this.efootrows) this.efootrows = null;
+ });
+});
\ No newline at end of file
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/report.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/report.js
index f36b15480a..eabc361a54 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/report.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/report.js
@@ -3,38 +3,38 @@ if (typeof window.idempiere === 'undefined')
window.idempiere.zoom = function(cmpid, column, value){
zAu.cmd0.showBusy(null);
- var widget = zk.Widget.$(cmpid);
- var event = new zk.Event(widget, 'onZoom', {data: [column, value]}, {toServer: true});
+ let widget = zk.Widget.$(cmpid);
+ let event = new zk.Event(widget, 'onZoom', {data: [column, value]}, {toServer: true});
zAu.send(event);
};
window.idempiere.zoomWindow = function(cmpid, column, value, windowuu){
zAu.cmd0.showBusy(null);
- var widget = zk.Widget.$(cmpid);
- var event = new zk.Event(widget, 'onZoom', {data: [column, value, 'AD_Window_UU', windowuu]}, {toServer: true});
+ let widget = zk.Widget.$(cmpid);
+ let event = new zk.Event(widget, 'onZoom', {data: [column, value, 'AD_Window_UU', windowuu]}, {toServer: true});
zAu.send(event);
};
window.idempiere.drillAcross = function(cmpid, column, value){
zAu.cmd0.showBusy(null);
- var widget = zk.Widget.$(cmpid);
- var event = new zk.Event(widget, 'onDrillAcross', {data: [column, value]}, {toServer: true});
+ let widget = zk.Widget.$(cmpid);
+ let event = new zk.Event(widget, 'onDrillAcross', {data: [column, value]}, {toServer: true});
zAu.send(event);
};
window.idempiere.drillDown = function(cmpid, column, value){
zAu.cmd0.showBusy(null);
- var widget = zk.Widget.$(cmpid);
- var event = new zk.Event(widget, 'onDrillDown', {data: [column, value]}, {toServer: true});
+ let widget = zk.Widget.$(cmpid);
+ let event = new zk.Event(widget, 'onDrillDown', {data: [column, value]}, {toServer: true});
zAu.send(event);
};
window.idempiere.showColumnMenu = function(doc, e, columnName, row) {
- var d = idempiere.getMenu (doc, e.target.getAttribute ("componentId"), e.target.getAttribute ("foreignColumnName"), e.target.getAttribute ("value"));
+ let d = idempiere.getMenu (doc, e.target.getAttribute ("componentId"), e.target.getAttribute ("foreignColumnName"), e.target.getAttribute ("value"));
- var posx = 0;
- var posy = 0;
- if (!e) var e = window.event;
+ let posx = 0;
+ let posy = 0;
+ if (!e) e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX;
posy = e.pageY;
@@ -50,7 +50,7 @@ window.idempiere.showColumnMenu = function(doc, e, columnName, row) {
d.style.left = posx;
d.style.display = "block";
- var f = function() {
+ let f = function() {
doc.contextMenu.style.display='none'
};
setTimeout(f, 3000);
@@ -60,7 +60,7 @@ window.idempiere.getMenu = function(doc, componentId, foreignColumnName, value){
doc.contextMenu = null;
if (componentId != null){
//menu div
- var menu = doc.createElement("div");
+ let menu = doc.createElement("div");
menu.style.position = "absolute";
menu.style.display = "none";
menu.style.top = "0";
@@ -70,13 +70,13 @@ window.idempiere.getMenu = function(doc, componentId, foreignColumnName, value){
menu.style.backgroundColor = "white";
//window menu item
- var windowMenu = doc.createElement("div");
+ let windowMenu = doc.createElement("div");
windowMenu.style.padding = "3px";
windowMenu.style.verticalAlign = "middle";
windowMenu.setAttribute("onmouseover", "this.style.backgroundColor = 'lightgray'");
windowMenu.setAttribute("onmouseout", "this.style.backgroundColor = 'white'");
- var href = doc.createElement("a");
+ let href = doc.createElement("a");
href.style.fontSize = "11px";
href.style.textDecoration = "none";
href.style.verticalAlign = "middle";
@@ -86,9 +86,9 @@ window.idempiere.getMenu = function(doc, componentId, foreignColumnName, value){
windowMenu.appendChild(href);
menu.appendChild(windowMenu);
- var windowIco = doc.body.getAttribute ("windowIco");
+ let windowIco = doc.body.getAttribute ("windowIco");
if (typeof windowIco === 'string' && windowIco.length > 0) {
- var image = doc.createElement("img");
+ let image = doc.createElement("img");
image.src = windowIco;
image.setAttribute("align", "middle");
href.appendChild(image);
@@ -96,14 +96,14 @@ window.idempiere.getMenu = function(doc, componentId, foreignColumnName, value){
href.appendChild(doc.createTextNode(doc.body.getAttribute ("windowLabel")));
//report menu item
- var report = doc.createElement("div");
+ let report = doc.createElement("div");
report.style.padding = "3px";
report.style.verticalAlign = "middle";
report.setAttribute("onmouseover", "this.style.backgroundColor = 'lightgray'");
report.setAttribute("onmouseout", "this.style.backgroundColor = 'white'");
- var reportHref = doc.createElement("a");
+ let reportHref = doc.createElement("a");
reportHref.href = "javascript:void(0)";
reportHref.style.textDecoration = "none";
reportHref.style.fontSize = "11px";
@@ -112,9 +112,9 @@ window.idempiere.getMenu = function(doc, componentId, foreignColumnName, value){
report.appendChild(reportHref);
menu.appendChild(report);
- var reportIco = doc.body.getAttribute ("reportIco");
+ let reportIco = doc.body.getAttribute ("reportIco");
if (typeof reportIco === 'string' && reportIco.length > 0) {
- var reportimage = doc.createElement("img");
+ let reportimage = doc.createElement("img");
reportimage.src = reportIco;
reportimage.setAttribute("align", "middle");
reportHref.appendChild(reportimage);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/tree.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/tree.js
index a9e98c8e2b..3665dc30cf 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/tree.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/tree.js
@@ -1,24 +1,24 @@
zk.afterLoad("zul.sel", function () {
- var _tWgt = {},
+ let _tWgt = {},
_tiWgt = {};
zk.override(zul.sel.Treerow.prototype, _tiWgt, {
getDragOptions_: function (map) {
- var copy = map.constructor(),
+ let copy = map.constructor(),
wgt = this;
// clone map
- for (var attr in map) {
+ for (let attr in map) {
if (map.hasOwnProperty(attr)) copy[attr] = map[attr];
}
// change functions as needed
- var oldChange = copy.change,
+ let oldChange = copy.change,
oldEnd = copy.endeffect;
copy.change = function (drag, pt, evt) {
- var tree = wgt.getTree();
+ let tree = wgt.getTree();
oldChange(drag, pt, evt);
tree.triggerAutoScroll(evt.pageX, evt.pageY);
};
copy.endeffect = function (drag, evt) {
- var tree = wgt.getTree();
+ let tree = wgt.getTree();
oldEnd(drag, evt);
tree.stopAutoScroll();
}
@@ -36,7 +36,7 @@ zk.afterLoad("zul.sel", function () {
speedGap: 50,
speedGapCounter: 0,
triggerAutoScroll: function (x, y) {
- var $n = jq(this.$n()),
+ let $n = jq(this.$n()),
offset = $n.offset(),
top = offset.top + (this.$n('head')? 10 : 0),
bottom = $n.outerHeight(true);
@@ -52,7 +52,7 @@ zk.afterLoad("zul.sel", function () {
this.clearScrollToBottomTimer();
},
startScrollToTop: function (y) {
- var wgt = this;
+ let wgt = this;
this.clearScrollToBottomTimer();
if (!this._scrollToTopTimer) {
this.scrollDelay = this.initialScrollDelay;
@@ -84,7 +84,7 @@ zk.afterLoad("zul.sel", function () {
}
},
startScrollToBottom: function (y) {
- var wgt = this;
+ let wgt = this;
this.clearScrollToTopTimer();
if (!this._scrollToBottomTimer) {
this.scrollDelay = this.initialScrollDelay;
@@ -116,13 +116,13 @@ zk.afterLoad("zul.sel", function () {
}
},
clearScrollToTopTimer: function () {
- var timer = this._scrollToTopTimer;
+ let timer = this._scrollToTopTimer;
if (timer)
clearInterval(timer);
this._scrollToTopTimer = null;
},
clearScrollToBottomTimer: function () {
- var timer = this._scrollToBottomTimer;
+ let timer = this._scrollToBottomTimer;
if (timer)
clearInterval(timer);
this._scrollToBottomTimer = null;
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/window.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/window.js
index 9be2901227..d1e4247183 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/window.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/window.js
@@ -2,19 +2,19 @@ if (typeof window.idempiere === 'undefined')
window.idempiere = {};
window.idempiere.show_popup_window = function(refid, windowid, position) {
- var ref = zk.Widget.$(refid);
- var window = zk(windowid);
+ let ref = zk.Widget.$(refid);
+ let window = zk(windowid);
window.position(ref.$n(), position);
};
zk.override(zk.Widget.prototype, "canActivate",
function () {
- var b = this.$canActivate.apply(this, arguments);
+ let b = this.$canActivate.apply(this, arguments);
if (b) {
if (zk.currentModal) {
return true;
}
- var wgt = this;
+ let wgt = this;
while (wgt) {
if (wgt.busy) {
if (wgt.busy.className) {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/zk.wpd b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/zk.wpd
index ad2b81f95c..fb0a121b58 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/zk.wpd
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/commons/zk.wpd
@@ -5,4 +5,7 @@
+
+
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js
index 822713a508..83a48a553d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js
@@ -1,18 +1,18 @@
(function() {
org.idempiere.websocket.startServerPush = function(dtid) {
- var dt = zk.Desktop.$(dtid);
+ let dt = zk.Desktop.$(dtid);
if (dt._serverpush && dt._serverpush.socket) {
if (dt._serverpush._reconnectId) {
return;
}
dt._serverpush.restart();
} else {
- var spush = new org.idempiere.websocket.ServerPush(dtid);
+ let spush = new org.idempiere.websocket.ServerPush(dtid);
spush.start();
}
};
org.idempiere.websocket.stopServerPush = function(dtid) {
- var dt = zk.Desktop.$(dtid);
+ let dt = zk.Desktop.$(dtid);
if (dt._serverpush)
dt._serverpush.stop();
};
@@ -22,26 +22,26 @@
this.socket = null;
this.active = false;
this.reconnect = false;
- var desktop = zk.Desktop.$(this.dtid);
+ let desktop = zk.Desktop.$(this.dtid);
desktop._serverpush = this;
},
start: function() {
- var desktop = zk.Desktop.$(this.dtid);
+ let desktop = zk.Desktop.$(this.dtid);
if (typeof desktop === 'undefined')
return;
this.reconnect = false;
this._reconnectId = null;
- var url = window.location.protocol == "http:" ? "ws://" : "wss://";
- var path = window.location.href.substring(window.location.protocol.length+2);
+ let url = window.location.protocol == "http:" ? "ws://" : "wss://";
+ let path = window.location.href.substring(window.location.protocol.length+2);
path = path.substring(location.host.length+1);
- var last=path.lastIndexOf("/");
+ let last=path.lastIndexOf("/");
if (last > 0) {
path = "/" + path.substring(0, last) + "/serverpush/";
} else {
path = "/serverpush/";
}
url = url + window.location.host + path + desktop.id;
- var me = this;
+ let me = this;
this.socket = new WebSocket(url);
this.socket.onopen = function (event) {
me.active = true;
@@ -49,7 +49,7 @@
};
this.socket.onmessage = function (event) {
if (event.data=="echo") {
- var desktop = zk.Desktop.$(me.dtid);
+ let desktop = zk.Desktop.$(me.dtid);
zAu.cmd0.echo(desktop);
} else if (event.data=="stop") {
me.stop();
@@ -69,7 +69,7 @@
},
stop: function() {
this.active = false;
- var desktop = zk.Desktop.$(this.dtid);
+ let desktop = zk.Desktop.$(this.dtid);
desktop._serverpush = null;
if (this.socket) {
try {
diff --git a/org.adempiere.ui.zk/index.zul b/org.adempiere.ui.zk/index.zul
index 073d5de720..57c62e99ff 100644
--- a/org.adempiere.ui.zk/index.zul
+++ b/org.adempiere.ui.zk/index.zul
@@ -35,224 +35,6 @@ if (window.location.protocol == 'https:') {
zk._Erbx.push = function(msg) {
if (console) console.log(msg);
};
-
- zk.$package('id.zk');
-
- id.zk.Extend = zk.$extends(zk.Object, {}, {
- fakeOnchange: function(wgt) {
- // just sent fake event when control is textfield and value is not yet sync to server
- if ((wgt.$instanceof(zul.inp.Textbox) || wgt.$instanceof(zul.inp.Decimalbox)) && wgt.$n().value != wgt.getText())
- zAu.send(new zk.Event(zk.Widget.$(wgt), 'onChange', {
- "value": wgt.$n().value
- }));
-
- else if (zk.$import("ckez.CKeditor") != undefined && wgt.$instanceof(ckez.CKeditor)) { //https://www.zkoss.org/javadoc/latest/jsdoc/_global_/zk.html#$import(_global_.String)
- // CKEditor extend from zul.Widget not from wget zul.inp.InputWidget
- // so some behavior is not same standard input
- // this code bring from ckez.CKeditor.onBlur
- var editor = wgt._editor;
-
- if (wgt._tidChg) {
- clearInterval(wgt._tidChg);
- wgt._tidChg = null;
- }
-
- if (!editor.document)
- editor.document = editor.element.getDocument();
-
- if (wgt.$class._checkEditorDirty(editor)) { // Issue #13
- var val = editor.getData();
- wgt._value = val; //save for onRestore
- //ZKCK-16, 17 use sendAhead to make sure onChange always happens first
- wgt.fire('onChange', {
- value: val
- });
- editor.resetDirty();
- }
- }
- },
-
- fireOnInitEdit: function(wgt) {
- // sent even to indicate field is start edit, this event sent new value to server but now don't use this data.
- if (wgt.$instanceof(zul.inp.Textbox))
- zAu.send(new zk.Event(zk.Widget.$(wgt), 'onInitEdit', {
- "value": wgt.$n().value
- }));
- }
- });
- });
-
- zk.afterLoad('zul.inp', function() {
-
- // should filter out for only component inside standard window or component wish fire this event,
- // or ever rise other event like start editting to distinguish with true onChange event
- zk.override(zul.inp.InputWidget.prototype, "doInput_", function(evt) {
- this.$doInput_(evt);
-
- if (this.get("isOnStardardWindow") == 'false' || this.get("isChangeEventWhenEditing") != true) {
- return; // don't waste time to check component don't lay on standard window
- }
-
- var domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout"); // return a array
- if (domElemOfLayout.length == 0) {
- this.set("isOnStardardWindow", "false"); // next time don't waste time to check this component
- // in case, you move this component to a standard window, please update this properties at client by javascript Widget.set ()
- // or at server by java function component.setWidgetOverride
- } else {
- var winLayoutWg = zk.Widget.$(domElemOfLayout);
- if (winLayoutWg == null) {
- ; // do nothing, this case rare happen because ".adwindow-layout" always is a component
- } else {
- var isEditting = winLayoutWg.get("isEditting");
- // winLayoutWg should cache to improve perfomance
- if (isEditting == "false") {
- winLayoutWg.set("isEditting", "true");
- id.zk.Extend.fireOnInitEdit(this); //fire change event to move to edit
- }
- }
- }
- });
-
- zk.override(zk.Widget.prototype, "onAutofill", function(evt) {
- id.zk.Extend.fakeOnchange(this); //fire change event to move to edit
- });
-
- zk.override(zul.inp.Textbox.prototype, "bind_", function(dt, skipper, after) {
- if (!this.$bind_)
- return;
-
- this.$bind_(dt, skipper, after);
-
- var txtid = this.getId()
- if (txtid != "txtUserId" && txtid != "txtPassword") {
- return;
- }
-
- this.domListen_(this.$n(), "onChange", "onAutofill");
- });
-
- zk.override(zul.inp.Textbox.prototype, "unbind_", function(dt, skipper) {
- if (!this.$unbind_)
- return;
-
- this.$unbind_(dt, skipper);
-
- var txtid = this.getId()
- if (txtid != "txtUserId" && txtid != "txtPassword") {
- return;
- }
-
- this.domUnlisten_(this.$n(), "onChange", "onAutofill"); //unlisten
- });
-
- zk.override(zul.inp.Combobox.prototype, "doKeyDown_", function(evt) {
- // avoid confuse of idempiere shortcut key and function key of combobox
- if ((evt.altKey || evt.ctrlKey || evt.shiftKey) &&
- (evt.keyCode == 33 || evt.keyCode == 34 || evt.keyCode == 35 || evt.keyCode == 36 || evt.keyCode == 38 || evt.keyCode == 40 || evt.keyCode == 37 || evt.keyCode == 39)) { //page up | page down | end | home | up | down | left | write
-
- if (this.isOpen()) //close drop down if already open. it will let combobox select current item, it's consistent with lost focus
- this.close({
- sendOnOpen: true
- });
-
- return;
- // TODO:current idempiere use alt + down/up to move child parrent tab, but combobox also use it to open, close drop down
- // at the moment, idempiere shortcut is more useful, so just get it work
- } else {
- this.$doKeyDown_(evt);
- }
-
- });
-
- });
-
- zk.afterLoad('zul.mesh', function() {
-
- zk.override(zul.mesh.Paging.prototype, "bind_", function() {
- this.$bind_.apply(this, arguments);
- if (this._totalSize == 0x7fffffff) {
- jq(".z-paging-text", this).text(" / ?");
- }
- });
-
- zk.override(zul.mesh.Paging.prototype, "infoText_",
- function() {
- //this.$infoText_.apply(this, arguments);
- var acp = this._activePage,
- psz = this._pageSize,
- tsz = this._totalSize,
-
- lastItem = (acp + 1) * psz,
- dash = '';
-
- if ('os' != this.getMold())
- dash = ' - ' + (lastItem > tsz ? tsz : lastItem);
-
- if (this._totalSize == 0x7fffffff)
- tsz = "?";
-
- return '[ ' + (acp * psz + 1) + dash + ' / ' + tsz + ' ]';
- });
- });
-
- zk.afterLoad('calendar', function() {
- zk.override(calendar.Event.prototype, "calculate_", function() {
- if (typeof this.event === "undefined" || this.event == null) {
- return;
- }
- this.$calculate_.apply(this, arguments);
- });
-
- zk.override(calendar.Event.prototype, "unbind_", function() {
- var node = this.$n();
- if (typeof node === "undefined") {
- return;
- }
- if (typeof this.$unbind_ === "undefined") {
- return;
- }
- this.$unbind_.apply(this, arguments);
- });
-
- zk.override(calendar.CalendarsMonth.prototype, "onSize", function() {
- var cmp = this.$n();
- if (typeof cmp === "undefined" || cmp == null) {
- return;
- }
- this.$onSize.apply(this, arguments);
- });
-
- zk.override(calendar.CalendarsDefault.prototype, "onSize", function() {
- var cmp = this.$n();
- if (typeof cmp === "undefined" || cmp == null) {
- return;
- }
- this.$onSize.apply(this, arguments);
- });
- });
-
- zk.afterLoad("zul.mesh", function() {
- var _xFrozen = {};
- zk.override(zul.mesh.Frozen.prototype, _xFrozen, {
- _doScrollNow: function() {
- var result = _xFrozen._doScrollNow.apply(this, arguments);
- /*Patch: add class to non-visible columns*/
- var mesh = this.parent;
- if (mesh.head) {
- var totalCols = mesh.head.nChildren,
- hdcol = mesh.ehdfaker.firstChild;
-
- for (var faker, i = 0; hdcol && i < totalCols; hdcol = hdcol.nextSibling, i++) {
- if (hdcol.style.width.indexOf('0.001px') != -1 || hdcol.style.width.indexOf('0px') != -1) {
- jq(zk.$(hdcol).$n()).addClass("hiddencol");
- } else {
- jq(zk.$(hdcol).$n()).removeClass("hiddencol");
- }
- }
- }
- return result;
- }
- });
});
} //window.location.protocol check