Commit 219322f1 authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI cleanup: Delete unused alert_overly css/js/html.

Last user was old Extensions UI, which was recently removed.

Bug: 820187
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I50aeda59349f31b59965437200c6f4cc9eecfca3
Reviewed-on: https://chromium-review.googlesource.com/1025048Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552953}
parent 52724b33
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
#alertOverlay {
width: 500px;
}
#alertOverlayMessage {
white-space: pre-wrap;
word-wrap: break-word;
}
<div id="alertOverlay" class="page">
<h1 id="alertOverlayTitle"></h1>
<div class="content-area">
<div id="alertOverlayMessage"></div>
</div>
<div class="action-area">
<div class="button-strip">
<button id="alertOverlayCancel" type="reset"></button>
<button id="alertOverlayOk" type="submit"></button>
</div>
</div>
</div>
<script src="chrome://resources/js/cr/ui/alert_overlay.js"></script>
......@@ -6,7 +6,6 @@ import("//third_party/closure_compiler/compile_js.gni")
js_type_check("closure_compile") {
deps = [
":alert_overlay",
":array_data_model",
":autocomplete_list",
":command",
......@@ -37,13 +36,6 @@ js_type_check("closure_compile") {
]
}
js_library("alert_overlay") {
deps = [
"../..:cr",
"../..:util",
]
}
js_library("array_data_model") {
deps = [
"..:event_target",
......
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.define('alertOverlay', function() {
/**
* The confirm <button>.
* @type {HTMLElement}
*/
var okButton;
/**
* The cancel <button>.
* @type {HTMLElement}
*/
var cancelButton;
function initialize(e) {
okButton = $('alertOverlayOk');
cancelButton = $('alertOverlayCancel');
// The callbacks are set to the callbacks provided in show(). Clear them
// out when either is clicked.
okButton.addEventListener('click', function(e) {
assert(okButton.clickCallback);
okButton.clickCallback(e);
okButton.clickCallback = null;
cancelButton.clickCallback = null;
});
cancelButton.addEventListener('click', function(e) {
assert(cancelButton.clickCallback);
cancelButton.clickCallback(e);
okButton.clickCallback = null;
cancelButton.clickCallback = null;
});
}
/**
* Updates the alert overlay with the given message, button titles, and
* callbacks.
* @param {string} title The alert title to display to the user.
* @param {string} message The alert message to display to the user.
* @param {string=} opt_okTitle The title of the OK button. If undefined or
* empty, no button is shown.
* @param {string=} opt_cancelTitle The title of the cancel button. If
* undefined or empty, no button is shown.
* @param {function()=} opt_okCallback A function to be called when the user
* presses the ok button. Can be undefined if |opt_okTitle| is falsey.
* @param {function()=} opt_cancelCallback A function to be called when the
* user presses the cancel button. Can be undefined if |opt_cancelTitle|
* is falsey.
*/
function setValues(
title, message, opt_okTitle, opt_cancelTitle, opt_okCallback,
opt_cancelCallback) {
if (typeof title != 'undefined')
$('alertOverlayTitle').textContent = title;
$('alertOverlayTitle').hidden = typeof title == 'undefined';
if (typeof message != 'undefined')
$('alertOverlayMessage').textContent = message;
$('alertOverlayMessage').hidden = typeof message == 'undefined';
if (opt_okTitle)
okButton.textContent = opt_okTitle;
okButton.hidden = !opt_okTitle;
okButton.clickCallback = opt_okCallback;
if (opt_cancelTitle)
cancelButton.textContent = opt_cancelTitle;
cancelButton.hidden = !opt_cancelTitle;
cancelButton.clickCallback = opt_cancelCallback;
}
// Export
return {initialize: initialize, setValues: setValues};
});
document.addEventListener('DOMContentLoaded', alertOverlay.initialize);
......@@ -3,14 +3,6 @@
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'alert_overlay',
'dependencies': [
'../../compiled_resources2.gyp:cr',
'../../compiled_resources2.gyp:util',
],
'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'array_data_model',
'dependencies': [
......
......@@ -207,9 +207,6 @@ without changes to the corresponding grd file. -->
<structure name="IDR_WEBUI_CSS_ACTION_LINK"
file="css/action_link.css" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_CSS_ALERT_OVERLAY"
file="css/alert_overlay.css" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_CSS_APPS_COMMON"
file="css/apps/common.css" type="chrome_html"
compress="gzip" />
......@@ -284,9 +281,6 @@ without changes to the corresponding grd file. -->
compress="gzip" />
<structure name="IDR_WEBUI_HTML_CR_UI"
file="html/cr/ui.html" type="chrome_html" compress="gzip" />
<structure name="IDR_WEBUI_HTML_CR_UI_ALERT_OVERLAY"
file="html/cr/ui/alert_overlay.html" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_HTML_CR_UI_ARRAY_DATA_MODEL"
file="html/cr/ui/array_data_model.html" type="chrome_html"
compress="gzip" />
......@@ -387,9 +381,6 @@ without changes to the corresponding grd file. -->
compress="gzip" />
<structure name="IDR_WEBUI_JS_CR_UI"
file="js/cr/ui.js" type="chrome_html" compress="gzip" />
<structure name="IDR_WEBUI_JS_CR_UI_ALERT_OVERLAY"
file="js/cr/ui/alert_overlay.js" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_JS_CR_UI_ARRAY_DATA_MODEL"
file="js/cr/ui/array_data_model.js"
type="chrome_html" compress="gzip" flattenhtml="true" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment