Permalink
Browse files

ENHANCEMENT Using a simple target=_blank for opening the logo link in…

… CMS instead of javascript

ENHANCEMENT Moved the "edit profile" popup link to concrete

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92605 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent afc285c commit 2ccc3669ebf8c0a8f4c610d58489e647b6eb9d4a @chillu chillu committed Nov 21, 2009
Showing with 14 additions and 25 deletions.
  1. +13 −24 javascript/LeftAndMain.js
  2. +1 −1 templates/Includes/CMSTopMenu.ss
@@ -77,7 +77,7 @@
},
/**
- * Suppress submission unless it is handled through save()
+ * Suppress submission unless it is handled through ajaxSubmit()
*/
onsubmit: function(e) {
return false;
@@ -218,6 +218,17 @@
}
});
+ /**
+ * Link for editing the profile for a logged-in member
+ * through a popup. Required "greybox" javascript library.
+ */
+ $('#EditMemberProfile').concrete({
+ onclick: function(e) {
+ GB_show('Edit Profile', this.attr('href'), 290, 500);
+ return false;
+ }
+ });
+
})(jQuery);
jQuery(document).ready(function() {
@@ -249,30 +260,8 @@ Behaviour.register({
Event.stop(event);
}
},
-
- '#Menu-help' : {
- onclick : function() {
- var w = window.open(this.getElementsByTagName('a')[0].href, 'help');
- w.focus();
- return false;
- }
- },
-
- '#Logo' : {
- onclick : function() {
- var w = window.open(this.getElementsByTagName('a')[0].href);
- w.focus();
- return false;
- }
- },
- '#EditMemberProfile': {
- onclick: function(e) {
- var el = Event.element(e);
- GB_show('Edit Profile', el.attributes.href.value, 290, 500);
- Event.stop(e);
- }
- }
+
});
@@ -1,6 +1,6 @@
<div id="Logo" style="$LogoStyle">
<% if ApplicationLogoText %>
- <a href="$ApplicationLink">$ApplicationLogoText</a><br />
+ <a href="$ApplicationLink" target="_blank">$ApplicationLogoText</a><br />
<% end_if %>
</div>
<ul id="MainMenu">

0 comments on commit 2ccc366

Please sign in to comment.