Skip to content
Browse files

MINOR Removed hardcoded children entries from CMS Menu (and record se…

…tting logic), as the related controllers have been merged to be accessible under the same top-level menu
  • Loading branch information...
1 parent cde9b31 commit 6bee103d1414b4996ba6fe9ded260d3906282f58 @chillu chillu committed
Showing with 0 additions and 58 deletions.
  1. +0 −23 admin/javascript/LeftAndMain.Menu.js
  2. +0 −35 admin/templates/Includes/LeftAndMain_Menu.ss
View
23 admin/javascript/LeftAndMain.Menu.js
@@ -237,28 +237,5 @@
}
});
- $('.cms-menu-list #Menu-CMSPageSettingsController, .cms-menu-list #Menu-CMSPageHistoryController, .cms-menu-list #Menu-CMSPageEditController').entwine({
- setRecordID: function(id) {
- // Only applies to edit forms relating to page elements
- if(!$('.cms-content').is('.CMSMain')) return;
-
- var link = this.find('a:first'), href = link.attr("href").split('/');
- // Assumes that current ID will always be the last URL segment (and not a query parameter)
- href[href.length -1] = id;
- link.attr('href', href.join('/'));
- }
- });
-
- $('.cms-menu-list #Menu-CMSPageAddController').entwine({
- setRecordID: function(id) {
- // Only applies to edit forms relating to page elements
- if(!$('.cms-content').is('.CMSMain')) return;
-
- var link = this.find('a:first'), href = link.attr('href');
- if(!href.match(/\?/)) href += '?';
- link.attr('href', href.replace(/\?.*$/, '?ParentID=' + id));
- }
- });
-
});
}(jQuery));
View
35 admin/templates/Includes/LeftAndMain_Menu.ss
@@ -29,41 +29,6 @@
<span class="text">$Title</span>
</a>
- <% if Code == 'CMSMain' %>
- <ul>
- <li class="first <% if Top.class == 'CMSPageEditController' || Top.class == 'CMSMain' %>current<% end_if %>" id="Menu-CMSPageEditController">
- <a href="admin/page/edit/show/$Top.CurrentPageID">
- <span class="text">Content</span>
- </a>
- </li>
- <li <% if Top.class == 'CMSPageSettingsController' %>class="current"<% end_if %> id="Menu-CMSPageSettingsController">
- <a href="admin/page/settings/show/$Top.CurrentPageID">
- <span class="text">Settings</span>
- </a>
- </li>
- <li <% if Top.class == 'CMSPageHistoryController' %>class="current"<% end_if %> id="Menu-CMSPageHistoryController">
- <a href="admin/page/history/show/$Top.CurrentPageID">
- <span class="text">History</span>
- </a>
- </li>
- </ul>
- <% end_if %>
-
- <% if Code == 'CMSPagesController' %>
- <ul>
- <li class="first <% if Top.class == 'CMSPagesController' %>current<% end_if %>" id="Menu-CMSPagesController">
- <a href="admin/pages/">
- <span class="text">Edit &amp; organize</span>
- </a>
- </li>
- <li class="last <% if Top.class == 'CMSPageAddController' %>current<% end_if %>" id="Menu-CMSPageAddController">
- <a href="admin/page/add/?ParentID=$Top.CurrentPageID">
- <span class="text">Add page</span>
- </a>
- </li>
- </ul>
- <% end_if %>
-
<% if Code == 'AssetAdmin' %>
<ul>
<li class="first <% if Top.class == 'AssetAdmin' %>current<% end_if %>" id="Menu-AssetAdmin">

0 comments on commit 6bee103

Please sign in to comment.
Something went wrong with that request. Please try again.