[FIX] dict notation for js reserved words in options (Fixes #2957)
authorFabien Meghazi <fme@openerp.com>
Wed, 8 Oct 2014 10:33:56 +0000 (12:33 +0200)
committerFabien Meghazi <fme@openerp.com>
Wed, 8 Oct 2014 10:33:56 +0000 (12:33 +0200)
addons/website/static/src/js/website.js

index 79214e5..0b5684e 100644 (file)
@@ -93,7 +93,7 @@
         options = _.extend({
             window_title: '',
             field_name: '',
-            default: '',
+            'default': '', // dict notation for IE<9
             init: function() {}
         }, options || {});
 
         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];