Authored by lingmin

dialog update

... ... @@ -33,7 +33,7 @@
}
header.append($("<h4>").addClass("modal-title").html(opt.title));
var body = $("<div>").addClass("modal-body").css({
width : "100%",
width : "100%",
overflow : "auto"
});
if (opt.content !== undefined) {
... ... @@ -74,7 +74,14 @@
}
var dialogDiv = $("<div>").addClass("modal-dialog").css(opt.style).addClass(opt.size ? opt.size : "").attr("role", "document").appendTo(self);
var contentDiv = $("<div>").addClass("modal-content").append(header).append(body).append(footer).appendTo(dialogDiv);
if (opt.height) {
body.css("height", opt.height);
}
if (opt.width) {
contentDiv.css("width", opt.width);
}
self.on("show.bs.modal", function(e) {
if (opt.onBeforeShow) {
opt.onBeforeShow.call(self);
... ... @@ -101,10 +108,10 @@
keyboard : opt.keyboard,
show : opt.show
}));
});
};
/**
* 销毁
*/
... ... @@ -112,8 +119,8 @@
//$(jq).empty().removeClass("modal fade").removeAttr("role").removeAttr("aria-labelledby");
jq.remove();
}
$.fn.dialog.methods = {
show : function() {
return this.each(function() {
... ... @@ -154,7 +161,7 @@
});
}
};
$.fn.dialog.events = {
onBeforeShow : function() {},
onAfterShow : function() {},
... ...
... ... @@ -206,21 +206,23 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "60%",
width: "50%",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -296,21 +298,23 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop: "static",
title: "异常详情",
content: content,
height: "60%",
width: "50%",
buttons: [{
text: "关闭",
className: "btn-danger",
onclick: function () {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ...
... ... @@ -124,8 +124,8 @@
backdrop: "static",
title: "异常详情",
content: content,
height: "60%",
width: "50%",
height : "700px",
width : "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
... ... @@ -210,8 +210,8 @@
backdrop: "static",
title: "异常详情",
content: content,
height: "60%",
width: "50%",
height : "700px",
width : "1100px",
buttons: [{
text: "关闭",
className: "btn-danger",
... ...
... ... @@ -346,22 +346,25 @@
content= content +rowData.errorInfo[i]+"<br><br>";
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -382,21 +385,23 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -460,21 +465,23 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -495,21 +502,24 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -575,21 +585,24 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "异常详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ... @@ -610,21 +623,24 @@
}
}
editBtn.click(function () {
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "80%",
width : "60%",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
if(content != ""){
var dialog = $("<div>").appendTo($("body"));
dialog.dialog({
backdrop : "static",
title : "超时详情",
content : content,
height : "700px",
width : "1100px",
buttons : [{
text : "关闭",
className : "btn-danger",
onclick : function() {
$(dialog).dialog("hide");
}
}]
});
}
});
return div;
}
... ...