mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
initial add, not part of build
This commit is contained in:
parent
0dd6d239c4
commit
26c1c87640
71
mailnews/base/resources/content/folderProps.js
Normal file
71
mailnews/base/resources/content/folderProps.js
Normal file
@ -0,0 +1,71 @@
|
||||
var gMsgFolder;
|
||||
var preselectedFolderURI = null;
|
||||
|
||||
// services used
|
||||
var RDF;
|
||||
|
||||
|
||||
function folderPropsOKButtonCallback()
|
||||
{
|
||||
if (gMsgFolder)
|
||||
{
|
||||
if (document.getElementById("selectForDownload").checked)
|
||||
gMsgFolder.setFlag(0x8000000);
|
||||
else
|
||||
gMsgFolder.clearFlag(0x8000000);
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
||||
function folderPropsOnLoad()
|
||||
{
|
||||
dump("folder props loaded"+'\n');
|
||||
doSetOKCancel(folderPropsOKButtonCallback);
|
||||
moveToAlertPosition();
|
||||
|
||||
RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
// look in arguments[0] for parameters
|
||||
if (window.arguments && window.arguments[0]) {
|
||||
if ( window.arguments[0].title ) {
|
||||
// dump("title = " + window.arguments[0].title + "\n");
|
||||
top.window.title = window.arguments[0].title;
|
||||
}
|
||||
|
||||
if ( window.arguments[0].okCallback ) {
|
||||
top.okCallback = window.arguments[0].okCallback;
|
||||
}
|
||||
}
|
||||
|
||||
// fill in folder name, based on what they selected in the folder pane
|
||||
if (window.arguments[0].preselectedURI) {
|
||||
try {
|
||||
preselectedFolderURI = window.arguments[0].preselectedURI;
|
||||
}
|
||||
catch (ex) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
dump("passed null for preselectedURI, do nothing\n");
|
||||
}
|
||||
|
||||
if(window.arguments[0].name)
|
||||
{
|
||||
var name = document.getElementById("name");
|
||||
name.value = window.arguments[0].name;
|
||||
// name.setSelectionRange(0,-1);
|
||||
// name.focusTextField();
|
||||
|
||||
}
|
||||
// this hex value come from nsMsgFolderFlags.h
|
||||
var folderResource = RDF.GetResource(preselectedFolderURI);
|
||||
|
||||
if(folderResource)
|
||||
gMsgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
if (!gMsgFolder)
|
||||
dump("no gMsgFolder preselectfolder uri = "+preselectedFolderURI+'\n');
|
||||
|
||||
if (gMsgFolder && (gMsgFolder.flags & 0x8000000))
|
||||
document.getElementById("selectForDownload").checked = true;
|
||||
|
||||
}
|
71
mailnews/base/resources/content/imapFolderProps.xul
Normal file
71
mailnews/base/resources/content/imapFolderProps.xul
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
- Contributor(s): David Bienvenu <bienvenu@netscape.com>
|
||||
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/folderProps.dtd">
|
||||
|
||||
<window
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&folderProps.windowtitle.label;"
|
||||
onload="folderPropsOnLoad()" style="width: 36em;"
|
||||
class="dialog" orient="vertical">
|
||||
|
||||
<script language="Javascript" src="chrome://global/content/globalOverlay.js"></script>
|
||||
<script language="JavaScript" src="chrome://global/content/strres.js"></script>
|
||||
<script language="JavaScript" src="chrome://messenger/content/folderProps.js"></script>
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<tabcontrol orient="vertical">
|
||||
<tabbox>
|
||||
<tab value="&generalInfo.label;" accesskey="&generalInfo.accesskey;"/>
|
||||
<tab id="DownloadTab" value="&download.label;" accesskey="&download.accesskey;"/>
|
||||
</tabbox>
|
||||
<tabpanel>
|
||||
<box orient="vertical">
|
||||
<box id="nameBox" orient="vertical">
|
||||
<text class="label" value="&folderProps.name.label;" />
|
||||
<textfield id="name" />
|
||||
</box>
|
||||
|
||||
</box>
|
||||
|
||||
<titledbox orient="vertical">
|
||||
|
||||
<titledbox orient="vertical">
|
||||
|
||||
<checkbox id="selectForDownload" value="&download.check.label;" />
|
||||
</titledbox>
|
||||
</titledbox>
|
||||
</tabpanel>
|
||||
</tabcontrol>
|
||||
|
||||
<box id="okCancelButtonsRight"/>
|
||||
|
||||
</window>
|
Loading…
Reference in New Issue
Block a user