~ubuntu-branches/ubuntu/edgy/bugzilla/edgy

« back to all changes in this revision

Viewing changes to template/en/default/global/help-header.html.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Alexis Sukrieh
  • Date: 2005-10-03 16:51:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051003165101-38n0y5qofd68vole
Tags: 2.18.4-1
* New upstream minor release
  + Fixed a security issue: It was possible to bypass the "user
    visibility groups" restrictions if user-matching was turned on
    in "substring" mode.
  + Fixed a security issue: config.cgi exposed information to users who
    weren't logged in, even when "requirelogin" was turned on in Bugzilla.
  (closes: #331206)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[%# 1.0@bugzilla.org %]
 
2
[%# The contents of this file are subject to the Mozilla Public
 
3
  # License Version 1.1 (the "License"); you may not use this file
 
4
  # except in compliance with the License. You may obtain a copy of
 
5
  # the License at http://www.mozilla.org/MPL/
 
6
  #
 
7
  # Software distributed under the License is distributed on an "AS
 
8
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
  # implied. See the License for the specific language governing
 
10
  # rights and limitations under the License.
 
11
  #
 
12
  # The Original Code is the Bugzilla Bug Tracking System.
 
13
  #
 
14
  # The Initial Developer of the Original Code is Netscape Communications
 
15
  # Corporation. Portions created by Netscape are
 
16
  # Copyright (C) 1998 Netscape Communications Corporation. All
 
17
  # Rights Reserved.
 
18
  #
 
19
  # Contributor(s): Gervase Markham <gerv@gerv.net>
 
20
  #%]
 
21
 
 
22
[% USE Bugzilla %]
 
23
[% cgi = Bugzilla.cgi %]
 
24
 
 
25
[% IF help %]
 
26
  [% IF cgi.user_agent("Mozilla/5") %]
 
27
    <style type="text/css">
 
28
    .help {
 
29
        border-style: solid;
 
30
        border-color: #F0A000;
 
31
        background-color: #FFFFFF;
 
32
        padding: 5;
 
33
        position: absolute;
 
34
    }
 
35
    </style>
 
36
 
 
37
    <script type="application/x-javascript">
 
38
    var currentHelp;
 
39
 
 
40
    function initHelp() {
 
41
        for (var i = 0; i < document.forms.length; i++) {
 
42
            for (var j = 0; j < document.forms[i].elements.length; j++) {
 
43
                [%# MS decided to add fieldsets to the elements array; and 
 
44
                  # Mozilla decided to copy this brokenness. Grr. 
 
45
                  #%]
 
46
                if (document.forms[i].elements[j].tagName != 'FIELDSET') {
 
47
                    document.forms[i].elements[j].onmouseover = showHelp;
 
48
                }
 
49
            }
 
50
        }
 
51
 
 
52
        document.body.onclick = hideHelp;
 
53
    }
 
54
 
 
55
    function showHelp() {      
 
56
        hideHelp();
 
57
        var newHelp = document.getElementById(this.name + '_help');
 
58
        if (newHelp) {
 
59
            currentHelp = newHelp;
 
60
 
 
61
            var mytop = this.offsetTop;
 
62
            var myleft = this.offsetLeft;
 
63
            var myparent = this.offsetParent;
 
64
            while (myparent.tagName != 'BODY') {
 
65
                mytop = mytop + myparent.offsetTop;
 
66
                myleft = myleft + myparent.offsetLeft;
 
67
                myparent = myparent.offsetParent;
 
68
            }
 
69
 
 
70
            currentHelp.style.top = mytop + this.offsetHeight + 5;
 
71
            currentHelp.style.left = myleft;
 
72
            currentHelp.style.display='';
 
73
        }
 
74
    }
 
75
 
 
76
    function hideHelp() {
 
77
        if (currentHelp) {
 
78
            currentHelp.style.display='none';
 
79
        }
 
80
    }
 
81
    </script>
 
82
  [% END %]
 
83
[% ELSE %]
 
84
  <script type="text/javascript">
 
85
  <!--
 
86
  [%# Avoid warnings by having a dummy function %]
 
87
  function initHelp() {}
 
88
  // -->
 
89
  </script>
 
90
[% END %]
 
91