PageSourceSearch

https://user.sipac.gov.cn/yhzx/ui/lib/easyui/plugins/jquery.dialog.js

js sipac.gov.cn collected 2026-10-02 06:24:56 UTC 3,413 bytes, 122 lines download raw bytes

1/**
2 * jQuery EasyUI 1.4
3 * 
4 * Copyright (c) 2009-2014 www.jeasyui.com. All rights reserved.
5 *
6 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
7 * To use it on other terms please contact us at [email protected]
8 *
9 */
10(function($){
11function _1(_2){
12var _3=$.data(_2,"dialog").options;
13_3.inited=false;
14$(_2).window($.extend({},_3,{onResize:function(w,h){
15if(_3.inited){
16_a(this);
17_3.onResize.call(this,w,h);
18}
19}}));
20var _4=$(_2).window("window");
21if(_3.toolbar){
22if($.isArray(_3.toolbar)){
23$(_2).siblings("div.dialog-toolbar").remove();
24var _5=$("<div class=\"dialog-toolbar\"><table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table></div>").appendTo(_4);
25var tr=_5.find("tr");
26for(var i=0;i<_3.toolbar.length;i++){
27var _6=_3.toolbar[i];
28if(_6=="-"){
29$("<td><div class=\"dialog-tool-separator\"></div></td>").appendTo(tr);
30}else{
31var td=$("<td></td>").appendTo(tr);
32var _7=$("<a href=\"javascript:void(0)\"></a>").appendTo(td);
33_7[0].onclick=eval(_6.handler||function(){
34});
35_7.linkbutton($.extend({},_6,{plain:true}));
36}
37}
38}else{
39$(_3.toolbar).addClass("dialog-toolbar").appendTo(_4);
40$(_3.toolbar).show();
41}
42}else{
43$(_2).siblings("div.dialog-toolbar").remove();
44}
45if(_3.buttons){
46if($.isArray(_3.buttons)){
47$(_2).siblings("div.dialog-button").remove();
48var _8=$("<div class=\"dialog-button\"></div>").appendTo(_4);
49for(var i=0;i<_3.buttons.length;i++){
50var p=_3.buttons[i];
51var _9=$("<a href=\"javascript:void(0)\"></a>").appendTo(_8);
52if(p.handler){
53_9[0].onclick=p.handler;
54}
55_9.linkbutton(p);
56}
57}else{
58$(_3.buttons).addClass("dialog-button").appendTo(_4);
59$(_3.buttons).show();
60}
61}else{
62$(_2).siblings("div.dialog-button").remove();
63}
64_3.inited=true;
65_4.show();
66$(_2).window("resize");
67if(_3.closed){
68_4.hide();
69}
70};
71function _a(_b,_c){
72var t=$(_b);
73var _d=t.dialog("options");
74var _e=_d.noheader;
75var tb=t.siblings(".dialog-toolbar");
76var bb=t.siblings(".dialog-button");
77tb.insertBefore(_b).css({position:"relative",borderTopWidth:(_e?1:0),top:(_e?tb.length:0)});
78bb.insertAfter(_b).css({position:"relative",top:-1});
79if(!isNaN(parseInt(_d.height))){
80t._outerHeight(t._outerHeight()-tb._outerHeight()-bb._outerHeight());
81}
82tb.add(bb)._outerWidth(t._outerWidth());
83var _f=$.data(_b,"window").shadow;
84if(_f){
85var cc=t.panel("panel");
86_f.css({width:cc._outerWidth(),height:cc._outerHeight()});
87}
88};
89$.fn.dialog=function(_10,_11){
90if(typeof _10=="string"){
91var _12=$.fn.dialog.methods[_10];
92if(_12){
93return _12(this,_11);
94}else{
95return this.window(_10,_11);
96}
97}
98_10=_10||{};
99return this.each(function(){
100var _13=$.data(this,"dialog");
101if(_13){
102$.extend(_13.options,_10);
103}else{
104$.data(this,"dialog",{options:$.extend({},$.fn.dialog.defaults,$.fn.dialog.parseOptions(this),_10)});
105}
106_1(this);
107});
108};
109$.fn.dialog.methods={options:function(jq){
110var _14=$.data(jq[0],"dialog").options;
111var _15=jq.panel("options");
112$.extend(_14,{width:_15.width,height:_15.height,left:_15.left,top:_15.top,closed:_15.closed,collapsed:_15.collapsed,minimized:_15.minimized,maximized:_15.maximized});
113return _14;
114},dialog:function(jq){
115return jq.window("window");
116}};
117$.fn.dialog.parseOptions=function(_16){
118return $.extend({},$.fn.window.parseOptions(_16),$.parser.parseOptions(_16,["toolbar","buttons"]));
119};
120$.fn.dialog.defaults=$.extend({},$.fn.window.defaults,{title:"New Dialog",collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null});
121})(jQuery);
122

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.