forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert managed dialog to a cr_component
Convert the managed dialog settings element to a cr_component as it will be used in the customize_theme component (bug 1173533), which is also a cr_component. Bug: 1173533 Change-Id: I073eb14f1a34340a8090aafed8f1db32f54435d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2733230 Reviewed-by: dpapad <dpapad@chromium.org> Commit-Queue: Igor Ruvinov <igorruvinov@chromium.org> Cr-Commit-Position: refs/heads/master@{#860287}
- Loading branch information
Igor Ruvinov
authored and
Chromium LUCI CQ
committed
Mar 5, 2021
1 parent
962c8df
commit ff4a482
Showing
12 changed files
with
100 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2021 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. | ||
|
||
import("//third_party/closure_compiler/compile_js.gni") | ||
import("//tools/polymer/html_to_js.gni") | ||
|
||
js_type_check("closure_compile") { | ||
is_polymer3 = true | ||
deps = [ ":managed_dialog" ] | ||
} | ||
|
||
js_library("managed_dialog") { | ||
deps = [ | ||
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", | ||
"//ui/webui/resources/cr_elements/cr_dialog:cr_dialog.m", | ||
"//ui/webui/resources/js:i18n_behavior.m", | ||
] | ||
} | ||
|
||
html_to_js("web_components") { | ||
js_files = [ "managed_dialog.js" ] | ||
} |
26 changes: 26 additions & 0 deletions
26
ui/webui/resources/cr_components/managed_dialog/managed_dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<style> | ||
iron-icon { | ||
--iron-icon-height: var(--cr-icon-size); | ||
--iron-icon-width: var(--cr-icon-size); | ||
padding-inline-end: 10px; | ||
} | ||
|
||
cr-dialog::part(body-container) { | ||
padding-inline-start: 35px; | ||
} | ||
</style> | ||
|
||
<cr-dialog id="dialog" close-text="[[i18n('close')]]" show-on-attach> | ||
<div slot="title"> | ||
<iron-icon icon="cr:domain" role="img" | ||
aria-label="[[i18n('controlledSettingPolicy')]]"> | ||
</iron-icon> | ||
[[title]] | ||
</div> | ||
<div slot="body">[[body]]</div> | ||
<div slot="button-container"> | ||
<cr-button class="action-button" on-click="onOkClick_"> | ||
[[i18n('ok')]] | ||
</cr-button> | ||
</div> | ||
</cr-dialog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters