Browse Source

修复sonar扫描问题

guohh 4 years ago
parent
commit
89ef866e25

+ 185 - 182
push-manager-server/src/main/webapp/res/js/ui/wm-animate.js

3
 * Only supports x/y now and is used by the scroller library
3
 * Only supports x/y now and is used by the scroller library
4
 */
4
 */
5
define(["jcl"],function($){
5
define(["jcl"],function($){
6
	/**
7
	  * @license MIT - https://github.com/darius/requestAnimationFrame/commit/4f27a5a21902a883330da4663bea953b2f96cb15#diff-9879d6db96fd29134fc802214163b95a
8

9
	    http://paulirish.com/2011/requestanimationframe-for-smart-animating/
10
	    http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
11
	    requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
12
	    MIT license
13

14
	    Adapted from https://gist.github.com/paulirish/1579671 which derived from 
15
	    http://paulirish.com/2011/requestanimationframe-for-smart-animating/
16
	    http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
17

18
	    requestAnimationFrame polyfill by Erik Möller.
19
	    Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavič, Darius Bacon
20
	*/
21

22
	if (!Date.now)
23
	    Date.now = function() {
24
	        return new Date().getTime();
25
	    };
26

27
	(function() {
28
	    var vendors = ["webkit", "moz","ms"];
29
	    for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
30
	        var vp = vendors[i];
31
	        window.requestAnimationFrame = window[vp+"RequestAnimationFrame"];
32
	        window.cancelAnimationFrame = (window[vp+"CancelAnimationFrame"] || window[vp+"CancelRequestAnimationFrame"]);
33
	    }
34
	    if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
35
	        var lastTime = 0;
36
	        window.requestAnimationFrame = function(callback) {
37
	            var now = Date.now();
38
	            var nextTime = Math.max(lastTime + 16, now);
39
	            return setTimeout(function() { callback(lastTime = nextTime); },
40
	                              nextTime - now);
41
	        };
42
	        window.cancelAnimationFrame = clearTimeout;
43
	    }
44
	}());
45
	
46
	/*-------------------------------------------------------*/
47
    var cache = [];
48
    var objId = function(obj) {
49
        if (!obj.wmAnimateId) obj.wmAnimateId = $.uuid();
50
        return obj.wmAnimateId;
51
    };
52
    var getEl = function(elID) {
53
        if (typeof elID === "string" || elID instanceof String) {
54
            return document.getElementById(elID);
55
        } else if ($.is$(elID)) {
56
            return elID[0];
57
        } else {
58
            return elID;
59
        }
60
    };
61
    var getAnimate = function(obj, options) {
62
        var tmp, id, el = getEl(obj);
63
        //first one
64
        id = objId(el);
65
        if (cache[id]) {
66
            if(options)
67
                cache[id].animate(options);
68
            tmp = cache[id];
69
        } else {
70
            tmp = Animate(el, options);
71
            cache[id] = tmp;
72
        }
73
        return tmp;
74
    };
75
    $.fn.animate = function(opts) {
76
        var tmp = getAnimate(this[0], opts);
77
        return tmp;
78
    };
79

6
  /**
7
   * @license MIT - https://github.com/darius/requestAnimationFrame/commit/4f27a5a21902a883330da4663bea953b2f96cb15#diff-9879d6db96fd29134fc802214163b95a
80

8

9
   http://paulirish.com/2011/requestanimationframe-for-smart-animating/
10
   http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
11
   requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
12
   MIT license
81

13

82
    var Animate = function(elID, options) {
83
        if (!(this instanceof Animate)) return new Animate(elID, options);
14
   Adapted from https://gist.github.com/paulirish/1579671 which derived from
15
   http://paulirish.com/2011/requestanimationframe-for-smart-animating/
16
   http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
84

17

85
        this.el=elID;
86
        //start doing stuff
87
        if (!this.el) return;
18
   requestAnimationFrame polyfill by Erik Möller.
19
   Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavič, Darius Bacon
20
   */
88

21

89
        if(options)
90
            this.animate(options);
91

92
        var that = this;
93
        $(this.el).bind("destroy", function() {
94
            var id = that.el.wmAnimateId;
95
            if (cache[id]) delete cache[id];
96
        });
97
    };
98
    Animate.prototype = {
99
        animationTimer:null,
100
        isAnimating:false,
101
        startX:0,
102
        startY:0,
103
        runTime:0,
104
        endX:0,
105
        endY:0,
106
        currX:0,
107
        currY:0,
108
        animationStartTime:0,
109
        pauseTime:0,
110
        completeCB:null,
111
        easingFn:"linear",
112
        animateOpts:{},
113
        updateCb:null,
114
        animate: function(options) {
115
            var that=this;
116
            if(that.isAnimating) return;
117
            that.isAnimating=true;
118
            window.cancelAnimationFrame(that.animationTimer);
119
            if (!options) {
120
                options={
121
                    x:0,
122
                    y:0,
123
                    duration:0
124
                };
125
            }
126
            this.easingFn=options.easing||"linear";
127

128
            this.completeCB=options.complete||null;
129
            this.updateCB=options.update||null;
130
            this.runTime=numOnly(options.duration);
131
            options.complete&&(delete options.complete);
132
            this.animateOpts=options;
133
            this.startTime=Date.now();
134
            this.startMatrix=$.getCssMatrix(this.el);
135

136
            if(this.runTime===0)
137
                this.doAnimate();
138
        },
139
        start:function(){
140
            this.doAnimate();
141
        },
142
        doAnimate:function(){
143
            var now = Date.now(), nextX, nextY,easeStep,that=this;
144

145
            if (this.runTime===0||(now >= this.startTime + this.runTime)) {
146
                that.setPosition(this.animateOpts.x,this.animateOpts.y);
147
                that.isAnimating = false;
148
                if(this.updateCB)
149
                    this.updateCB({x:this.animateOpts.x,y:this.animateOpts.y});
150
                if(this.completeCB)
151
                    this.completeCB();
152
                return;
153
            }
154

155
            now = (now - this.startTime) / this.runTime;
156
            now=now>1?1:now;
157
            easeStep = tweens[this.easingFn](now);
158
            nextX = (this.animateOpts.x - this.startMatrix.e) * easeStep + this.startMatrix.e;
159
            nextY = (this.animateOpts.y - this.startMatrix.f) * easeStep + this.startMatrix.f;
160
            this.setPosition(nextX,nextY);
161
            if(this.updateCB)
162
                this.updateCB({x:nextX,y:nextY});
163

164
            if (this.isAnimating)
165
                this.animationTimer = window.requestAnimationFrame(function(){that.doAnimate();});
166
        },
167
        setPosition:function(x,y){
168
            this.el.style[$.feat.cssPrefix+"Transform"]="matrix3d( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, "+x+", "+y+", 0, 1 )";
169
            this.currX=x;
170
            this.currY=y;
171
        },
172
        stop:function(){
173
            this.isAnimating=false;
174
            window.cancelAnimationFrame(this.animationTimer);
175
            this.pauseTime=Date.now()-this.startTime;
176
        },
177
        resume:function(){
178
            this.isAnimating=true;
179
            this.startTime=Date.now()-this.pauseTime;
180
            this.doAnimate();
181
        }
22
  if (!Date.now)
23
    Date.now = function() {
24
      return new Date().getTime();
182
    };
25
    };
183

26

184

185
    var tweens = {
186
        linear:function (k) {
187
            return k;
188
        },
189
        easeOutSine:function (k) {
190
            return Math.sin(k * Math.PI / 2 );
191
        }
192
    };
193
    return $;
27
  (function() {
28
    var vendors = ["webkit", "moz","ms"];
29
    for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
30
      var vp = vendors[i];
31
      window.requestAnimationFrame = window[vp+"RequestAnimationFrame"];
32
      window.cancelAnimationFrame = (window[vp+"CancelAnimationFrame"] || window[vp+"CancelRequestAnimationFrame"]);
33
    }
34
    if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
35
      var lastTime = 0;
36
      window.requestAnimationFrame = function(callback) {
37
        var now = Date.now();
38
        var nextTime = Math.max(lastTime + 16, now);
39
        return setTimeout(function() { callback(lastTime = nextTime); },
40
          nextTime - now);
41
      };
42
      window.cancelAnimationFrame = clearTimeout;
43
    }
44
  }());
