Subversion Repositories DevTools

Rev

Rev 5597 | Rev 5603 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5597 Rev 5598
Line 21... Line 21...
21
        icon: "images/i_warning.gif",
21
        icon: "images/i_warning.gif",
22
        url : null,
22
        url : null,
23
        ok : null,
23
        ok : null,
24
        post : null,
24
        post : null,
25
        button : "Confirm",
25
        button : "Confirm",
26
        progress : "#ProgressBar"
26
        progress : "#ProgressBar",
-
 
27
		cancel : true
27
     };
28
     };
28
     $.extend( defaults, parms);
29
     $.extend( defaults, parms);
29
 
30
 
30
     defaults.open = function() {
31
     defaults.open = function() {
31
        $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus(); 
32
        $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus(); 
Line 53... Line 54...
53
                if (defaults.post != null ) {
54
                if (defaults.post != null ) {
54
                    $('form[name="'+defaults.post+'"]').submit();    
55
                    $('form[name="'+defaults.post+'"]').submit();    
55
                }
56
                }
56
                $(this).dialog("close");
57
                $(this).dialog("close");
57
            }
58
            }
58
        },
-
 
59
        {
-
 
60
        text : 'Cancel',
-
 
61
        click : function (){
-
 
62
            $(this).dialog("close");
-
 
63
            }
-
 
64
        }];
59
        }];
65
 
60
 
-
 
61
		if(typeof(defaults.cancel) == 'boolean' && defaults.cancel)
-
 
62
		{
-
 
63
				defaults.buttons.push({
-
 
64
					text : 'Cancel',
-
 
65
					click : function (){
-
 
66
						$(this).dialog("close");
-
 
67
						}
-
 
68
				});
-
 
69
		}
-
 
70
 
66
     var dd = $( "<div>Confirm</div>" ).dialog(defaults);
71
     var dd = $( "<div>Confirm</div>" ).dialog(defaults);
67
     // Once the dialog has been instantiated the autosize dimensions are known
72
     // Once the dialog has been instantiated the autosize dimensions are known
68
     // and the dialog can be correctly positioned
73
     // and the dialog can be correctly positioned
69
     if (defaults.position == 'center')
74
     if (defaults.position == 'center')
70
     {
75
     {