Work around new & silly MSIE behaviour where the request resulting from
authoroes <oes@users.sourceforge.net>
Wed, 17 Dec 2003 16:35:17 +0000 (16:35 +0000)
committeroes <oes@users.sourceforge.net>
Wed, 17 Dec 2003 16:35:17 +0000 (16:35 +0000)
changing window.location.href doesn't reveal the referrer anymore

templates/edit-actions-list
templates/edit-actions-list-section
templates/edit-actions-list-url

index d98fd53..5675fef 100644 (file)
@@ -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.
 # 
 #
 # 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 <li> 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;
 }
-
 //-->
 </script>
 </head>
index b48bcb5..87ad9db 100644 (file)
@@ -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
 <tr class="actions"><td class="indentbuttons"><a href="eafu?f=@f@&amp;v=@v@&amp;s=@s@">Edit</a></td></tr>
 <tr class="actions"><td class="action">@actions@</td></tr>
 <tr class="url"><td class="header"><a href="@user-manual@@actions-help-prefix@AF-PATTERNS">URL patterns</a>:</td></tr>
-<tr class="url"><td class="indentbuttons"><a href="eaa?f=@f@&amp;v=@v@&amp;s=@s@" onclick="return a_p(@s@);">Add</a></td></tr>
+<tr class="url"><td class="indentbuttons"><a href="eaa?f=@f@&amp;v=@v@&amp;s=@s@" onclick="return a_p(this,@s@);">Add</a></td></tr>
 @urls@
 <tr class="adv"><td class="header">Advanced:</td></tr>
 <tr class="adv"><td class="indentbuttons">
index f44eb58..bf9b5ee 100644 (file)
@@ -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 @@
 #############################################################################
 <tr class="url" valign="top">
 <td class="indentbuttons"><a name="l@p@"
-href="ear?f=@f@&amp;v=@v@&amp;p=@p@" onclick="return rm_p(@p@,'@url@');">Remove</a>&nbsp;&nbsp;&nbsp;<a
-href="eau?f=@f@&amp;v=@v@&amp;p=@p@" onclick="return  e_p(@p@,'@url@');">Edit</a>&nbsp; @url-html@</td>
+href="ear?f=@f@&amp;v=@v@&amp;p=@p@" onclick="return rm_p(this, @p@,'@url@');">Remove</a>&nbsp;&nbsp;&nbsp;<a
+href="eau?f=@f@&amp;v=@v@&amp;p=@p@" onclick="return  e_p(this, @p@,'@url@');">Edit</a>&nbsp; @url-html@</td>
 </tr>