modify atfield directive to handle complex search buttons, issue #30,#38