Skip to content

Commit

Permalink
fix issue where the dialog doesn't insert images on any wymeditor field
Browse files Browse the repository at this point in the history
  • Loading branch information
djones committed Oct 12, 2010
1 parent 1ae18d1 commit 8431dcf
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions public/javascripts/refinery/admin.js
Expand Up @@ -950,18 +950,21 @@ var resource_picker = {
}

close_dialog = function(e) {
if (parent
&& parent.document.location.href != document.location.href
&& $.isFunction(parent.$))
if (parent && parent.document.location.href != document.location.href && $.isFunction(parent.$))
{
$(parent.document.body).removeClass('hide-overflow');
parent.$('.ui-dialog').dialog('close').remove();
the_body = $(parent.document.body)
the_dialog = parent.$('.ui-dialog');
} else {
$(document.body).removeClass('hide-overflow');
$('.ui-dialog').dialog('close').remove();
the_body = $(document.body).removeClass('hide-overflow');
the_dialog = $('.ui-dialog').dialog('close').remove();
}
// if there's a wymeditor involved then let it do its thing without blocking first.
if (!($(document.body).hasClass('wym_iframe_body'))) {
the_body.removeClass('hide-overflow');
the_dialog.dialog('close').remove();

e.preventDefault();
e.preventDefault();
}
}

//parse a URL to form an object of properties
Expand Down

0 comments on commit 8431dcf

Please sign in to comment.