Re: [Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-11 Thread Chris Travers
On Sat, Aug 10, 2013 at 2:54 PM, John Locke m...@freelock.com wrote:

  Hi,

 In 1.4 trunk, there is a Dojo date widget currently hooked up to the
 Journal Entry screen. I've been planning to move this into
 UI/lib/elements.html, basically create a date element that can then be
 more easily hooked up, and then there's a single place where the date
 format preferences can be handled for everywhere in the application... and
 a nifty drop-down date widget included.


The autocomplete dropdowns were added to elements.html for the reason that
they have a different HTML structure.  I am wondering how hard it would be
to just getElementsByClass() and attach the scripts to these so that they
could be more easily themed?


 What I haven't yet figured out is how to get the user's date format and
 locale preference injected into the template system. If somebody can more
 easily inject that into the environment so it can be accessed by a
 variable, this will be a very easy thing to solve.


maybe we should have a namespace USER (I am trying to keep reserved words
all upper case) which would store this info?  Easy enough to add.


 The next question then becomes, do we localize in the JS only, or also on
 the server?

 Here are some examples for how you can set date formats in the date
 widget:
 http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_DateTextBox.html,
  and then Dojo could automatically convert those to a single format that
 is actually submitted on the form -- this to me seems like the easier
 approach. Then the form post handler can expect a consistent format from
 anywhere.


For now I don't think it is likely to be feasible to stop doing
localization on the server.  We do autodetect -mm-dd dates so any
localization should use that format.However as we move all code over, I
can see the benefits of moving this onto the client for data entry.  I
think for display we will still need it on the server though so I am not
sure it is possible to do all of this.


 There are more date parsing formats available, we could even support
 custom formats as described here:
 http://dojotoolkit.org/reference-guide/1.9/dojo/date/locale/parse.html#dojo-date-locale-parse

 Cool.

Best Wishes,
Chris Travers


 Cheers,
 John Locke
 http://www.freelock.com


 On 08/09/2013 05:36 AM, Erik Huelsmann wrote:


 
   Much of the new code has date fields being of class date which is
 there in part to allow Javascript handles to be added programmatically in a
 central manner.
 
  My larger question is this:  what is the best way to allow for
 customized handles like this?
 
  Hmmm, I have no idea.
 
  If you mentioned, it is possible to hook custom javascripts for each
 class of input fields, probably a dedicated subdirectory could contain
 custom scripts. I guess it needs to develop a general framework.
 
  I guess you know more about the code and possibilities. :)

 In my opinion, it'd be very good to include this in the discussion on UI
 improvements John, Brian, Mikkel and others are (going to be) having.

 Possibly, this is just a matter of flipping a bit there (i hope :-)

 Bye,

 Erik.
  !DSPAM:5204e505296858941011170!

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes. 
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk


 !DSPAM:5204e505296858941011170!



 ___
 Ledger-smb-devel mailing 
 listLedger-smb-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/ledger-smb-devel



 !DSPAM:5204e505296858941011170!




 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Ledger-smb-devel mailing list
 Ledger-smb-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel




-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more.shtml
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 

Re: [Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-11 Thread John Locke

Hi,


On 08/10/2013 10:58 PM, Chris Travers wrote:




On Sat, Aug 10, 2013 at 2:54 PM, John Locke m...@freelock.com 
mailto:m...@freelock.com wrote:


Hi,

In 1.4 trunk, there is a Dojo date widget currently hooked up to
the Journal Entry screen. I've been planning to move this into
UI/lib/elements.html, basically create a date element that can
then be more easily hooked up, and then there's a single place
where the date format preferences can be handled for everywhere in
the application... and a nifty drop-down date widget included.


The autocomplete dropdowns were added to elements.html for the reason 
that they have a different HTML structure.  I am wondering how hard it 
would be to just getElementsByClass() and attach the scripts to these 
so that they could be more easily themed?


Yes, we can do this, and adding a class name is probably good for 
themers. It's actually more work to hook up on the JS side than just 
outputting a data-dojo-type attribute on the HTML tag (as I'm already 
doing). Dojo supports this really simple declarative syntax -- we can 
override the base Dojo objects to easily set other defaults, and then 
just leverage the parser to hook everything up.


Dojo widgets actually encapsulate a template for the HTML it generates, 
and there's a lot of theming capability built into those templates (and 
4 or 5 different themes shipping with the core). So whether or not we 
explicitly add a class to these elements, there's a lot of room for theming.




What I haven't yet figured out is how to get the user's date
format and locale preference injected into the template system. If
somebody can more easily inject that into the environment so it
can be accessed by a variable, this will be a very easy thing to
solve.


maybe we should have a namespace USER (I am trying to keep reserved 
words all upper case) which would store this info?  Easy enough to add.


That sounds great! If this can be turned into a JS object on the page, 
this should work fine. Simplest approach is probably to inline this into 
a script loaded on the page -- the Dojo parser will run after the DOM is 
ready, so this object should be available by then. Or we can load it as 
a callback, and require that data in elements that need it -- I would 
expect this would be a lot of them, though, so this probably isn't good 
from a performance standpoint, doing an extra Ajax callback on every page...




The next question then becomes, do we localize in the JS only, or
also on the server?

Here are some examples for how you can set date formats in the
date widget:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_DateTextBox.html
, and then Dojo could automatically convert those to a single
format that is actually submitted on the form -- this to me seems
like the easier approach. Then the form post handler can expect a
consistent format from anywhere.


For now I don't think it is likely to be feasible to stop doing 
localization on the server.  We do autodetect -mm-dd dates so any 
localization should use that format.However as we move all code 
over, I can see the benefits of moving this onto the client for data 
entry.  I think for display we will still need it on the server though 
so I am not sure it is possible to do all of this.


Oh, right. Yes, wasn't thinking of output. The dojo stuff can handle 
converting all input to -mm-dd format, but we'll still have to 
localize output on reports. To make the client side easier, we should, 
however, use -mm-dd format to provide the initial value of date 
inputs... Dojo can then convert to the appropriate locale format.


Cheers,
John Locke
http://www.freelock.com

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-10 Thread John Locke

Hi,

In 1.4 trunk, there is a Dojo date widget currently hooked up to the 
Journal Entry screen. I've been planning to move this into 
UI/lib/elements.html, basically create a date element that can then be 
more easily hooked up, and then there's a single place where the date 
format preferences can be handled for everywhere in the application... 
and a nifty drop-down date widget included.


What I haven't yet figured out is how to get the user's date format and 
locale preference injected into the template system. If somebody can 
more easily inject that into the environment so it can be accessed by a 
variable, this will be a very easy thing to solve.


The next question then becomes, do we localize in the JS only, or also 
on the server?


Here are some examples for how you can set date formats in the date 
widget: 
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_DateTextBox.html 
, and then Dojo could automatically convert those to a single format 
that is actually submitted on the form -- this to me seems like the 
easier approach. Then the form post handler can expect a consistent 
format from anywhere.


There are more date parsing formats available, we could even support 
custom formats as described here: 
http://dojotoolkit.org/reference-guide/1.9/dojo/date/locale/parse.html#dojo-date-locale-parse


Cheers,
John Locke
http://www.freelock.com

On 08/09/2013 05:36 AM, Erik Huelsmann wrote:




  Much of the new code has date fields being of class date which 
is there in part to allow Javascript handles to be added 
programmatically in a central manner.


 My larger question is this:  what is the best way to allow for 
customized handles like this?


 Hmmm, I have no idea.

 If you mentioned, it is possible to hook custom javascripts for each 
class of input fields, probably a dedicated subdirectory could contain 
custom scripts. I guess it needs to develop a general framework.


 I guess you know more about the code and possibilities. :)

In my opinion, it'd be very good to include this in the discussion on 
UI improvements John, Brian, Mikkel and others are (going to be) having.


Possibly, this is just a matter of flipping a bit there (i hope :-)

Bye,

Erik.

!DSPAM:5204e505296858941011170!


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk

!DSPAM:5204e505296858941011170!


___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


!DSPAM:5204e505296858941011170!


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


[Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-09 Thread Pongrácz István

Hi,

In the Hungarian sql-ledger fork there is a good small script to improve date 
input, thanks to tavugyvitel.hu (József Kabai).

It is working like this: you can write this to the field: 0513 and jump to the 
next input, the script automatically change the 0513 to 2013-05-13 (or the 
default date format).

This kind of input handling gives quicker data entering.

Check it here in action: http://www.youtube.com/watch?v=B1g-3o7a6x8

My opinion, regarding the date entries, it is much quicker and more error proof 
than the default.

What do you think?

Cheers,

István


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-09 Thread Chris Travers
On Fri, Aug 9, 2013 at 4:30 AM, Pongrácz István
pongracz.ist...@gmail.comwrote:

 Hi,

 In the Hungarian sql-ledger fork there is a good small script to improve
 date input, thanks to tavugyvitel.hu (József Kabai).

 It is working like this: you can write this to the field: 0513 and jump to
 the next input, the script automatically change the 0513 to 2013-05-13 (or
 the default date format).

 This kind of input handling gives quicker data entering.

 Check it here in action: http://www.youtube.com/watch?v=B1g-3o7a6x8

 My opinion, regarding the date entries, it is much quicker and more error
 proof than the default.

 What do you think?

Much of the new code has date fields being of class date which is there
in part to allow Javascript handles to be added programmatically in a
central manner.

My larger question is this:  what is the best way to allow for customized
handles like this?

Best Wishes,
Chris Travers


 Cheers,

 István




 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Ledger-smb-devel mailing list
 Ledger-smb-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel




-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more.shtml
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Date input field enhancement by tavugyvitel.hu - worth to use it

2013-08-09 Thread Erik Huelsmann

  Much of the new code has date fields being of class date which is
there in part to allow Javascript handles to be added programmatically in a
central manner.

 My larger question is this:  what is the best way to allow for
customized handles like this?

 Hmmm, I have no idea.

 If you mentioned, it is possible to hook custom javascripts for each
class of input fields, probably a dedicated subdirectory could contain
custom scripts. I guess it needs to develop a general framework.

 I guess you know more about the code and possibilities. :)

In my opinion, it'd be very good to include this in the discussion on UI
improvements John, Brian, Mikkel and others are (going to be) having.

Possibly, this is just a matter of flipping a bit there (i hope :-)

Bye,

Erik.
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel