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

Side by Side Diff: chrome/browser/resources/settings/people_page/users_page.js

Issue 2557073003: Call preventDefault in all on-tap events that show a dialog. (Closed)
Patch Set: nit Created 4 years 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-users-page' is the settings page for managing user accounts on 7 * 'settings-users-page' is the settings page for managing user accounts on
8 * the device. 8 * the device.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 created: function() { 48 created: function() {
49 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) { 49 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) {
50 this.isOwner_ = isOwner; 50 this.isOwner_ = isOwner;
51 }.bind(this)); 51 }.bind(this));
52 52
53 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) { 53 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) {
54 this.isWhitelistManaged_ = isWhitelistManaged; 54 this.isWhitelistManaged_ = isWhitelistManaged;
55 }.bind(this)); 55 }.bind(this));
56 }, 56 },
57 57
58 /** @private */ 58 /**
59 openAddUserDialog_: function() { 59 * @param {!Event} e
60 * @private
61 */
62 openAddUserDialog_: function(e) {
63 e.preventDefault();
60 this.$.addUserDialog.open(); 64 this.$.addUserDialog.open();
61 }, 65 },
62 66
63 /** 67 /**
64 * @param {boolean} isOwner 68 * @param {boolean} isOwner
65 * @param {boolean} isWhitelistManaged 69 * @param {boolean} isWhitelistManaged
66 * @private 70 * @private
67 * @return {boolean} 71 * @return {boolean}
68 */ 72 */
69 isEditingDisabled_: function(isOwner, isWhitelistManaged) { 73 isEditingDisabled_: function(isOwner, isWhitelistManaged) {
70 return !isOwner || isWhitelistManaged; 74 return !isOwner || isWhitelistManaged;
71 }, 75 },
72 76
73 /** 77 /**
74 * @param {boolean} isOwner 78 * @param {boolean} isOwner
75 * @param {boolean} isWhitelistManaged 79 * @param {boolean} isWhitelistManaged
76 * @param {boolean} allowGuest 80 * @param {boolean} allowGuest
77 * @private 81 * @private
78 * @return {boolean} 82 * @return {boolean}
79 */ 83 */
80 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { 84 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) {
81 return !isOwner || isWhitelistManaged || allowGuest; 85 return !isOwner || isWhitelistManaged || allowGuest;
82 } 86 }
83 }); 87 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698