Skip to content

Commit

Permalink
Popdown might not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 19, 2013
1 parent feeb8cc commit 7145819
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion imp/js/compose-dimp.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,20 @@ var DimpCompose = {

setPopdownLabel: function(id, s, l, k)
{
var input;

if (!k) {
k = this.knl[id];
if (!k) {
return;
}
}

input = $(k.opts.input);
if (!input) {
return;
}

if (!l) {
l = k.opts.data.find(function(f) {
return f.v == s;
Expand All @@ -176,7 +183,7 @@ var DimpCompose = {
: l.l;
}

$(k.opts.input).setValue(s);
input.setValue(s);
$(k.opts.label).writeAttribute('title', l.escapeHTML()).setText(l.truncate(15)).up(1).show();

if (k.knl) {
Expand Down

0 comments on commit 7145819

Please sign in to comment.