45

46
  /*-------------------------------------------------------*/
47
  var cache = [];
48
  var objId = function(obj) {
49
    if (!obj.wmAnimateId) obj.wmAnimateId = $.uuid();
50
    return obj.wmAnimateId;
51
  };
52
  var getEl = function(elID) {
53
    if (typeof elID === "string" || elID instanceof String) {
54
      return document.getElementById(elID);
55
    } else if ($.is$(elID)) {
56
      return elID[0];
57
    } else {
58
      return elID;
59
    }
60
  };
61
  var getAnimate = function(obj, options) {
62
    var tmp, id, el = getEl(obj);
63
    //first one
64
    id = objId(el);
65
    if (cache[id]) {
66
      if(options)
67
        cache[id].animate(options);
68
      tmp = cache[id];
69
    } else {
70
      tmp = Animate(el, options);
71
      cache[id] = tmp;
72
    }
73
    return tmp;
74
  };
75
  $.fn.animate = function(opts) {
76
    var tmp = getAnimate(this[0], opts);
77
    return tmp;
78
  };
79

80

81

82
  var Animate = function(elID, options) {
83
    if (!(this instanceof Animate)) return new Animate(elID, options);
84

85
    this.el=elID;
86
    //start doing stuff
87
    if (!this.el) return;
88

89
    if(options)
90
      this.animate(options);
91

92
    var that = this;
93
    $(this.el).bind("destroy", function() {
94
      var id = that.el.wmAnimateId;
95

96
      if (cache[id]) {
97
        cache[id] = null;
98
      }
99
    });
100
  };
