I remember first seeing Wonder Woman and Batman flirting in an early comic book...nothing came of it, but they were clearly flirting with each other. I remember her wearing go-go boots and traveling with some Asian guy, if that puts a better time stamp on it.
As for throughout history, most writers have paired W and Superman together. They shared a kiss in an Action Comic Superman 50th Anniversary edition, and in Kingdom Come they get together and later have a child.
Well, when JLUnlimited came out, the Powers That Be decided that was sort of routine. I think Timm said it was like the head cheerleader and star quarterback getting together, so they never pursued it. Then when the Gorilla City episode aired and fans responded to Batman's distress when he thought WWWonder Woman had died, they decided to explore that route, which then leechedleached into the comics a bit but was again dropped.
There seems to be interest on both sides in pairing WWWonder Woman with either Batman or Superman, but the majority seem to want the red, white, and blues together.
Oh, and there is one three-part comic series where Wonder Woman and Batman share a kiss (as well as Superman being in awe of her too): Trinity.