Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Dec 13, 2023
1 parent f7c6085 commit e4959db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
3 changes: 1 addition & 2 deletions zk/src/main/resources/web/js/zk/au.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1653,8 +1653,7 @@ export namespace au_global {
*/
export function download(url: string): void {
if (url) {
var ifr: HTMLIFrameElement = jq('#zk_download')[0] as HTMLIFrameElement,
sbu = zk.skipBfUnload;
var ifr: HTMLIFrameElement = jq('#zk_download')[0] as HTMLIFrameElement;

if (!ifr) {
ifr = document.createElement('iframe');
Expand Down
23 changes: 10 additions & 13 deletions zk/src/main/resources/web/js/zk/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,7 @@ jq(function () {
if (!wgt) wgt = evt.target;

var dEvent = evt.domEvent!,
body = document.body,
old = zk.currentFocus;
body = document.body;
if (dEvent.clientX! <= body.clientWidth && dEvent.clientY! <= body.clientHeight) //not click on scrollbar
// F70-ZK-2007: Add the button information in it.
Widget.mimicMouseDown_(wgt, noFocusChange, evt.which); //wgt is null if mask
Expand Down Expand Up @@ -968,18 +967,16 @@ jq(function () {

var _oldBfUnload = window.onbeforeunload;
window.onbeforeunload = function (ev: BeforeUnloadEvent) {
if (!zk.skipBfUnload) {
if (zk.confirmClose) {
setTimeout(function () { //If user click 'cancel', the disabledRequest should be false. Ref: https://stackoverflow.com/questions/4650692/
zAu.disabledRequest = false;
}, 0);
return zk.confirmClose;
}
if (zk.confirmClose) {
setTimeout(function () { //If user click 'cancel', the disabledRequest should be false. Ref: https://stackoverflow.com/questions/4650692/
zAu.disabledRequest = false;
}, 0);
return zk.confirmClose;
}

for (var j = 0; j < _bfUploads.length; ++j) {
var s = _bfUploads[j]() as unknown;
if (s) return s;
}
for (var j = 0; j < _bfUploads.length; ++j) {
var s = _bfUploads[j]() as unknown;
if (s) return s;
}

if (_oldBfUnload) {
Expand Down
2 changes: 0 additions & 2 deletions zk/src/main/resources/web/js/zk/zk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,6 @@ _zk.ipad = (_zk.webkit && agent.includes('ipad') && (
_zk.android = agent.includes('android');
_zk.mobile = _zk.ios || _zk.android;
_zk.css3 = true;
const ie11 = browser.mozilla && (agent.includes('trident')) && _ver(browser.version);

_zk.vendor = _zk.webkit ? 'webkit' : '';

let bodycls = '';
Expand Down

0 comments on commit e4959db

Please sign in to comment.