From b06f34b55bca08a67b9bb7624ffed39d6ae0d492 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 27 Jun 2013 16:36:41 -0400 Subject: [PATCH] Use portrait alignment for adding-bots form. The add-bots form used to have a landscape alignment, as it was integrated into the same HTML table that showed your existing bots. This became unwieldy once we allowed users to upload avatars. (imported from commit 246a35be77ce1679d595271e6911dc339a6813ab) --- templates/zephyr/settings.html | 53 ++++++++++++++++----------------- zephyr/static/js/settings.js | 3 +- zephyr/static/styles/zephyr.css | 12 +++----- 3 files changed, 31 insertions(+), 37 deletions(-) diff --git a/templates/zephyr/settings.html b/templates/zephyr/settings.html index 6e70810175..13671ce21d 100644 --- a/templates/zephyr/settings.html +++ b/templates/zephyr/settings.html @@ -130,8 +130,6 @@

Your bots

-
-
@@ -140,34 +138,33 @@ - - - - - -
Avatar (optional) API key
-
- -
-
-
-
- -bot@{{ user_profile.realm.domain }} -
-
-
-

- -

-
-
- -
-
+ + +
+

Add new bot:

+

+

Full name:
+ +
+

+

+

Username:
+ -bot@{{ user_profile.realm.domain }} +
+

+

+

Optional avatar:
+ +

+

+

+

+ +

diff --git a/zephyr/static/js/settings.js b/zephyr/static/js/settings.js index 57d30d1aba..24862ae1af 100644 --- a/zephyr/static/js/settings.js +++ b/zephyr/static/js/settings.js @@ -15,7 +15,8 @@ function add_bot_row(name, email, avatar_url, api_key) { $('').text(email), $('').html(avatar_cell), $('').text(api_key)); - $('#create_bot_row').before(row); + $('#bots_table tr:last').after(row); + $('#bots_table').show(); } function is_local_part(value, element) { diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index 5e471bd9c8..0920c32cbf 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -1808,6 +1808,10 @@ li.expanded_subject { overflow: hidden; } +#bots_table { + display: none; +} + #create_bot_name { width: 85%; } @@ -1829,14 +1833,6 @@ li.expanded_subject { font-size: 85%; } -.create_bot_control { - vertical-align: middle; -} - -#create_bot_row input { - margin: 0; -} - #onboarding-header { font-size: 16px; font-weight: bold;