Fix 25592 - implement "open frame in this whole window" functionality and add an item to the context menu. r=law sr=shaver

git-svn-id: svn://10.0.0.236/trunk@81195 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com
2000-10-14 03:40:41 +00:00
parent 37618b65ed
commit a136571755
3 changed files with 11 additions and 0 deletions

View File

@@ -126,6 +126,10 @@ Contributor(s): ______________________________________. -->
value="&openFrameCmd.label;"
accesskey=""
oncommand="contextMenu.openFrame();"/>
<menuitem id="context-showonlythisframe"
value="&showOnlyThisFrameCmd.label;"
accesskey="&showOnlyThisFrameCmd.accesskey;"
oncommand="contextMenu.showOnlyThisFrame();"/>
<menuseparator id="context-sep-open"/>
<!-- Navigation ============================== -->
<menuitem id="context-back"

View File

@@ -81,6 +81,7 @@ nsContextMenu.prototype = {
// Remove open frame if not applicable.
this.showItem( "context-openframe", this.inFrame );
this.showItem( "context-showonlythisframe", this.inFrame );
// Remove separator after open items if neither link nor frame.
this.showItem( "context-sep-open", this.onSaveableLink || ( this.inDirList && this.onLink ) || this.inFrame );
@@ -387,6 +388,10 @@ nsContextMenu.prototype = {
openFrame : function () {
openNewWindowWith( this.target.ownerDocument.location.href );
},
// Open clicked-in frame in the same window
showOnlyThisFrame : function () {
window._content.location.href = this.target.ownerDocument.location.href;
},
// Open new "view source" window with the frame's URL.
viewFrameSource : function () {
window.openDialog( "chrome://navigator/content/viewSource.xul",

View File

@@ -320,6 +320,8 @@
<!ENTITY editLinkCmd.accesskey "e">
<!ENTITY openFrameCmd.label "Open Frame in New Window">
<!ENTITY openFrameCmd.accesskey "o">
<!ENTITY showOnlyThisFrameCmd.label "Show Only This Frame">
<!ENTITY showOnlyThisFrameCmd.accesskey "w">
<!ENTITY reloadCmd.accesskey "r">
<!ENTITY reloadCmd.commandKey "r">
<!ENTITY reloadFrameCmd.label "Reload Frame">