You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Todor Spasov (JIRA)" <ji...@apache.org> on 2009/01/15 11:01:59 UTC

[jira] Commented: (OFBIZ-1825) Colors and localisation for the calendar

    [ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664068#action_12664068 ] 

Todor Spasov commented on OFBIZ-1825:
-------------------------------------

Hello Jacques,

I have worked on Marco Ruocco's patch and modified it according to your last comments. Here are the changes I've made:
* Removed duplicate blocks in HtmlFormRenderer.java introduced by unnecessary spaces-to-tabs conversion.
* Merged and resolved all conflicts with head revision (currently r734637)
* Modified some of the import to be more precise. Replaced lines:
{code:title=HtmlFormRenderer.java|borderStyle=solid}
import org.ofbiz.base.util.*
{code}
with the actual used imports:
{code:title=HtmlFormRenderer.java|borderStyle=solid}
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.ObjectType;
import org.ofbiz.base.util.GeneralException;
{code}
Apart from this there are no other code implementation changes.
* calendar_date_select.js is moved to the new calendar folder for better structure. Should we keep the original js file?
* There is a problem with the new calendar - the returned value is not local aware.
* I found difficulties to patch CommonUiLabels.xml: the patch works well on linux but gives conflict on this file on winXP (the message is "unmatched patch segment"). Please suggest how to make it work on win.

I'm attaching the modified patch (calendarModified.patch).

> Colors and localisation for the calendar
> ----------------------------------------
>
>                 Key: OFBIZ-1825
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1825
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calendar.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, Existing.jpg, Proposition.jpg, WE_CAL.gif
>
>
> I tried to change the calendar colors, to be more "in the OFBiz way". Please let me you know what you think.
> I also changed some colors to respect our CSS best practices (no color names).
> Here are some remarks :
> Colors
> *  I kept the 3 chars scheme when it's was obvious. For instance we don't need to set #000000 or #ffffff when actually #000 or #fff is sufficient. 
> * I used Wikipedia as reference http://en.wikipedia.org/wiki/Web_colors for choising colors. While doing this change I wondered if we could not authorise and even recommend to use sandard names for colors as shown in Wikipedia page. I found it easier to recall a color by its names than by an hexa number...! As long as we would use this Wikipedia reference I think it could be possible to use names instead of hexa, WDYT ?
> * The days initials are not centered but at left (It's late and I did not found the reason)
> We need to provide a localisation mean. From http://electronicholas.com/calendar?style=default&format=natural it should not be too hard. I propose a simple way, maybe we can do better
> * More calendar formats in a calendar.properties file (like the euro or american ones)
> * For the moment I think all string are harcoded in calendar_date_select.js
>     Date.weekdays = $w("S M T W T F S");
>     Date.first_day_of_week = 0;
>     Date.months = $w("January February March April May June July August September October November December" );
>     _translations = {
>       "OK": "OK",
>       "Now": "Now",
>       "Today": "Today"
>     }
> A very simple way (but not very clever I must admit) could be to set a property for the language to use in calendar.properties file and use it in a switch statement with "hardcoded" strings in  calendar_date_select.js. Is anybody aware of better ways to do that in Javascript or Prototype ?
> BTW I think we should delete calendarstyles.css and calendarTable.css. If it's ok, I will do it when I will upate the attached patch later.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.