~jfb-tempo-consulting/unifield-web/US-7530

« back to all changes in this revision

Viewing changes to addons/openerp/controllers/templates/closepopup.mako

  • Committer: jf
  • Date: 2020-08-06 14:23:27 UTC
  • mfrom: (4989.2.5 web-US-5271)
  • Revision ID: jfb@tempo-consulting.fr-20200806142327-fy0fvg6ud982dxu7
US-5271 [IMP] new attr set_ids on button to retrieve the o2m ids
Refresh o2m in a 1st popup when the 2nd popup is closed

lp:~jfb-tempo-consulting/unifield-web/US-5271

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    <script type="text/javascript" src="/openobject/static/javascript/openobject/openobject.dom.js"></script>
13
13
    <script type="text/javascript" src="/openobject/static/javascript/openobject/openobject.http.js"></script>
14
14
    <script type="text/javascript" src="/openobject/static/javascript/openobject/openobject.tools.js"></script>
15
 
    
 
15
     <script type="text/javascript" src="/openerp/static/javascript/openerp/openerp.ui.textarea.js"></script>
 
16
 
16
17
    <script type="text/javascript">    
17
18
        jQuery(document).ready(function(){
18
19
            if(!window.opener && window.top == window) {
21
22
            }
22
23
            var topWindow;
23
24
            if(window.top != window) {
 
25
                % if frompopup:
 
26
                if (jQuery(window).attr('frameElement')) {
 
27
                    new window.top.frames[0].ListView('${o2m_refresh}').reload()
 
28
                    setTimeout(function () {
 
29
                      window.frameElement.close();
 
30
                    });
 
31
                   return;
 
32
                }
 
33
                % else:
24
34
                topWindow = window.top;
25
35
                setTimeout(function () {
26
36
                    topWindow.closeAction();
27
37
                });
 
38
                % endif
28
39
            } else {
29
40
                topWindow = window.opener;
30
41
                setTimeout(close);