101
  Animate.prototype = {
102
    animationTimer:null,
103
    isAnimating:false,
104
    startX:0,
105
    startY:0,
106
    runTime:0,
107
    endX:0,
108
    endY:0,
109
    currX:0,
110
    currY:0,
111
    animationStartTime:0,
112
    pauseTime:0,
113
    completeCB:null,
114
    easingFn:"linear",
115
    animateOpts:{},
116
    updateCb:null,
117
    animate: function(options) {
118
      var that=this;
119
      if(that.isAnimating) return;
120
      that.isAnimating=true;
121
      window.cancelAnimationFrame(that.animationTimer);
122
      if (!options) {
123
        options={
124
          x:0,
125
          y:0,
126
          duration:0
127
        };
128
      }
129
      this.easingFn=options.easing||"linear";
130

131
      this.completeCB=options.complete||null;
132
      this.updateCB=options.update||null;
133
      this.runTime=numOnly(options.duration);
134
      options.complete&&(delete options.complete);
135
      this.animateOpts=options;
136
      this.startTime=Date.now();
137
      this.startMatrix=$.getCssMatrix(this.el);
138

139
      if(this.runTime===0)
140
        this.doAnimate();
141
    },
142
    start:function(){
143
      this.doAnimate();
144
    },
145
    doAnimate:function(){
146
      var now = Date.now(), nextX, nextY,easeStep,that=this;
147

148
      if (this.runTime===0||(now >= this.startTime + this.runTime)) {
149
        that.setPosition(this.animateOpts.x,this.animateOpts.y);
150
        that.isAnimating = false;
151
        if(this.updateCB)
152
          this.updateCB({x:this.animateOpts.x,y:this.animateOpts.y});
153
        if(this.completeCB)
154
          this.completeCB();
155
        return;
156
      }
157

158
      now = (now - this.startTime) / this.runTime;
159
      now=now>1?1:now;
160
      easeStep = tweens[this.easingFn](now);
161
      nextX = (this.animateOpts.x - this.startMatrix.e) * easeStep + this.startMatrix.e;
162
      nextY = (this.animateOpts.y - this.startMatrix.f) * easeStep + this.startMatrix.f;
163
      this.setPosition(nextX,nextY);
164
      if(this.updateCB)
165
        this.updateCB({x:nextX,y:nextY});
166

167
      if (this.isAnimating)
168
        this.animationTimer = window.requestAnimationFrame(function(){that.doAnimate();});
169
    },
170
    setPosition:function(x,y){
171
      this.el.style[$.feat.cssPrefix+"Transform"]="matrix3d( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, "+x+", "+y+", 0, 1 )";
172
      this.currX=x;
173
      this.currY=y;
174
    },
175
    stop:function(){
176
      this.isAnimating=false;
177
      window.cancelAnimationFrame(this.animationTimer);
178
      this.pauseTime=Date.now()-this.startTime;
179
    },
180
    resume:function(){
181
      this.isAnimating=true;
182
      this.startTime=Date.now()-this.pauseTime;
183
      this.doAnimate();
184
    }
185
  };
186

187

188
  var tweens = {
189
    linear:function (k) {
190
      return k;
191
    },
192
    easeOutSine:function (k) {
193
      return Math.sin(k * Math.PI / 2 );
194
    }
195
  };
196
  return $;
194
});
197
});

+ 40 - 38
push-manager-server/src/main/webapp/res/js/ui/wm-css3animate.js

1
/**
1
/**
2
 * wm.css3animate - a css3 animation library that supports chaning/callbacks
2
 * wm.css3animate - a css3 animation library that supports chaning/callbacks
3
 */
3
 */
4
 /*  EXAMPLE
5

6
  $("#animate").css3Animate({
7
        width: "100px",
8
        height: "100px",
9
        x: "20%",
10
        y: "30%",
11
        time: "1000ms",
12
        opacity: .5,
13
        callback: function () {
14
            //execute when finished
15
        }
16
    });
17

18
    //Chain animations
19
    $("#animate").css3Animate({
20
        x: 20,
21
        y: 30,
22
        time: "300ms",
23
        callback: function () {
24
            $("#animate").css3Animate({
25
                x: 20,
26
                y: 30,
27
                time: "500ms",
28
                previous: true,
29
                callback: function () {
30
                    reset();
31
                }
32
            });
33
        }
34
    });
35
 */
36

37
 /* global wm*/
38
 /* global numOnly*/
4
/*  EXAMPLE
5

6
 $("#animate").css3Animate({
7
       width: "100px",
8
       height: "100px",
9
       x: "20%",
10
       y: "30%",
11
       time: "1000ms",
12
       opacity: .5,
13
       callback: function () {
14
           //execute when finished
15
       }
16
   });
17

18
   //Chain animations
19
   $("#animate").css3Animate({
20
       x: 20,
21
       y: 30,
22
       time: "300ms",
23
       callback: function () {
24
           $("#animate").css3Animate({
25
               x: 20,
26
               y: 30,
27
               time: "500ms",
28
               previous: true,
29
               callback: function () {
30
                   reset();
31
               }
32
           });
33
       }
34
   });
35
*/
36

