[FIX] menu entry dialog to work correctly with select2 page picker

bzr revid: xmo@openerp.com-20131113155704-7l0d87va0860h7dx
This commit is contained in:
Xavier Morel
2013-11-13 16:57:04 +01:00
parent 837aa436e5
commit ca0537ad4a
2 changed files with 6 additions and 6 deletions
@@ -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,
+5 -5
View File
@@ -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();
});
});
},