From 007c44cb9f4f9233a886e60a89ebc088362e826a Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sat, 23 Jun 2007 08:07:31 +0000 Subject: [PATCH] #689: Fix the profile edition link when the profile is shown on Xnet ChangeLog | 3 ++- htdocs/javascript/xorg.js | 8 ++++---- templates/profile/profile.tpl | 8 ++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1863 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 3 ++- htdocs/javascript/xorg.js | 8 ++++---- templates/profile/profile.tpl | 8 ++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3944afd..6c93e97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,8 +13,9 @@ Bug/Wish: - #678: PlUpload filename detection -FRU * Profile: - - #663: Link to Xnet's map from the "My groups" page -FRU - Fix GoogleMaps links -FRU + - #663: Link to Xnet's map from the "My groups" page -FRU + - #689: Edit my profile from Xnet -FRU From 0.9.14 branch: diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 0ce3169..aa4b114 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -173,11 +173,11 @@ function auto_links() { "$1?display=light&$2$3"); } if(node.className == 'popup2') { - node.onclick = function () { popWin(this,840,600); return false; }; + node.onclick = function () { popWin(this,840,600); return false; }; } - if(node.className == 'popup3') { - node.onclick = function () { popWin(this, 640, 800); return false; }; - } + if(node.className == 'popup3') { + node.onclick = function () { popWin(this, 640, 800); return false; }; + } if(matches = (/^popup_([0-9]*)x([0-9]*)$/).exec(node.className)) { var w = matches[1], h = matches[2]; node.onclick = function () { popWin(this,w,h); return false; }; diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 6f049b1..a4a0520 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -26,8 +26,12 @@ function chgMainWinLoc(strPage) { strPage = platal_baseurl + strPage; if (parent.opener) { - parent.opener.document.location = strPage; - window.close(); + try { + parent.opener.document.location = strPage; + window.close(); + } catch(e) { + window.open(strPage); + } } else { document.location = strPage; } -- 2.1.4