Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
var PortletAjax = function () {
2
 
3
    var handlePortletAjax = function () {
4
        //custom portlet reload handler
5
        $('#my_portlet .portlet-title a.reload').click(function(e){
6
            e.preventDefault();  // prevent default event
7
            e.stopPropagation(); // stop event handling here(cancel the default reload handler)
8
            // do here some custom work:
9
            App.alert({
10
                'type': 'danger',
11
                'icon': 'warning',
12
                'message': 'Custom reload handler!',
13
                'container': $('#my_portlet .portlet-body')
14
            });
15
        })
16
    }
17
 
18
    return {
19
        //main function to initiate the module
20
        init: function () {
21
            handlePortletAjax();
22
        }
23
 
24
    };
25
 
26
}();
27
 
28
jQuery(document).ready(function() {    
29
   PortletAjax.init();
30
});