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

Side by Side Diff: ui/webui/resources/js/cr/ui/alert_overlay.js

Issue 2902033002: WebUI: Fix violations of no-extra-semi lint rule. (Closed)
Patch Set: Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('alertOverlay', function() { 5 cr.define('alertOverlay', function() {
6 /** 6 /**
7 * The confirm <button>. 7 * The confirm <button>.
8 * @type {HTMLElement} 8 * @type {HTMLElement}
9 */ 9 */
10 var okButton; 10 var okButton;
(...skipping 17 matching lines...) Expand all
28 okButton.clickCallback = null; 28 okButton.clickCallback = null;
29 cancelButton.clickCallback = null; 29 cancelButton.clickCallback = null;
30 }); 30 });
31 cancelButton.addEventListener('click', function(e) { 31 cancelButton.addEventListener('click', function(e) {
32 assert(cancelButton.clickCallback); 32 assert(cancelButton.clickCallback);
33 33
34 cancelButton.clickCallback(e); 34 cancelButton.clickCallback(e);
35 okButton.clickCallback = null; 35 okButton.clickCallback = null;
36 cancelButton.clickCallback = null; 36 cancelButton.clickCallback = null;
37 }); 37 });
38 }; 38 }
39 39
40 /** 40 /**
41 * Updates the alert overlay with the given message, button titles, and 41 * Updates the alert overlay with the given message, button titles, and
42 * callbacks. 42 * callbacks.
43 * @param {string} title The alert title to display to the user. 43 * @param {string} title The alert title to display to the user.
44 * @param {string} message The alert message to display to the user. 44 * @param {string} message The alert message to display to the user.
45 * @param {string=} opt_okTitle The title of the OK button. If undefined or 45 * @param {string=} opt_okTitle The title of the OK button. If undefined or
46 * empty, no button is shown. 46 * empty, no button is shown.
47 * @param {string=} opt_cancelTitle The title of the cancel button. If 47 * @param {string=} opt_cancelTitle The title of the cancel button. If
48 * undefined or empty, no button is shown. 48 * undefined or empty, no button is shown.
(...skipping 16 matching lines...) Expand all
65 65
66 if (opt_okTitle) 66 if (opt_okTitle)
67 okButton.textContent = opt_okTitle; 67 okButton.textContent = opt_okTitle;
68 okButton.hidden = !opt_okTitle; 68 okButton.hidden = !opt_okTitle;
69 okButton.clickCallback = opt_okCallback; 69 okButton.clickCallback = opt_okCallback;
70 70
71 if (opt_cancelTitle) 71 if (opt_cancelTitle)
72 cancelButton.textContent = opt_cancelTitle; 72 cancelButton.textContent = opt_cancelTitle;
73 cancelButton.hidden = !opt_cancelTitle; 73 cancelButton.hidden = !opt_cancelTitle;
74 cancelButton.clickCallback = opt_cancelCallback; 74 cancelButton.clickCallback = opt_cancelCallback;
75 }; 75 }
76 76
77 // Export 77 // Export
78 return {initialize: initialize, setValues: setValues}; 78 return {initialize: initialize, setValues: setValues};
79 }); 79 });
80 80
81 document.addEventListener('DOMContentLoaded', alertOverlay.initialize); 81 document.addEventListener('DOMContentLoaded', alertOverlay.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/cookie_tree_node.js ('k') | ui/webui/resources/js/webui_resource_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698