园子中的朋友大家好。在上一篇文章中我们,给大家介绍了 Wijmo Accordion 手风琴插件的特性及使用方法。感谢园子中朋友的支持,朋友们的支持给我们写这一系列文章提供了很大的动力。在这篇文章中我们将介绍 Dialog 的特性及使用方法。 Dialog 即为 jQuery 中的弹出对话框。
有些朋友第一次看到本系列文章,所以给出本系列文章的链接:
首先让我们看看 Wijmo Dialog 给我们带来了哪些惊喜?
使用ComponentOne为ASP.NET Wijmo出品的Dialog™控件可以创建功能强大的、互动的、可定制的对话框窗口。这种特殊类型的对话窗口可以在客户端创建,或者在服务器端显示信息,并接收来自用户的输入。
HTML 标签: <div> <input type="button" value="Hide Dialog" onclick="$('#dialog').wijdialog('close')" /> <input type="button" value="Show Dialog" onclick="$('#dialog').wijdialog('open')" /> <div id="dialog" title="Basic dialog"> </div> </div> jQuery 脚本: <script id="scriptInit" type="text/javascript"> $(document).ready(function () { $('#dialog').wijdialog({ autoOpen: false, captionButtons: { refresh: { visible: false} } }); }); </script>
效果预览:
ASP.NET Wijmo的对话框控件可以提供两种不同类型的对话框窗口:模式化的对话框窗口和无模式的对话框窗口。一个模式化的对话框窗口是一个子窗口,在用户可以在当前的应用程序上继续工作之前,它必须关闭。一个无模式的对话框窗口,可以使用户在对话框窗口存在时与其他窗口进行交互的对话。
当用户用局部页面呈现(PPR)技术执行操作时,它可以提高应用程序的性能,并提供更直接的反馈。
这是当窗口最小化时该对话框可停靠的区域。
ASP.NET Wijmo的对话框控件可以为它的标题栏和内容元素提供独特的属性样式.
C1Dialog控件包括一个可以在加载内容时显示的微调元素。你可以使用样式来自定义该图像。
模板可以被添加到对话窗口的内容区域。为实现丰富的对话框窗口的演示,动态模板可以在对话窗口的内容区域中使用。
它可以使用任何内置的动画效果来自定义对话框与互动。对如何显示和隐藏对话框窗口与如何展开和折叠对话框窗口进行更改。在默认情况下,对话框窗口中不使用任何动画效果。
只需点击一下智能标签,就可以通过从六个溢价主题(北极,午夜时分,雅集,火箭,钴和英镑)中选择一个来改变组合框的外观。另外,还可以使用jQuery UI中的ThemeRoller来创建一个自定义的主题!
你可以使用这一种级联样式表(CSS)的样式来定义自定义皮肤。有了CSS支持,你可以使该窗口与你的组织标准相匹配。
感谢大家阅读本文章,在下一篇文章中我们将介绍 Wijmo jQuery Calendar-日历插件 的使用方法。
1.源码下载(包含以上特性):Wijmo-Dialog.zip
2.更多信息请参考:Wijmo 中文网站:http://www.gcpowertools.com.cn/products/c1_asp_overview.htm
3.开源Wijmo jQuery 讨论社区: http://gcdn.grapecity.com/index.aspx
$(
"selector"
).wijdialog({autoOpen:
false
});
$(
"selector"
).wijdialog({button: {ok:
function
(){…}});
$(
"selector"
).wijdialog({button: [{text:”ok”, click:
function
(){…}}]);
{
pin: {visible:
true
, click: self.pin, iconClassOn:
'ui-icon-pin-w'
, iconClassOff:
'ui-icon-pin-s'
},
refresh: {visible:
true
, click: self.refresh, iconClassOn:
'ui-icon-refresh'
},
toggle: {visible:
true
, click: self.toggle, iconClassOn:
'ui-icon-carat-1-n'
, iconClassOff:
'ui-icon-carat-1-s'
},
minimize: {visible:
true
, click: self.minimize, iconClassOn:
'ui-icon-minus'
},
maximize: {visible:
true
, click: self.maximize, iconClassOn:
'ui-icon-extlink'
},
close: {visible:
true
, click: self.close, iconClassOn:
'ui-icon-close'
}
};
$(
"selector"
).wijdialog({captionButtons: {
pin: { visible:
false
},
refresh: { visible:
false
},
toggle: { visible:
false
},
minimize: { visible:
false
},
maximize: { visible:
false
}
}
});
$(
"selector"
).wijdialog({closeOnEscape:
false
});
$(
"selector"
).wijdialog({closeText:
"close"
});
$(
"selector"
).wijdialog({contentUrl:
'http://www.google.com'
});
$(
"selector"
).wijdialog({dialogClass:
"alert"
});
$(
"selector"
).wijdialog({disabled:
true
});
$(
"selector"
).wijdialog({draggable:
false
});
$(
"selector"
).wijdialog({expandingAnimation:
{ effect:
"puff"
, duration: 300, easing:
"easeOutExpo"
}
});
$(
"selector"
).wijdialog({height: 600});
$(
"selector"
).wijdialog({hide:
"slide"
});
$(
"selector"
).wijdialog({maxHeight: 400});
$(
"selector"
).wijdialog({maxWidth: 300});
$(
"selector"
).wijdialog({minHeight: 400});
$(
"selector"
).wijdialog({minimizeZoneElementId:
"zoomId"
});
$(
"selector"
).wijdialog({minWidth: 400});
$(
"selector"
).wijdialog({modal:
true
});
$(
"selector"
).wijdialog({position:
"top"
});
$(
"selector"
).wijdialog({resizable:
false
});
$(
"selector"
).wijdialog({show:
"fade"
});
$(
"selector"
).wijdialog({stack:
false
});
$(
"selector"
).wijdialog({title:
"Dialog Title"
});
$(
"selector"
).wijdialog({width: 300});
$(
"selector"
).wijdialog({zIndex: 2000});
//Supply a function as an option:
$(
".selector"
).wijdialog({ close:
function
(e) { } });
//Bind to the event by type: wijdialogclose:
$(
".selector"
).bind(
"wijdialogclose"
,
function
(e) { } );
$(
".selector"
).wijdialog({ blur:
function
(e, data) { } });
//Bind to the event by type: wijdialogblur:
$(
".selector"
).bind(
"wijdialogblur"
,
function
(e, data) { } );
$(
"selector"
).wijdialog({ buttonCreating:
function
(e, data) { } });
//Bind to the event by type: wijdialogbuttoncreating:
$(
".selector"
).bind(
"wijdialogbuttoncreating"
,
function
(e, data) { } );
Code Example:
$(
".selector"
).wijdialog({ close:
function
(e) { } });
//Bind to the event by type: wijdialogclose:
$(
".selector"
).bind(
"wijdialogclose"
,
function
(e) { } );
$(
".selector"
).wijdialog({ create:
function
(e) { } });
//Bind to the event by type: wijdialogcreate:
$(
".selector"
).bind(
"wijdialogcreate"
,
function
(e) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({drag:
function
(e, data) { } });
//Bind to the event by type: wijdialogdrag:
$(
".selector"
).bind(
"wijdialogdrag"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({dragStart:
function
(e, data) { } });
//Bind to the event by type: wijdialogdragstart:
$(
".selector"
).bind(
"wijdialogdragstart"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({dragStop:
function
(e, data) { } });
//Bind to the event by type: wijdialogdragstop:
$(
".selector"
).bind(
"wijdialogdragstop"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ focus:
function
(e) { } });
//Bind to the event by type: wijdialogfocus:
$(
".selector"
).bind(
"wijdialogfocus"
,
function
(e) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ open:
function
(e) { } });
//Bind to the event by type: wijdialogopen:
$(
".selector"
).bind(
"wijdialogopen"
,
function
(e) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ resize:
function
(e, data) { } });
//Bind to the event by type: wijdialogresize:
$(
".selector"
).bind(
"wijdialogresize"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ resizeStart:
function
(e, data) { } });
//Bind to the event by type: wijdialogresizestart:
$(
".selector"
).bind(
"wijdialogresizestart"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ resizeStop:
function
(e, data) { } });
//Bind to the event by type: wijdialogresizestop:
$(
".selector"
).bind(
"wijdialogresizestop"
,
function
(e, data) { } );
//Supply a function as an option:
$(
".selector"
).wijdialog({ stateChanged:
function
(e, data) { } });
//Bind to the event by type: wijdialogstatechanged:
$(
".selector"
).bind(
"wijdialogstatechanged"
,
function
(e, data) { } );
$(
" selector "
).wijdialog (
"close"
);
$(
" selector "
).wijdialog (
"destroy"
);
$(
" selector "
).wijdialog (
"disable"
);
$(
" selector "
).wijdialog (
"enable "
);
$(
'selector'
).wijdialog(
"getState"
);
$(
" selector "
).wijdialog (
"isOpen"
);
$(
'selector'
).wijdialog(
"maximize"
);
$(
'selector'
).wijdialog(
"minimize"
);
$(
" selector "
).wijdialog (
"moveToTop "
);
$(
" selector "
).wijdialog (
"open"
);
$(
" selector "
).wijdialog (
"option"
, optionName , [value]);
$(
" selector "
).wijdialog (
"option"
, options);
$(
'selector'
).wijdialog(
"pin"
);
$(
'selector'
).wijdialog(
"refresh"
);
$(
'selector'
).wijdialog(
"reset"
);
$(
'selector'
).wijdialog(
"restore"
);
$(
'selector'
).wijdialog(
"toggle"
);
$(
" selector "
).wijdialog (
"widget"
);