如何将openMultiPopover多页面浮动窗口 置为顶层

 我来答
就烦条0o
2017-05-30 · 知道合伙人软件行家
就烦条0o
知道合伙人软件行家
采纳数:33315 获赞数:46492
从事多年系统运维,喜欢编写各种小程序和脚本。

向TA提问 私信TA
展开全部
        function openCon(idx) {
            for (var i = 0, l = $("#header")[0].children.length; i < l; i++) {
                if (idx == i) {//如果选中的是当前循环窗口
                    $("#header")[0].children.className = "uh bc-text-head ub bc-head maxh";
                    //如果是第一次打开窗口
                    if (!conArray[idx]) {
                            if(idx == 0){
                            appcan.window.openMultiPopover({
                                popName : "content_0",
                                content : [{
                                    "inPageName" : "switch",
                                    "inUrl" : "inde0_content.html",
                                }, {
                                    "inPageName" : "radio",
                                    "inUrl" : "about_help_content.html",
                                }, {
                                    "inPageName" : "checkbox",
                                    "inUrl" : "about_baomi_content.html",
                                }],
                                top : titHeight,
                                left : 0,
                                width : $("#content").width(),
                                height : $("#content").height(),
                                index :  0,
                                change:function(err,res){
                                    //tabview.moveTo(res.multiPopSelectedIndex);
                                   $('#nav-smartSetup').navigator('switchTo', res.multiPopSelectedIndex);
                                }
                            });   
                            }else{
                               appcan.openPopoverByEle("content", "indexCon_" + idx + ".html", 0, $('#header').offset().height, 0, 'content_' + idx);
                               uexWindow.setPopoverFrame("content_"+idx, 0, titHeight, $("#content").width(), $("#content").height());   
                               appcan.frame.resize("content", 0, $("#header").offset().height, 0, 'content_' + idx);
                            }
                      conArray[idx] = true;//记录已经打开过
                   //否则已经打开窗口了     
                   } else {
                        if(idx == 0){//不管从哪里跳转至第一个窗口,都强制设置另外三个窗口为底层
                            //appcan.window.bringPopoverToFront('content_0');
                            //appcan.window.closePopover('content_1');
                            //appcan.window.closePopover('content_2');
                            //appcan.window.closePopover('content_3');
                            //conArray[1] = false;
                            //conArray[2] = false;
                            //conArray[3] = false;
                            uexWindow.setPopoverFrame("content_1", 0, titHeight, 1, 1);
                            uexWindow.setPopoverFrame("content_2", 0, titHeight, 1, 1);
                            uexWindow.setPopoverFrame("content_3", 0, titHeight, 1, 1);   
                        }else{//如果不是第一个窗口,则把其他窗口置为最上面
                            appcan.bringPopoverToFront('content_' + idx);
                            uexWindow.setPopoverFrame("content_"+idx, 0, titHeight, $("#content").width(), $("#content").height());
                        }
                   }
                } else {//如果不是当前选中窗口则隐藏其他导航栏
                    $("#header")[0].children.className = "uhide";
                }
            }
        }
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式