Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
cdeaa140
Commit
cdeaa140
authored
May 19, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_dhtml_style: do not indent in listbox cells
parent
cd2918ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/erp5_dhtml_style.js.js
...Item/portal_skins/erp5_dhtml_style/erp5_dhtml_style.js.js
+18
-21
No files found.
bt5/erp5_dhtml_style/SkinTemplateItem/portal_skins/erp5_dhtml_style/erp5_dhtml_style.js.js
View file @
cdeaa140
...
...
@@ -26,29 +26,26 @@ $(function() {
// Make the parallel list field adding more elements automatically.
$
(
'
.input .extensible_parallel_list_field
'
).
change
(
function
(
event
)
{
event
.
preventDefault
();
var
select_element
=
$
(
event
.
target
)
var
add_element
=
true
;
var
to_clone_element
=
select_element
var
parent
=
select_element
.
parent
()
if
(
parent
[
0
].
nodeName
==
'
DIV
'
)
{
to_clone_element
=
parent
parent
=
parent
.
parent
()
var
select_element
=
$
(
event
.
target
)
;
var
to_clone_element
=
select_element
;
var
parent
=
select_element
.
parent
();
var
parent
_is_div
=
parent
[
0
].
nodeName
==
'
DIV
'
;
if
(
parent
_is_div
)
{
to_clone_element
=
parent
;
parent
=
parent
.
parent
()
;
}
var
select_list
=
parent
.
find
(
'
select
'
)
for
(
var
x
=
select_list
.
length
;
x
;)
{
current_select
=
select_list
[
--
x
]
if
(
current_select
.
selectedIndex
==
0
)
{
add_element
=
false
;
}
}
if
(
add_element
)
{
parent
.
append
(
jQuery
(
'
<label> </label>
'
))
var
cloned_element
=
to_clone_element
.
clone
(
true
)
cloned_element
[
0
].
selectedIndex
=
0
cloned_element
.
appendTo
(
parent
)
parent
.
append
(
jQuery
(
'
<p class="clear">
'
))
var
select_list
=
parent
.
find
(
'
select
'
);
for
(
var
i
=
select_list
.
length
;
i
--
;)
{
if
(
!
select_list
[
i
].
selectedIndex
)
return
;
}
var
clear
=
$
(
'
<p class="clear">
'
);
parent
.
append
(
parent_is_div
?
$
(
'
<label> </label>
'
)
:
clear
);
var
cloned_element
=
to_clone_element
.
clone
(
true
);
cloned_element
[
0
].
selectedIndex
=
0
;
cloned_element
.
appendTo
(
parent
);
if
(
parent_is_div
)
parent
.
append
(
clear
);
});
});
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