OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of swarmlib; | 5 part of swarmlib; |
6 | 6 |
7 /** | 7 /** |
8 * An informational dialog that shows keyboard shortcuts and provides a | 8 * An informational dialog that shows keyboard shortcuts and provides a |
9 * link to the Dart language webpage. | 9 * link to the Dart language webpage. |
10 */ | 10 */ |
11 //TODO(efortuna): fix DialogView so it doesn't require the HTML passed to | 11 //TODO(efortuna): fix DialogView so it doesn't require the HTML passed to |
12 // the constructor. | 12 // the constructor. |
13 class HelpDialog extends DialogView { | 13 class HelpDialog extends DialogView { |
14 CompositeView _parent; | 14 CompositeView _parent; |
15 Function _doneHandler; | 15 Function _doneHandler; |
16 | 16 |
17 HelpDialog(this._parent, this._doneHandler) | 17 HelpDialog(this._parent, this._doneHandler) |
18 : super('Information', '', makeContent()); | 18 : super('Information', '', makeContent()); |
19 | 19 |
20 void onDone() { _doneHandler(); } | 20 void onDone() { |
| 21 _doneHandler(); |
| 22 } |
21 | 23 |
22 static View makeContent() { | 24 static View makeContent() { |
23 return new View.html( | 25 return new View.html(''' |
24 ''' | |
25 <div> | 26 <div> |
26 | 27 |
27 <p> | 28 <p> |
28 Keyboard shortcuts: | 29 Keyboard shortcuts: |
29 ${generateTableHtml()} | 30 ${generateTableHtml()} |
30 </p> | 31 </p> |
31 | 32 |
32 <p> | 33 <p> |
33 <div id="dart-logo"> | 34 <div id="dart-logo"> |
34 <a href="http://dartlang.org"> | 35 <a href="http://dartlang.org"> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ${cellStart} Next Category </th> | 76 ${cellStart} Next Category </th> |
76 </tr> | 77 </tr> |
77 <tr> | 78 <tr> |
78 ${cellStart} p </th> | 79 ${cellStart} p </th> |
79 ${cellStart} Previous Category </th> | 80 ${cellStart} Previous Category </th> |
80 </tr> | 81 </tr> |
81 | 82 |
82 </table>'''; | 83 </table>'''; |
83 } | 84 } |
84 } | 85 } |
OLD | NEW |