Added unit test for #332
moved link transferring into inheritAttributesFromElement method

The previous location did not work any more because at that time the parent's attributes had not been inherited yet.
Fixed demo functionality of having a DTLinkButton on top of custom image view for attachment.
Test Case for #332