mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-05-13 17:07:01 +00:00
Persist bookmark window's x/y and width/height attributes.
This commit is contained in:
parent
c8b5bd6ae7
commit
6c576abc0f
@ -20,6 +20,22 @@
|
|||||||
Script for the bookmarks properties window
|
Script for the bookmarks properties window
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function doUnload()
|
||||||
|
{
|
||||||
|
// Get the current window position/size.
|
||||||
|
var x = window.screenX;
|
||||||
|
var y = window.screenY;
|
||||||
|
var h = window.outerHeight;
|
||||||
|
var w = window.outerWidth;
|
||||||
|
|
||||||
|
// Store these into the window attributes (for persistence).
|
||||||
|
var win = document.getElementById( "bookmark-window" );
|
||||||
|
win.setAttribute( "x", x );
|
||||||
|
win.setAttribute( "y", y );
|
||||||
|
win.setAttribute( "height", h );
|
||||||
|
win.setAttribute( "width", w );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function BookmarkProperties()
|
function BookmarkProperties()
|
||||||
|
@ -20,6 +20,22 @@
|
|||||||
Script for the bookmarks properties window
|
Script for the bookmarks properties window
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function doUnload()
|
||||||
|
{
|
||||||
|
// Get the current window position/size.
|
||||||
|
var x = window.screenX;
|
||||||
|
var y = window.screenY;
|
||||||
|
var h = window.outerHeight;
|
||||||
|
var w = window.outerWidth;
|
||||||
|
|
||||||
|
// Store these into the window attributes (for persistence).
|
||||||
|
var win = document.getElementById( "bookmark-window" );
|
||||||
|
win.setAttribute( "x", x );
|
||||||
|
win.setAttribute( "y", y );
|
||||||
|
win.setAttribute( "height", h );
|
||||||
|
win.setAttribute( "width", w );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function BookmarkProperties()
|
function BookmarkProperties()
|
||||||
|
@ -23,12 +23,12 @@
|
|||||||
<?xml-stylesheet href="chrome://bookmarks/skin/" type="text/css"?>
|
<?xml-stylesheet href="chrome://bookmarks/skin/" type="text/css"?>
|
||||||
|
|
||||||
<!DOCTYPE window SYSTEM "chrome://bookmarks/locale/bookmarks.dtd">
|
<!DOCTYPE window SYSTEM "chrome://bookmarks/locale/bookmarks.dtd">
|
||||||
<window title="&bookmarksWindowTitle.label;"
|
<window title="&bookmarksWindowTitle.label;" id="bookmark-window" onunload="doUnload()"
|
||||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:web="http://home.netscape.com/WEB-rdf#"
|
xmlns:web="http://home.netscape.com/WEB-rdf#"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
width="500" height="400" align="vertical">
|
width="500" height="400" x="20" y="20" persist="width height x y" align="vertical">
|
||||||
|
|
||||||
<html:script src="chrome://bookmarks/content/bookmarks.js"/>
|
<html:script src="chrome://bookmarks/content/bookmarks.js"/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user