/* ui/dialog-1.0.0.js Date:2015-09-15 18:39:14 */
//alert('load ui/dialog-1.0.0')
!function(a) {
a.ui.define("dialog", {
options: {
hasCssLink: !0,
baseVersion: "1.0.0",
cssLinkVersion: "1.0.0",
maskHas: !0,
maskClass: "ui-mask",
maskIframe: !1,
maskClose: !1,
opacity: .15,
zIndex: 9998,
type: "text",
source: null,
extendMainClass: null,
autoIframe: !0,
autoOpen: !0,
autoCloseTime: 0,
title: !0,
hasButton: !1,
submitButton: "\u786e\u8ba4",
cancelButton: "\u53d6\u6d88",
onSubmit: null,
onCancel: null,
closeButton: !0,
onReady: null,
width: 480,
height: null,
fixed: !1,
autoUpdate: !1,
maskId: null,
mainId: null,
contentId: null,
titleId: null,
iframeName: "dialogIframe",
iframeTimestamp: !0,
x:null,
y:null,
},
init: function() {
var b = this.options;
a.browser.isIE6() && (b.fixed = !1),
this.createMain(),
this.createMask(),
this.mainStyle(),
b.autoOpen ? this.open() : this.hide(),
this.bind();
},
show: function() {
this.mask && this.mask.show(),
this.el.show()
},
hide: function() {
this.mask && this.mask.hide(),
this.el.hide()
},
tpl: {
mask: '
',
close: '',
title: ' <%=title%>
',
wrap: '',
conten: '',
button: ' '
},
createMain: function() {
var c = this.options;
var d = "";
c.title && (d = a.tpl(this.tpl.title, {
title: c.title
}));
var e = a.tpl(this.tpl.button, {
submit: this.options.submitButton,
cancel: this.options.cancelButton
});
var f = d + this.tpl.conten + (c.hasButton ? e: "");
this.el = a(this.tpl.wrap),
c.extendMainClass && this.el.addClass(c.extendMainClass),
a(f).appendTo(this.el),
this.el.appendTo("body"),
this.content = this.el.find(".ui-dialog-content"),
this.title = this.el.find(".ui-dialog-title"),
c.mainId && this.el.attr("id", c.mainId),
c.contentId && this.content.attr("id", c.contentId),
c.titleId && this.title.attr("id", c.titleId),
c.closeButton && this.el.append(this.tpl.close)
},
createMask: function() {
var b = this;
var c = this.options;
if (c.maskHas) {
{
this.mask = a(document.createElement("div"))
}
this.mask.addClass(c.maskClass).css({
position: "absolute",
left: 0,
top: 0,
opacity: c.opacity,
zIndex: c.zIndex,
backgroundColor: "#000",
width: a.page.docWidth(),
height: a.page.docHeight()
}),
c.maskId && this.mask.attr("id", c.maskId),
a("." + c.maskClass)[0] || this.mask.appendTo("body"),
(a.browser.isIE6() || c.maskIframe) && this.mask.append('