[FIX] menu entry dialog to work correctly with select2 page picker
bzr revid: xmo@openerp.com-20131113155704-7l0d87va0860h7dx
This commit is contained in:
@@ -863,7 +863,7 @@
|
||||
rs.push({
|
||||
create: true,
|
||||
id: q.term,
|
||||
text: "Create " + q.term,
|
||||
text: _.str.sprintf(_t("Create page '%s'"), q.term),
|
||||
});
|
||||
q.callback({
|
||||
more: false,
|
||||
|
||||
@@ -160,11 +160,11 @@
|
||||
self.bind_data(self.data.name, self.data.url, self.data.new_window);
|
||||
}
|
||||
var $link_text = self.$('#link-text').focus();
|
||||
self.$('#link-existing').change(function () {
|
||||
if (!$link_text.val()) {
|
||||
$link_text.val($(this).find('option:selected').text());
|
||||
$link_text.focus();
|
||||
}
|
||||
self.$('#link-page').change(function (e) {
|
||||
if ($link_text.val()) { return; }
|
||||
var data = $(this).select2('data');
|
||||
$link_text.val(data.create ? data.id : data.text);
|
||||
$link_text.focus();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user