From b6c2930de2e1f58a883128959250640abc913e12 Mon Sep 17 00:00:00 2001 From: oes Date: Wed, 17 Dec 2003 16:35:17 +0000 Subject: [PATCH] Work around new & silly MSIE behaviour where the request resulting from changing window.location.href doesn't reveal the referrer anymore --- templates/edit-actions-list | 30 ++++++++++++++++++++--------- templates/edit-actions-list-section | 5 ++++- templates/edit-actions-list-url | 9 ++++++--- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/templates/edit-actions-list b/templates/edit-actions-list index d98fd530..5675fef8 100644 --- a/templates/edit-actions-list +++ b/templates/edit-actions-list @@ -1,6 +1,6 @@ ############################################################################## # -# File : $Source: /cvsroot/ijbswa//current/templates/edit-actions-list,v $ +# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list,v $ # # Purpose : Template used to edit the actions file. # @@ -31,6 +31,12 @@ # # Revisions : # $Log: edit-actions-list,v $ +# Revision 1.26.2.3 2002/09/25 15:34:09 oes +# - Work around JS problem in NS 2.0 (no joke) +# - Make JS string edit popup remove the pattern +# if edited to empty; make JS add popup do nothing +# if pattern empty. +# # Revision 1.26.2.2 2002/08/23 02:22:53 hal9 # Fix a perl brain fart with
  • in comments. # @@ -217,32 +223,38 @@ td.indentbuttons { // JavaScript-capable browsers will call this function, which does a // client-side prompt for speed. It may kick off the delete directly. // It always returns false to cancel following the link. -function rm_p(pattern,curtext) +function rm_p(link,pattern,curtext) { if (window.confirm("Are you sure you want to delete this URL pattern?\nPattern is: "+unescape(curtext))) - { window.location.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; } + { + link.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; + return true; + } return false; } -function e_p(pattern,curtext) +function e_p(link,pattern,curtext) { if ((newtext=window.prompt("Edit the pattern to your needs:", unescape(curtext))) != null) { if (newtext != "") - { window.location.href="edit-actions-url?f=@f@&v=@v@&p="+pattern+"&u="+escape(newtext); } + { link.href="edit-actions-url?f=@f@&v=@v@&p="+pattern+"&u="+escape(newtext); } else - { window.location.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; } + { link.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; } + return true; } return false; } -function a_p(section) +function a_p(link,section) { if (((newtext=window.prompt("Enter the new pattern:", "")) != null ) && (newtext != "")) - { window.location.href="edit-actions-add-url?f=@f@&v=@v@&s="+section+"&u="+escape(newtext); } + { + link.href="edit-actions-add-url?f=@f@&v=@v@&s="+section+"&u="+escape(newtext); + return true; + } return false; } - //--> diff --git a/templates/edit-actions-list-section b/templates/edit-actions-list-section index b48bcb5a..87ad9db3 100644 --- a/templates/edit-actions-list-section +++ b/templates/edit-actions-list-section @@ -31,6 +31,9 @@ # # Revisions : # $Log: edit-actions-list-section,v $ +# Revision 1.15 2002/05/21 21:02:52 oes +# Added more help links +# # Revision 1.14 2002/05/21 19:12:43 oes # - Added client-side JavaScript versions of edit and add URL forms # - Moved jump targets to before container table cell @@ -101,7 +104,7 @@ Edit @actions@ URL patterns: -Add +Add @urls@ Advanced: diff --git a/templates/edit-actions-list-url b/templates/edit-actions-list-url index f44eb589..bf9b5ee4 100644 --- a/templates/edit-actions-list-url +++ b/templates/edit-actions-list-url @@ -1,6 +1,6 @@ ############################################################################## # -# File : $Source: /cvsroot/ijbswa//current/templates/edit-actions-list-url,v $ +# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list-url,v $ # # Purpose : Template which forms part of edit-actions-list # @@ -31,6 +31,9 @@ # # Revisions : # $Log: edit-actions-list-url,v $ +# Revision 1.10 2002/05/21 19:13:14 oes +# Added client-side JavaScript versions of edit and add URL forms +# # Revision 1.9 2002/05/12 15:45:33 jongfoster # Applying [Patch 552094] New templates for edit-actions-list # This cleans up the templates by: @@ -79,6 +82,6 @@ ############################################################################# Remove   Edit  @url-html@ +href="ear?f=@f@&v=@v@&p=@p@" onclick="return rm_p(this, @p@,'@url@');">Remove   Edit  @url-html@ -- 2.39.2