~ubuntu-branches/ubuntu/raring/lurker/raring

« back to all changes in this revision

Viewing changes to ui/common.js

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Meurer
  • Date: 2006-12-20 05:05:31 UTC
  • mfrom: (3.1.6 feisty)
  • Revision ID: james.westby@ubuntu.com-20061220050531-79inzy7o6uu95qx7
Tags: 2.1-7
* updated vi debconf translations, thanks to Clytie Siddall
  <clytie@riverland.net.au>
* fixed typo in one template (that you would like, not that
  would you like), thanks as well to Clytie Siddall
  - unfuzzied all translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
var oldColor = "ffffff";
 
1
var oldClass = "";
2
2
 
3
3
function rollOut(thisItem)
4
4
{
5
 
        thisItem.style.background      = oldColor;
6
 
        thisItem.style.backgroundColor = oldColor;
 
5
        thisItem.className = oldClass;
7
6
}
8
7
 
9
8
function rollIn(thisItem)
10
9
{
11
 
        if (thisItem.style.background)
12
 
        {
13
 
                oldColor = thisItem.style.background; 
14
 
                thisItem.style.background = "CCAACC"; 
15
 
        }
16
 
        else
17
 
        {
18
 
                oldColor = thisItem.style.backgroundColor;
19
 
                thisItem.style.backgroundColor = "CCAACC";
20
 
        }
 
10
        oldClass = thisItem.className;
 
11
        thisItem.className = "rowover";
21
12
}
22
13
 
23
14
function twostr(num)
83
74
        d.setFullYear(form.year.value);
84
75
        form.utc.value = d.valueOf() / 1000;
85
76
}
 
77
 
 
78
function readCookie(name)
 
79
{
 
80
        var nameEQ = name + "=";
 
81
        var ca = document.cookie.split(';');
 
82
        for(var i=0;i < ca.length;i++)
 
83
        {
 
84
                var c = ca[i];
 
85
                while (c.charAt(0)==' ') c = c.substring(1,c.length);
 
86
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 
87
        }
 
88
        return null;
 
89
}
 
90
 
 
91
function trash(kill)
 
92
{
 
93
        if (readCookie('lurker-pass') == null)
 
94
        {
 
95
                var pass = prompt('Enter the admin password to confirm deletion');
 
96
                if (pass != null)
 
97
                {
 
98
                        document.cookie = "lurker-pass="+escape(pass)+"; path=/";
 
99
                        self.location = kill;
 
100
                }
 
101
        }
 
102
        else
 
103
        {
 
104
                if (confirm('Really delete this message?'))
 
105
                {
 
106
                        self.location = kill;
 
107
                }
 
108
        }
 
109
}