From 2ccc3669ebf8c0a8f4c610d58489e647b6eb9d4a Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:36:15 +0000 Subject: [PATCH] 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 --- javascript/LeftAndMain.js | 37 +++++++++++--------------------- templates/Includes/CMSTopMenu.ss | 2 +- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index 8b811d5a..b7f76822 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -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); - } - } + }); diff --git a/templates/Includes/CMSTopMenu.ss b/templates/Includes/CMSTopMenu.ss index 3a7e8e14..35fbd5c1 100644 --- a/templates/Includes/CMSTopMenu.ss +++ b/templates/Includes/CMSTopMenu.ss @@ -1,6 +1,6 @@