From dee3a3b655a5c4eeb3f401f80b67f0da3cb4263e Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 8 Mar 2013 10:06:03 -0600 Subject: [PATCH 1/3] fixed issue 1358, himBH>jQuery, thanks FeDjango --- VERSION | 2 +- gluon/sqlhtml.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 24287e7a..acad1af6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.2-stable+timestamp.2013.03.06.12.37.02 +Version 2.4.2-stable+timestamp.2013.03.08.10.05.09 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index c4b4a20c..288977fb 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -286,9 +286,9 @@ jQuery.fn.grow_input = function() { function pe(ul, e) { var new_line = ml(ul); rel(ul); - if ($(e.target).parent().is(':visible')) { + if (jQuery(e.target).parent().is(':visible')) { //make sure we didn't delete the element before we insert after - new_line.insertAfter($(e.target).parent()); + new_line.insertAfter(jQuery(e.target).parent()); } else { //the line we clicked on was deleted, just add to end of list new_line.appendTo(ul); @@ -299,7 +299,7 @@ function pe(ul, e) { function rl(ul, e) { if (jQuery(ul).children().length > 1) { //only remove if we have more than 1 item so the list is never empty - $(e.target).parent().remove(); + jQuery(e.target).parent().remove(); } } function ml(ul) { From 5122fbe110779ff417888e45e153d0e7ae44cf30 Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 8 Mar 2013 10:16:48 -0600 Subject: [PATCH 2/3] fixed issue 1366, minor rewrite in retrieve, thanks Dominic --- VERSION | 2 +- gluon/dal.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index acad1af6..a39f4e8f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.2-stable+timestamp.2013.03.08.10.05.09 +Version 2.4.2-stable+timestamp.2013.03.08.10.16.16 diff --git a/gluon/dal.py b/gluon/dal.py index 56e2eb8a..0ee8066e 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -9262,7 +9262,8 @@ class Field(Expression): stream = self.uploadfs.open(name, 'rb') else: # ## if file is on regular filesystem - stream = pjoin(file_properties['path'], name) + fullname = pjoin(file_properties['path'], name) + stream = open(fullname,'rb') return (filename, stream) def retrieve_file_properties(self, name, path=None): From da25c6f843c592923876a24209414879a2f6774f Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 8 Mar 2013 10:19:13 -0600 Subject: [PATCH 3/3] fixed CONTAINS (again) --- VERSION | 2 +- gluon/dal.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index a39f4e8f..3b730039 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.2-stable+timestamp.2013.03.08.10.16.16 +Version 2.4.2-stable+timestamp.2013.03.08.10.18.44 diff --git a/gluon/dal.py b/gluon/dal.py index 0ee8066e..2d084937 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2668,7 +2668,7 @@ class PostgreSQLAdapter(BaseAdapter): elif first.type.startswith('list:'): second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%' op = case_sensitive and self.LIKE or self.ILIKE - return op(first,key) + return op(first,second) # GIS functions @@ -3455,9 +3455,9 @@ class FireBirdAdapter(BaseAdapter): def CONTAINS(self, first, second, case_sensitive=False): if first.type in ('string','text'): - key = str(second).replace('%','%%') + second = str(second).replace('%','%%') elif first.type.startswith('list:'): - key = '|'+str(second).replace('|','||').replace('%','%%')+'|' + second = '|'+str(second).replace('|','||').replace('%','%%')+'|' return self.CONTAINING(first,second) def _drop(self,table,mode):