Antenna mounting question
It looks like a quarter wave monopole to me. At 2.45GHz a theoretical quarter wave monopole will be 31mm long because: -

Wavelength of 2.45GHz = \$\dfrac{velocity\space of\space propagation}{frequency}\$ = \$\dfrac{3 \times 10^8}{2.45\times 10^9}\$ = 12.25 cm

A quarter wavelength is therefore 3.06 cm or approximately 31mm

But, it is a bit shorter than this so maybe it is helically wound and this is a way of shortening antenna length a little bit. The data sheet doesn't say so it's a little bit of guesswork. 

I would estimate that it needs to stick out at least 19mm above the metal enclosure to be totally effective. Lowering it inside the metal enclosure is going to affect the antenna gain and the field pattern but it may still work effectively over shorter distances.

I'll also add that the data sheet is very poor in specifying this antenna. It talks about antenna gain but doesn't clearly state whether this is dBi (relative to the theoretical isotropic antenna) or some other reference.