зеркало из https://github.com/mozilla/pjs.git
These changes never made it in with original xul landing (/embedding). r=hewitt sr=ben
This commit is contained in:
Родитель
bef18ebe5f
Коммит
3bd372dfa1
|
@ -319,14 +319,14 @@ nsHelperAppDialog.prototype = {
|
|||
|
||||
if ( (applicationDescription || this.choseApp) && this.mLauncher.MIMEInfo.preferredAction != this.nsIMIMEInfo.saveToDisk )
|
||||
{
|
||||
this.dialogElement( "openUsing" ).checked = true;
|
||||
this.dialogElement( "saveToDisk" ).checked = false;
|
||||
var openUsing = this.dialogElement( "openUsing" );
|
||||
openUsing.radioGroup.selectedItem = openUsing;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Save to disk.
|
||||
this.dialogElement( "saveToDisk" ).checked = true;
|
||||
this.dialogElement( "openUsing" ).checked = false;
|
||||
var saveToDisk = this.dialogElement( "saveToDisk" );
|
||||
saveToDisk.radioGroup.selectedItem = saveToDisk;
|
||||
// Disable choose app button.
|
||||
this.dialogElement( "chooseApp" ).setAttribute( "disabled", "true" );
|
||||
}
|
||||
|
@ -342,8 +342,8 @@ nsHelperAppDialog.prototype = {
|
|||
|
||||
// Enable pick app button if the user chooses that option.
|
||||
toggleChoice : function () {
|
||||
// See what option is checked.
|
||||
if ( this.dialogElement( "openUsing" ).checked ) {
|
||||
// See what option is selected.
|
||||
if ( this.dialogElement( "openUsing" ).selected ) {
|
||||
// We can enable the pick app button.
|
||||
this.dialogElement( "chooseApp" ).removeAttribute( "disabled" );
|
||||
} else {
|
||||
|
@ -362,7 +362,7 @@ nsHelperAppDialog.prototype = {
|
|||
// we first need to rest the user action if the user selected save to disk instead of open...
|
||||
// reset the preferred action in this case...we need to do this b4 setting the always ask before handling state
|
||||
|
||||
if (!this.dialogElement( "openUsing" ).checked)
|
||||
if (!this.dialogElement( "openUsing" ).selected)
|
||||
this.mLauncher.MIMEInfo.preferredAction = this.nsIMIMEInfo.saveToDisk;
|
||||
|
||||
|
||||
|
@ -371,7 +371,7 @@ nsHelperAppDialog.prototype = {
|
|||
},
|
||||
updateOKButton: function() {
|
||||
var ok = false;
|
||||
if ( this.dialogElement( "saveToDisk" ).checked )
|
||||
if ( this.dialogElement( "saveToDisk" ).selected )
|
||||
{
|
||||
// This is always OK.
|
||||
ok = true;
|
||||
|
@ -393,7 +393,7 @@ nsHelperAppDialog.prototype = {
|
|||
|
||||
this.processAlwaysAskState();
|
||||
|
||||
if ( this.dialogElement( "openUsing" ).checked )
|
||||
if ( this.dialogElement( "openUsing" ).selected )
|
||||
{
|
||||
// If no app "chosen" then convert input string to file.
|
||||
if (this.chosenApp)
|
||||
|
|
|
@ -36,13 +36,11 @@
|
|||
]>
|
||||
|
||||
<window id="nsHelperAppDlg"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&caption.label;"
|
||||
onload="dialog.initDialog()"
|
||||
style="width: 40em;"
|
||||
class="dialog"
|
||||
orient="vertical">
|
||||
class="dialog">
|
||||
|
||||
|
||||
<keyset id="dialogKeys"/>
|
||||
|
@ -50,43 +48,40 @@
|
|||
<vbox>
|
||||
<hbox flex="1">
|
||||
<vbox flex="1">
|
||||
<html id="intro">&intro.label;</html>
|
||||
<description id="intro">&intro.label;</description>
|
||||
<description id="location" crop="center" value=""/>
|
||||
<separator orient="horizontal" class="thin"/>
|
||||
<html id="prompt">&prompt.label;</html>
|
||||
<description id="prompt">&prompt.label;</description>
|
||||
</vbox>
|
||||
<image id="contentTypeImage"/>
|
||||
</hbox>
|
||||
|
||||
<separator orient="horizontal" class="thin"/>
|
||||
<radiogroup id="mode" orient="vertical" oncommand="dialog.toggleChoice()">
|
||||
<radiogroup id="mode" oncommand="dialog.toggleChoice()">
|
||||
<hbox flex="1">
|
||||
<hbox autostretch="never" flex="1">
|
||||
<radio id="openUsing" flex="1"
|
||||
group="mode"
|
||||
<hbox align="center" flex="1">
|
||||
<radio id="openUsing"
|
||||
label="&openUsing.label;"
|
||||
accesskey="&openUsing.accesskey;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox class="indent" autostretch="never">
|
||||
<hbox class="indent" align="center">
|
||||
<button id="chooseApp"
|
||||
class="dialog"
|
||||
label="&chooseApp.label;"
|
||||
accesskey="&chooseApp.accesskey;"
|
||||
oncommand="dialog.chooseApp()"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<vbox>
|
||||
<hbox autostretch="never">
|
||||
<hbox align="center">
|
||||
<radio id="saveToDisk"
|
||||
group="mode"
|
||||
label="&saveToDisk.label;"
|
||||
accesskey="&saveToDisk.accesskey;"/>
|
||||
label="&saveToDisk.label;"
|
||||
accesskey="&saveToDisk.accesskey;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</radiogroup>
|
||||
<separator orient="horizontal" class="thin"/>
|
||||
<hbox autostretch="never">
|
||||
<hbox align="center">
|
||||
<checkbox id="alwaysAskMe" label="&alwaysAsk.label;" accesskey="&alwaysAsk.accesskey;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
@ -94,8 +89,8 @@
|
|||
<separator class="groove"/>
|
||||
|
||||
<hbox>
|
||||
<button class="dialog" id="default.set" label="&default.set.label;" accesskey="&default.set.accesskey;"
|
||||
oncommand="dialog.setDefault()"/>
|
||||
<button id="default.set" label="&default.set.label;" accesskey="&default.set.accesskey;"
|
||||
oncommand="dialog.setDefault()"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox id="okCancelButtonsRight"/>
|
||||
</hbox>
|
||||
|
|
|
@ -62,11 +62,12 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
document.getElementById( "appName" ).value = this.chosenApp.unicodePath;
|
||||
}
|
||||
|
||||
var saveToDisk = document.getElementById("saveToDisk");
|
||||
if ( applicationDescription && this.appLauncher.MIMEInfo.preferredAction != this.nsIMIMEInfo.saveToDisk ) {
|
||||
document.getElementById( "runApp" ).checked = true;
|
||||
saveToDisk.radioGroup.selectedItem = document.getElementById( "runApp" );
|
||||
} else {
|
||||
// Save to disk.
|
||||
document.getElementById( "saveToDisk" ).checked = true;
|
||||
saveToDisk.radioGroup.selectedItem = saveToDisk;
|
||||
// Disable choose app button.
|
||||
document.getElementById( "chooseApp" ).setAttribute( "disabled", "true" );
|
||||
}
|
||||
|
@ -100,7 +101,7 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
|
||||
// this.appLauncher.MIMEInfo.alwaysAskBeforeHandling = document.getElementById( "alwaysAskMe" ).checked;
|
||||
|
||||
if ( document.getElementById( "runApp" ).checked ) {
|
||||
if ( document.getElementById( "runApp" ).selected ) {
|
||||
// Update preferred action if the user chose an app.
|
||||
if ( this.userChoseApp ) {
|
||||
this.appLauncher.MIMEInfo.preferredAction = this.nsIHelperAppLauncher.useHelperApp;
|
||||
|
@ -126,8 +127,8 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
|
||||
// Enable pick app button if the user chooses that option.
|
||||
toggleChoice : function () {
|
||||
// See what option is checked.
|
||||
if ( document.getElementById( "runApp" ).checked ) {
|
||||
// See what option is selected.
|
||||
if ( document.getElementById( "runApp" ).selected ) {
|
||||
// We can enable the pick app button.
|
||||
document.getElementById( "chooseApp" ).removeAttribute( "disabled" );
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче