MINOR Removed hardcoded children entries from CMS Menu (and record setting logic), as the related controllers have been merged to be accessible under the same top-level menu

This commit is contained in:
Ingo Schommer 2012-04-16 17:20:28 +02:00
parent cde9b3183b
commit 6bee103d14
2 changed files with 0 additions and 58 deletions

View File

@ -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 File

@ -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">