| 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 nav_bar_element; | 5 library nav_bar_element; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
| 9 import 'package:observatory/app.dart'; | |
| 10 import 'package:observatory/service.dart'; | 9 import 'package:observatory/service.dart'; |
| 11 import 'package:polymer/polymer.dart'; | 10 import 'package:polymer/polymer.dart'; |
| 12 | 11 |
| 13 | 12 |
| 14 @CustomTag('nav-bar') | 13 @CustomTag('nav-bar') |
| 15 class NavBarElement extends ObservatoryElement { | 14 class NavBarElement extends ObservatoryElement { |
| 16 @published bool pad = true; | 15 @published bool pad = true; |
| 17 | 16 |
| 18 NavBarElement.created() : super.created(); | 17 NavBarElement.created() : super.created(); |
| 19 } | 18 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void refreshDone() { | 55 void refreshDone() { |
| 57 active = false; | 56 active = false; |
| 58 } | 57 } |
| 59 } | 58 } |
| 60 | 59 |
| 61 @CustomTag('nav-control') | 60 @CustomTag('nav-control') |
| 62 class NavControlElement extends ObservatoryElement { | 61 class NavControlElement extends ObservatoryElement { |
| 63 NavControlElement.created() : super.created(); | 62 NavControlElement.created() : super.created(); |
| 64 | 63 |
| 65 void forward(Event e, var detail, Element target) { | 64 void forward(Event e, var detail, Element target) { |
| 66 location.forward(); | 65 app.locationManager.forward(); |
| 67 } | 66 } |
| 68 | 67 |
| 69 void back(Event e, var detail, Element target) { | 68 void back(Event e, var detail, Element target) { |
| 70 location.back(); | 69 app.locationManager.back(); |
| 71 } | 70 } |
| 72 } | 71 } |
| 73 | 72 |
| 74 @CustomTag('top-nav-menu') | 73 @CustomTag('top-nav-menu') |
| 75 class TopNavMenuElement extends ObservatoryElement { | 74 class TopNavMenuElement extends ObservatoryElement { |
| 76 @published bool last = false; | 75 @published bool last = false; |
| 77 | 76 |
| 78 TopNavMenuElement.created() : super.created(); | 77 TopNavMenuElement.created() : super.created(); |
| 79 } | 78 } |
| 80 | 79 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 109 LibraryNavMenuElement.created() : super.created(); | 108 LibraryNavMenuElement.created() : super.created(); |
| 110 } | 109 } |
| 111 | 110 |
| 112 @CustomTag('class-nav-menu') | 111 @CustomTag('class-nav-menu') |
| 113 class ClassNavMenuElement extends ObservatoryElement { | 112 class ClassNavMenuElement extends ObservatoryElement { |
| 114 @published Class cls; | 113 @published Class cls; |
| 115 @published bool last = false; | 114 @published bool last = false; |
| 116 | 115 |
| 117 ClassNavMenuElement.created() : super.created(); | 116 ClassNavMenuElement.created() : super.created(); |
| 118 } | 117 } |
| OLD | NEW |