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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
61 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Marco,

I had a new fresh look. Here are some other problems I crossed
* There are encoding issues in your patch for CommonUiLabels.xml
** look at
*** <value xml:lang="ru">Формат: ЧЧ:мм:ѿѿ.ССС</value>
***          <value xml:lang="zh_CN">建立数濮溿类型</value>
***         <value xml:lang="zh">新建数濮溿类型</value>

Anyway the patch need an update :  CommonUiLabels.xml and widget-forms.xsd can't be merged. If you can prodive this update please take into account my previous recommandations.

Not sure yet but I wonder why you removedf completly calendar_date_select.js. I think we should keep it for now.

In HtmlFormRenderer.java, there are a lot of blocks like
{code}-    public void appendOfbizUrl(Appendable writer, String location) throws IOException {
-        writer.append(this.rh.makeLink(this.request, this.response, location));
-    }{code}
and
{code}+ public void appendOfbizUrl(Appendable writer, String location) throws IOException {
+ writer.append(this.rh.makeLink(this.request, this.response, location));
+ }{code}
which are removedf and re-added only because you introduced tabs I guess. Cleaning this would help a lot to understand the *real* changes !

Thanks



> 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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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 ]

Todor Spasov updated OFBIZ-1825:
--------------------------------

    Attachment: 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, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12664098#action_12664098 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Thanks Todor,

I will have a look, hopefully this weekend...

> 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, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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 ]

Bruno Busco updated OFBIZ-1825:
-------------------------------

    Fix Version/s:     (was: SVN trunk)
                   OFBIZ 9.3

> 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: OFBIZ 9.3
>
>         Attachments: calendar.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12665073#action_12665073 ]

Marco Ruocco commented on OFBIZ-1825:
-------------------------------------

Hi,

I'm attaching some modification related to the new localized date functions, presents in the voarious modules

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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_sequence.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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12666671#action_12666671 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Todor, Marco,

I did a 1st cursory review of calendarModified.patch (more on style than content for now). Below numbers are line number

Miss a {} block  (even if it's not done everywhere well in current code)
5, 53,55 77, 80, 82, 104, 107, 109, 177, 179, 221, 223, 287, 292, 552, 539, 559, 652, 653, 654, 710, 726, 772,  966, 1003, 1126, 1142, 1183, 1256, 1273, 1293,  1375, 1376, 1377, 1433, 1449, 1497, 3782 3783, 3784, 3788, 3827, 3828, 3829, 3845, 3846, 3855, 3586

To be put on several lines
320, 816

Comments in english please
403, 509, 526, 880, 953, 970, 983, 1236

Tabs
1582, 3910, 3911

Nothing missing in ? (at least a debug.error or warning)
3755, 3944, 3965, 3986, 4033

merging conflicts
ModelFormField.java
HtmlFormRenderer.java

Please update and submit a new patch, thanks for your great work on this !

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12666951#action_12666951 ]

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

Hello Marco,

Regarding this code from your patch:
{code:title=calendar_date_select.js|borderStyle=solid}
    initialize: function(calendar_panel, options) {
        this.options = $H(options || {});
        this.calendar_panel = $(calendar_panel);
       
        dhtmlLoadScript('/images/calendar/date.js');
       
        var synchronousOptions = {symbol: 'coolFeature', timeout:0.001,  onSuccess: this.start.bind(this), onTimeout: this.start.bind(this)};
        if (this.options.get("locale"))
            dhtmlLoadScript('/images/calendar/i18n/LocalizedDate_'+ this.options.get("locale") + '.js', synchronousOptions);
    },
{code}
Would you please give an example for LocalizedDate_it.js file as I cannot quite figure its content?
I am willing to convert the modified patch according to Jacques Le Roux's remarks.

Thanks,
Todor

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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: LocalizedDate_it.patch

This is the date pattern localized for the italian language

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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: CommonScreens.patch

This is a patch for the LookupDecorator with the new localized calendar

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12669415#action_12669415 ]

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

Hello Marco & everyone,
Regarding the localized calendar all date-time fields  rendered by form-widget work just fine but there is one major problem regarding freemarker files. The current way it is made suggests that *every* call to javascript:call_cal() in all ftl files must be changed to include the new surrounding <div date_panel> tag and also hidden parameters for all info like locale etc. Here is the problematic code in form-widget date-time render function which does not have an equivalent in ftl.



{code:title=HtmlFormRenderer.java|borderStyle=solid}
// this is part of renderDateTimeField function

            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"paramName\" value=\""+("time-dropdown".equals(dateTimeField.getInputMethod()) ? UtilHttp.makeCompositeParam(paramName, "date") : paramName)+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"time\" value=\""+"time".equals(dateTimeField.getType())+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"shortDateInput\" value=\""+shortDateInput+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"dateTimeValue\" value=\""+UtilHttp.encodeBlanks(dateTimeValue)+"\"/>");
            if (dateTimeField.getShowFormat() && UtilValidate.isEmpty(value))
                writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"localizedDefaultFormatToShow\" value=\""+localizedDefaultFormatToShow+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"localizedInputTitle\" value=\""+localizedInputTitle+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"localizedIconTitle\" value=\""+localizedIconTitle+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"yearRange\" value=\""+dateTimeField.getYearRange()+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"localizedValue\" value=\""+ value +"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"size\" value=\""+size+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"maxlength\" value=\""+maxlength+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"locale\" value=\""+UtilHttp.getLocale(request).getLanguage()+"\"/>");
            writer.append("<input type=\"hidden\" class=\"dateParams\" name=\"imagesrc\" value=\"");

