(name, id, text, img, oc)
| 238 | }; |
| 239 | |
| 240 | var createImageButton = function(name, id, text, img, oc) { |
| 241 | var b = null; |
| 242 | var c = null; |
| 243 | var i = null; |
| 244 | |
| 245 | b = crc('input', 'imgbutton button', name, id, 'bu', true); |
| 246 | c = crc('div', 'imgbutton_container', name, id, 'bu_container'); |
| 247 | c.appendChild(b); |
| 248 | |
| 249 | b.name = name; |
| 250 | b.key = id; |
| 251 | b.type = "button"; |
| 252 | |
| 253 | i = crc('img', 'imgbutton_image', name, id, 'bu_img', true); |
| 254 | i.src = img; |
| 255 | c.appendChild(i); |
| 256 | b.setAttribute('title', text); |
| 257 | i.setAttribute('title', text); |
| 258 | |
| 259 | if (!b.inserted && oc) { |
| 260 | b.addEventListener("click", oc); |
| 261 | i.addEventListener("click", oc); |
| 262 | } |
| 263 | |
| 264 | return c; |
| 265 | }; |
| 266 | |
| 267 | var createItemButton = function(name, i, oc) { |
| 268 | var b = null; |
nothing calls this directly
no test coverage detected
searching dependent graphs…