Skip to content

Commit

Permalink
Merge pull request #501 from astagi/feature/idchange
Browse files Browse the repository at this point in the history
Trigger change event on hidden input when image id changes
  • Loading branch information
yakky committed Mar 11, 2015
2 parents 025e55b + dbc794e commit 369e948
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filer/static/filer/js/popup_handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
var txt_name = name + '_description_txt';
var clear_name = name + '_clear';
var elem = document.getElementById(name);
var old_id = elem.value;
document.getElementById(name).value = chosenId;
document.getElementById(img_name).src = chosenThumbnailUrl;
document.getElementById(txt_name).innerHTML = chosenDescriptionTxt;
document.getElementById(clear_name).style.display = 'inline';
if (old_id != chosenId) {
$(elem).trigger('change');
}
win.close();
};
dismissRelatedFolderLookupPopup = function(win, chosenId, chosenName) {
Expand Down

0 comments on commit 369e948

Please sign in to comment.