SWC-364: only refresh the attachments of the entity when the edit dialog is visible (we don't care if it's rendered or not).  also add tests around this functionality
Merge pull request #182 from jay-hodgson/release-1.18

SWC-364: only refresh the attachments of the entity when the edit dialog is visible