[FIX] html widget: fix cleditor width when the field was invisible before becoming...
authorFabien Meghazi <fme@openerp.com>
Wed, 9 Jan 2013 16:46:26 +0000 (17:46 +0100)
committerOlivier Dony <odo@openerp.com>
Wed, 9 Jan 2013 16:46:26 +0000 (17:46 +0100)
lp bug: https://launchpad.net/bugs/1097638 fixed

bzr revid: odo@openerp.com-20130109164626-1a16vqmwc366n0xf

addons/web/static/lib/cleditor/jquery.cleditor.js

index f70cc8b..e344699 100644 (file)
 \r
       var $toolbar = editor.$toolbar,\r
           $group = $toolbar.children("div:last"),\r
-          wid = $main.width();\r
+          wid = /%/.test("" + options.width) ? options.width : $main.width();\r
 \r
       // Resize the toolbar\r
       var hgt = $group.offset().top + $group.outerHeight() - $toolbar.offset().top + 1;\r