Re: [web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-15 Thread Martin Weissenboeck
+1
Martin

2011/9/15 Omi Chiba 

> Kenji san,
>
> The adjusting the length feature looks great !  : )
>
>
>


[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-15 Thread Omi Chiba
Kenji san,

The adjusting the length feature looks great !  : )




[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-14 Thread kenji4569
How about this one?

http://dev.s-cubism.com/plugin_tight_input_widget

This is a size-adjusted input widget with such right aligned text. I'v
used this widget in one of my products (I rewrote it for the plugin
just now).

The size of the widget is automatically adjusted to maximum length of
the field value which is defined by validators such as IS_LENGTH and
IS_INT_IN_RANGE. In this case, mixture of text and numeric fields
would not look so odd.

I also think it might be better just to leave the default for
simplicity.

Kenji


On 9月14日, 午後10:13, Omi Chiba  wrote:
> I'm not float/double guy but yes, it make sense.
>
> With that, we can use this.
>
> input.decimal, input.integer, input.double {
>     text-align: right;
>
> }
>
> I also understand the Anthony's point. My table actually has five decimal
> field for different pricing for the product, which look really weird but
> there is also text-like integer value used for ID or status for example.
>
> If we keep the current, then I will just add this to my blog post in case
> someone looking for the solution.


[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-14 Thread Omi Chiba
I'm not float/double guy but yes, it make sense.

With that, we can use this.

input.decimal, input.integer, input.double { 
text-align: right; 
} 

I also understand the Anthony's point. My table actually has five decimal 
field for different pricing for the product, which look really weird but 
there is also text-like integer value used for ID or status for example.

If we keep the current, then I will just add this to my blog post in case 
someone looking for the solution.


[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-13 Thread Massimo Di Pierro
How about we always display a minimum of two decimals for float/double
fields instead of one?

On Sep 13, 5:22 pm, Anthony  wrote:
> I'm not sure. When there is a mixture of text and numeric fields, I think it
> looks better to keep them all aligned to the left (for example, your
> "before" screenshot looks better to me -- the 500.00 looks odd all the way
> on the right). On the other hand, if you have several numbers (with the same
> number of decimal places) stacked on top of each other, I suppose right
> alignment would be better. I think this might be more of a case-by-case
> thing -- maybe just leave the default as it is.
>
> Anthony
>
>
>
>
>
>
>
> On Tuesday, September 13, 2011 5:59:49 PM UTC-4, Omi Chiba wrote:
>
> > By default, all input field is aligned to left but we all know it
> > should be aligned to right for numbers.
>
> > We can add the following in the base.css to align them correctly.
> > (Tested with IE and Chrome)
>
> > Don't you guys think it's better to make this change on the base.css
> > comes from web2py ?
>
> > input.decimal, input.integer {
> >     text-align: right;
> > }
>
> > Before
>
> >https://picasaweb.google.com/107398878481677837585/Web2py#56519648819...
>
> > After
>
> >https://picasaweb.google.com/107398878481677837585/Web2py#56519648839...


[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-13 Thread Anthony
I'm not sure. When there is a mixture of text and numeric fields, I think it 
looks better to keep them all aligned to the left (for example, your 
"before" screenshot looks better to me -- the 500.00 looks odd all the way 
on the right). On the other hand, if you have several numbers (with the same 
number of decimal places) stacked on top of each other, I suppose right 
alignment would be better. I think this might be more of a case-by-case 
thing -- maybe just leave the default as it is.

Anthony

On Tuesday, September 13, 2011 5:59:49 PM UTC-4, Omi Chiba wrote:
>
> By default, all input field is aligned to left but we all know it 
> should be aligned to right for numbers. 
>
> We can add the following in the base.css to align them correctly. 
> (Tested with IE and Chrome) 
>
> Don't you guys think it's better to make this change on the base.css 
> comes from web2py ? 
>
> input.decimal, input.integer { 
> text-align: right; 
> } 
>
> Before 
>
> https://picasaweb.google.com/107398878481677837585/Web2py#5651964881929692066 
>
> After 
>
> https://picasaweb.google.com/107398878481677837585/Web2py#5651964883954263666