diff options
author | koz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-28 02:01:52 +0000 |
---|---|---|
committer | koz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-28 02:01:52 +0000 |
commit | 244f2b3b9ff0cc85d5c94f33006c417fc8f3220e (patch) | |
tree | c15d651e37e5d0af553cb48e037549e25ccc94c4 | |
parent | 8446c1c07c5d947b450ae7d28bafa8f4e0f9310c (diff) | |
download | chromium_src-244f2b3b9ff0cc85d5c94f33006c417fc8f3220e.zip chromium_src-244f2b3b9ff0cc85d5c94f33006c417fc8f3220e.tar.gz chromium_src-244f2b3b9ff0cc85d5c94f33006c417fc8f3220e.tar.bz2 |
Make the ignored handlers list disappear when it is empty.
TEST=manual testing
Review URL: http://codereview.chromium.org/7495011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94415 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 17 insertions, 9 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 0b19fc7..3e3e053 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -5551,6 +5551,9 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_HANDLERS_NONE_HANDLER" desc="Text in the dropdown for handlers for a given protocol that indicates that the protocol shouldn't be handled."> (none) </message> + <message name="IDS_HANDLERS_ACTIVE_HEADING" desc="Header for the section of the handlers settings page that lists handlers that are active, that is, can be used to handle links."> + Active protocol handlers + </message> <message name="IDS_HANDLERS_IGNORED_HEADING" desc="Header for the section of the handlers settings page that lists handlers that are ignored."> Ignored protocol handlers </message> diff --git a/chrome/browser/resources/options/handler_options.html b/chrome/browser/resources/options/handler_options.html index b8ba813..2a77105 100644 --- a/chrome/browser/resources/options/handler_options.html +++ b/chrome/browser/resources/options/handler_options.html @@ -1,5 +1,6 @@ <div id="handler-options" class="page" hidden> <h1 i18n-content="handlersPage"></h1> + <h3 i18n-content="handlers_active_heading"></h3> <div class="handlers-column-headers"> <div class="handlers-type-column"> <h3 i18n-content="handlers_type_column_header"></h3> @@ -11,15 +12,17 @@ </div> <list id="handlers-list"></list> - <h3 i18n-content="handlers_ignored_heading"></h3> - <div class="handlers-column-headers"> - <div class="handlers-type-column"> - <h3 i18n-content="handlers_type_column_header"></h3> + <div id="ignored-handlers-section"> + <h3 i18n-content="handlers_ignored_heading"></h3> + <div class="handlers-column-headers"> + <div class="handlers-type-column"> + <h3 i18n-content="handlers_type_column_header"></h3> + </div> + <div class="handlers-site-column"> + <h3 i18n-content="handlers_site_column_header"></h3> + </div> + <div class="handlers-remove-column"></div> </div> - <div class="handlers-site-column"> - <h3 i18n-content="handlers_site_column_header"></h3> - </div> - <div class="handlers-remove-column"></div> + <list id="ignored-handlers-list"></list> </div> - <list id="ignored-handlers-list"></list> </div> diff --git a/chrome/browser/resources/options/handler_options.js b/chrome/browser/resources/options/handler_options.js index ad740f5..039d9eb 100644 --- a/chrome/browser/resources/options/handler_options.js +++ b/chrome/browser/resources/options/handler_options.js @@ -67,6 +67,7 @@ cr.define('options', function() { * @param handlers to be shown in the view. */ HandlerOptions.setIgnoredHandlers = function(handlers) { + $('ignored-handlers-section').hidden = handlers.length == 0; $('ignored-handlers-list').setHandlers(handlers); }; diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc index ff2f4e1..af8c668 100644 --- a/chrome/browser/ui/webui/options/handler_options_handler.cc +++ b/chrome/browser/ui/webui/options/handler_options_handler.cc @@ -33,6 +33,7 @@ void HandlerOptionsHandler::GetLocalizedValues( { "handlers_site_column_header", IDS_HANDLERS_SITE_COLUMN_HEADER }, { "handlers_remove_link", IDS_HANDLERS_REMOVE_HANDLER_LINK }, { "handlers_none_handler", IDS_HANDLERS_NONE_HANDLER }, + { "handlers_active_heading", IDS_HANDLERS_ACTIVE_HEADING }, { "handlers_ignored_heading", IDS_HANDLERS_IGNORED_HEADING }, }; RegisterTitle(localized_strings, "handlersPage", |