|
|
@@ -13,8 +13,7 @@ var FrameCall = (function () {
|
|
|
var ie = !-[1] //是否ie
|
|
|
return {
|
|
|
apiOpen: function () {
|
|
|
- var html =
|
|
|
- '<input id="FrameCall" type="hidden" action="1" value="1" onclick="FrameCall.api()" result=""/>'
|
|
|
+ var html = '<input id="FrameCall" type="hidden" action="1" value="1" onclick="FrameCall.api()" result=""/>'
|
|
|
$(html).prependTo("body")
|
|
|
},
|
|
|
//其他窗口调用该窗口函数,调用另一个frame的方法
|
|
|
@@ -198,11 +197,7 @@ var Tips = (function () {
|
|
|
var tipsIDname = "messageTips"
|
|
|
var tipsID = "#" + tipsIDname
|
|
|
if ($(tipsID).length == 0) {
|
|
|
- var html =
|
|
|
- '<div id="' +
|
|
|
- tipsIDname +
|
|
|
- '" class="tips_box"><i></i><span></span>' +
|
|
|
- '<a class="tips_close">×</a></div>'
|
|
|
+ var html = '<div id="' + tipsIDname + '" class="tips_box" style="border-radius:5px"><i></i><span></span>' + '<a class="tips_close">×</a></div>'
|
|
|
$("body").append(html)
|
|
|
|
|
|
$(tipsID)
|
|
|
@@ -267,28 +262,29 @@ var Tips = (function () {
|
|
|
code = msg.code
|
|
|
msg = msg.data
|
|
|
}
|
|
|
- if (offset_top == undefined) offset_top = 0
|
|
|
var self = _init(msg, code)
|
|
|
+ if (offset_top == undefined || offset_top == 0) offset_top = ($(window).height() - self.innerHeight()) / 2 - 100
|
|
|
self
|
|
|
.stop(true, true)
|
|
|
.css({ opacity: "0", top: offset_top - self.height() })
|
|
|
.show()
|
|
|
.animate({ opacity: opacity, top: offset_top }, in_time, 0)
|
|
|
- .delay(delay)
|
|
|
- .animate({ opacity: 0, top: "-=" + (offset_top + self.height()) }, in_time, 0, function () {
|
|
|
+ setTimeout(function () {
|
|
|
+ self.animate({ opacity: 0, top: "-=" + (offset_top + self.height()) }, in_time, 0, function () {
|
|
|
$(this).hide()
|
|
|
})
|
|
|
+ }, delay)
|
|
|
}
|
|
|
var loading = function (msg, code, offset_top) {
|
|
|
if (typeof msg == "object") {
|
|
|
code = msg.code
|
|
|
msg = msg.data
|
|
|
}
|
|
|
- if (offset_top == undefined) offset_top = 0
|
|
|
- if (msg == undefined) msg = "loading..."
|
|
|
+ if (msg == undefined) msg = "加载中..."
|
|
|
msg += " <img src='/images/loading.gif'/>"
|
|
|
|
|
|
var self = _init(msg, code)
|
|
|
+ if (offset_top == undefined || offset_top == 0) offset_top = ($(window).height() - self.innerHeight()) / 2 - 100
|
|
|
self
|
|
|
.stop(true, true)
|
|
|
.css({ opacity: "0", top: offset_top - self.height() })
|
|
|
@@ -304,22 +300,13 @@ var Tips = (function () {
|
|
|
msg = ""
|
|
|
}
|
|
|
}
|
|
|
- if (offset_top == undefined) offset_top = 0
|
|
|
var self = _init(msg, code)
|
|
|
- self
|
|
|
- .delay(delay)
|
|
|
- .show()
|
|
|
- .animate(
|
|
|
- {
|
|
|
- opacity: 0,
|
|
|
- top: "-=" + (offset_top + self.height()),
|
|
|
- },
|
|
|
- in_time,
|
|
|
- 0,
|
|
|
- function () {
|
|
|
- $(this).hide()
|
|
|
- }
|
|
|
- )
|
|
|
+ if (offset_top == undefined || offset_top == 0) offset_top = ($(window).height() - self.innerHeight()) / 2 - 100
|
|
|
+ setTimeout(function () {
|
|
|
+ self.animate({ opacity: 0, top: "-=" + (offset_top + self.height()) }, in_time, 0, function () {
|
|
|
+ $(this).hide()
|
|
|
+ })
|
|
|
+ }, delay)
|
|
|
}
|
|
|
return {
|
|
|
tips: tips,
|
|
|
@@ -370,12 +357,7 @@ var MaskView = (function () {
|
|
|
if (time != undefined) animatetime == time
|
|
|
|
|
|
if ($(maskId).length == 0) {
|
|
|
- var html =
|
|
|
- '<div id="windowMaskView" style="position:fixed;top:0;left:0;right:0;bottom:0;background:' +
|
|
|
- color +
|
|
|
- ";opacity:" +
|
|
|
- opacity +
|
|
|
- ';z-index:9998;"></div><div id="maskViewContent" style="position:absolute;z-index:9999"></div>'
|
|
|
+ var html = '<div id="windowMaskView" style="position:fixed;top:0;left:0;right:0;bottom:0;background:' + color + ";opacity:" + opacity + ';z-index:9998;"></div><div id="maskViewContent" style="position:absolute;z-index:9999"></div>'
|
|
|
$("body").append(html)
|
|
|
$(maskId).bind("click", close)
|
|
|
$(maskContent).bind("click", function (e) {
|
|
|
@@ -400,11 +382,7 @@ var MaskView = (function () {
|
|
|
add("<div style='font-size:50px;color:#fff;opacity:0.6;'>" + msg + "</div>")
|
|
|
}
|
|
|
var image = function (url) {
|
|
|
- add(
|
|
|
- "<img src='" +
|
|
|
- url +
|
|
|
- "' class='image' onload='MaskView.resize();' style='-webkit-box-reflect: below 1px -webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(80%,transparent),color-stop(70%,rgba(255,255,255,0)),to(rgba(255,255,255,0.3)));'/>"
|
|
|
- )
|
|
|
+ add("<img src='" + url + "' class='image' onload='MaskView.resize();' style='-webkit-box-reflect: below 1px -webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(80%,transparent),color-stop(70%,rgba(255,255,255,0)),to(rgba(255,255,255,0.3)));'/>")
|
|
|
var $content = $(maskContent)
|
|
|
var $dom = $content.find(".image")
|
|
|
var dragFlag = false,
|
|
|
@@ -537,7 +515,6 @@ var MaskView = (function () {
|
|
|
})
|
|
|
}
|
|
|
})(jQuery)
|
|
|
-
|
|
|
;(function ($) {
|
|
|
$.fn.extend({
|
|
|
//dom绑定enter事件 用于input
|
|
|
@@ -577,7 +554,6 @@ var MaskView = (function () {
|
|
|
},
|
|
|
})
|
|
|
})(jQuery)
|
|
|
-
|
|
|
;(function ($) {
|
|
|
$.tooltipsy = function (el, options) {
|
|
|
this.options = options
|
|
|
@@ -738,22 +714,12 @@ var MaskView = (function () {
|
|
|
|
|
|
readify: function () {
|
|
|
this.ready = true
|
|
|
- this.$tipsy = $(
|
|
|
- '<div id="tooltipsy' +
|
|
|
- this.random +
|
|
|
- '" style="position:fixed;z-index:2147483647;display:none">'
|
|
|
- ).appendTo("body")
|
|
|
+ this.$tipsy = $('<div id="tooltipsy' + this.random + '" style="position:fixed;z-index:2147483647;display:none">').appendTo("body")
|
|
|
this.$tip = $('<div class="' + this.settings.className + '">').appendTo(this.$tipsy)
|
|
|
this.$tip.data("rootel", this.$el)
|
|
|
var e = this.$el
|
|
|
var t = this.$tip
|
|
|
- this.$tip.html(
|
|
|
- this.settings.content != ""
|
|
|
- ? typeof this.settings.content == "string"
|
|
|
- ? this.settings.content
|
|
|
- : this.settings.content(e, t)
|
|
|
- : this.title
|
|
|
- )
|
|
|
+ this.$tip.html(this.settings.content != "" ? (typeof this.settings.content == "string" ? this.settings.content : this.settings.content(e, t)) : this.title)
|
|
|
},
|
|
|
|
|
|
offset: function (el) {
|
|
|
@@ -805,21 +771,7 @@ var date = function (format, timestamp) {
|
|
|
}
|
|
|
var txt_weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
|
var txt_ordin = { 1: "st", 2: "nd", 3: "rd", 21: "st", 22: "nd", 23: "rd", 31: "st" }
|
|
|
- var txt_months = [
|
|
|
- "",
|
|
|
- "January",
|
|
|
- "February",
|
|
|
- "March",
|
|
|
- "April",
|
|
|
- "May",
|
|
|
- "June",
|
|
|
- "July",
|
|
|
- "August",
|
|
|
- "September",
|
|
|
- "October",
|
|
|
- "November",
|
|
|
- "December",
|
|
|
- ]
|
|
|
+ var txt_months = ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
|
var f = {
|
|
|
// Day
|
|
|
d: function () {
|
|
|
@@ -912,8 +864,7 @@ var date = function (format, timestamp) {
|
|
|
},
|
|
|
B: function () {
|
|
|
var off = (jsdate.getTimezoneOffset() + 60) * 60
|
|
|
- var theSeconds =
|
|
|
- jsdate.getHours() * 3600 + jsdate.getMinutes() * 60 + jsdate.getSeconds() + off
|
|
|
+ var theSeconds = jsdate.getHours() * 3600 + jsdate.getMinutes() * 60 + jsdate.getSeconds() + off
|
|
|
var beat = Math.floor(theSeconds / 86.4)
|
|
|
if (beat > 1000) beat -= 1000
|
|
|
if (beat < 0) beat += 1000
|
|
|
@@ -989,12 +940,7 @@ var Base64 = (function () {
|
|
|
} else if (isNaN(chr3)) {
|
|
|
enc4 = 64
|
|
|
}
|
|
|
- output =
|
|
|
- output +
|
|
|
- _keyStr.charAt(enc1) +
|
|
|
- _keyStr.charAt(enc2) +
|
|
|
- _keyStr.charAt(enc3) +
|
|
|
- _keyStr.charAt(enc4)
|
|
|
+ output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)
|
|
|
}
|
|
|
return output
|
|
|
}
|