--- ECHO_content/ECHO_collection.py 2007/04/20 14:46:26 1.287 +++ ECHO_content/ECHO_collection.py 2007/07/19 11:02:28 1.289 @@ -1999,7 +1999,7 @@ class ECHO_link(ECHO_externalLink): params['backLink']=self.aq_parent.absolute_url() params['startLink']=splitted[0]+"?"+urllib.urlencode(params) - + return self.REQUEST.RESPONSE.redirect(splitted[0]+"?"+urllib.urlencode(params)) else: return "" @@ -2164,16 +2164,16 @@ class ECHO_collection(CatalogAware, Fold if obj.meta_type=="ECHO_mapText": if splitted[1]=="en": - obj.locale_en.pt_edit(REQUEST.form[key],None) + obj.locale_en.pt_edit(REQUEST.form[key],obj.locale_en.content_type) else: - obj.pt_edit(REQUEST.form[key],None) + obj.pt_edit(REQUEST.form[key],obj.content_type) else: text=obj.ZopeFind(obj,obj_metatypes=['ECHO_mapText']) if splitted[1]=="en": - text[0][1].locale_en.pt_edit(REQUEST.form[key],None) + text[0][1].locale_en.pt_edit(REQUEST.form[key],text[0][1].locale_en.content_type) else: - text[0][1].pt_edit(REQUEST.form[key],None) + text[0][1].pt_edit(REQUEST.form[key],text[0][1].content_type) if RESPONSE is not None: RESPONSE.redirect('manage_main') @@ -2630,9 +2630,9 @@ class ECHO_collection(CatalogAware, Fold ret="""""" return ret+""+getCollection(self,pwstr=pwstr)+"" - def createAllJSAreas(self): + def createAllJSAreas(self,mapColTypes=None): """create area calls for JavaScript""" - areas = self.getAllMapAreas() + areas = self.getAllMapAreas(mapColTypes=mapColTypes) return self.createJSAreas(areas) @@ -2857,9 +2857,11 @@ class ECHO_collection(CatalogAware, Fold """javascript""" return sendFile(self, 'js/hl_add.js', 'text/plain') - def getAllMapAreas(self,mapColTypes=['ECHO_collection','ECHO_resource','ECHO_link','ECHO_externalLink']): + def getAllMapAreas(self,mapColTypes=None): """Give list of coordinates""" - + if mapColTypes is None: + mapColTypes=['ECHO_collection','ECHO_resource','ECHO_link','ECHO_externalLink'] + areas=[] for entry in self.getSubCols(subColTypes=mapColTypes): object=entry