Skip to content

Commit 99cdb36

Browse files
committed
Root section always stays open.
* Selecting the root section does not change its icon or expand/collapse it.
1 parent ba9c7e5 commit 99cdb36

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

app/views/cms/section_nodes/_section.html.erb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<% # Handles both Root Section and Subsections
22
collapse = section.root? ? "" : "collapse"
33
icon_name = section.root? ? "home" : "folder-close"
4+
data = {
5+
target: "#section#{section.id}",
6+
type: 'section',
7+
:configure_path => section_path(section),
8+
:delete_path => section_path(section)
9+
}
10+
unless section.root?
11+
data[:toggle] = 'collapse'
12+
end
413
%>
514
<li>
6-
<%= content_tag("a", href: "#", class: 'selectable',
7-
data: {toggle: 'collapse',
8-
target: "#section#{section.id}",
9-
type: 'section',
10-
:configure_path => section_path(section),
11-
:delete_path => section_path(section)
12-
}) do %>
15+
<%= content_tag("a", href: "#", class: 'selectable', data: data) do %>
1316
<%= icon(icon_name) %> <%= section.name %>
1417
<span class="span1">
1518
<%= content_tag "i", "", class: access_status(section, @public_sections) %>

todo_ui_Revamp.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@ Tasks:
33
## UI Merge
44

55
* Sections can be hidden (but sitemap doesn't show it)
6-
* Select something else after deleting.
6+
* Select something else after deleting.
77
* Handle non-editable sections (from security)
8-
* Audit sitemap.js.erb for remaining features.
98
* Have something selected at the start (last selected or Root)
109
* Remove (or center) the lock/unlock icon for the root section
1110
* Keep open/closed state of sitemap
12-
* Delete/merge js/cms/sitemap.js.erb
11+
* Audit/Delete/merge js/cms/sitemap.js.erb
1312
* Move/drag/drop sections
14-
* Enable buttons correctly based on selected item
15-
* Selecting the root section should not change its icon or expand/collapse it.
1613
* Paths are not autogenerating when creating products/catalogs.
17-
14+
* No visual indicator of an empty section
1815
##
1916

2017

0 commit comments

Comments
 (0)