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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
33bfadcb
Commit
33bfadcb
authored
Nov 28, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifie test files and gadgetfield js with the new formulator GadgetField
Use field key instead of field id
parent
6c04613d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
216 deletions
+46
-216
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.xml
...eItem/portal_tests/gadget_field_zuite/testNotEditable.xml
+4
-4
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
...sts/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
+38
-5
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Bar_viewGadgetField.xml
...ateItem/portal_skins/erp5_ui_test/Bar_viewGadgetField.xml
+0
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Bar_viewGadgetField/my_format.xml
...rtal_skins/erp5_ui_test/Bar_viewGadgetField/my_format.xml
+0
-202
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
...tem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
+3
-3
product/ERP5Form/GadgetField.py
product/ERP5Form/GadgetField.py
+1
-1
No files found.
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testNotEditable.xml
View file @
33bfadcb
...
...
@@ -94,7 +94,7 @@
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'
field_my_language
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
@@ -102,7 +102,7 @@
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'
field_my_language
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
...
...
@@ -122,14 +122,14 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'
field_my_language
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'
field_my_language
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/PathTemplateItem/portal_tests/gadget_field_zuite/testSaveAndNotEditableInIFrame.xml
View file @
33bfadcb
...
...
@@ -84,12 +84,27 @@
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/bar_module/0/Bar_viewGadgetField
</td>
\n
<td>
${base_url}/bar_module/0/Bar_viewGadgetField
/my_language/manage_main
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'field_js_sandbox\']
</td>
\n
<td>
iframe
</td>
\n
</tr>
\n
\n
<tr>
\n
<td>
clickAndWait
</td>
\n
<td>
//input[@type=\'submit\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/bar_module/0/Bar_viewGadgetField
</td>
\n
<td></td>
\n
</tr>
\n
<!-- Initialize -->
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
...
...
@@ -99,7 +114,7 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'
field_my_format
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
@@ -111,7 +126,7 @@
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@title=\'
field_my_format
\']
</td>
\n
<td>
//input[@title=\'
null
\']
</td>
\n
<td>
couscous
</td>
\n
</tr>
\n
\n
...
...
@@ -136,7 +151,7 @@
\n
<tr>
\n
<td>
waitForElementPresent
</td>
\n
<td>
//input[@title=\'
field_my_format\']
</td>
\n
<td>
//input[@title=\'
null\']/
</td>
\n
<td></td>
\n
</tr>
\n
<tr>
\n
...
...
@@ -147,7 +162,25 @@
\n
<tr>
\n
<td>
verifyValue
</td>
\n
<td>
//input[@title=\'field_my_format\']
</td>
\n
<td>
//input[@title=\'null\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
open
</td>
\n
<td>
${base_url}/bar_module/0/Bar_viewGadgetField/my_language/manage_main
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
type
</td>
\n
<td>
//input[@name=\'field_js_sandbox\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
<tr>
\n
<td>
clickAndWait
</td>
\n
<td>
//input[@type=\'submit\']
</td>
\n
<td></td>
\n
</tr>
\n
\n
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Bar_viewGadgetField.xml
View file @
33bfadcb
...
...
@@ -61,7 +61,6 @@
<value>
<list>
<string>
my_right
</string>
<string>
my_format
</string>
</list>
</value>
</item>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Bar_viewGadgetField/my_format.xml
deleted
100644 → 0
View file @
6c04613d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"GadgetField"
module=
"Products.ERP5Form.GadgetField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_format
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string>
iframe
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Format
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: field.restrictedTraverse(\'gadget_stringfield.html\').absolute_url()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
View file @
33bfadcb
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts170
00485.95
</string>
</value>
<value>
<string>
ts170
97929.83
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
@@ -100,8 +100,8 @@
tmp = {};\n
list.push(g.getDeclaredGadget(scope));\n
tmp.sandbox = list_gadget[i].getAttribute("data-gadget-sandbox");\n
tmp.key = scope;\n
tmp.editable = list_gadget[i].getAttribute("data-gadget-editable");\n
tmp.key = tmp.editable;\n
tmp.value = list_gadget[i].getAttribute("data-gadget-value");\n
gadget_attributes.push(tmp);\n
}\n
...
...
@@ -216,7 +216,7 @@
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
62
57
</int>
</value>
<value>
<int>
62
64
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
product/ERP5Form/GadgetField.py
View file @
33bfadcb
...
...
@@ -30,7 +30,7 @@ class GadgetWidget(Widget.TextWidget):
def
render_view
(
self
,
field
,
value
,
REQUEST
=
None
,
render_prefix
=
None
,
key
=
None
):
kw
=
{}
kw
[
'data-gadget-url'
]
=
field
.
get_value
(
'gadget_url'
)
kw
[
'data-gadget-scope'
]
=
'field_'
+
field
.
id
kw
[
'data-gadget-scope'
]
=
field
.
id
if
key
is
not
None
:
kw
[
'data-gadget-editable'
]
=
key
kw
[
'class'
]
=
"gadget"
...
...
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