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

Side by Side Diff: client/web/minimap-element.dart

Issue 149573008: Factor out the anchor prefix to easily allow switching to #! (Closed) Base URL: https://github.com/dart-lang/dartdoc-viewer.git@master
Patch Set: Accept the basic form (#) but allow the ajax form Created 6 years, 10 months 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 unified diff | Download patch
OLDNEW
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 web.minimap_element; 5 library web.minimap_element;
6 6
7 import 'package:dartdoc_viewer/item.dart'; 7 import 'package:dartdoc_viewer/item.dart';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'package:polymer/src/build/utils.dart' show toCamelCase; 9 import 'package:polymer/src/build/utils.dart' show toCamelCase;
10 import 'app.dart' show viewer, defaultSyntax; 10 import 'app.dart' show viewer, defaultSyntax;
(...skipping 19 matching lines...) Expand all
30 categoryChanged(); 30 categoryChanged();
31 return; 31 return;
32 } 32 }
33 } 33 }
34 })); 34 }));
35 } 35 }
36 36
37 itemChanged() { 37 itemChanged() {
38 if (category == null || item == null) return; 38 if (category == null || item == null) return;
39 39
40 categoryLink = '#${item.linkHref}@${category.name.replaceAll(" ", "-")}'; 40 categoryLink =
41 '${item.prefixedLinkHref}@${category.name.replaceAll(" ", "-")}';
41 } 42 }
42 43
43 categoryChanged() { 44 categoryChanged() {
44 if (category == null || item == null) return; 45 if (category == null || item == null) return;
45 46
46 itemChanged(); 47 itemChanged();
47 camelCaseName = toCamelCase(category.name.toLowerCase()); 48 camelCaseName = toCamelCase(category.name.toLowerCase());
48 // Note: ObservableList for isNotEmpty 49 // Note: ObservableList for isNotEmpty
49 itemsToShow = 50 itemsToShow =
50 new ObservableList.from(category.filteredContent(viewer.filter)); 51 new ObservableList.from(category.filteredContent(viewer.filter));
51 } 52 }
52 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698