ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

button_markup.js
Go to the documentation of this file.
1
6 if( !ultimix )
7 {
8 ultimix = {};
9 }
10
16 if( !ultimix.button_markup )
17 {
18 ultimix.button_markup = {};
19 }
20
34 ultimix.button_markup.toggle_button = function( Obj , Icon , IconToggle , ToggleFunction )
35 {
36 var Src = jQuery( Obj ).children( 'img' ).attr( 'src' );
37 var Value = 0;
38
39 if( Src.indexOf( Icon ) != -1 )
40 {
41 Src = Src.replace( Icon , IconToggle );
42 Value = 0;
43 }
44 else
45 {
46 Src = Src.replace( IconToggle , Icon );
47 Value = 1;
48 }
49
50 jQuery( Obj ).children( 'img' ).attr( 'src' , Src );
51 ToggleFunction( Value );
52 }
53
63 ultimix.button_markup.run_controller_and_remove_dom = function( Data , DomSelector )
64 {
65 ultimix.std_dialogs.QuestionMessageBox(
66 'are_you_shure' ,
67 function()
68 {
69 var Functions = {
70 'success' : function()
71 {
72 jQuery( DomSelector ).remove();
73 }
74 };
75 ultimix.ajax_gate.direct_controller( Data , Functions );
76 }
77 );
78 }