Fixed summary visibility check

Now using the integer values to check whether to show the summary parts
instead of trying to parse the html code.

In the french language, someone didn't translate it properly. They used "{dir}" instead of "{dirs}". (I'll check on transifex)
This made the summary value parsing that uses .html().charAt(0) fail, which broke other things like not being able to open the documents app from the file list... probably because the JS error somehow prevented viewer.js to be loaded.

Anyway, please review this fix @Kondou-ger @karlitschek @schiesbn