Re: [Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

2011-11-29 Thread Simo Sorce
I couldn't find a clear ACK for this patch but it has been pushed as
well.

Guys please try to better report on the list when patches are pushed and
close the thread.

Simo.

On Thu, 2011-09-29 at 14:52 +0200, Petr Vobornik wrote:
 On 09/27/2011 10:54 PM, Endi Sukma Dewata wrote:
  On 9/27/2011 7:50 AM, Petr Vobornik wrote:
  I've added padding and unified font-weight in error-message style. The
  padding is added because text of the message was right on the border
  which wasn't much readable. Font-weight is added because sometimes it
  inherits font-weight from other style and so it is inconsistent with
  other appearances. I'm not sure about the 'bold', though.
 
  This is good but can we use a new CSS class for the error message? I'd
  rather not change the jquery-ui.css (removing white spaces is ok)
  because it will be difficult to keep track the changes if we need to
  upgrade it.
 Moved this change to ipa.css (no need to add extra class, it will 
 overwrite it as long ipa.css is linked after jquery-ui.css).
 
  There's another minor issue, but this one can be fixed separately if you
  want. Try editing a self-service permission, uncheck all attributes,
  then click Update. The undo link and the error message appear in 2
  separate lines.
 Kept them on 2 lines.
  I think it's better to show them in a single line. When
  we fix the attributes widget to inherit from table, they will fit into
  the footer.
 I agree.
  The padding should be consistent as well, right now the undo
  box is smaller than the error message.
 Added padding to undo. Added 1px margin-bottom to undo to separate undo 
 and error message borders when they are on two lines.
 
 Changed display of undo in attributes_widget from inline to inline-block 
 - looks better with added padding.
 
 ___
 Freeipa-devel mailing list
 Freeipa-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/freeipa-devel

-- 
Simo Sorce * Red Hat, Inc * New York

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


Re: [Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

2011-11-29 Thread Endi Sukma Dewata

On 11/29/2011 9:17 AM, Simo Sorce wrote:

I couldn't find a clear ACK for this patch but it has been pushed as
well.


Correct.


Guys please try to better report on the list when patches are pushed and
close the thread.


Yes, sorry, sometimes I missed a few, my fault.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

2011-09-29 Thread Petr Vobornik

On 09/27/2011 10:54 PM, Endi Sukma Dewata wrote:

On 9/27/2011 7:50 AM, Petr Vobornik wrote:

I've added padding and unified font-weight in error-message style. The
padding is added because text of the message was right on the border
which wasn't much readable. Font-weight is added because sometimes it
inherits font-weight from other style and so it is inconsistent with
other appearances. I'm not sure about the 'bold', though.


This is good but can we use a new CSS class for the error message? I'd
rather not change the jquery-ui.css (removing white spaces is ok)
because it will be difficult to keep track the changes if we need to
upgrade it.
Moved this change to ipa.css (no need to add extra class, it will 
overwrite it as long ipa.css is linked after jquery-ui.css).


There's another minor issue, but this one can be fixed separately if you
want. Try editing a self-service permission, uncheck all attributes,
then click Update. The undo link and the error message appear in 2
separate lines.

Kept them on 2 lines.

I think it's better to show them in a single line. When
we fix the attributes widget to inherit from table, they will fit into
the footer.

I agree.

The padding should be consistent as well, right now the undo
box is smaller than the error message.
Added padding to undo. Added 1px margin-bottom to undo to separate undo 
and error message borders when they are on two lines.


Changed display of undo in attributes_widget from inline to inline-block 
- looks better with added padding.


--
Petr Vobornik
From fdf6af10481885d8e8e2ba012b92129d5a534d17 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 14 Sep 2011 13:01:25 +0200
Subject: [PATCH] Fixed: Some widgets do not have space for validation error
 message

https://fedorahosted.org/freeipa/ticket/1454

The following widgets should call create_error_link() to create a space to show validation error messages:

  IPA.checkbox_widget
  IPA.checkboxes_widget
  IPA.radio_widget
  IPA.select_widget
  IPA.table_widget
  IPA.attributes_widget
  IPA.rights_widget
  IPA.target_section (it's a widget)

Solution:
 * added call to checkbox, checkboxes, radio, select, table, attributes widget
 * rights_widget inherits it from checkboxes_widget.
 * target_section IS NOT a widget as it doesn't inherit from widget. It's still a section, which shows different widgets based on its state.
 * table_widget displays error_link between pagination and summary.

Additional:
 * added padding and unified font-weight for error message
---
 install/ui/aci.js|6 ++
 install/ui/ipa.css   |   11 ++-
 install/ui/jquery-ui.css |   10 +-
 install/ui/widget.js |   29 -
 4 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index 676f5df3e63032dd6c6f32279314545608fbcc28..5d5fd8878ca14a5421cf5aa40a3c1384615935e2 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -315,6 +315,8 @@ IPA.attributes_widget = function(spec) {
 if (that.object_type) {
 that.populate(that.object_type);
 }
+
+that.create_error_link(container);
 };
 
 that.load = function(record) {
@@ -410,6 +412,10 @@ IPA.attributes_widget = function(spec) {
 }
 };
 
+that.show_undo = function() {
+$(that.undo_span).css('display', 'inline-block');
+};
+
 return that;
 };
 
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index a838195c042ed0e236306e3a15a241c141152a48..20b19eed66fc76490b7a9dde226873a39a83e6e4 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -193,6 +193,13 @@ body {
 padding-right: 0.3em;
 }
 
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+font-weight: bold;
+padding: 0.2em;
+}
+
 /*    Header    */
 #header {
 position: absolute;
@@ -698,12 +705,13 @@ span.main-nav-off  a:visited {
 padding: 0.5em 0 0 1em;
 border-top: 1px solid #dfdfdf;
 height: 25px;
+line-height: 25px;
 margin-top: 1em;
 }
 
 .search-table span[name=summary] {
 float: left;
-line-height: 25px;
+margin-right: 4em;
 }
 
 .search-table span[name=pagination] {
@@ -846,6 +854,7 @@ hr {
 
 .undo {
 cursor:pointer;
+padding: 0.2em;
 }
 
 span.attrhint {
diff --git a/install/ui/jquery-ui.css b/install/ui/jquery-ui.css
index 01c3ec90e2e01c2a6dc677ddf57164c12b9ba0a1..eb0228cd2fdf151872e7de92ff28c8305af8ea2b 100644
--- a/install/ui/jquery-ui.css
+++ b/install/ui/jquery-ui.css
@@ -348,7 +348,7 @@
  *
  * http://docs.jquery.com/UI/Autocomplete#theming
  */
-.ui-autocomplete { position: absolute; cursor: default; }	
+.ui-autocomplete { position: absolute; cursor: default; }
 
 /* workarounds */
 * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
@@ -404,8 +404,8 @@
 .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none 

Re: [Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

2011-09-27 Thread Endi Sukma Dewata

On 9/27/2011 7:50 AM, Petr Vobornik wrote:

I've added padding and unified font-weight in error-message style. The
padding is added because text of the message was right on the border
which wasn't much readable. Font-weight is added because sometimes it
inherits font-weight from other style and so it is inconsistent with
other appearances. I'm not sure about the 'bold', though.


This is good but can we use a new CSS class for the error message? I'd 
rather not change the jquery-ui.css (removing white spaces is ok) 
because it will be difficult to keep track the changes if we need to 
upgrade it.


There's another minor issue, but this one can be fixed separately if you 
want. Try editing a self-service permission, uncheck all attributes, 
then click Update. The undo link and the error message appear in 2 
separate lines. I think it's better to show them in a single line. When 
we fix the attributes widget to inherit from table, they will fit into 
the footer. The padding should be consistent as well, right now the undo 
box is smaller than the error message.


--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

2011-09-14 Thread Endi Sukma Dewata

On 9/14/2011 7:23 AM, Petr Vobornik wrote:

Forgot to update tests - to address newly added validation row in
table_widget.


One issue, in all search and association facets we now have 2 rows of 
footer (there are 2 horizontal lines at the bottom). I think it would be 
better to use a single row for both summary/error messages and 
pagination. The messages will be left aligned, the pagination will be 
right aligned.


--
Endi S. Dewata

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