| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library trydart.ui; | 5 library trydart.ui; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 | 8 |
| 9 import 'dart:async' show | 9 import 'dart:async' show |
| 10 scheduleMicrotask; | 10 scheduleMicrotask; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // TODO(ahe): Update currentSample. Or try switching to a drop-down menu. | 171 // TODO(ahe): Update currentSample. Or try switching to a drop-down menu. |
| 172 var active = inspirationTabs.query('[id="$currentSample"]'); | 172 var active = inspirationTabs.query('[id="$currentSample"]'); |
| 173 if (active == null) { | 173 if (active == null) { |
| 174 // inspirationTabs.query('li').classes.add('active'); | 174 // inspirationTabs.query('li').classes.add('active'); |
| 175 } | 175 } |
| 176 | 176 |
| 177 (inputPre = new DivElement()) | 177 (inputPre = new DivElement()) |
| 178 ..classes.add('well') | 178 ..classes.add('well') |
| 179 ..style.backgroundColor = currentTheme.background.color | 179 ..style.backgroundColor = currentTheme.background.color |
| 180 ..style.color = currentTheme.foreground.color | 180 ..style.color = currentTheme.foreground.color |
| 181 ..style.overflow = 'auto' | 181 ..style.overflow = 'visible' |
| 182 ..style.whiteSpace = 'pre' | 182 ..style.whiteSpace = 'pre' |
| 183 ..style.font = codeFont | 183 ..style.font = codeFont |
| 184 ..spellcheck = false; | 184 ..spellcheck = false; |
| 185 | 185 |
| 186 inputPre.contentEditable = 'true'; | 186 inputPre.contentEditable = 'true'; |
| 187 inputPre.onKeyDown.listen(onKeyUp); | 187 inputPre.onKeyDown.listen(onKeyUp); |
| 188 | 188 |
| 189 var inputWrapper = new DivElement() | 189 var inputWrapper = new DivElement() |
| 190 ..append(inputPre) | 190 ..append(inputPre) |
| 191 ..style.position = 'relative'; | 191 ..style.position = 'relative'; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 dialog.style.display = 'none'; | 411 dialog.style.display = 'none'; |
| 412 dialog.classes.remove('in'); | 412 dialog.classes.remove('in'); |
| 413 backdrop.remove(); | 413 backdrop.remove(); |
| 414 } | 414 } |
| 415 form.onSubmit.listen(onSubmit); | 415 form.onSubmit.listen(onSubmit); |
| 416 | 416 |
| 417 var doneButton = document.getElementById('settings-done'); | 417 var doneButton = document.getElementById('settings-done'); |
| 418 doneButton.onClick.listen(onSubmit); | 418 doneButton.onClick.listen(onSubmit); |
| 419 } | 419 } |
| OLD | NEW |