siddhartha-gupta/Elkarte — pull request #1 by Spuds (2014-02-16 04:32:05+00:00)
Title: Likes

Some tweaks s to the ajax'ing of likes (so cool thank you!)

I did some refactoring of the likes controller to make it a bit more flexible, added a few additional vars and a couple of new methods. This allowed for the consolidation of the json items to a single method.

The controller will now will accept the _api calls for ajax. The main reason for this is to prevent the system from sending template html back in the json or xml response, mostly if you have debug enabled. With out the you will get parse errors in the JS in some edge cases.

Updated the JS with the ;api stuffz in the url. Also made a change so that it updates the title text for the hover, it shows the likers if any.

Some general formatting stuff (mostly mine lol) as is my normal thing when I work on a file. Doc blocks etc added in some spots as well.

There are a couple txt strings in the JS, so it still needs an init so we can pass in a oTxt object with the goodies.