OLD | NEW |
1 function init() | 1 function init() |
2 { | 2 { |
3 loadI18nStrings(); | |
4 | |
5 // Attach event listeners | 3 // Attach event listeners |
6 window.addEventListener("keydown", onKeyDown, false); | 4 window.addEventListener("keydown", onKeyDown, false); |
7 window.addEventListener("dragstart", onDragStart, false); | 5 window.addEventListener("dragstart", onDragStart, false); |
8 window.addEventListener("drag", onDrag, false); | 6 window.addEventListener("drag", onDrag, false); |
9 window.addEventListener("dragend", onDragEnd, false); | 7 window.addEventListener("dragend", onDragEnd, false); |
10 | 8 |
11 $("#addButton").click(addFilters); | 9 $("#addButton").click(addFilters); |
12 $("#cancelButton").click(closeDialog.bind(null, false)); | 10 $("#cancelButton").click(closeDialog.bind(null, false)); |
13 | 11 |
14 // Apply jQuery UI styles | 12 // Apply jQuery UI styles |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ); | 100 ); |
103 dragCoords = [event.screenX, event.screenY]; | 101 dragCoords = [event.screenX, event.screenY]; |
104 } | 102 } |
105 } | 103 } |
106 | 104 |
107 function onDragEnd(event) | 105 function onDragEnd(event) |
108 { | 106 { |
109 onDrag(event); | 107 onDrag(event); |
110 dragCoords = null; | 108 dragCoords = null; |
111 } | 109 } |
OLD | NEW |