[FIX] dict notation for js reserved words in options (Fixes #2957)

This commit is contained in:
Fabien Meghazi 2014-10-08 12:33:56 +02:00
parent c521bb2835
commit 6c779e736a
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@
options = _.extend({
window_title: '',
field_name: '',
default: '',
'default': '', // dict notation for IE<9
init: function() {}
}, options || {});
@ -106,7 +106,7 @@
var dialog = $(openerp.qweb.render('website.prompt', options)).appendTo("body");
options.$dialog = dialog;
var field = dialog.find(options.field_type).first();
field.val(options.default);
field.val(options['default']); // dict notation for IE<9
field.fillWith = function (data) {
if (field.is('select')) {
var select = field[0];