Commit d276478a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix typo and make cosmetic changes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18238 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a2e7b4e4
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
# Jonathan Loriette <john@nexedi.com> # Jonathan Loriette <john@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs # consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial # End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software # guarantees and support are strongly adviced to contract a Free Software
# Service Company # Service Company
# #
# This program is Free Software; you can redistribute it and/or # This program is Free Software; you can redistribute it and/or
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
# this method should return a list of all the objects' urls that does not # this method should return a list of all the objects' urls that does not
# fit the constraints. # fit the constraints.
# Class monitoring access security control # Class monitoring access security control
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from Globals import InitializeClass from Globals import InitializeClass
...@@ -250,7 +248,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator): ...@@ -250,7 +248,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator):
if final_block['activity_origin'].name not in warning_activity_list: if final_block['activity_origin'].name not in warning_activity_list:
warning_activity_list.append(final_block['activity_origin'].name) warning_activity_list.append(final_block['activity_origin'].name)
block_moved['secondary_axis_start'] = secondary_axis_positions[0] block_moved['secondary_axis_start'] = secondary_axis_positions[0]
block_moved['secondary_axis_stop'] = secondary_axis_positions[1] block_moved['secondary_axis_stop'] = secondary_axis_positions[1]
...@@ -263,7 +260,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator): ...@@ -263,7 +260,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator):
except KeyError: except KeyError:
activity_dict[final_block['activity_origin'].name] = [final_block] activity_dict[final_block['activity_origin'].name] = [final_block]
# getting object_dict to update object properties once activities are up to # getting object_dict to update object properties once activities are up to
# date. Activities values will be updated directly on the # date. Activities values will be updated directly on the
object_dict = self.getObjectDict(basic=basic, planning=planning) object_dict = self.getObjectDict(basic=basic, planning=planning)
...@@ -413,7 +409,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator): ...@@ -413,7 +409,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator):
if block.name == block_name: if block.name == block_name:
return block return block
def getDestinationGroup(self, basic, planning, block_moved, axis_groups, def getDestinationGroup(self, basic, planning, block_moved, axis_groups,
group_position, group_length): group_position, group_length):
""" """
...@@ -440,7 +435,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator): ...@@ -440,7 +435,6 @@ class PlanningBoxValidator(Validator.StringBaseValidator):
return group return group
return None return None
def getDestinationBounds(self, basic, planning, block_moved, block_object, def getDestinationBounds(self, basic, planning, block_moved, block_object,
planning_coordinates, axis_length, planning_coordinates, axis_length,
destination_group=None): destination_group=None):
...@@ -745,7 +739,6 @@ class PlanningBoxWidget(Widget.Widget): ...@@ -745,7 +739,6 @@ class PlanningBoxWidget(Widget.Widget):
default=10, default=10,
required=1) required=1)
y_axis_position = fields.CheckBoxField('y_axis_position', y_axis_position = fields.CheckBoxField('y_axis_position',
title='Force Y axis to the right intead of left', title='Force Y axis to the right intead of left',
description='position of Y axis over the planning content.' \ description='position of Y axis over the planning content.' \
...@@ -761,7 +754,6 @@ class PlanningBoxWidget(Widget.Widget): ...@@ -761,7 +754,6 @@ class PlanningBoxWidget(Widget.Widget):
default=0, default=0,
required=1) required=1)
default = fields.TextAreaField('default', default = fields.TextAreaField('default',
title='Default', title='Default',
description="Default value of the text in the widget.", description="Default value of the text in the widget.",
...@@ -769,7 +761,6 @@ class PlanningBoxWidget(Widget.Widget): ...@@ -769,7 +761,6 @@ class PlanningBoxWidget(Widget.Widget):
width=20, height=3, width=20, height=3,
required=0) required=0)
delimiter = fields.IntegerField('delimiter', delimiter = fields.IntegerField('delimiter',
title='min number of delimiters over the secondary axis', title='min number of delimiters over the secondary axis',
description="min number of delimitations over the sec axis, required", description="min number of delimitations over the sec axis, required",
...@@ -812,7 +803,6 @@ class PlanningBoxWidget(Widget.Widget): ...@@ -812,7 +803,6 @@ class PlanningBoxWidget(Widget.Widget):
default='', default='',
required=0) required=0)
title_line = fields.StringField('title_line', title_line = fields.StringField('title_line',
title="Specific method which fetches the title of each line", title="Specific method which fetches the title of each line",
description="Method for inserting title in line", description="Method for inserting title in line",
...@@ -870,7 +860,6 @@ class PlanningBoxWidget(Widget.Widget): ...@@ -870,7 +860,6 @@ class PlanningBoxWidget(Widget.Widget):
default='', default='',
required=0) required=0)
sec_axis_script = fields.StringField('sec_axis_script', sec_axis_script = fields.StringField('sec_axis_script',
title='Name of script building secondary axis (ex. ' \ title='Name of script building secondary axis (ex. ' \
'Planning_generateAxis)', 'Planning_generateAxis)',
...@@ -1406,7 +1395,6 @@ class BasicStructure: ...@@ -1406,7 +1395,6 @@ class BasicStructure:
self.report_groups += [(object_tree_line,object_list,info_dict)] self.report_groups += [(object_tree_line,object_list,info_dict)]
self.nbr_groups += 1 self.nbr_groups += 1
# reset to original value # reset to original value
self.selection.edit(report = None) self.selection.edit(report = None)
#self.selection.edit(report_list=None) # comment to save report_list status #self.selection.edit(report_list=None) # comment to save report_list status
...@@ -1422,7 +1410,6 @@ class BasicStructure: ...@@ -1422,7 +1410,6 @@ class BasicStructure:
unfolded_list.append(report_line.getObject().getRelativeUrl()) unfolded_list.append(report_line.getObject().getRelativeUrl())
self.selection.edit(report_list=unfolded_list) self.selection.edit(report_list=unfolded_list)
############## CHECKING CONSTRAINTS ############## ############## CHECKING CONSTRAINTS ##############
# XXX Constraints checking should be called here # XXX Constraints checking should be called here
# and results saved in a list (list of url corresponding to objects not # and results saved in a list (list of url corresponding to objects not
...@@ -1548,7 +1535,6 @@ class BasicStructure: ...@@ -1548,7 +1535,6 @@ class BasicStructure:
self.calendar_range = calendar_range self.calendar_range = calendar_range
return secondary_axis_occurence return secondary_axis_occurence
def getSecondaryAxisInfo(self): def getSecondaryAxisInfo(self):
""" """
secondary_axis_ocurence holds couples of data (begin,end) related to secondary_axis_ocurence holds couples of data (begin,end) related to
...@@ -1649,7 +1635,6 @@ class BasicStructure: ...@@ -1649,7 +1635,6 @@ class BasicStructure:
# everything is OK, returning 'true' flag # everything is OK, returning 'true' flag
return axis_dict return axis_dict
def getMainAxisInfo(self, report_tree_list): def getMainAxisInfo(self, report_tree_list):
""" """
Getting main axis properties (total pages, current page, groups per page) Getting main axis properties (total pages, current page, groups per page)
...@@ -1713,7 +1698,6 @@ class BasicStructure: ...@@ -1713,7 +1698,6 @@ class BasicStructure:
return main_axis_dict return main_axis_dict
def buildGroupStructure(self): def buildGroupStructure(self):
""" """
This procedure builds BasicGroup instances corresponding to the This procedure builds BasicGroup instances corresponding to the
...@@ -1777,7 +1761,6 @@ class BasicStructure: ...@@ -1777,7 +1761,6 @@ class BasicStructure:
return 1 return 1
class BasicGroup: class BasicGroup:
""" """
A BasicGroup holds informations about an ERP5Object and is stored A BasicGroup holds informations about an ERP5Object and is stored
...@@ -2105,7 +2088,6 @@ class BasicActivity: ...@@ -2105,7 +2088,6 @@ class BasicActivity:
self.error = error self.error = error
self.property_dict = property_dict # dict containing specific properties self.property_dict = property_dict # dict containing specific properties
class PlanningStructure: class PlanningStructure:
""" """
class aimed to generate the Planning final structure, including : class aimed to generate the Planning final structure, including :
...@@ -2120,7 +2102,6 @@ class PlanningStructure: ...@@ -2120,7 +2102,6 @@ class PlanningStructure:
self.content = [] self.content = []
self.content_delimiters = None self.content_delimiters = None
def build(self, basic_structure=None, field=None, REQUEST=None): def build(self, basic_structure=None, field=None, REQUEST=None):
""" """
main procedure for building Planning Structure main procedure for building Planning Structure
...@@ -2248,7 +2229,6 @@ class PlanningStructure: ...@@ -2248,7 +2229,6 @@ class PlanningStructure:
return axis_group_list return axis_group_list
def completeAxis(self): def completeAxis(self):
""" """
complete axis informations (and more precisely axis position objects) thanks complete axis informations (and more precisely axis position objects) thanks
...@@ -2405,7 +2385,6 @@ class PlanningStructure: ...@@ -2405,7 +2385,6 @@ class PlanningStructure:
return 1 return 1
return axis_element_already_present return axis_element_already_present
def buildBlocs(self, basic_structure=None, REQUEST=None): def buildBlocs(self, basic_structure=None, REQUEST=None):
""" """
iterate the whole planning structure to get various activities and build iterate the whole planning structure to get various activities and build
...@@ -2448,7 +2427,6 @@ class PlanningStructure: ...@@ -2448,7 +2427,6 @@ class PlanningStructure:
# no problem during process, returning 'true' flag # no problem during process, returning 'true' flag
return 1 return 1
class Activity: class Activity:
""" """
Class representing a task in the Planning, for example an appointment or Class representing a task in the Planning, for example an appointment or
...@@ -2490,13 +2468,11 @@ class Activity: ...@@ -2490,13 +2468,11 @@ class Activity:
self.calendar_view = calendar_view self.calendar_view = calendar_view
self.property_dict = property_dict self.property_dict = property_dict
# XXX Still used ? # XXX Still used ?
def get_error_message(self, Error): def get_error_message(self, Error):
# need to update the error message # need to update the error message
return 'task %s (%s)not validated' % (self.name, self.title) return 'task %s (%s)not validated' % (self.name, self.title)
def isValidPosition(self, bound_begin, bound_end): def isValidPosition(self, bound_begin, bound_end):
""" """
can check if actual activity can fit within the bounds, returns : can check if actual activity can fit within the bounds, returns :
...@@ -2691,8 +2667,6 @@ class Activity: ...@@ -2691,8 +2667,6 @@ class Activity:
# # return new list # # return new list
# return returned_list # return returned_list
class Bloc: class Bloc:
""" """
structure that will be rendered as a bloc, a task element. structure that will be rendered as a bloc, a task element.
...@@ -2806,7 +2780,6 @@ class Position: ...@@ -2806,7 +2780,6 @@ class Position:
self.relative_end = relative_end self.relative_end = relative_end
self.relative_range = relative_range self.relative_range = relative_range
class Axis: class Axis:
""" """
Structure holding informations about a specified axis. Can be X or Y axis. Structure holding informations about a specified axis. Can be X or Y axis.
...@@ -2836,7 +2809,6 @@ class Axis: ...@@ -2836,7 +2809,6 @@ class Axis:
# dict containing all class properties with their values # dict containing all class properties with their values
self.render_dict=None self.render_dict=None
class AxisGroup: class AxisGroup:
""" """
Class representing an item, that can have the following properties : Class representing an item, that can have the following properties :
...@@ -2899,7 +2871,6 @@ class AxisGroup: ...@@ -2899,7 +2871,6 @@ class AxisGroup:
self.secondary_axis_range = secondary_axis_range self.secondary_axis_range = secondary_axis_range
self.property_dict = property_dict self.property_dict = property_dict
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declarePublic('setTitle') security.declarePublic('setTitle')
...@@ -2931,7 +2902,6 @@ class AxisGroup: ...@@ -2931,7 +2902,6 @@ class AxisGroup:
self.tooltip = info_title.info self.tooltip = info_title.info
def addActivity(self, activity=None, axis_element_already_insered=0, def addActivity(self, activity=None, axis_element_already_insered=0,
basic_structure=None): basic_structure=None):
""" """
...@@ -3021,7 +2991,6 @@ class AxisGroup: ...@@ -3021,7 +2991,6 @@ class AxisGroup:
self.axis_element_list = [] self.axis_element_list = []
self.axis_element_list.append(new_axis_element) self.axis_element_list.append(new_axis_element)
def addStatActivities(self, basic_activity_list=None, axis_group_number=0, def addStatActivities(self, basic_activity_list=None, axis_group_number=0,
axis_element_already_present= 0, calendar_view=0, axis_element_already_present= 0, calendar_view=0,
primary_axis_block=None, property_dict={}): primary_axis_block=None, property_dict={}):
...@@ -3074,7 +3043,6 @@ class AxisGroup: ...@@ -3074,7 +3043,6 @@ class AxisGroup:
activity_number +=1 activity_number +=1
def updateStatBlocks(self): def updateStatBlocks(self):
""" """
called once the blocks have been defined on all activities called once the blocks have been defined on all activities
...@@ -3133,7 +3101,6 @@ class AxisElement: ...@@ -3133,7 +3101,6 @@ class AxisElement:
self.render_dict=None self.render_dict=None
self.parent_axis_group = parent_axis_group self.parent_axis_group = parent_axis_group
class Info: class Info:
""" """
Class holding all informations to display an info text div inside of a block Class holding all informations to display an info text div inside of a block
...@@ -3155,7 +3122,6 @@ class Info: ...@@ -3155,7 +3122,6 @@ class Info:
# declaring validator instance # declaring validator instance
PlanningBoxValidatorInstance = PlanningBoxValidator() PlanningBoxValidatorInstance = PlanningBoxValidator()
class PlanningBox(ZMIField): class PlanningBox(ZMIField):
meta_type = "PlanningBox" meta_type = "PlanningBox"
widget = PlanningBoxWidgetInstance widget = PlanningBoxWidgetInstance
......
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