liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
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
44
45
46
47
48
49
50
51
52
/*!
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 * 
 * 主框架窗口大小调整
 * @author jeeplus
 * @version 2013-11-09
 */
 
$("#left").width(leftWidth);
$("#openClose").click(function(){
    if($(this).hasClass("close")){
        $(this).removeClass("close");
        $(this).addClass("open");
        $("#left").animate({width:0,opacity:"hide"});
        $("#right").animate({width:$("#content").width()-$("#openClose").width()-5},function(){
            if(typeof openCloseClickCallBack == 'function'){
                openCloseClickCallBack(true);
            }
            wSize();
        });
    }else{
        $(this).addClass("close");
        $(this).removeClass("open");
        $("#left").animate({width:leftWidth,opacity:"show"});
        $("#right").animate({width:$("#content").width()-$("#openClose").width()-leftWidth-9},function(){
            if(typeof openCloseClickCallBack == 'function'){
                openCloseClickCallBack(true);
            }
            wSize();
        });
    }
});
if(!Array.prototype.map)
    Array.prototype.map = function(fn,scope) {
    var result = [],ri = 0;
    for (var i = 0,n = this.length; i < n; i++){
      if(i in this){
        result[ri++]  = fn.call(scope ,this[i],i,this);
      }
    }
    return result;
};
var getWindowSize = function(){
    return ["Height","Width"].map(function(name){
      return window["inner"+name] ||
        document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ];
    });
};
$(window).resize(function(){
    wSize();
});
wSize(); // 在主窗体中定义,设置调整目标