Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: samples/third_party/todomvc/web/router_options.dart

Issue 60353013: Update TodoMVC based on https://github.com/polymer/todomvc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/third_party/todomvc/web/model.dart ('k') | samples/third_party/todomvc/web/router_options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/third_party/todomvc/web/router_options.dart
diff --git a/samples/third_party/todomvc/web/router_options.dart b/samples/third_party/todomvc/web/router_options.dart
deleted file mode 100644
index 937897dac0d3b81394487d64ef94391ef0b96ef9..0000000000000000000000000000000000000000
--- a/samples/third_party/todomvc/web/router_options.dart
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library todomvc.web.router_options;
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-
-/**
- * Given a set of child links to this page, this will add the "selected" CSS
- * class to the link that matches window.location.hash.
- *
- * For example, if the current window.location.hash is "#/completed" and we
- * have a tag like `<a href="#/completed">` it will get the class
- * `class="selected"`, and other links will have that CSS class removed.
- */
-@CustomTag('router-options')
-class RouterOptions extends UListElement with Polymer, Observable {
- factory RouterOptions() => new Element.tag('ul', 'router-options');
-
- RouterOptions.created() : super.created() {
- polymerCreated();
- }
-
- bool get applyAuthorStyles => true;
- var _sub;
-
- void enteredView() {
- super.enteredView();
-
- var anchors = this.querySelectorAll('a');
-
- _updateHash(records) {
- var hash = window.location.hash;
- if (hash == '') hash = '#/';
- for (var a in anchors) {
- if (a.hash == hash) {
- a.classes.add('selected');
- } else {
- a.classes.remove('selected');
- }
- }
- }
-
- _updateHash(null);
- _sub = windowLocation.changes.listen(_updateHash);
- }
-
- void leftView() {
- _sub.cancel();
- super.leftView();
- }
-}
« no previous file with comments | « samples/third_party/todomvc/web/model.dart ('k') | samples/third_party/todomvc/web/router_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698