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

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_animated_pages.js

Issue 1374563010: Settings Rewrite: Restore id of default id to 'main' from ''. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-animated-pages' is a container for a page and animated subpages. 7 * 'settings-animated-pages' is a container for a page and animated subpages.
8 * It provides a set of common behaviors and animations. 8 * It provides a set of common behaviors and animations.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (newRoute.subpage.length > oldRoute.subpage.length) { 69 if (newRoute.subpage.length > oldRoute.subpage.length) {
70 this.$.animatedPages.exitAnimation = 'slide-left-animation'; 70 this.$.animatedPages.exitAnimation = 'slide-left-animation';
71 this.$.animatedPages.entryAnimation = 'slide-from-right-animation'; 71 this.$.animatedPages.entryAnimation = 'slide-from-right-animation';
72 } else { 72 } else {
73 this.$.animatedPages.exitAnimation = 'slide-right-animation'; 73 this.$.animatedPages.exitAnimation = 'slide-right-animation';
74 this.$.animatedPages.entryAnimation = 'slide-from-left-animation'; 74 this.$.animatedPages.entryAnimation = 'slide-from-left-animation';
75 } 75 }
76 } 76 }
77 77
78 this.$.animatedPages.selected = 78 this.$.animatedPages.selected =
79 newRouteIsSubpage ? newRoute.subpage.slice(-1)[0] : ''; 79 newRouteIsSubpage ? newRoute.subpage.slice(-1)[0] : 'main';
80 }, 80 },
81 81
82 /** 82 /**
83 * Buttons in this pageset should use this method to transition to subpages. 83 * Buttons in this pageset should use this method to transition to subpages.
84 */ 84 */
85 setSubpageChain: function(subpage) { 85 setSubpageChain: function(subpage) {
86 this.currentRoute = { 86 this.currentRoute = {
87 page: this.currentRoute.page, 87 page: this.currentRoute.page,
88 section: subpage.length > 0 ? this.section : '', 88 section: subpage.length > 0 ? this.section : '',
89 subpage: subpage, 89 subpage: subpage,
90 }; 90 };
91 }, 91 },
92 }); 92 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698