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

Side by Side Diff: chrome/browser/resources/chromeos/login/gaia_buttons.js

Issue 1133733003: Unified icon-buttons used in the new GAIA flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Created 5 years, 7 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 Polymer('gaia-paper-button', { 6 Polymer('gaia-paper-button', {
7 onKeyDown: function(e) { 7 onKeyDown: function(e) {
8 if (e.keyCode == 13 || e.keyCode == 32) 8 if (e.keyCode == 13 || e.keyCode == 32)
9 this.fire('tap'); 9 this.fire('tap');
10 } 10 }
11 }); 11 });
12 12
13 Polymer('gaia-core-icon-button', { 13 Polymer('gaia-icon-button', {
14 onKeyDown: function(e) { 14 ready: function() {
15 if (e.keyCode == 13 || e.keyCode == 32) 15 this.classList.toggle('custom-appearance', true);
michaelpg 2015/05/08 22:02:23 this.classList.add('custom-appearance');
dzhioev (left Google) 2015/05/08 22:29:02 Done.
16 this.fire('tap'); 16 },
17
18 onMouseDown: function(e) {
19 /* Prevents button focusing after mouse click. */
20 e.preventDefault();
17 } 21 }
18 }); 22 });
19 23
20 Polymer('gaia-raised-on-focus-button', { 24 Polymer('gaia-raised-on-focus-button', {
21 onButtonFocus: function() { 25 onButtonFocus: function() {
22 this.raised = true; 26 this.raised = true;
23 }, 27 },
24 28
25 onButtonBlur: function() { 29 onButtonBlur: function() {
26 this.raised = false; 30 this.raised = false;
27 }, 31 },
28 }); 32 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698