wzp
2021-09-01 2891fe0769189be39c9634b2cbc1841dbd52d022
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
 * require artDialog 5.0.4, artDialog.plugin.override.js.
 *
 * @author Baishui2004
 * @Date July 20, 2014
 */
 
function alert(message) {
    return $.alert(message);
}
 
function confirm(message) {
    return $.confirm(message);
}
 
function prompt(text, defaultText) {
    return $.prompt(text, defaultText);
}
 
function modifyDialogAndMaskZIndex() {
    // Under IE9, may occur dialog covered by it's d-mask lock screen, These code is to solve it below.
    var mask_index = 0;
    $('.d-mask').each(function () {
        var tmp_index = $(this).css('z-index');
        if (!isNaN(tmp_index) && parseInt(tmp_index) > mask_index) {
            mask_index = parseInt(tmp_index);
        }
    });
    $('div[role=dialog]').parent('div').each(function (i) {
        $(this).css('z-index', mask_index + i + 1);
    });
}
 
$(function () {
    if ($.browser.msie && $.browser.version == '9.0') {
        // Under IE9, if not set width or set width 'auto', it will cause dialog not display in center. These three line code is to solve it below.
        alert().hidden().time(1);
        confirm('').hidden().time(1);
        prompt('', '').hidden().time(1);
 
        setInterval(modifyDialogAndMaskZIndex, 500);
    }
});