37
/* global wm*/
38
/* global numOnly*/
39
define(["jcl"],function($){
39
define(["jcl"],function($){
40
	"use strict";
40
    "use strict";
41
    var cache = [];
41
    var cache = [];
42
    var objId = function(obj) {
42
    var objId = function(obj) {
43
        if (!obj.wmCSS3AnimateId) obj.wmCSS3AnimateId = $.uuid();
43
        if (!obj.wmCSS3AnimateId) obj.wmCSS3AnimateId = $.uuid();
111
            $(this.el).bind("destroy", function() {
111
            $(this.el).bind("destroy", function() {
112
                var id = that.el.wmCSS3AnimateId;
112
                var id = that.el.wmCSS3AnimateId;
113
                that.callbacksStack = [];
113
                that.callbacksStack = [];
114
                if (cache[id]) delete cache[id];
114
                if (cache[id]) {
115
                    cache[id] = null;
116
                }
115
            });
117
            });
116
        };
118
        };
117
        css3Animate.prototype = {
119
        css3Animate.prototype = {
216
                this.countStack++;
218
                this.countStack++;
217

219

218
                var that = this,
220
                var that = this,
219
                    duration;
221
                  duration;
220
                var style = window.getComputedStyle(this.el);
222
                var style = window.getComputedStyle(this.el);
221
                if (classMode) {
223
                if (classMode) {
222
                    //get the duration
224
                    //get the duration

+ 108 - 104
push-manager-server/src/main/webapp/res/js/ui/wm-tooltip.js

1
/*引入util对应的js文件*/
1
/*引入util对应的js文件*/
2

2

3
define(['util'], function(){
4
	/*WmToolTip对象定义*/
5
	function WmToolTip(id){
6
		this.listeners = new Array(); //存储监听事件
7
		this.id = id;
8
		/*常用对象*/
9
		this.tip = (function(obj){
10
			if(typeof(obj)=="object"){
11
				obj = $(obj);
12
			}else if(typeof(obj)=="string"){
13
				obj = $("#"+obj);
14
			}else{
15
				alert("没有匹配类型");
16
				return null;
17
			}
18
			return obj;
19
		})(id);
20
		this.baseSize = parseInt($(document.getElementsByTagName("html")[0]).css("font-size"));
21
	}
22
	/*关闭按钮事件*/
23
	WmToolTip.prototype.setCloseAction = function(action){
24
		var closeAction = function(e){
25
			$($(e.target).parents("div.c_toolTip-view")[0]).removeClass("c_toolTip-view");
26
			if(action){
27
				if(typeof action =="function"){
28
					action();
29
				}else{
30
					new Function("return "+action)().call(window);
31
				}
32
			}
33
		};
34
		var btn = this.tip.find("span.e_button");
35
		$(btn[0]).tap(closeAction);
36
	};
37
	/*设置位置参照元素*/
38
	WmToolTip.prototype.setBaseElement = function(ele){
39
		var e;
40
		if(typeof ele =="object"){
41
			e = $(ele);
42
		}else if(typeof ele =="string"){
43
			e = $("#"+ele);
44
		}
45
		var o = e.offset();
46
		var h = e.height();
47
		var w = e.width();
48
		var tipH = this.tip.height();
49
		var tipW = this.tip.width();
50
		var left = o.left;
51
		var top = o.top;
52
		if(this.tip.hasClass("c_toolTip-positionBottom")){
53
			top-=tipH;//箭头在下
54
		}else{
55
			top+=h;//箭头在上
56
		}
57
		if(this.tip.hasClass("c_toolTip-arrowLeft")){
58
			//箭头居左
59
		}else if(this.tip.hasClass("c_toolTip-arrowRight")){
60
			left=left+w-tipW;//箭头居右
61
		}else{
62
			left = left+w/2-tipW/2;//箭头居
63
		}
64
		left = left/this.baseSize;
65
		top = top/this.baseSize;
66
		this.tip.css("top",top+"rem");
67
		this.tip.css("left",left+"rem");
68
	};
69
	/*显示*/
70
	WmToolTip.prototype.show = function(){
71
		if(!this.tip.hasClass("c_toolTip-view")){
72
			this.tip.addClass("c_toolTip-view");
73
		}
74
	};
75
	/*隐藏*/
76
	WmToolTip.prototype.hide = function(){
77
		this.tip.removeClass("c_toolTip-view");
78
	};
79
	/*移除*/
80
	WmToolTip.prototype.remove = function(){
81
		this.tip.remove();
82
	};
83
	/*设置按钮文本*/
84
	WmToolTip.prototype.setButtonText = function(text){
85
		var button = this.tip.find('span.e_button');
86
		if(button.length){
87
			$(button[0]).text(text);
88
		}else{
89
			$(this.tip.find("div.content")[0]).append('<div class="submit"><span class="e_button">'+text+'</span></div>');
90
		}
91
	};
92
	/*设置图标*/
93
	WmToolTip.prototype.setIcon = function(icon){
94
		var e = this.tip.find('div.ico');
95
		if(e.length){
96
			$(e[0]).html('<span class="e_ico '+icon+'"></span>');
97
		}else{
98
			$(this.tip.find("div.content")[0]).prepend('<div class="ico"><span class="e_ico '+icon+'"></span></div>');
99
		}
100
	};
101
	/*设置提示内容*/
102
	WmToolTip.prototype.setContent = function(text){
103
		$(this.tip.find("div.detail")[0]).text(text);
104
	};
105
	/*导出WmToolTip*/
106
	return WmToolTip;
3
define(['util'], function () {
4
  /*WmToolTip对象定义*/
5
  function WmToolTip(id) {
6
    this.listeners = new Array(); //存储监听事件
7
    this.id = id;
8
    /*常用对象*/
9
    this.tip = (function (obj) {
10
      if (typeof (obj) == "object") {
11
        obj = $(obj);
12
      } else if (typeof (obj) == "string") {
13
        obj = $("#" + obj);
14
      } else {
15
        alert("没有匹配类型");
16
        return null;
17
      }
18
      return obj;
19
    })(id);
20
    this.baseSize = parseInt($(document.getElementsByTagName("html")[0]).css("font-size"));
21
  }
22

23
  /*关闭按钮事件*/
24
  WmToolTip.prototype.setCloseAction = function (action) {
25
    var closeAction = function (e) {
26
      $($(e.target).parents("div.c_toolTip-view")[0]).removeClass("c_toolTip-view");
27
      if (action) {
28
        if (typeof action == "function") {
29
          action();
30
        } else {
31
          new Function("return " + action)().call(window);
32
        }
33
      }
34
    };
35
    var btn = this.tip.find("span.e_button");
36
    $(btn[0]).tap(closeAction);
37
  };
38
  /*设置位置参照元素*/
39
  WmToolTip.prototype.setBaseElement = function (ele) {
40
    var e;
41
    if (typeof ele == "object") {
42
      e = $(ele);
43
    } else if (typeof ele == "string") {
44
      e = $("#" + ele);
45
    }
46
    if (!e) {
47
      return;
48
    }
49
    var o = e.offset();
50
    var h = e.height();
51
    var w = e.width();
52
    var tipH = this.tip.height();
53
    var tipW = this.tip.width();
54
    var left = o.left;
55
    var top = o.top;
56
    if (this.tip.hasClass("c_toolTip-positionBottom")) {
57
      top -= tipH;//箭头在下
58
    } else {
59
      top += h;//箭头在上
60
    }
61
    if (this.tip.hasClass("c_toolTip-arrowLeft")) {
62
      //箭头居
63
    } else if (this.tip.hasClass("c_toolTip-arrowRight")) {
64
      left = left + w - tipW;//箭头居右
65
    } else {
66
      left = left + w / 2 - tipW / 2;//箭头居中
67
    }
68
    left = left / this.baseSize;
69
    top = top / this.baseSize;
70
    this.tip.css("top", top + "rem");
71
    this.tip.css("left", left + "rem");
72
  };
73
  /*显示*/
74
  WmToolTip.prototype.show = function () {
75
    if (!this.tip.hasClass("c_toolTip-view")) {
76
      this.tip.addClass("c_toolTip-view");
77
    }
78
  };
79
  /*隐藏*/
80
  WmToolTip.prototype.hide = function () {
81
    this.tip.removeClass("c_toolTip-view");
82
  };
83
  /*移除*/
84
  WmToolTip.prototype.remove = function () {
85
    this.tip.remove();
86
  };
87
  /*设置按钮文本*/
88
  WmToolTip.prototype.setButtonText = function (text) {
89
    var button = this.tip.find('span.e_button');
90
    if (button.length) {
91
      $(button[0]).text(text);
92
    } else {
93
      $(this.tip.find("div.content")[0]).append('<div class="submit"><span class="e_button">' + text + '</span></div>');
94
    }
95
  };
96
  /*设置图标*/
97
  WmToolTip.prototype.setIcon = function (icon) {
98
    var e = this.tip.find('div.ico');
99
    if (e.length) {
100
      $(e[0]).html('<span class="e_ico ' + icon + '"></span>');
101
    } else {
102
      $(this.tip.find("div.content")[0]).prepend('<div class="ico"><span class="e_ico ' + icon + '"></span></div>');
103
    }
104
  };
105
  /*设置提示内容*/
106
  WmToolTip.prototype.setContent = function (text) {
107
    $(this.tip.find("div.detail")[0]).text(text);
108
  };
109
  /*导出WmToolTip*/
110
  return WmToolTip;
107
});
111
});

+ 4 - 2
push-manager-server/src/main/webapp/res/js/ui/wm-webui.js

1
define(function($){
1
define(function($){
2
	if(!window["WmWebUI"]){
3
		var wmWebUI = window["WmWebUI"] = {};
2
	var wmWebUI = window["WmWebUI"];
3

4
	if(wmWebUI){
5
		wmWebUI = window["WmWebUI"] = {};
4
		wmWebUI.tags = {}
6
		wmWebUI.tags = {}
5
	}
7
	}
6
	
8