diff --git a/frontend_tests/node_tests/templates.js b/frontend_tests/node_tests/templates.js index 71e178ae04..d3278600cb 100644 --- a/frontend_tests/node_tests/templates.js +++ b/frontend_tests/node_tests/templates.js @@ -335,7 +335,7 @@ function render(template_name, args) { html += '
'; html += '
'; html += '
'; - html += '
    '; + html += '
      '; var args = { email: "hamlet@zulip.com", api_key: "123456ABCD", diff --git a/static/js/settings.js b/static/js/settings.js index 40fd8be60e..853b9517a6 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -84,8 +84,8 @@ function add_bot_row(info) { default_events_register_stream_select.val(info.default_events_register_stream); } - $('#bots_list').append(row); - $('#bots_list').show(); + $('#active_bots_list').append(row); + $('#active_bots_list').show(); } function add_bot_default_streams_to_form(formData, default_sending_stream, @@ -110,7 +110,7 @@ function is_local_part(value, element) { } function render_bots() { - $('#bots_list').empty(); + $('#active_bots_list').empty(); _.each(bot_data.get_editable(), function (elem) { add_bot_row({ name: elem.full_name, @@ -755,7 +755,7 @@ function _setup_page() { }, }); - $("#bots_list").on("click", "button.delete_bot", function (e) { + $("#active_bots_list").on("click", "button.delete_bot", function (e) { var email = $(e.currentTarget).data('email'); channel.del({ url: '/json/bots/' + encodeURIComponent(email), @@ -769,7 +769,7 @@ function _setup_page() { }); }); - $("#bots_list").on("click", "button.regenerate_bot_api_key", function (e) { + $("#active_bots_list").on("click", "button.regenerate_bot_api_key", function (e) { var email = $(e.currentTarget).data('email'); channel.post({ url: '/json/bots/' + encodeURIComponent(email) + '/api_key/regenerate', @@ -790,7 +790,7 @@ function _setup_page() { var avatar_widget = avatar.build_bot_edit_widget($("#settings_page")); - $("#bots_list").on("click", "button.open_edit_bot_form", function (e) { + $("#active_bots_list").on("click", "button.open_edit_bot_form", function (e) { var users_list = people.get_realm_persons().filter(function (person) { return !person.is_bot; }); @@ -889,7 +889,7 @@ function _setup_page() { }); - $("#bots_list").on("click", "a.download_bot_zuliprc", function () { + $("#active_bots_list").on("click", "a.download_bot_zuliprc", function () { var bot_info = $(this).closest(".bot-information-box"); var email = bot_info.find(".email .value").text(); var api_key = bot_info.find(".api_key .api-key-value-and-button .value").text(); diff --git a/static/styles/settings.css b/static/styles/settings.css index 1a063c20fc..008442f993 100644 --- a/static/styles/settings.css +++ b/static/styles/settings.css @@ -453,23 +453,22 @@ input[type=checkbox].inline-block { margin: 20px 0 0 0; } -#bots_list { +#active_bots_list { display: none; list-style-type: none; margin: 0px 15px; } -#bots_list .image { - vertical-align: top; -} - -#bots_list .bot-information-box .details { - display: inline-block; +#active_bots_list .image { vertical-align: top; width: calc(100% - 85px); } -#bots_list .name { +#active_bots_list .bot-information-box .details { + display: inline-block; +} + +#active_bots_list .name { font-weight: 600; font-size: 1.3rem; margin: 10px 0px 5px 0px; @@ -480,42 +479,42 @@ input[type=checkbox].inline-block { white-space: pre; } -#bots_list .regenerate_bot_api_key { +#active_bots_list .regenerate_bot_api_key { position: relative; margin-left: 5px; color: #aaa; transition: all 0.3s ease; } -#bots_list .regenerate_bot_api_key:hover { +#active_bots_list .regenerate_bot_api_key:hover { color: #444; } -#bots_list .edit-bot-buttons { +#active_bots_list .edit-bot-buttons { padding-top: 5px; } -#bots_list .edit-bot-buttons button { +#active_bots_list .edit-bot-buttons button { background-color: transparent; } -#bots_list .edit-bot-buttons .btn { +#active_bots_list .edit-bot-buttons .btn { padding: 4px; } -#bots_list .edit-bot-buttons .sea-green { +#active_bots_list .edit-bot-buttons .sea-green { color: #24cac2; } -#bots_list .edit-bot-buttons .blue { +#active_bots_list .edit-bot-buttons .blue { color: #3ba4e6; } -#bots_list .edit-bot-buttons .danger-red { +#active_bots_list .edit-bot-buttons .danger-red { color: #e29595; } -#bots_list .bot-information-box { +#active_bots_list .bot-information-box { position: relative; display: inline-block; width: calc(33.3% - 10px); @@ -530,7 +529,7 @@ input[type=checkbox].inline-block { overflow: auto; } -#bots_list img.avatar { +#active_bots_list img.avatar { margin: 10px 5px 10px 10px; height: 50px; width: 50px; @@ -539,12 +538,12 @@ input[type=checkbox].inline-block { box-shadow: 0px 0px 4px rgba(0,0,0,0.1); } -#bots_list .email { +#active_bots_list .email { margin-bottom: 5px; } -#bots_list .email .value, -#bots_list .api_key .api-key-value-and-button { +#active_bots_list .email .value, +#active_bots_list .api_key .api-key-value-and-button { display: block; margin-left: 0px; white-space: -moz-pre-wrap !important; @@ -556,12 +555,12 @@ input[type=checkbox].inline-block { white-space: normal; } -#bots_list .api_key .api-key-value-and-button { +#active_bots_list .api_key .api-key-value-and-button { font-family: "Inconsolata", Menlo, monospace; font-size: 0.85em; } -#bots_list .bot_info { +#active_bots_list .bot_info { padding: 10px; } @@ -984,19 +983,19 @@ input[type=text]#settings_search { } /* -- end new settings overlay -- */ @media (min-width: 1850px) { - #bots_list .bot-information-box { + #active_bots_list .bot-information-box { width: calc(20% - 10px); } } @media (min-width: 1500px) and (max-width: 1850px) { - #bots_list .bot-information-box { + #active_bots_list .bot-information-box { width: calc(25% - 10px); } } @media (max-width: 1215px) { - #bots_list .bot-information-box { + #active_bots_list .bot-information-box { width: calc(50% - 10px); } diff --git a/static/templates/settings/bot-settings.handlebars b/static/templates/settings/bot-settings.handlebars index 6b2f9a1baf..4773bf74e1 100644 --- a/static/templates/settings/bot-settings.handlebars +++ b/static/templates/settings/bot-settings.handlebars @@ -13,7 +13,7 @@

      {{/tr}} -
        +