Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1825

Colors and localisation for the calendar

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • Trunk
    • ALL COMPONENTS
    • None

    Description

      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.

      Attachments

        1. WE_CAL.gif
          57 kB
          Adrian Crum
        2. Proposition.jpg
          176 kB
          Jacques Le Roux
        3. LocalizedDate_it.patch
          1 kB
          Marco Ruocco
        4. Existing.jpg
          167 kB
          Jacques Le Roux
        5. CommonScreens.patch
          6 kB
          Marco Ruocco
        6. calendarModified.patch
          185 kB
          Todor Spasov
        7. calendarDateSelectColor.patch
          3 kB
          Jacques Le Roux
        8. calendarDateSelectColor.patch
          3 kB
          Jacques Le Roux
        9. calendar.patch
          379 kB
          Marco Ruocco
        10. calendar_sequence.patch
          27 kB
          Marco Ruocco
        11. calendar_I18n.patch
          74 kB
          Sascha Schumann
        12. calendar_I18n.patch
          74 kB
          Sascha Schumann

        Activity

          People

            jleroux Jacques Le Roux
            jleroux Jacques Le Roux
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: