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
This commit is contained in:
Ingo Schommer 2009-11-21 02:36:15 +00:00
parent afc285cb12
commit 2ccc3669eb
2 changed files with 14 additions and 25 deletions

View File

@ -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);
}
}
});

View File

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