|
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 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. |
|
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-1825: ----------------------------------- Attachment: calendarDateSelectColor.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: calendarDateSelectColor.patch > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602803#action_12602803 ] Adrian Crum commented on OFBIZ-1825: ------------------------------------ Jacques, I haven't looked at the code, but off the top of my head I think we could setup an Ajax request that would return localized data. Regarding using color names in the CSS: in other css files I have made a list at the top of the css file that shows the colors used and their hex values. > 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: calendarDateSelectColor.patch > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-1825: ----------------------------------- Attachment: Proposition.jpg > 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: calendarDateSelectColor.patch, Proposition.jpg > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602814#action_12602814 ] Jacques Le Roux commented on OFBIZ-1825: ---------------------------------------- Thanks for comment Adrian, I'm adding pictures to facilitate the choice (BTW the official trunk demo site is down...) > 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: calendarDateSelectColor.patch, Proposition.jpg > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-1825: ------------------------------- Attachment: WE_CAL.JPG Maybe you could use the existing workeffort calendar as a guide. > 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: calendarDateSelectColor.patch, Proposition.jpg > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-1825: ------------------------------- Attachment: (was: WE_CAL.JPG) > 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: calendarDateSelectColor.patch, Proposition.jpg > > > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-1825: ------------------------------- Attachment: WE_CAL.gif > 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: calendarDateSelectColor.patch, 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-1825: ----------------------------------- Attachment: Existing.jpg > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602818#action_12602818 ] Jacques Le Roux commented on OFBIZ-1825: ---------------------------------------- Yes good idea, I will have a look, thanks :o) > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-1825: ----------------------------------- Attachment: calendarDateSelectColor.patch Same patch updated after Scott's clean up (some css tags were removed by error) > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603071#action_12603071 ] Ashish Vijaywargiya commented on OFBIZ-1825: -------------------------------------------- Proposition.jpg looks good to me instead of Existing one. +1 for Proposition.jpg. -- Ashish > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603324#action_12603324 ] Jacques Le Roux commented on OFBIZ-1825: ---------------------------------------- Hi Adrian, You wrote "Regarding using color names in the CSS: in other css files I have made a list at the top of the css file that shows the colors used and their hex values. ". Sorry, I did not find them, could you please indicate which files ? I was just re-reading that thread http://www.nabble.com/New-javascript-calendar-%28dojo%29-td11816555.html. But until now I missed this link : http://code.google.com/p/calendardateselect/wiki/HowToLocalize. It seems to me that it would be enough (notably using/enhancing technique exposed in last comment). What do you guys think ? There will still be a point missing, but should not be to hard to code : 24hours. I think there will be no pb with time zone since it"s only local to the client but I'm maybe overlooking something here (no more time to search and think...) In OFBiz I found MonthlyCalendar.js/css/html and while browsing around I found also this one http://shaneosullivan.wordpress.com/2008/03/24/sexy-new-calendar-widget-for-dojo/ but it's missing a time selection. > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603700#action_12603700 ] Jacques Le Roux commented on OFBIZ-1825: ---------------------------------------- I commited a 1st patch for calendar colors in revision: 665902 > 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656643#action_12656643 ] Marco Ruocco commented on OFBIZ-1825: ------------------------------------- Hi, I spent my time in the past days on the calendar localization problem and I propose a 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: 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marco Ruocco updated OFBIZ-1825: -------------------------------- Attachment: calendar.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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656673#action_12656673 ] Jacques Le Roux commented on OFBIZ-1825: ---------------------------------------- Hi Marco, Wooww... near 9000 lines in this patch ! I did not review all lines in detail, just had a look pages by pages for now. Some remarks : * Please use relative path from root, ie ** not D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/org/ofbiz/base/util/ObjectType.java ** but framework/base/src/org/ofbiz/base/util/ObjectType.java * dont use tabs but 4 spaces instead * use english in your comments //costruisco il rndering dei campi * and finally be sure to read carefully http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices A question : are you sure that all your changes in HtmlFormRenderer.java are only related to calendar localization ? (this is the most important and delicate part) Globally this patch looks good, but will indubitably need very carefull review*S* before being commited. Selenium tests also would be very appreciated (not necessarily from you Marco, I will even prefer them from someone else) Thanks for your work ! > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656939#action_12656939 ] Marco Ruocco commented on OFBIZ-1825: ------------------------------------- Hi Jacques, thanks for your suggestion. I'll try to explain my work: 1 - I try to apply the "The progressive enhancement" perspective for the calendar widget. Without javascript, it is composed by three field: - day field (a text field) - month field (a drop-down field with the localized name of months) - year field (a text field) The position of that fields is related to the localized date pattern that you have to specify in the CommonUiLabels.xml (I think this is the better resource where you can localize that information). With javascript, it place the right calendar widget. I use unobtrusive Javascript to separate completely the html part from the javascript part (I think this would be a best practice also for other solution as autocompleter....) > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656949#action_12656949 ] Marco Ruocco commented on OFBIZ-1825: ------------------------------------- Hi Jacques, thanks for your suggestion. I'll try to explain my work: 1 - I try to apply the "The progressive enhancement" perspective for the calendar widget. Without javascript, it is composed by three field: - day field (a text field) - month field (a drop-down field with the localized name of months) - year field (a text field) The position of that fields is related to the localized date pattern that you have to specify in the CommonUiLabels.xml (I think this is the better resource where you can localize that information). With javascript, it place the right calendar widget. I use unobtrusive Javascript to separate completely the html part from the javascript part (I think this would be a best practice also for other solution as autocompleter....) > 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. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marco Ruocco updated OFBIZ-1825: -------------------------------- Comment: was deleted > 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. |
| Free forum by Nabble | Edit this page |
