Several of the students in the art class at the time (mostly juniors and seniors) were interviewed by local news media. Seems the teacher took the squirt gun from a student who as using it to periodically squirt another student. Despite being in the Dallas IDS, she didn't call the police to report a school shooting or a potential terrorism incident. By coincidence, just as she took the gun, Trump appeared on the projected television image, and she squirted him vociferously with enthusiasm. The classroom laughed, she laughed, it was a funny joke. The one student who said it was maybe a little over the time still doesn't think the teacher should lose her job over it.
Immediate jailing might be a a tad harsh, but that's just me.