mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-05-13 08:57:27 +00:00
Bug 261267 helper application dialog has title issues when opening an unknown filetype
Relanding after aviary branch landing - already reviewed
This commit is contained in:
parent
6d1529f02c
commit
d03f509ba3
@ -116,7 +116,6 @@ function Startup()
|
|||||||
var bookmarkView = document.getElementById("bookmarks-view");
|
var bookmarkView = document.getElementById("bookmarks-view");
|
||||||
|
|
||||||
var shouldSetOKButton = true;
|
var shouldSetOKButton = true;
|
||||||
var dialogElement = document.documentElement;
|
|
||||||
if ("arguments" in window) {
|
if ("arguments" in window) {
|
||||||
var ind;
|
var ind;
|
||||||
var folderItem = null;
|
var folderItem = null;
|
||||||
@ -132,7 +131,7 @@ function Startup()
|
|||||||
document.getElementById("createinseparator").setAttribute("hidden", "true");
|
document.getElementById("createinseparator").setAttribute("hidden", "true");
|
||||||
document.getElementById("nameseparator").setAttribute("hidden", "true");
|
document.getElementById("nameseparator").setAttribute("hidden", "true");
|
||||||
sizeToContent();
|
sizeToContent();
|
||||||
dialogElement.setAttribute("title", dialogElement.getAttribute("title-selectFolder"));
|
document.title = document.documentElement.getAttribute("selectFolderTitle");
|
||||||
shouldSetOKButton = false;
|
shouldSetOKButton = false;
|
||||||
if (window.arguments[2])
|
if (window.arguments[2])
|
||||||
folderItem = RDF.GetResource(window.arguments[2]);
|
folderItem = RDF.GetResource(window.arguments[2]);
|
||||||
|
@ -63,7 +63,7 @@ function Startup()
|
|||||||
|
|
||||||
bookmarksView.treeBoxObject.view.selection.select(0);
|
bookmarksView.treeBoxObject.view.selection.select(0);
|
||||||
|
|
||||||
windowNode.setAttribute("title", titleString);
|
document.title = titleString;
|
||||||
|
|
||||||
document.getElementById("CommandUpdate_Bookmarks").setAttribute("commandupdater","true");
|
document.getElementById("CommandUpdate_Bookmarks").setAttribute("commandupdater","true");
|
||||||
bookmarksView.focus();
|
bookmarksView.focus();
|
||||||
|
@ -94,11 +94,8 @@ function Init()
|
|||||||
field.value = value;
|
field.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
var propsWindow = document.getElementById("bmPropsWindow");
|
|
||||||
var nameNode = document.getElementById("name");
|
var nameNode = document.getElementById("name");
|
||||||
var title = propsWindow.getAttribute("title");
|
document.title = document.title.replace(/\*\*bm_title\*\*/gi, nameNode.value);
|
||||||
title = title.replace(/\*\*bm_title\*\*/gi, nameNode.value);
|
|
||||||
propsWindow.setAttribute("title", title);
|
|
||||||
|
|
||||||
// check bookmark schedule
|
// check bookmark schedule
|
||||||
var scheduleArc = RDF.GetResource(WEB_NS+"Schedule");
|
var scheduleArc = RDF.GetResource(WEB_NS+"Schedule");
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
# Global Variables
|
# Global Variables
|
||||||
var helpBrowser;
|
var helpBrowser;
|
||||||
var helpWindow;
|
|
||||||
var helpSearchPanel;
|
var helpSearchPanel;
|
||||||
var emptySearch;
|
var emptySearch;
|
||||||
var emptySearchText
|
var emptySearchText
|
||||||
@ -117,7 +116,6 @@ function displayTopic(topic) {
|
|||||||
# Initialize the Help window
|
# Initialize the Help window
|
||||||
function init() {
|
function init() {
|
||||||
// Cache panel references.
|
// Cache panel references.
|
||||||
helpWindow = document.getElementById("help");
|
|
||||||
helpSearchPanel = document.getElementById("help-search-panel");
|
helpSearchPanel = document.getElementById("help-search-panel");
|
||||||
helpTocPanel = document.getElementById("help-toc-panel");
|
helpTocPanel = document.getElementById("help-toc-panel");
|
||||||
helpIndexPanel = document.getElementById("help-index-panel");
|
helpIndexPanel = document.getElementById("help-index-panel");
|
||||||
@ -186,8 +184,7 @@ function loadHelpRDF() {
|
|||||||
log("Help file: " + helpFileURI + " was not found.");
|
log("Help file: " + helpFileURI + " was not found.");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
helpWindow.setAttribute("title",
|
document.title = getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, "");
|
||||||
getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, ""));
|
|
||||||
helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
|
helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
|
||||||
defaultTopic = getAttribute(helpFileDS,
|
defaultTopic = getAttribute(helpFileDS,
|
||||||
RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
|
RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
|
||||||
|
@ -55,8 +55,7 @@ function onLoad()
|
|||||||
// if no download button
|
// if no download button
|
||||||
// set title to "Install Font"
|
// set title to "Install Font"
|
||||||
// and set cancel button to "OK"
|
// and set cancel button to "OK"
|
||||||
var downloadFontDialog = document.getElementById("downloadFontDialog");
|
document.title = fontPackageBundle.getString("windowTitleNoDownload");
|
||||||
downloadFontDialog.setAttribute("title", fontPackageBundle.getString("windowTitleNoDownload"));
|
|
||||||
var cancelButton = document.getElementById("cancelButton");
|
var cancelButton = document.getElementById("cancelButton");
|
||||||
cancelButton.setAttribute("label", fontPackageBundle.getString("cancelButtonNoDownload"));
|
cancelButton.setAttribute("label", fontPackageBundle.getString("cancelButtonNoDownload"));
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
</content>
|
</content>
|
||||||
|
|
||||||
<implementation>
|
<implementation>
|
||||||
<property name="title" onget="return this.getAttribute('title')"
|
<property name="title" onget="return document.title;"
|
||||||
onset="this.setAttribute('title', val);"/>
|
onset="return document.title = val;"/>
|
||||||
|
|
||||||
<property name="canAdvance" onget="return this._canAdvance;"
|
<property name="canAdvance" onget="return this._canAdvance;"
|
||||||
onset="this._canAdvance=val; this._nextButton.setAttribute('disabled', !val);"/>
|
onset="this._canAdvance=val; this._nextButton.setAttribute('disabled', !val);"/>
|
||||||
|
@ -265,7 +265,6 @@ nsUnknownContentTypeDialog.prototype = {
|
|||||||
// initDialog: Fill various dialog fields with initial content.
|
// initDialog: Fill various dialog fields with initial content.
|
||||||
initDialog : function() {
|
initDialog : function() {
|
||||||
// Put file name in window title.
|
// Put file name in window title.
|
||||||
var win = this.dialogElement( "unknownContentType" );
|
|
||||||
var suggestedFileName = this.mLauncher.suggestedFileName;
|
var suggestedFileName = this.mLauncher.suggestedFileName;
|
||||||
|
|
||||||
// Some URIs do not implement nsIURL, so we can't just QI.
|
// Some URIs do not implement nsIURL, so we can't just QI.
|
||||||
@ -288,7 +287,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||||||
|
|
||||||
|
|
||||||
this.mTitle = this.dialogElement("strings").getFormattedString("title", [fname]);
|
this.mTitle = this.dialogElement("strings").getFormattedString("title", [fname]);
|
||||||
win.setAttribute( "title", this.mTitle );
|
this.mDialog.document.title = this.mTitle;
|
||||||
|
|
||||||
// Put content type, filename and location into intro.
|
// Put content type, filename and location into intro.
|
||||||
this.initIntro(url, fname);
|
this.initIntro(url, fname);
|
||||||
|
@ -350,7 +350,6 @@ nsUnknownContentTypeDialog.prototype = {
|
|||||||
// initDialog: Fill various dialog fields with initial content.
|
// initDialog: Fill various dialog fields with initial content.
|
||||||
initDialog : function() {
|
initDialog : function() {
|
||||||
// Put file name in window title.
|
// Put file name in window title.
|
||||||
var win = this.dialogElement( "unknownContentType" );
|
|
||||||
var suggestedFileName = this.mLauncher.suggestedFileName;
|
var suggestedFileName = this.mLauncher.suggestedFileName;
|
||||||
|
|
||||||
// Some URIs do not implement nsIURL, so we can't just QI.
|
// Some URIs do not implement nsIURL, so we can't just QI.
|
||||||
@ -374,7 +373,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||||||
var displayName = fname.replace(/ +/g, " ");
|
var displayName = fname.replace(/ +/g, " ");
|
||||||
|
|
||||||
this.mTitle = this.dialogElement("strings").getFormattedString("title", [displayName]);
|
this.mTitle = this.dialogElement("strings").getFormattedString("title", [displayName]);
|
||||||
win.setAttribute( "title", this.mTitle );
|
this.mDialog.document.title = this.mTitle;
|
||||||
|
|
||||||
// Put content type, filename and location into intro.
|
// Put content type, filename and location into intro.
|
||||||
this.initIntro(url, fname, displayName);
|
this.initIntro(url, fname, displayName);
|
||||||
|
@ -44,7 +44,7 @@ function init()
|
|||||||
if (creator)
|
if (creator)
|
||||||
creator = creator.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
creator = creator.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
||||||
|
|
||||||
document.documentElement.setAttribute("title", extensionsStrings.getFormattedString("aboutWindowTitle", [name]));
|
document.title = extensionsStrings.getFormattedString("aboutWindowTitle", [name]);
|
||||||
var extensionName = document.getElementById("extensionName");
|
var extensionName = document.getElementById("extensionName");
|
||||||
extensionName.setAttribute("value", name);
|
extensionName.setAttribute("value", name);
|
||||||
var extensionVersion = document.getElementById("extensionVersion");
|
var extensionVersion = document.getElementById("extensionVersion");
|
||||||
|
@ -171,7 +171,7 @@ function Startup()
|
|||||||
gExtensionsView.selected = lastSelected;
|
gExtensionsView.selected = lastSelected;
|
||||||
|
|
||||||
var extensionsStrings = document.getElementById("extensionsStrings");
|
var extensionsStrings = document.getElementById("extensionsStrings");
|
||||||
document.documentElement.setAttribute("title", extensionsStrings.getString(gWindowState + "Title"));
|
document.title = extensionsStrings.getString(gWindowState + "Title");
|
||||||
|
|
||||||
gExtensionsViewController.onCommandUpdate();
|
gExtensionsViewController.onCommandUpdate();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user