Bug 31578; add 'Reload Frame' to context menu; r=matt@netscape.com

This commit is contained in:
law%netscape.com 2000-06-23 22:49:05 +00:00
Родитель 71f81aeb8e
Коммит b855f3824c
3 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -131,8 +131,12 @@ Contributor(s): ______________________________________. -->
oncommand="BrowserForward()"/>
<menuitem id="context-reload"
value="&reloadCmd.label;"
accesskey=""
accesskey="&reloadCmd.accesskey;"
oncommand="BrowserReallyReload(0);"/>
<menuitem id="context-reload-frame"
value="&reloadFrameCmd.label;"
accesskey="&reloadFrameCmd.accesskey;"
oncommand="contextMenu.reloadFrame();"/>
<menuitem id="context-stop"
value="&stopCmd.label;"
accesskey=""

Просмотреть файл

@ -88,7 +88,9 @@ nsContextMenu.prototype = {
// Forward determined by canGoForward broadcaster.
this.setItemAttrFromNode( "context-forward", "disabled", "canGoForward" );
// Reload is always OK.
// Reload is OK if not on a frame; vice-versa for reload-frame.
this.showItem( "context-reload", !this.inFrame );
this.showItem( "context-reload-frame", this.inFrame );
// Stop determined by canStop broadcaster.
this.setItemAttrFromNode( "context-stop", "disabled", "canStop" );
@ -301,6 +303,10 @@ nsContextMenu.prototype = {
editLink : function () {
BrowserEditPage( this.linkURL() );
},
// Reload clicked-in frame.
reloadFrame : function () {
this.target.ownerDocument.location.reload();
},
// Open clicked-in frame in its own window.
openFrame : function () {
openNewWindowWith( this.target.ownerDocument.location.href );

Просмотреть файл

@ -329,6 +329,9 @@
<!ENTITY editLinkCmd.accesskey "e">
<!ENTITY openFrameCmd.label "Open Frame in New Window">
<!ENTITY openFrameCmd.accesskey "o">
<!ENTITY reloadCmd.accesskey "r">
<!ENTITY reloadFrameCmd.label "Reload Frame">
<!ENTITY reloadFrameCmd.accesskey "r">
<!ENTITY viewPageSourceCmd.label "View Page Source">
<!ENTITY viewPageSourceCmd.accesskey "v">
<!ENTITY viewFrameSourceCmd.label "View Frame Source">