mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Make "save link as" work in the context menu on files in the XUL
dirviewer. Bug 124762, r=bbaetz, sr=jag.
This commit is contained in:
parent
bbabfda7e9
commit
3e0b8d4c3e
@ -303,7 +303,15 @@ nsContextMenu.prototype = {
|
||||
if ( root.getAttribute( "URL" ) ) {
|
||||
// Build pseudo link object so link-related functions work.
|
||||
this.onLink = true;
|
||||
this.link = { href : root.getAttribute("URL") };
|
||||
this.link = { href : root.getAttribute("URL"),
|
||||
getAttribute: function (attr) {
|
||||
if (attr == "title") {
|
||||
return root.firstChild.firstChild.getAttribute("label");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
};
|
||||
// If element is a directory, then you can't save it.
|
||||
if ( root.getAttribute( "container" ) == "true" ) {
|
||||
this.onSaveableLink = false;
|
||||
|
Loading…
Reference in New Issue
Block a user