Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
09fa0b01
Commit
09fa0b01
authored
5 years ago
by
aboeckle
Browse files
Options
Downloads
Patches
Plain Diff
OO-4366 Fixed table column selector with mandatory columns and only one
additionally selected column
parent
ffc38208
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java
+8
-3
8 additions, 3 deletions
...m/flexible/impl/elements/table/FlexiTableElementImpl.java
with
8 additions
and
3 deletions
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/table/FlexiTableElementImpl.java
+
8
−
3
View file @
09fa0b01
...
@@ -106,6 +106,7 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
...
@@ -106,6 +106,7 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
private
boolean
numOfRowsEnabled
=
true
;
private
boolean
numOfRowsEnabled
=
true
;
private
boolean
showAllRowsEnabled
=
false
;
private
boolean
showAllRowsEnabled
=
false
;
private
boolean
extendedSearchExpanded
=
false
;
private
boolean
extendedSearchExpanded
=
false
;
private
boolean
hasAlwaysVisibleColumns
=
false
;
private
int
columnLabelForDragAndDrop
;
private
int
columnLabelForDragAndDrop
;
private
String
emptyTableMessageKey
=
null
;
private
String
emptyTableMessageKey
=
null
;
...
@@ -166,6 +167,10 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
...
@@ -166,6 +167,10 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
enabledColumnIndex
.
add
(
Integer
.
valueOf
(
col
.
getColumnIndex
()));
enabledColumnIndex
.
add
(
Integer
.
valueOf
(
col
.
getColumnIndex
()));
}
}
}
}
if
(
enabledColumnIndex
.
size
()
>
0
)
{
hasAlwaysVisibleColumns
=
true
;
}
String
dispatchId
=
component
.
getDispatchID
();
String
dispatchId
=
component
.
getDispatchID
();
customButton
=
new
FormLinkImpl
(
dispatchId
+
"_customButton"
,
"rCustomButton"
,
""
,
Link
.
BUTTON
+
Link
.
NONTRANSLATED
);
customButton
=
new
FormLinkImpl
(
dispatchId
+
"_customButton"
,
"rCustomButton"
,
""
,
Link
.
BUTTON
+
Link
.
NONTRANSLATED
);
...
@@ -1385,12 +1390,12 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
...
@@ -1385,12 +1390,12 @@ public class FlexiTableElementImpl extends FormItemImpl implements FlexiTableEle
}
}
protected
void
setCustomizedColumns
(
UserRequest
ureq
,
Choice
visibleColsChoice
)
{
protected
void
setCustomizedColumns
(
UserRequest
ureq
,
Choice
visibleColsChoice
)
{
List
<
Integer
>
visible
Cols
=
visibleColsChoice
.
getSelectedRows
();
List
<
Integer
>
chosen
Cols
=
visibleColsChoice
.
getSelectedRows
();
if
(
visible
Cols
.
size
()
>
1
)
{
if
(
chosen
Cols
.
size
()
>
1
||
hasAlwaysVisibleColumns
)
{
VisibleFlexiColumnsModel
model
=
(
VisibleFlexiColumnsModel
)
visibleColsChoice
.
getModel
();
VisibleFlexiColumnsModel
model
=
(
VisibleFlexiColumnsModel
)
visibleColsChoice
.
getModel
();
for
(
int
i
=
model
.
getRowCount
();
i
-->
0
;
)
{
for
(
int
i
=
model
.
getRowCount
();
i
-->
0
;
)
{
FlexiColumnModel
col
=
model
.
getObject
(
i
);
FlexiColumnModel
col
=
model
.
getObject
(
i
);
if
(
visible
Cols
.
contains
(
Integer
.
valueOf
(
i
)))
{
if
(
chosen
Cols
.
contains
(
Integer
.
valueOf
(
i
)))
{
enabledColumnIndex
.
add
(
col
.
getColumnIndex
());
enabledColumnIndex
.
add
(
col
.
getColumnIndex
());
}
else
{
}
else
{
enabledColumnIndex
.
remove
(
col
.
getColumnIndex
());
enabledColumnIndex
.
remove
(
col
.
getColumnIndex
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment