ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

pmsg_view.js
Go to the documentation of this file.
1
6 if( !ultimix )
7 {
8 ultimix = {};
9 }
10
16 if( !ultimix.pmsg )
17 {
18 ultimix.pmsg = {};
19 }
20
30 ultimix.pmsg.set_read = function( Id )
31 {
32 Success = function( Response )
33 {
34 jQuery( '#record_view_opener_' + Id + '_in' ).children().removeClass( 'not_read' );
35 jQuery( '#record_view_opener_' + Id + '_in' ).children().addClass( 'read' );
36 }
37
38 if( jQuery( '#record_view_opener_' + Id + '_in' ).children().hasClass( 'not_read' ) )
39 {
40 Data = { 'package_name' : 'pmsg::pmsg_controller' , 'action' : 'set_read' , 'pmsg_read' : 1 , 'id' : Id };
41 ultimix.DirectController( Data , Success , { 'async' : true } );
42 }
43 }
44
54 ultimix.pmsg.set_default_options = function( ViewOptions )
55 {
56 if( !ViewOptions )
57 {
58 ViewOptions = {};
59 }
60
61 ViewOptions.meta = ViewOptions.meta ? ViewOptions.meta : 'meta_pmsg_list';
62 ViewOptions.package_name = ViewOptions.package_name ? ViewOptions.package_name : 'pmsg::pmsg_view';
63 ViewOptions.paging_require_form = ViewOptions.paging_require_form ? ViewOptions.paging_require_form : '0';
64 ViewOptions.add_hidden_fields = ViewOptions.add_hidden_fields ? ViewOptions.add_hidden_fields : '0';
65
66 return( ViewOptions );
67 }
68
78 ultimix.pmsg.get_list_form = function( Fuctions , ViewOptions )
79 {
80 if( !Fuctions )
81 {
82 Fuctions = {};
83 }
84
85 ViewOptions = ultimix.pmsg.set_default_options( ViewOptions );
86
87 ultimix.ajax_gate.direct_view( ViewOptions , Fuctions );
88 }
89
105 ultimix.pmsg.get_custom_list_form = function( Fuctions , Header , Item , Footer , ViewOptions )
106 {
107 ultimix.auto.get_custom_list_form( Fuctions , Header , Item , Footer , false , ViewOptions , 'ad_banner' );
108 }
109
119 ultimix.pmsg.delete = function( Id , DataSelector )
120 {
121 ultimix.auto.delete(
122 Id , DataSelector ,
123 {
124 'package_name' : 'pmsg::pmsg_controller' ,
125 'pmsg_context_action' : 'delete_record' ,
126 'pmsg_action' : 'delete_record' , 'pmsg_record_id' : Id ,
127 'meta' : 'meta_delete_pmsg'
128 }
129 );
130 }
131
143 ultimix.pmsg.record_view_form = function( Id , DataSelector )
144 {
145 ultimix.auto.record_view_form(
146 Id , DataSelector ,
147 {
148 'package_name' : 'pmsg::pmsg_view' , 'pmsg_context_action' : 'record_view_form' ,
149 'pmsg_action' : 'record_view_form' , 'pmsg_record_id' : Id ,
150 'meta' : 'meta_record_view_pmsg_form'
151 }
152 );
153 }