ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

jquery.dialog.js
Go to the documentation of this file.
1
6 if( !ultimix )
7 {
8 ultimix = {};
9 }
10
16 if( !ultimix.dialog )
17 {
18 ultimix.dialog = {};
19 }
20
30 ultimix.dialog.init_click_handlers = function( Item , OpenDialogFunction )
31 {
32 jQuery( Item ).unbind( 'click' );
33 jQuery( Item ).click( OpenDialogFunction );
34
35 if( jQuery( Item ).attr( 'tagName' ) == 'A' )
36 {
37 jQuery( Item ).attr( 'href' , '#' );
38 }
39
40 if( jQuery( Item ).attr( 'tagName' ) == 'INPUT' || jQuery( Item ).attr( 'tagName' ) == 'TEXTAREA' )
41 {
42 jQuery( Item ).unbind( 'focus' );
43 jQuery( Item ).focus( OpenDialogFunction );
44 }
45 }
46
64 ultimix.dialog.add_opener = function( Opener , Selector , DataAcceptor , StatusAcceptor , DataSource , Validation )
65 {
66 if( Opener )
67 {
68 if( jQuery( Opener ).length )
69 {
70 var Items = jQuery( Opener );
71
72 for( var i = 0 ; i < Items.length ; i++ )
73 {
74 var OpenDialogFunction = function()
75 {
76 ultimix.dialog.open_dialog(
77 Selector , DataAcceptor , StatusAcceptor , DataSource , Validation
78 );
79 }
80 ultimix.dialog.init_click_handlers( Items[ i ] , OpenDialogFunction );
81 }
82 }
83 }
84 }
85
101 ultimix.dialog.open_dialog = function( Selector , DataAcceptor , StatusAcceptor , DataSource , BeforeOpenValidation )
102 {
103 jQuery( Selector ).attr( 'data_acceptor' , DataAcceptor );
104 jQuery( Selector ).attr( 'status_acceptor' , StatusAcceptor );
105 jQuery( Selector ).attr( 'data_source' , DataSource );
106
107 if( BeforeOpenValidation && BeforeOpenValidation() == false )
108 {
109 return;
110 }
111
112 scroll( 0 , 0 );
113 jQuery( Selector ).dialog( 'open' );
114 jQuery( Selector ).dialog( { position: [ 'center' , 'center' ] } );
115 }
116
126 ultimix.dialog.show_dom_in_dialog = function( Selector , Title )
127 {
128 jQuery( Selector ).dialog(
129 {
130 'title' : Title ,
131 'width' : 'auto' ,
132 'maxWidth' : '960' ,
133 'height' : '500' ,
134 'modal' : true ,
135 'buttons' : [
136 {
137 text: "OK",
138 click: function()
139 {
140 jQuery( this ).dialog( 'close' );
141 }
142 }
143 ]
144 }
145 );
146 }
147
163 ultimix.dialog.create_form = function( DataAcceptor , StatusAcceptor , DataSource , Selector )
164 {
165 return( true );
166 }