~unifield-team/unifield-web/uftp-234

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/o2m.js

  • Committer: jf
  • Date: 2013-09-05 12:39:46 UTC
  • mfrom: (4713.1.4 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20130905123946-23wd1oz5cks0zsjc
OEB-181 [FIX] 'default_focus' attribute doesn't work
lp:~unifield-team/unifield-web/oeb-181

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
            width: '90%',
251
251
            height: '95%',
252
252
        });
 
253
        $frame.load(function() {
 
254
            $frame_content = $frame.contents();
 
255
            $frame_content.find("[autofocus='autofocus']").focus();
 
256
        });
253
257
        var $form = jQuery('<form>', {
254
258
            method: 'POST',
255
259
            action: '/openerp/openo2m/edit',
279
283
        var jQ = jQuery;
280
284
        var $ = $frame_window[0].jQuery;
281
285
 
 
286
        $frame = $($frame_window.attr('frameElement'));
282
287
        var $form = $('#view_form');
283
288
 
284
289
        var list_id = frame_data($frame_window, 'list');
300
305
            })));
301
306
        });
302
307
 
 
308
        setTimeout(function() {
 
309
            var $frame_content = $frame.contents();
 
310
            $frame_content.find("[autofocus='autofocus']").focus();
 
311
        }, 100);
 
312
 
303
313
        var lc = parseInt($('#_terp_load_counter').val(), 10) || 0;
304
314
        if(lc) {
305
315
            $.o2m('refresh');