File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,17 @@ def checked_item_id(hash = params)
10
10
# Common routine to find checked items on a page (checkbox ids are
11
11
# "check_xxx" where xxx is the item id or index)
12
12
def find_checked_items ( prefix = nil )
13
- # If id is present use id, example on summary pages
14
- if params [ :id ] . present?
13
+ nested_list_item_string = ""
14
+ # Check if nested list items are tagged.
15
+ if params [ "miq_grid_checks" ] . present?
16
+ nested_list_item = params [ "miq_grid_checks" ] . split ( "," ) [ 0 ]
17
+
18
+ # Create param string
19
+ nested_list_item_string = "select-row-#{ nested_list_item } "
20
+ end
21
+
22
+ # If id is present use id, unless when nested list exists, example on summary pages
23
+ if params [ :id ] . present? && params [ nested_list_item_string ] != "on"
15
24
[ params [ :id ] ]
16
25
elsif params [ :miq_grid_checks ] . present?
17
26
params [ :miq_grid_checks ] . split ( "," ) . collect ( &:to_i )
You can’t perform that action at this time.
0 commit comments