Commit ef1faebb authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove needless imports and make cosmetic cleanup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17882 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b5dbb663
...@@ -38,12 +38,11 @@ from SelectionTool import createFolderMixInPageSelectionMethod ...@@ -38,12 +38,11 @@ from SelectionTool import createFolderMixInPageSelectionMethod
from Products.ERP5Type.Utils import getPath from Products.ERP5Type.Utils import getPath
from Products.ERP5Type.Document import newTempBase from Products.ERP5Type.Document import newTempBase
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import _checkPermission
from Products.ZSQLCatalog.zsqlbrain import ZSQLBrain from Products.ZSQLCatalog.zsqlbrain import ZSQLBrain
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
from Acquisition import aq_base, aq_self from Acquisition import aq_base, aq_self
from zLOG import LOG, WARNING from zLOG import LOG, WARNING, INFO
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from Globals import InitializeClass, Acquisition, get_request from Globals import InitializeClass, Acquisition, get_request
...@@ -52,7 +51,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile ...@@ -52,7 +51,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile
import md5 import md5
import cgi import cgi
import types from traceback import extract_stack
# For compatibility with Python 2.3. # For compatibility with Python 2.3.
try: try:
...@@ -60,7 +59,6 @@ try: ...@@ -60,7 +59,6 @@ try:
except NameError: except NameError:
from sets import Set as set from sets import Set as set
class ObjectValuesWrapper: class ObjectValuesWrapper:
"""This class wraps objectValues so that objectValues behaves like portal_catalog. """This class wraps objectValues so that objectValues behaves like portal_catalog.
""" """
...@@ -1771,7 +1769,6 @@ class ListBoxRendererLine: ...@@ -1771,7 +1769,6 @@ class ListBoxRendererLine:
return context.getTitleOrId() or '' return context.getTitleOrId() or ''
return '' return ''
def getDepth(self): def getDepth(self):
"""Return the depth of a domain. Used only for a summary line. """Return the depth of a domain. Used only for a summary line.
""" """
...@@ -2846,7 +2843,6 @@ class ListBoxValidator(Validator.Validator): ...@@ -2846,7 +2843,6 @@ class ListBoxValidator(Validator.Validator):
portal_url = getToolByName(here, 'portal_url') portal_url = getToolByName(here, 'portal_url')
portal = portal_url.getPortalObject() portal = portal_url.getPortalObject()
result = {} result = {}
error_result = {} error_result = {}
MARKER = [] MARKER = []
...@@ -3052,7 +3048,6 @@ class ListBox(ZMIField): ...@@ -3052,7 +3048,6 @@ class ListBox(ZMIField):
name = list_method name = list_method
return name or None return name or None
class ListBoxLine: class ListBoxLine:
meta_type = "ListBoxLine" meta_type = "ListBoxLine"
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -3240,7 +3235,6 @@ class ListBoxLine: ...@@ -3240,7 +3235,6 @@ class ListBoxLine:
""" """
self.is_section_folded = is_section_folded self.is_section_folded = is_section_folded
security.declarePublic('isSectionFolded') security.declarePublic('isSectionFolded')
def isSectionFolded(self): def isSectionFolded(self):
""" """
...@@ -3278,7 +3272,6 @@ class ListBoxLine: ...@@ -3278,7 +3272,6 @@ class ListBoxLine:
else: else:
config_column = [self.config_dict[column_id] for column_id in self.config_display_list] config_column = [self.config_dict[column_id] for column_id in self.config_display_list]
return config_column + [self.column_dict[column_id] for column_id in column_id_list] return config_column + [self.column_dict[column_id] for column_id in column_id_list]
security.declarePublic('getColumnItemList') security.declarePublic('getColumnItemList')
......
...@@ -30,29 +30,19 @@ ...@@ -30,29 +30,19 @@
ERP5 portal_selection tool. ERP5 portal_selection tool.
""" """
from OFS.Traversable import NotFound
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
from Products.CMFCore.utils import UniqueObject from Products.CMFCore.utils import UniqueObject
from Globals import InitializeClass, DTMLFile, PersistentMapping, get_request from Globals import InitializeClass, DTMLFile, PersistentMapping, get_request
from ZTUtils import make_query
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions as ERP5Permissions from Products.ERP5Type import Permissions as ERP5Permissions
from Products.ERP5Form import _dtmldir from Products.ERP5Form import _dtmldir
from Selection import Selection, DomainSelection from Selection import Selection, DomainSelection
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
from email.MIMEBase import MIMEBase
from email import Encoders
from copy import copy
from DateTime import DateTime
import md5 import md5
import pickle
import hmac
import random
import re
import string import string
from zLOG import LOG, WARNING, INFO from zLOG import LOG, INFO
from Acquisition import Implicit, aq_base from Acquisition import aq_base
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
import warnings import warnings
...@@ -726,7 +716,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -726,7 +716,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
params = selection.getParams() params = selection.getParams()
zoom_start = request.form.get('zoom_start',0) zoom_start = request.form.get('zoom_start',0)
params['zoom_start'] = zoom_start params['zoom_start'] = zoom_start
selection.edit(params= params) selection.edit(params=params)
if REQUEST is not None: if REQUEST is not None:
return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id, return self._redirectToOriginalForm(REQUEST=REQUEST, form_id=form_id,
query_string=query_string) query_string=query_string)
...@@ -963,7 +953,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -963,7 +953,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
# It is better to reset the query when changing the display mode. # It is better to reset the query when changing the display mode.
params = selection.getParams() params = selection.getParams()
if 'where_expression' in params: del params['where_expression'] if 'where_expression' in params: del params['where_expression']
selection.edit(params = params) selection.edit(params=params)
if redirect: if redirect:
return self._redirectToOriginalForm(REQUEST=request, form_id=form_id, return self._redirectToOriginalForm(REQUEST=request, form_id=form_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment