From 8639b7bcf29239457b1c462d0809a77ad99b6d7d Mon Sep 17 00:00:00 2001 From: Parker Park Date: Thu, 31 Aug 2017 19:31:16 +0900 Subject: [PATCH 01/10] update croniter. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9212e87..4f338bf 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ install_requires = [ 'BeautifulSoup4==4.6.0', 'boto3==1.4.7', - 'croniter==0.3.18', + 'croniter==0.3.19', 'CyMySQL==0.9.1', 'httpagentparser==1.8.0', 'lxml==3.8.0', From 074e63dad135c9b58d0849d9efad625f12d9f79c Mon Sep 17 00:00:00 2001 From: Parker Park Date: Fri, 8 Sep 2017 23:15:09 +0900 Subject: [PATCH 02/10] add on paste event handler. --- dp_tornado/engine/static/js/dp.ui.js | 29 ++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/dp_tornado/engine/static/js/dp.ui.js b/dp_tornado/engine/static/js/dp.ui.js index d32d385..b9a9afa 100644 --- a/dp_tornado/engine/static/js/dp.ui.js +++ b/dp_tornado/engine/static/js/dp.ui.js @@ -180,6 +180,7 @@ dp.ui = { dp.ui.element.input.delegate.on_focusout(obj); dp.ui.element.input.delegate.on_keyup(obj); dp.ui.element.input.delegate.on_keydown(obj); + dp.ui.element.input.delegate.on_paste(obj); }, input: { delegate: { @@ -216,7 +217,7 @@ dp.ui = { }, on_focus: function(obj) { if (!obj) obj = dp_jqlib('body'); - obj.find('input[dp-on-focus][dp-on-focus-installed!=yes]').each(function() { + obj.find('input[dp-on-focus][dp-on-focus-installed!=yes],textarea[dp-on-focus][dp-on-focus-installed!=yes]').each(function() { var _id = dp_jqlib(this).attr('id') || 'uniqid-' + dp.helper.string.uniqid(); dp_jqlib(this).attr('id', _id); @@ -237,7 +238,7 @@ dp.ui = { }, on_focusout: function(obj) { if (!obj) obj = dp_jqlib('body'); - obj.find('input[dp-on-focusout][dp-on-focusout-installed!=yes]').each(function() { + obj.find('input[dp-on-focusout][dp-on-focusout-installed!=yes],textarea[dp-on-focusout][dp-on-focusout-installed!=yes]').each(function() { var _id = dp_jqlib(this).attr('id') || 'uniqid-' + dp.helper.string.uniqid(); dp_jqlib(this).attr('id', _id); @@ -258,7 +259,7 @@ dp.ui = { }, on_keyup: function(obj) { if (!obj) obj = dp_jqlib('body'); - obj.find('input[dp-on-keyup][dp-on-keyup-installed!=yes]').each(function() { + obj.find('input[dp-on-keyup][dp-on-keyup-installed!=yes],textarea[dp-on-keyup][dp-on-keyup-installed!=yes]').each(function() { var _id = dp_jqlib(this).attr('id') || 'uniqid-' + dp.helper.string.uniqid(); dp_jqlib(this).attr('id', _id); @@ -278,7 +279,7 @@ dp.ui = { }, on_keydown: function(obj) { if (!obj) obj = dp_jqlib('body'); - obj.find('input[dp-on-keydown][dp-on-keydown-installed!=yes]').each(function() { + obj.find('input[dp-on-keydown][dp-on-keydown-installed!=yes],textarea[dp-on-keydown][dp-on-keydown-installed!=yes]').each(function() { var _id = dp_jqlib(this).attr('id') || 'uniqid-' + dp.helper.string.uniqid(); dp_jqlib(this).attr('id', _id); @@ -290,6 +291,26 @@ dp.ui = { delegate = eval(dp_jqlib(this).attr('dp-on-keydown')); }catch(_){} + if (delegate && typeof(delegate) == 'function') { + setTimeout(delegate(dp_jqlib(this), e), 0); + } + }); + }); + }, + on_paste: function(obj) { + if (!obj) obj = dp_jqlib('body'); + obj.find('input[dp-on-paste][dp-on-paste-installed!=yes],textarea[dp-on-paste][dp-on-paste-installed!=yes]').each(function() { + var _id = dp_jqlib(this).attr('id') || 'uniqid-' + dp.helper.string.uniqid(); + + dp_jqlib(this).attr('id', _id); + dp_jqlib(this).attr('dp-on-paste-installed', 'yes'); + + dp_jqlib(this).bind('paste', function(e) { + var delegate; + try { + delegate = eval(dp_jqlib(this).attr('dp-on-paste')); + }catch(_){} + if (delegate && typeof(delegate) == 'function') { setTimeout(delegate(dp_jqlib(this), e), 0); } From 09cd51072a785d3d3feeafcc6f8417fc5a2498f5 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Fri, 8 Sep 2017 23:29:46 +0900 Subject: [PATCH 03/10] hand paste data over to delegate. --- dp_tornado/engine/static/js/dp.ui.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dp_tornado/engine/static/js/dp.ui.js b/dp_tornado/engine/static/js/dp.ui.js index b9a9afa..6fa3102 100644 --- a/dp_tornado/engine/static/js/dp.ui.js +++ b/dp_tornado/engine/static/js/dp.ui.js @@ -305,14 +305,21 @@ dp.ui = { dp_jqlib(this).attr('id', _id); dp_jqlib(this).attr('dp-on-paste-installed', 'yes'); - dp_jqlib(this).bind('paste', function(e) { + this.addEventListener('paste', function(e) { var delegate; try { delegate = eval(dp_jqlib(this).attr('dp-on-paste')); }catch(_){} if (delegate && typeof(delegate) == 'function') { - setTimeout(delegate(dp_jqlib(this), e), 0); + var clipboardData, pastedData; + + try { + clipboardData = e.clipboardData || window.clipboardData; + pastedData = clipboardData.getData('Text'); + }catch(_){} + + delegate(dp_jqlib(this), e, pastedData); } }); }); From 416843e88f9efa50a0c41105d1c1cf6f5d95db3f Mon Sep 17 00:00:00 2001 From: Parker Park Date: Tue, 3 Oct 2017 03:13:13 +0900 Subject: [PATCH 04/10] update requirements. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4f338bf..fc4ee15 100644 --- a/setup.py +++ b/setup.py @@ -57,8 +57,8 @@ 'croniter==0.3.19', 'CyMySQL==0.9.1', 'httpagentparser==1.8.0', - 'lxml==3.8.0', - 'Pillow==4.2.1', + 'lxml==4.0.0', + 'Pillow==4.3.0', 'pycrypto==2.6.1', 'pytz==2017.2', 'redis==2.10.6', From 59aa312e733559c434965b14bb4b36758a23955f Mon Sep 17 00:00:00 2001 From: Parker Park Date: Sun, 5 Nov 2017 02:59:15 +0900 Subject: [PATCH 05/10] update requirements. --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index fc4ee15..5851b48 100644 --- a/setup.py +++ b/setup.py @@ -55,15 +55,15 @@ 'BeautifulSoup4==4.6.0', 'boto3==1.4.7', 'croniter==0.3.19', - 'CyMySQL==0.9.1', + 'CyMySQL==0.9.2', 'httpagentparser==1.8.0', - 'lxml==4.0.0', + 'lxml==4.1.1', 'Pillow==4.3.0', 'pycrypto==2.6.1', - 'pytz==2017.2', + 'pytz==2017.3', 'redis==2.10.6', 'requests==2.18.4', - 'SQLAlchemy==1.1.13', + 'SQLAlchemy==1.1.15', 'tornado==4.5.2', 'validate_email==1.3', 'validators==0.12.0', From a6af166ec75919c22395b69d07d3e0ce30faaaa4 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Tue, 7 Nov 2017 21:35:44 +0900 Subject: [PATCH 06/10] add timezone configuration. --- example/controller/tests/view/ui_methods/engine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/controller/tests/view/ui_methods/engine.py b/example/controller/tests/view/ui_methods/engine.py index b34aeac..70b1775 100644 --- a/example/controller/tests/view/ui_methods/engine.py +++ b/example/controller/tests/view/ui_methods/engine.py @@ -6,7 +6,11 @@ class EngineController(Controller): def get(self): + backup_zone = self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + expect = ','.join(['2016>01>02', '2016>01>02']) render = ','.join(self.render_string('tests/view/ui_methods/engine.html').split('\n')) + self.model.tests.helper_test.datetime.set_timezone(backup_zone) + assert(expect == render) From ec84cac004dc7abe2706758ba24a2c91f44d54d7 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Tue, 7 Nov 2017 21:49:18 +0900 Subject: [PATCH 07/10] add timezone configuration. --- example/controller/tests/view/ui_methods/hhii.py | 2 ++ example/controller/tests/view/ui_methods/hhiiss.py | 2 ++ example/controller/tests/view/ui_methods/mmdd.py | 2 ++ example/controller/tests/view/ui_methods/weekday.py | 2 ++ example/controller/tests/view/ui_methods/yyyymmdd.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/example/controller/tests/view/ui_methods/hhii.py b/example/controller/tests/view/ui_methods/hhii.py index 55c57ac..a74d153 100644 --- a/example/controller/tests/view/ui_methods/hhii.py +++ b/example/controller/tests/view/ui_methods/hhii.py @@ -6,6 +6,8 @@ class HhiiController(Controller): def get(self): + self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + ts = 1451671445 ms = ts * 1000 dt = self.helper.datetime.convert(timestamp=ts) diff --git a/example/controller/tests/view/ui_methods/hhiiss.py b/example/controller/tests/view/ui_methods/hhiiss.py index 5154f89..843616a 100644 --- a/example/controller/tests/view/ui_methods/hhiiss.py +++ b/example/controller/tests/view/ui_methods/hhiiss.py @@ -6,6 +6,8 @@ class HhiissController(Controller): def get(self): + self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + ts = 1451671445 ms = ts * 1000 dt = self.helper.datetime.convert(timestamp=ts) diff --git a/example/controller/tests/view/ui_methods/mmdd.py b/example/controller/tests/view/ui_methods/mmdd.py index fa47576..f9afccb 100644 --- a/example/controller/tests/view/ui_methods/mmdd.py +++ b/example/controller/tests/view/ui_methods/mmdd.py @@ -6,6 +6,8 @@ class MmddController(Controller): def get(self): + self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + ts = 1451671445 ms = ts * 1000 dt = self.helper.datetime.convert(timestamp=ts) diff --git a/example/controller/tests/view/ui_methods/weekday.py b/example/controller/tests/view/ui_methods/weekday.py index f505de2..f184a2a 100644 --- a/example/controller/tests/view/ui_methods/weekday.py +++ b/example/controller/tests/view/ui_methods/weekday.py @@ -6,6 +6,8 @@ class WeekdayController(Controller): def get(self): + self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + ts = 1451671445 ms = ts * 1000 dt = self.helper.datetime.convert(timestamp=ts) diff --git a/example/controller/tests/view/ui_methods/yyyymmdd.py b/example/controller/tests/view/ui_methods/yyyymmdd.py index 931cd48..1ed1b32 100644 --- a/example/controller/tests/view/ui_methods/yyyymmdd.py +++ b/example/controller/tests/view/ui_methods/yyyymmdd.py @@ -6,6 +6,8 @@ class YyyymmddController(Controller): def get(self): + self.model.tests.helper_test.datetime.switch_timezone('Asia/Seoul') + ts = 1451671445 ms = ts * 1000 dt = self.helper.datetime.convert(timestamp=ts) From 7977461e548be664328ae4c20bc7f20eec4b2a54 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Tue, 7 Nov 2017 21:57:28 +0900 Subject: [PATCH 08/10] update requirements. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5851b48..f983ee0 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ install_requires = [ 'BeautifulSoup4==4.6.0', 'boto3==1.4.7', - 'croniter==0.3.19', + 'croniter==0.3.20', 'CyMySQL==0.9.2', 'httpagentparser==1.8.0', 'lxml==4.1.1', From 71b08672c6996b49998f2dba6899a079dc206938 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Sat, 16 Dec 2017 16:51:36 +0900 Subject: [PATCH 09/10] update requirements. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f983ee0..ee3d3ca 100644 --- a/setup.py +++ b/setup.py @@ -53,10 +53,10 @@ install_requires = [ 'BeautifulSoup4==4.6.0', - 'boto3==1.4.7', + 'boto3==1.5.1', 'croniter==0.3.20', - 'CyMySQL==0.9.2', - 'httpagentparser==1.8.0', + 'CyMySQL==0.9.4', + 'httpagentparser==1.8.1', 'lxml==4.1.1', 'Pillow==4.3.0', 'pycrypto==2.6.1', From 264ca0a22942528a94b7a806af9c5a2a355bc117 Mon Sep 17 00:00:00 2001 From: Parker Park Date: Wed, 3 Jan 2018 20:59:25 +0900 Subject: [PATCH 10/10] update requirements. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ee3d3ca..4a2932d 100644 --- a/setup.py +++ b/setup.py @@ -53,17 +53,17 @@ install_requires = [ 'BeautifulSoup4==4.6.0', - 'boto3==1.5.1', + 'boto3==1.5.8', 'croniter==0.3.20', 'CyMySQL==0.9.4', 'httpagentparser==1.8.1', 'lxml==4.1.1', - 'Pillow==4.3.0', + 'Pillow==5.0.0', 'pycrypto==2.6.1', 'pytz==2017.3', 'redis==2.10.6', 'requests==2.18.4', - 'SQLAlchemy==1.1.15', + 'SQLAlchemy==1.2.0', 'tornado==4.5.2', 'validate_email==1.3', 'validators==0.12.0',