[FIX] forgot to move image_style initialization

bzr revid: xmo@openerp.com-20131001113429-tc6qgigsxvgbtxnc
This commit is contained in:
Xavier Morel 2013-10-01 13:34:29 +02:00
parent f4980e1d3b
commit ddb65ce339
1 changed files with 3 additions and 4 deletions

View File

@ -704,6 +704,9 @@
}),
start: function () {
var $options = this.$('.image-style').children();
this.image_styles = $options.map(function () { return this.value; }).get();
var o = { url: null, style: null, };
// avoid typos, prevent addition of new properties to the object
Object.preventExtensions(o);
@ -783,10 +786,6 @@
var el = selection && selection.getSelectedElement();
this.element = null;
var $select = this.$('.image-style');
var $options = $select.children();
this.image_styles = $options.map(function () { return this.value; }).get();
if (el && el.is('img')) {
this.element = el;
_(this.image_styles).each(function (style) {