зеркало из https://github.com/mozilla/pjs.git
Bug 88287; Add Flush when removing entries, and, prevent user from changing mime type when opened from helper app dialog; r=sgehani, sr=mscott
This commit is contained in:
Родитель
2a8de6ca22
Коммит
00d9dab97e
|
@ -402,6 +402,10 @@ function removeOverride(aMIMEType)
|
|||
gDS.Unassert(mimeRes, linkRes, linkTarget);
|
||||
}
|
||||
}
|
||||
try {
|
||||
gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkInput() {
|
||||
|
|
|
@ -78,6 +78,9 @@
|
|||
// Construct what we need from mime type URI.
|
||||
getDS();
|
||||
handlerInfo = window.arguments[0] = new HandlerOverride( MIME_URI( mimeType ) );
|
||||
|
||||
// Don't let the user change the mime type; we ignore any such changes anyway.
|
||||
gMIMEField.setAttribute( "readonly", "true" );
|
||||
}
|
||||
|
||||
gExtensionLabel.setAttribute("value", handlerInfo.extensions);
|
||||
|
@ -127,7 +130,11 @@
|
|||
var imageString = "moz-icon://" + "dummy." + ext.toLowerCase() + "?size=32&contentType=" + handlerInfo.mimeType;
|
||||
document.getElementById("contentTypeImage").setAttribute("src", imageString);
|
||||
|
||||
gMIMEField.focus();
|
||||
// If opened from helper app dialog, then focus goes to radio buttons.
|
||||
if ( "gHelperAppDlg" in window )
|
||||
gHandlerGroup.focus();
|
||||
else
|
||||
gMIMEField.focus();
|
||||
|
||||
sizeToContent();
|
||||
moveToAlertPosition();
|
||||
|
|
Загрузка…
Ссылка в новой задаче