~ubuntu-branches/ubuntu/maverick/webdeveloper/maverick-proposed

« back to all changes in this revision

Viewing changes to source/content_common/webdeveloper/message/message.js

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2009-01-04 12:25:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090104122500-agtub7j8tfr3s09t
Tags: 1.1.6+repack-1ubuntu1
* Merge from Debian experimental, remaining Ubuntu changes:
  + debian/control:
    - Build firefox-webdeveloper and adjust it for Firefox.
    - Do not conflict/replaces with firefox-developer.
    - Add Vcs-Bzr header.
  + debian/rules:
    - Adjust makebuilddir to build firefox-webdeveloper package.
  + Rename iceweasel-{webdeveloper.links,firefox-webdeveloper.install} to
    firefox-{webdeveloper.links,firefox-webdeveloper.install}

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Initializes the message dialog
 
2
function webdeveloper_initializeMessage()
 
3
{
 
4
    document.getElementById("webdeveloper-message").value = window.arguments[0];
 
5
 
 
6
    // If the second window argument is not set
 
7
    if(!window.arguments[1])
 
8
    {
 
9
        document.getElementById("webdeveloper-more-information").style.display = "none";
 
10
    }
 
11
}
 
12
 
 
13
// Loads the more information link in a new tab
 
14
function webdeveloper_moreInformation()
 
15
{
 
16
    var parentWindow = null;
 
17
 
 
18
    // If there is a parent window
 
19
    if(window.opener)
 
20
    {
 
21
        // If there is a grand parent window
 
22
        if(window.opener.opener)
 
23
        {
 
24
            parentWindow = window.opener.opener;
 
25
        }
 
26
        else
 
27
        {
 
28
            parentWindow = window.opener;
 
29
        }
 
30
    }
 
31
 
 
32
    // If a parent window was found
 
33
    if(parentWindow)
 
34
    {
 
35
        // If the open in windows preference is set to true
 
36
        if(webdeveloper_getBooleanPreference("webdeveloper.open.tabs", true))
 
37
        {
 
38
            var newTab = parentWindow.getBrowser().addTab(window.arguments[1]);
 
39
 
 
40
            // If the open tabs in background preference is not set or is set to false
 
41
            if(!webdeveloper_getBooleanPreference("webdeveloper.open.tabs.background", true))
 
42
            {
 
43
                parentWindow.getBrowser().selectedTab = newTab;
 
44
            }
 
45
        }
 
46
        else
 
47
        {
 
48
            parentWindow.open(window.arguments[1]);
 
49
        }
 
50
 
 
51
        window.close();
 
52
    }
 
53
}
 
 
b'\\ No newline at end of file'