IDEMPIERE-5137 Login page reload continuously using http (#1158)
Improve error message, change: This request has been blocked, the content must be served over HTTPS by Direct http:// is forbidden - please use https:// instead with the SSL port used in your installation Improve indentation of the whole script (readability) Change EOL character to unix
This commit is contained in:
parent
68db1fd3b7
commit
497c93fc63
|
|
@ -21,8 +21,7 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
"?>
|
||||
<zk>
|
||||
<script><![CDATA[
|
||||
if (window.location.protocol == 'https:')
|
||||
{
|
||||
if (window.location.protocol == 'https:') {
|
||||
|
||||
zk.load("jawwa.atmosphere");
|
||||
zk.load("org.idempiere.websocket");
|
||||
|
|
@ -43,7 +42,9 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
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}));
|
||||
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
|
||||
|
|
@ -63,7 +64,9 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
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});
|
||||
wgt.fire('onChange', {
|
||||
value: val
|
||||
});
|
||||
editor.resetDirty();
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +75,9 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
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}));
|
||||
zAu.send(new zk.Event(zk.Widget.$(wgt), 'onInitEdit', {
|
||||
"value": wgt.$n().value
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -108,7 +113,6 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
zk.override(zk.Widget.prototype, "onAutofill", function(evt) {
|
||||
id.zk.Extend.fakeOnchange(this); //fire change event to move to edit
|
||||
});
|
||||
|
|
@ -127,7 +131,6 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
this.domListen_(this.$n(), "onChange", "onAutofill");
|
||||
});
|
||||
|
||||
|
||||
zk.override(zul.inp.Textbox.prototype, "unbind_", function(dt, skipper) {
|
||||
if (!this.$unbind_)
|
||||
return;
|
||||
|
|
@ -148,7 +151,9 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
(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});
|
||||
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
|
||||
|
|
@ -159,7 +164,6 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
zk.afterLoad('zul.mesh', function() {
|
||||
|
|
@ -171,7 +175,6 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
zk.override(zul.mesh.Paging.prototype, "infoText_",
|
||||
function() {
|
||||
//this.$infoText_.apply(this, arguments);
|
||||
|
|
@ -253,9 +256,8 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
});
|
||||
|
||||
} //window.location.protocol check
|
||||
else
|
||||
{
|
||||
alert("This request has been blocked, the content must be served over HTTPS");
|
||||
else {
|
||||
alert("Direct http:// is forbidden - please use https:// instead with the SSL port used in your installation");
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue