Tuesday 29 April 2014

Horse History (And stable/Jockey History)

An all-encompassing piece of code. This is a great example of how the new Track King can be more efficient behind the scenes, and less confusing for players.

I've replaced 4 pages (Stable Diary, Stable History, Horse History, Jockey History) with one page.... implemented as a Tab which can appear on Horse, jockey, or stable.

This Tab formats the history into "bitesize" chunks, (12 week blocks for horses and stable history, and 4 week blocks for jockeys and stable diary) and allows OC members to page back to the start of the "object"...and non-OC to page back once only.

I even think the display is fairly tidy, given the chaotic nature of the data being displayed!

I'm pretty sure all items are being displayed correctly, but if anyone would like to undertake a comprehensive survey of horses bought, sold, studded, bred, yearlings, retired, cup winners, races, travel, and so forth, that would be awesome!! ;-)

Monday 7 April 2014

Training and Vets Schedules

Have implemented a bit of "cleverness" around Schedules today.... this is largely in readiness for the Transport page being almost complete.

Now, when you amend your Vet/Training Schedule - whether its on the horse page or on the Training/Vet tabs, it should automatically update ALL copies of the Horse schedule.... whether they be on the Horse Page, or it's Transport Tab, or wherever.

This was quite a tricky update to get in place, particularly having it work out where in a Table to insert a row for new Training/Vet.

The big plus here though, is that when travel is booked it will instantly appear in all schedules rather than prompting for a refresh.

If anyone making vet/training updates in future can keep an eye on schedules after updates, that would be awesome thanks guys.

Latest Addition:

It's now possible to flip back to training reports from previous weeks ;-) Very happy with this new feature!

Friday 4 April 2014

Auctions Bug

Auctions Bug

Found a major issue on the Auctions page today, which was a real headache to fix. The bug didn't apply to the "Horse" page, only when placing a bid on a horse direct from the Auctions List.

Basically, it was ignoring the number that you entered, and simply placing the "default" bid value.

(For those that like a bit of tech thinking) - The reason was because the row of data about the horse is "copied" into the table from a hidden area on the page (it can't be a permanent part of the table or else it will disappear when the table gets sorted)... the original form had already been created and cloned, but when re-inserted into the page it needed to have javascript events setup again otherwise it was still pointing to the original copy in memory. For some reason the cloned javascript events weren't cutting it.

Anyways, bottom line - anytime you want to do anything on Auctions, it would be REALLY appreciated if you can use the new TK and test it out... feel free to try unusual stuff and see how it responds.... it's currently the most technically complicated page in the new TK, so it would be great if you guys can see if it stands up to a bit of punishment.

Thanks!