{code}

It would lead to a lot of superfluous code for every call to the javascript calendar. One alternative though is to include a freemarker macro for the calendar which will receive all needed parameters. This means that, again, all ftl files must be changed to include the new macro & additional calculation of the desired parameters must be made for every field. Please suggest a solution.

Todor


> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12669598#action_12669598 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Todor,

We already use FreeMarker mocros for URLs and Currency all over in FTL files. So I guess this would be the solution so far..

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12669600#action_12669600 ]

Marco Ruocco commented on OFBIZ-1825:
-------------------------------------

Hi Todor,

I'm working on it, in this days. I hope to send you a patch as soon as possible....

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12677797#action_12677797 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Marco,

It's just to know if you got a chance to work on this issue because I expected to put calendar i18n in release 9.3 which should come soon.
Don't feel any pressure, if you think you will do it later just let us know so that we will not wait for it in 9.3

Thanks

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12689858#action_12689858 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Marco, Todor,

I wanted to put the  calendar localisation in the 9.4 release which will be release soon.
But if you think it can't be done in the following 2 weeks simply tell me and I will remove this issue from the 9.4 schedule

Thanks

> 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: Release Branch 9.3
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12783229#action_12783229 ]

Sascha Rodekamp commented on OFBIZ-1825:
----------------------------------------

Hi Jacques,
i read the above comments and have a few (more or less simple) ideas.
Besides i checked the current version of the calendar implementation, it seems that they
support localization. http://code.google.com/p/calendardateselect/

When we updating the code to the current version it should be easy to set the right locale (without modifiying the 'calendar core')
when the calendar is calling (maybe from the user login local and/or the browser locale).

Displaying the right date format i can handel in a few lines of code.

BUT one problem. When we added for exampel a european date/ time in an input field
and submit the form. The european date will cause some trouble when we try to at this to the Database.
So its absolutely necessary to transform it back to a database timestamp (or something the database can work with).

You understand what i mean and have an idea how we can solve it??

Best Regards :-),
Sascha

> 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: Release Branch 9.04
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1825) Colors and localisation for the calendar

Nicolas Malin (Jira)
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=12783229#action_12783229 ]

Sascha Rodekamp edited comment on OFBIZ-1825 at 11/28/09 12:01 PM:
-------------------------------------------------------------------

Hi Jacques,
i read the above comments and have a few (more or less simple) ideas.
Besides i checked the current version of the calendar implementation, it seems that they
support localization. http://code.google.com/p/calendardateselect/

When we are updating the code to the current version it should be easy to set the right locale (without modifiying the 'calendar core') when the calendar is calling (maybe from the user login local and/or the browser locale).

I can do the displaying of the right data format in a few codelines.

BUT there is one problem. When we added a european date/ time for exampel  in an input field
and submit the form, the european date will cause some trouble when we try to add this to the Database.
So its absolutely necessary to transform it back to a database timestamp (or something the database can work with).

Did you understand what i meant? And do you have an idea how we can solve it?

Cu :-),
Sascha

      was (Author: sascha):
    Hi Jacques,
i read the above comments and have a few (more or less simple) ideas.
Besides i checked the current version of the calendar implementation, it seems that they
support localization. http://code.google.com/p/calendardateselect/

When we updating the code to the current version it should be easy to set the right locale (without modifiying the 'calendar core')
when the calendar is calling (maybe from the user login local and/or the browser locale).

Displaying the right date format i can handel in a few lines of code.

BUT one problem. When we added for exampel a european date/ time in an input field
and submit the form. The european date will cause some trouble when we try to at this to the Database.
So its absolutely necessary to transform it back to a database timestamp (or something the database can work with).

You understand what i mean and have an idea how we can solve it??

Best Regards :-),
Sascha
 

> 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: Release Branch 9.04
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

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

Nicolas Malin (Jira)
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=12783268#action_12783268 ]

Jacques Le Roux commented on OFBIZ-1825:
----------------------------------------

Hi Sascha,

Absolutely, anyway in OFBiz we want to deal with date formats only a the UI level. Else we want to stay with a *sortable* format ie yyyy-mm-dd hh:mm:dd.ms.

Hope I understood your question an replied as well

Thanks

> 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: Release Branch 9.04
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1825) Colors and localisation for the calendar

Nicolas Malin (Jira)
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=12783268#action_12783268 ]

Jacques Le Roux edited comment on OFBIZ-1825 at 11/28/09 10:13 PM:
-------------------------------------------------------------------

Hi Sascha,

Absolutely, anyway in OFBiz we want to deal with date formats only a the UI level. Else we want to stay with a *sortable* format ie yyyy-mm-dd hh:mm:ss.ms.

Hope I understood your question an replied as well

Thanks

edit ******typo in date/hour format *****************

      was (Author: jacques.le.roux):
    Hi Sascha,

Absolutely, anyway in OFBiz we want to deal with date formats only a the UI level. Else we want to stay with a *sortable* format ie yyyy-mm-dd hh:mm:dd.ms.

Hope I understood your question an replied as well

Thanks
 

> 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: Release Branch 9.04
>
>         Attachments: calendar.patch, calendar_sequence.patch, calendarDateSelectColor.patch, calendarDateSelectColor.patch, calendarModified.patch, CommonScreens.patch, Existing.jpg, LocalizedDate_it.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.

1234