| 12 | mod(CodeMirror); |
| 13 | })(function(CodeMirror) { |
| 14 | function dialogDiv(cm, template, bottom) { |
| 15 | var wrap = cm.getWrapperElement(); |
| 16 | var dialog; |
| 17 | dialog = wrap.appendChild(document.createElement("div")); |
| 18 | if (bottom) |
| 19 | dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom"; |
| 20 | else |
| 21 | dialog.className = "CodeMirror-dialog CodeMirror-dialog-top"; |
| 22 | |
| 23 | if (typeof template == "string") { |
| 24 | dialog.innerHTML = template; |
| 25 | } else { // Assuming it's a detached DOM element. |
| 26 | dialog.appendChild(template); |
| 27 | } |
| 28 | return dialog; |
| 29 | } |
| 30 | |
| 31 | function closeNotification(cm, newVal) { |
| 32 | if (cm.state.currentNotificationClose) |