From bfed18611be2906a3f74e29c11670732221022ec Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Fri, 25 Nov 2011 21:44:36 -0600 Subject: [PATCH] each instead of focus for datetime pickers --- Makefile | 4 ++-- VERSION | 2 +- applications/admin/static/js/web2py.js | 7 ++++--- applications/examples/static/js/web2py.js | 7 ++++--- applications/welcome/static/js/web2py.js | 7 ++++--- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 4829dead..f485e664 100644 --- a/Makefile +++ b/Makefile @@ -114,9 +114,9 @@ commit: make src echo '' > NEWINSTALL hg commit -m "$(S)" - bzr commit -m "$(S)" + #bzr commit -m "$(S)" git commit -a -m "$(S)" push: hg push git push - bzr push bzr+ssh://mdipierro@bazaar.launchpad.net/~mdipierro/web2py/devel --use-existing-dir + #bzr push bzr+ssh://mdipierro@bazaar.launchpad.net/~mdipierro/web2py/devel --use-existing-dir diff --git a/VERSION b/VERSION index 745152f1..d4ad336e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.3 (2011-11-25 18:04:29) dev +Version 1.99.3 (2011-11-25 21:44:35) dev diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index a6ac1c42..95f3e2f8 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -29,9 +29,10 @@ function web2py_ajax_fields(target) { jQuery("input[type='checkbox'].delete", target).click(function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; }); var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; - jQuery("input.date",target).focus(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); - jQuery("input.datetime",target).focus(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); - jQuery("input.time",target).focus(function() { var el = jQuery(this);if (!el.hasClass('hasTimeEntry')) try { el.timeEntry();} catch(e) {};}); + jQuery("input.date",target).each(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); + jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); + jQuery("input.time",target).each(function(){alert('x');jQuery(this).timeEntry();alert('y');}); + }; function web2py_ajax_init(target) { diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index a6ac1c42..95f3e2f8 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -29,9 +29,10 @@ function web2py_ajax_fields(target) { jQuery("input[type='checkbox'].delete", target).click(function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; }); var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; - jQuery("input.date",target).focus(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); - jQuery("input.datetime",target).focus(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); - jQuery("input.time",target).focus(function() { var el = jQuery(this);if (!el.hasClass('hasTimeEntry')) try { el.timeEntry();} catch(e) {};}); + jQuery("input.date",target).each(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); + jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); + jQuery("input.time",target).each(function(){alert('x');jQuery(this).timeEntry();alert('y');}); + }; function web2py_ajax_init(target) { diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index a6ac1c42..95f3e2f8 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -29,9 +29,10 @@ function web2py_ajax_fields(target) { jQuery("input[type='checkbox'].delete", target).click(function(){ if(this.checked) if(!confirm(confirm_message)) this.checked=false; }); var date_format = (typeof w2p_ajax_date_format != 'undefined') ? w2p_ajax_date_format : "%Y-%m-%d"; var datetime_format = (typeof w2p_ajax_datetime_format != 'undefined') ? w2p_ajax_datetime_format : "%Y-%m-%d %H:%M:%S"; - jQuery("input.date",target).focus(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); - jQuery("input.datetime",target).focus(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); - jQuery("input.time",target).focus(function() { var el = jQuery(this);if (!el.hasClass('hasTimeEntry')) try { el.timeEntry();} catch(e) {};}); + jQuery("input.date",target).each(function() {Calendar.setup({inputField:this, ifFormat:date_format, showsTime:false });}); + jQuery("input.datetime",target).each(function() {Calendar.setup({inputField:this, ifFormat:datetime_format, showsTime: true, timeFormat: "24" });}); + jQuery("input.time",target).each(function(){alert('x');jQuery(this).timeEntry();alert('y');}); + }; function web2py_ajax_init(target) {