On 07/02/2012 05:49 PM, Endi Sukma Dewata wrote:
ACK. Some more comments below. Feel free to fix before push or later
separately.

Implemented most of the issues, look bellow. Update patch attached.


On 7/2/2012 2:55 AM, Petr Vobornik wrote:
On 06/28/2012 10:47 PM, Endi Sukma Dewata wrote:
On 6/28/2012 9:07 AM, Petr Vobornik wrote:
Message 'Logged in as: u...@freeipa.org' was displayed before user was
logged in. It was wrong.

Now 'Logged in as: XXX' is displayed only when user XXX is logged
in. So
no more u...@freeipa.org :) .

It might be better to use visibility instead of display to reserve the
space. Right now the password expiration warning will initially appear
on the right, then shift to the left when the "Logged in as" appears.

Seems like better approach. Updated patch attached.

The message still shifts, but this time from left to right, probably
because the "loggedinas" element doesn't have a fixed width.

I don't like fixed width for loggedinas - some names can be long and so we don't know how much space should be reserved. To avoid it, warning and login info are now displayed at the same time.


Another improvement might be: display password expiration warning at the
same time as login information. What do you think? Does it matter?

Yes, I was thinking about that too. It doesn't really matter much but I
agree it would look better if they appear at the same time.

The "u...@freeipa.org" in the HTML code is never visible anymore, so
feel free to remove it. You can also replace the <strong> with a <span>
then define the style in CSS.

Removed and replaced.


A separate issue, under IPA Server tab, the Trusts menu comes after
Configuration. Would it make more sense to show Configuration last
because Configuration is really like "Other Settings"?


Agree, https://fedorahosted.org/freeipa/ticket/2900

--
Petr Vobornik


From f6cca089324175dfda135cf7382a504a5e8d4150 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Thu, 28 Jun 2012 14:42:29 +0200
Subject: [PATCH] Display loginas information only after login

Message 'Logged in as: u...@freeipa.org' was displayed before user was logged in. It was wrong.

Now 'Logged in as: XXX' is displayed only when user XXX is logged in. So no more u...@freeipa.org :) .

https://fedorahosted.org/freeipa/ticket/2882
---
 install/ui/index.html |    6 +++---
 install/ui/ipa.css    |    4 ++++
 install/ui/ipa.js     |    6 +++++-
 install/ui/webui.js   |    5 ++++-
 4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/install/ui/index.html b/install/ui/index.html
index 33c0923c197d53824d79591488b18dda2ea90ad2..cfa7a4c8136639e05f4345352a9bf4188ed2af89 100644
--- a/install/ui/index.html
+++ b/install/ui/index.html
@@ -71,10 +71,10 @@
             </span>
             <span class="header-right">
                 <span class="header-passwordexpires"></span>
-                <span id="loggedinas" class="header-loggedinas">
-                    <a href="#"><span id="login_header">Logged in as</span>: <strong>u...@freeipa.org</strong></a>
+                <span id="loggedinas" class="header-loggedinas" style="visibility:hidden;">
+                    <a href="#"><span id="login_header">Logged in as</span>: <span class="login"></span></a>
                 </span>
-                <span class="header-loggedinas">
+                <span class="header-loggedinas" style="visibility:hidden;">
                     | <a href="#logout" id="logout">Logout</a>
                 </span>
                 <span id="header-network-activity-indicator" class="network-activity-indicator">
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index dac345ac39c92c30aa6b8c9754eb325c41152c28..d6ad5806038f47919404615f224f5ed75a917563 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -262,6 +262,10 @@ body {
     color: #fff;
 }
 
+.header-loggedinas .login {
+    font-weight: bold;
+}
+
 /* ---- Navigation ---- */
 #navigation {
     position: absolute;
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index aadea8d2af07c1d0c7f5ae1b8168a36966c546c5..2547a24d283a40480660b9b8d22d1c91e5edbbe8 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -157,7 +157,6 @@ var IPA = function() {
             on_success: function(data, text_status, xhr) {
                 that.whoami = batch ? data.result[0] : data.result.result[0];
                 that.principal = that.whoami.krbprincipalname[0];
-                that.update_password_expiration();
             }
         });
     };
@@ -516,6 +515,11 @@ IPA.password_selfservice = function() {
         self_service: true,
         on_success: function() {
             var command = IPA.get_whoami_command();
+            var orig_on_success = command.on_success;
+            command.on_success = function(data, text_status, xhr) {
+                orig_on_success.call(this, data, text_status, xhr);
+                IPA.update_password_expiration();
+            };
             command.execute();
 
             alert(IPA.messages.password.password_change_complete);
diff --git a/install/ui/webui.js b/install/ui/webui.js
index 9b7c31be4c4f5edd2f3bd4bfab3559a5cb2aef4c..2b666007fa812e1e4caeb3f266f63e101e578253 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -167,7 +167,7 @@ $(function() {
 
         var whoami = IPA.whoami;
         IPA.whoami_pkey = whoami.uid[0];
-        $('#loggedinas strong').text(whoami.cn[0]);
+        $('#loggedinas .login').text(whoami.cn[0]);
         $('#loggedinas a').fragment(
             {'user-facet': 'details', 'user-pkey': IPA.whoami_pkey}, 2);
 
@@ -176,6 +176,9 @@ $(function() {
             return false;
         }).text(IPA.messages.login.logout);
 
+        $('.header-loggedinas').css('visibility','visible');
+        IPA.update_password_expiration();
+
         IPA.nav = create_navigation();
         IPA.nav.create();
         IPA.nav.update();
-- 
1.7.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to