Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
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
nexedi
ecommerce-ui
Commits
1ac6c45c
Commit
1ac6c45c
authored
Dec 26, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed display of hidden fields
parent
ecf7d9bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
data/computer_fieldlist.json
data/computer_fieldlist.json
+2
-2
data/computer_new.json
data/computer_new.json
+2
-1
js/erp5_loader.js
js/erp5_loader.js
+11
-4
No files found.
data/computer_fieldlist.json
View file @
1ac6c45c
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
"description"
:
"The reference number for this computer."
,
"description"
:
"The reference number for this computer."
,
"description_i18n"
:
"portal_type_dict.computer_dict.field_list.reference.description"
,
"description_i18n"
:
"portal_type_dict.computer_dict.field_list.reference.description"
,
"alternate_name"
:
"computer_reference"
,
"alternate_name"
:
"computer_reference"
,
"default_value"
:
null
,
"default_value"
:
"COMP-1234"
,
"css_class"
:
null
,
"css_class"
:
null
,
"hidden"
:
false
,
"hidden"
:
false
,
"display_width"
:
30
,
"display_width"
:
30
,
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
},
},
"properties"
:
{
"properties"
:
{
"enabled"
:
true
,
"enabled"
:
true
,
"editable"
:
tru
e
,
"editable"
:
fals
e
,
"external_validator"
:
null
,
"external_validator"
:
null
,
"required"
:
true
,
"required"
:
true
,
"preserve_whitespace"
:
null
,
"preserve_whitespace"
:
null
,
...
...
data/computer_new.json
View file @
1ac6c45c
...
@@ -42,7 +42,8 @@
...
@@ -42,7 +42,8 @@
},
{
},
{
"position"
:
"center"
,
"position"
:
"center"
,
"fieldlist"
:
[
"fieldlist"
:
[
{
"title"
:
"computer_description"
}
{
"title"
:
"computer_description"
},
{
"title"
:
"computer_reference"
,
"overrides"
:
{
"widget"
:{
"hidden"
:
true
}}}
]
]
}
}
]
]
...
...
js/erp5_loader.js
View file @
1ac6c45c
...
@@ -867,6 +867,8 @@
...
@@ -867,6 +867,8 @@
}
}
// construct config
// construct config
// NOTE: type is always set in attributes, because it can be null
// on select/textarea
config
.
type
=
element
;
config
.
type
=
element
;
config
.
direct
=
{
config
.
direct
=
{
"
id
"
:
(
prevail
.
widget
.
id
||
spec
.
widget
.
id
),
"
id
"
:
(
prevail
.
widget
.
id
||
spec
.
widget
.
id
),
...
@@ -3386,7 +3388,7 @@
...
@@ -3386,7 +3388,7 @@
label_inside
,
label_target
,
element_target
,
action
,
clear
,
label_inside
,
label_target
,
element_target
,
action
,
clear
,
theme
,
icon_string
,
input_type
,
need_text_node
,
container_class_list
,
theme
,
icon_string
,
input_type
,
need_text_node
,
container_class_list
,
label_class_list
,
index
,
disabled
,
active
,
text
,
addLabel
,
readonly
,
label_class_list
,
index
,
disabled
,
active
,
text
,
addLabel
,
readonly
,
mask_set
,
mask
,
star
;
mask_set
,
mask
,
star
,
hidden_field
;
if
(
config
.
type
===
"
span
"
)
{
if
(
config
.
type
===
"
span
"
)
{
return
factory
.
element
(
return
factory
.
element
(
...
@@ -3465,13 +3467,18 @@
...
@@ -3465,13 +3467,18 @@
mask_set
=
true
;
mask_set
=
true
;
}
}
// hidden
if
(
config
.
attributes
.
type
===
"
hidden
"
)
{
hidden_field
=
true
;
}
// mask
// mask
if
(
mask_set
)
{
if
(
mask_set
)
{
mask
=
"
ui-mask-input
"
;
mask
=
"
ui-mask-input
"
;
}
}
// fieldcontain wrapper
// fieldcontain wrapper
if
(
wrap
===
false
||
wrap
===
undefined
)
{
if
(
wrap
===
false
||
wrap
===
undefined
||
hidden_field
)
{
wrapper
=
document
.
createDocumentFragment
();
wrapper
=
document
.
createDocumentFragment
();
}
else
{
}
else
{
wrapper
=
factory
.
element
(
wrapper
=
factory
.
element
(
...
@@ -3562,7 +3569,7 @@
...
@@ -3562,7 +3569,7 @@
// container
// container
if
(
config
.
type
===
"
textarea
"
||
if
(
config
.
type
===
"
textarea
"
||
config
.
direct
.
type
===
"
hidden
"
||
hidden_field
||
config
.
logic
.
plain_element
)
{
config
.
logic
.
plain_element
)
{
container
=
wrapper
;
container
=
wrapper
;
}
else
{
}
else
{
...
@@ -3606,7 +3613,7 @@
...
@@ -3606,7 +3613,7 @@
// doing "invalid" handler with javascript
// doing "invalid" handler with javascript
// NOTE: hidden fields & security fields get no label
// NOTE: hidden fields & security fields get no label
if
(
need_text_node
===
undefined
&&
if
(
need_text_node
===
undefined
&&
!
label_inside
&&
!
label_inside
&&
!
hidden_field
&&
config
.
logic
.
plain_element
===
undefined
)
{
config
.
logic
.
plain_element
===
undefined
)
{
label_target
.
appendChild
(
addLabel
(
config
,
label_class_list
));
label_target
.
appendChild
(
addLabel
(
config
,
label_class_list
));
}
}
...
...
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