Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
erp5
Commits
c27b84a4
Commit
c27b84a4
authored
Feb 12, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Enable coding style for erp5_xhtml_style
/reviewed-on
nexedi/erp5!1048
parents
159daa14
e8674e78
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
37 additions
and
36 deletions
+37
-36
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getCategorizedModuleActionInformationDict.py
...tab/ERP5Site_getCategorizedModuleActionInformationDict.py
+0
-1
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getConfiguredStatusDict.py
...skins/erp5_access_tab/ERP5Site_getConfiguredStatusDict.py
+0
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getExpressSupportHTML.py
...l_skins/erp5_access_tab/ERP5Site_getExpressSupportHTML.py
+0
-3
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm.bin
...lerpages/spellerpages/server-scripts/spellchecker.cfm.bin
+0
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl.bin
...llerpages/spellerpages/server-scripts/spellchecker.pl.bin
+0
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorCPS.py.py
...or/filemanager/browser/zope/connectors/connectorCPS.py.py
+1
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorERP5.py
...itor/filemanager/browser/zope/connectors/connectorERP5.py
+1
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorPlone.py.py
.../filemanager/browser/zope/connectors/connectorPlone.py.py
+1
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/resolveUid.py
...kinTemplateItem/portal_skins/erp5_fckeditor/resolveUid.py
+1
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_checkUserCanViewERP5XHTMLStyleOrRaise.py
...xhtml_style/Base_checkUserCanViewERP5XHTMLStyleOrRaise.py
+1
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doFavorite.py
...lateItem/portal_skins/erp5_xhtml_style/Base_doFavorite.py
+2
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
...lateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
+3
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
...em/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
+3
-3
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.py
...tal_skins/erp5_xhtml_style/Base_redirectToDialogAction.py
+2
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Field_getDescription.py
...tem/portal_skins/erp5_xhtml_style/Field_getDescription.py
+3
-3
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Form_getListbox.py
...lateItem/portal_skins/erp5_xhtml_style/Form_getListbox.py
+2
-3
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/breadcrumbs.py
...TemplateItem/portal_skins/erp5_xhtml_style/breadcrumbs.py
+7
-7
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_coordinates.py
...tem/portal_skins/erp5_xhtml_style/planning_coordinates.py
+0
-7
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_css.py
...emplateItem/portal_skins/erp5_xhtml_style/planning_css.py
+4
-4
product/ERP5/bootstrap/erp5_xhtml_style/bt/skip_coding_style_test
...ERP5/bootstrap/erp5_xhtml_style/bt/skip_coding_style_test
+0
-1
product/ERP5Type/CodingStyle.py
product/ERP5Type/CodingStyle.py
+6
-0
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getCategorizedModuleActionInformationDict.py
View file @
c27b84a4
...
@@ -128,7 +128,6 @@ def getModuleActionInformationDict(**kw):
...
@@ -128,7 +128,6 @@ def getModuleActionInformationDict(**kw):
print_list
.
append
((
translated_title
,
module_print_list
))
print_list
.
append
((
translated_title
,
module_print_list
))
# Add the actions, only if they are not empty.
# Add the actions, only if they are not empty.
action_list_dict
=
{}
for
k
,
v
in
((
'add'
,
add_list
),
(
'search'
,
search_list
),
for
k
,
v
in
((
'add'
,
add_list
),
(
'search'
,
search_list
),
(
'exchange'
,
exchange_list
),
(
'report'
,
report_list
),
(
'exchange'
,
exchange_list
),
(
'report'
,
report_list
),
(
'print'
,
print_list
),
(
'view'
,
view_list
)):
(
'print'
,
print_list
),
(
'view'
,
view_list
)):
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getConfiguredStatusDict.py
View file @
c27b84a4
...
@@ -10,7 +10,6 @@ def getConfiguredStatusDict():
...
@@ -10,7 +10,6 @@ def getConfiguredStatusDict():
express_pref_dict
=
context
.
ERP5Site_getExpressPreferenceDict
()
express_pref_dict
=
context
.
ERP5Site_getExpressPreferenceDict
()
subscription_status
=
express_pref_dict
.
get
(
'subscription_status'
)
subscription_status
=
express_pref_dict
.
get
(
'subscription_status'
)
configuration_status
=
express_pref_dict
.
get
(
'configuration_status'
)
user_id
=
express_pref_dict
.
get
(
'user_id'
)
user_id
=
express_pref_dict
.
get
(
'user_id'
)
SUPPORT_ENABLED
=
'support_enabled'
SUPPORT_ENABLED
=
'support_enabled'
...
@@ -39,7 +38,6 @@ basic_mode, dms_mode, express_mode = getConfiguredStatusDict()
...
@@ -39,7 +38,6 @@ basic_mode, dms_mode, express_mode = getConfiguredStatusDict()
member
=
portal
.
portal_membership
.
getAuthenticatedMember
()
member
=
portal
.
portal_membership
.
getAuthenticatedMember
()
role_list
=
list
(
member
.
getRoles
())
role_list
=
list
(
member
.
getRoles
())
role_list
.
sort
()
role_list
.
sort
()
group_list
=
()
getGroups
=
getattr
(
member
,
'getGroups'
,
None
)
getGroups
=
getattr
(
member
,
'getGroups'
,
None
)
if
role_list
==
[
'Authenticated'
,
'Member'
]
and
not
getGroups
():
if
role_list
==
[
'Authenticated'
,
'Member'
]
and
not
getGroups
():
basic_mode
=
False
basic_mode
=
False
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_getExpressSupportHTML.py
View file @
c27b84a4
language
=
context
.
Localizer
.
get_selected_language
()
SUPPORT_ENABLED
=
'support_enabled'
SUPPORT_ENABLED
=
'support_enabled'
SUPPORT_DISABLED
=
'support_disabled'
SUPPORT_DISABLED
=
'support_disabled'
ADVERTISEMENT_ENABLED
=
'advertisement_enabled'
if
express_mode
==
SUPPORT_ENABLED
:
if
express_mode
==
SUPPORT_ENABLED
:
# For Express users.
# For Express users.
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm.
obj
→
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm.
bin
View file @
c27b84a4
File moved
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl.
obj
→
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl.
bin
View file @
c27b84a4
File moved
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorCPS.py.py
View file @
c27b84a4
# pylint: disable-all
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
Products.FCKeditor.utils
import
fckCreateValidZopeId
from
Products.FCKeditor.utils
import
fckCreateValidZopeId
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorERP5.py
View file @
c27b84a4
# pylint: disable-all
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/editor/filemanager/browser/zope/connectors/connectorPlone.py.py
View file @
c27b84a4
# pylint: disable-all
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
Products.FCKeditor.utils
import
fckCreateValidZopeId
from
Products.FCKeditor.utils
import
fckCreateValidZopeId
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/resolveUid.py
View file @
c27b84a4
# pylint: disable-all
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
Products.PythonScripts.standard
import
html_quote
from
Products.PythonScripts.standard
import
html_quote
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_checkUserCanViewERP5XHTMLStyleOrRaise.py
View file @
c27b84a4
# Override this script to control user access to ERP5 XHTML-style rendering.
# Override this script to control user access to ERP5 XHTML-style rendering.
pass
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doFavorite.py
View file @
c27b84a4
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
View file @
c27b84a4
# pylint: disable=redefined-builtin
# select_language is a builtin because of Localizer add in builtins and pylint uses it as it runs in same process as ERP5.
# https://lab.nexedi.com/nexedi/erp5/blob/52146f5e3abf538c056a1ab2ffd124757c4825d6/product/Localizer/itools/i18n/accept.py#L163
import
re
import
re
try
:
try
:
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
View file @
c27b84a4
...
@@ -29,7 +29,7 @@ def addDialogIfNeeded(url):
...
@@ -29,7 +29,7 @@ def addDialogIfNeeded(url):
# try to get format parameter if exists
# try to get format parameter if exists
parameter_kw
=
{}
parameter_kw
=
{}
format
=
''
target_
format
=
''
if
len
(
action_list
)
>
1
:
if
len
(
action_list
)
>
1
:
parameter_list
=
action
.
split
(
'?'
)[
1
]
parameter_list
=
action
.
split
(
'?'
)[
1
]
parameter_tuple_list
=
[
tuple
(
tuple_parameter
.
split
(
'='
))
for
tuple_parameter
in
parameter_list
.
split
(
'&'
)]
parameter_tuple_list
=
[
tuple
(
tuple_parameter
.
split
(
'='
))
for
tuple_parameter
in
parameter_list
.
split
(
'&'
)]
...
@@ -44,13 +44,13 @@ def addDialogIfNeeded(url):
...
@@ -44,13 +44,13 @@ def addDialogIfNeeded(url):
base_content_type
=
form
.
getProperty
(
'content_type'
)
base_content_type
=
form
.
getProperty
(
'content_type'
)
if
parameter_kw
.
has_key
(
'format'
):
if
parameter_kw
.
has_key
(
'format'
):
# if format is passed in action url: remove it
# if format is passed in action url: remove it
format
=
parameter_kw
.
pop
(
'format'
)
target_
format
=
parameter_kw
.
pop
(
'format'
)
action
=
'%s?%s'
%
(
action_id
,
'&'
.
join
([
'='
.
join
(
tuple_parameter
)
for
tuple_parameter
in
parameter_kw
.
items
()]))
action
=
'%s?%s'
%
(
action_id
,
'&'
.
join
([
'='
.
join
(
tuple_parameter
)
for
tuple_parameter
in
parameter_kw
.
items
()]))
url
=
'%s/Base_viewOOoPrintDialog?dialog_action_url=%s&base_content_type=%s&field_your_format=%s'
%
(
url
=
'%s/Base_viewOOoPrintDialog?dialog_action_url=%s&base_content_type=%s&field_your_format=%s'
%
(
context
.
absolute_url
(),
context
.
absolute_url
(),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)),
url_quote
(
base_content_type
),
url_quote
(
base_content_type
),
url_quote
(
format
))
url_quote
(
target_
format
))
elif
not
(
hasattr
(
form
,
'pt'
)
and
form
.
pt
==
'form_dialog'
):
elif
not
(
hasattr
(
form
,
'pt'
)
and
form
.
pt
==
'form_dialog'
):
url
=
'%s/Base_viewIntermediatePrintDialog?dialog_action_url=%s'
%
(
url
=
'%s/Base_viewIntermediatePrintDialog?dialog_action_url=%s'
%
(
context
.
absolute_url
(),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)))
context
.
absolute_url
(),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)))
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.py
View file @
c27b84a4
# pylint: disable=redefined-builtin
# this script uses format argument
if
'?'
in
dialog_action_url
:
if
'?'
in
dialog_action_url
:
dialog_action_url
=
'%s&form_id=%s'
%
(
dialog_action_url
,
form_id
)
dialog_action_url
=
'%s&form_id=%s'
%
(
dialog_action_url
,
form_id
)
else
:
else
:
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Field_getDescription.py
View file @
c27b84a4
...
@@ -20,9 +20,9 @@ def getFieldDescription(field_id):
...
@@ -20,9 +20,9 @@ def getFieldDescription(field_id):
properties
=
document
.
propertyMap
()
properties
=
document
.
propertyMap
()
except
AttributeError
:
# If context has no propertyMap, give up
except
AttributeError
:
# If context has no propertyMap, give up
properties
=
[]
properties
=
[]
for
prop
erty
in
properties
:
for
prop
in
properties
:
if
split_id
[
1
]
==
prop
erty
[
'id'
]:
if
split_id
[
1
]
==
prop
[
'id'
]:
desc
=
prop
erty
.
get
(
'description'
,
''
)
desc
=
prop
.
get
(
'description'
,
''
)
break
break
return
desc
return
desc
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Form_getListbox.py
View file @
c27b84a4
# Return first listbox in a form that is enabled and not hidden
# Return first listbox in a form that is enabled and not hidden
# Christophe Dumez <christophe@nexedi.com>
# This script should be used to detect a listbox without having to name it "listbox"
# This script should be used to detect a listbox without having to name it "listbox"
form
=
context
form
=
context
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/breadcrumbs.py
View file @
c27b84a4
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_coordinates.py
View file @
c27b84a4
...
@@ -42,13 +42,6 @@ car_width = 6
...
@@ -42,13 +42,6 @@ car_width = 6
depth_width
=
10
depth_width
=
10
# the same over the vertical axis
# the same over the vertical axis
depth_height
=
10
depth_height
=
10
# mid block size in wich we try to insert text
block_width
=
40
# margin between the block and the delimitation (this permits to have
# blocks a bit smaller that lines or columns)
margin
=
5
size_planning_width
=
basic
.
field
.
get_value
(
'size_planning_width'
)
size_planning_width
=
basic
.
field
.
get_value
(
'size_planning_width'
)
size_x_axis_height
=
basic
.
field
.
get_value
(
'size_x_axis_height'
)
size_x_axis_height
=
basic
.
field
.
get_value
(
'size_x_axis_height'
)
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_css.py
View file @
c27b84a4
...
@@ -84,12 +84,12 @@ for area_name in properties_structure.keys():
...
@@ -84,12 +84,12 @@ for area_name in properties_structure.keys():
returned_list
.
append
(
'.%s{'
%
class_name
)
returned_list
.
append
(
'.%s{'
%
class_name
)
else
:
else
:
returned_list
.
append
(
'#%s{'
%
class_name
)
returned_list
.
append
(
'#%s{'
%
class_name
)
for
id
in
css_dict
[
class_name
].
keys
():
for
id
_
in
css_dict
[
class_name
].
keys
():
if
same_type
(
css_dict
[
class_name
][
id
],
''
):
if
same_type
(
css_dict
[
class_name
][
id
_
],
''
):
returned_list
.
append
(
'%s:%s;
\
n
'
%
(
id
,
css_dict
[
class_name
][
id
]))
returned_list
.
append
(
'%s:%s;
\
n
'
%
(
id
_
,
css_dict
[
class_name
][
id_
]))
else
:
else
:
# if data is type float or integer then need to add 'px' at the end
# if data is type float or integer then need to add 'px' at the end
returned_list
.
append
(
'%s:%s%s;
\
n
'
%
(
id
,
int
(
css_dict
[
class_name
][
id
]
+
0.5
),
'px'
))
returned_list
.
append
(
'%s:%s%s;
\
n
'
%
(
id
_
,
int
(
css_dict
[
class_name
][
id_
]
+
0.5
),
'px'
))
returned_list
.
append
(
'}
\
n
'
)
returned_list
.
append
(
'}
\
n
'
)
returned_list
.
append
(
"
\
returned_list
.
append
(
"
\
.planning_box_topleft{ position:absolute;left:0;top:0;}
\
n
\
.planning_box_topleft{ position:absolute;left:0;top:0;}
\
n
\
...
...
product/ERP5/bootstrap/erp5_xhtml_style/bt/skip_coding_style_test
deleted
100644 → 0
View file @
159daa14
1
\ No newline at end of file
product/ERP5Type/CodingStyle.py
View file @
c27b84a4
...
@@ -124,6 +124,12 @@ ignored_skin_id_set = {
...
@@ -124,6 +124,12 @@ ignored_skin_id_set = {
'PortalType_addAction'
,
'PortalType_addAction'
,
'PortalType_deleteAction'
,
'PortalType_deleteAction'
,
'RelationFieldZuite_CommonTemplate'
,
'RelationFieldZuite_CommonTemplate'
,
'Field_getDescription'
,
'ERP5XhtmlStyle_redirect'
,
'connectorCPS.py'
,
'connectorERP5'
,
'connectorPlone.py'
,
'resolveUid'
,
}
}
# Generic method to check consistency of a skin item
# Generic method to check consistency of a skin item
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment