From the sound of it, the network interface in your Ubuntu laptop is set to retrieve it's IP address automatically using DHCP (a "random" free IP address within your network, technical details can be found on Wikipedia). When you plug your laptop into the NAS, Ubuntu recognizes that a data connection is established and will start broadcasting a DHCP request.
Although, your NAS is (in all likelyhood) not a DHCP server and does not respond to the request. Result: Your network icon will keep on asking for an address and show the "loading indicator" while it does.
When you plugin your laptop into your router, it does respond to the DHCP request and give you an address to use inside of your network. That's why this "hack" works.
What you should do when you want to talk to your NAS is give your Ubuntu laptop a static IP address as well, so your laptop does not issue a DHCP request.
(The below text is mostly borrowed from this page that also has some screenshots to guide you along the process).
To change your Ubuntu machine to a Static IP go to System \ Preferences \ Network Connections. Find your interface (usually eth0 or wlan0) and click "Edit".
Now, select the IPv4 settings tab, change Method to Manual, click the Add button. Then type in the Static IP Address, Subnet Mask, DNS Servers, and Default Gateway.
Set your IP address to something in the same range as your NAS.
For example if your NAS is on
192.168.0.1, set your laptop to
192.168.0.5 (or something else that's not in use yet). For subnet mask you can then use
255.255.255.0. You can usually leave the default gateway empty.
This should allow your laptop and NAS to talk to each other directly. This should also still allow you to communicate with your router, so you could keep this configuration permanently to avoid having to "switch" all the time.