ブラウザウィンドウの、ブックマークのプロパティのポップアップが初回表示時に壊れる問題への対処の準備

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4920 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-08-10 11:29:13 +00:00
parent d06ad331c8
commit c5c034e9a0
9 changed files with 59 additions and 27 deletions

View File

@ -3,9 +3,11 @@ content treestyletab jar:chrome/treestyletab.jar!/content/treestyletab/
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/treestyletab.xul
overlay chrome://browser/content/bookmarks/bookmarksPanel.xul chrome://treestyletab/content/bookmarksOverlay.xul
overlay chrome://browser/content/places/editBookmarkOverlay.xul chrome://treestyletab/content/editBookmarkOverlay.xul
overlay chrome://browser/content/history/history-panel.xul chrome://treestyletab/content/bookmarksOverlay.xul
overlay chrome://browser/content/places/places.xul chrome://treestyletab/content/editBookmarkOverlay.xul
overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/editBookmarkOverlay.xul
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/res/bookmarkMultipleTabs.xul

View File

@ -1,4 +1,6 @@
var TreeStyleTabBookmarksService = {
if (!('TreeStyleTabBookmarksService' in window)) {
window.TreeStyleTabBookmarksService = {
get BookmarksService() {
if (!this._BookmarksService) {
@ -293,3 +295,5 @@ var TreeStyleTabBookmarksService = {
TreeStyleTabBookmarksService.__proto__ = TreeStyleTabService;
window.addEventListener('load', TreeStyleTabBookmarksService, false);
}

View File

@ -1,4 +1,6 @@
var TreeStyleEditableBookmarkService = {
if (!('TreeStyleEditableBookmarkService' in window)) {
window.TreeStyleEditableBookmarkService = {
instantApply : false,
@ -27,7 +29,29 @@ var TreeStyleEditableBookmarkService = {
init : function()
{
window.removeEventListener('DOMContentLoaded', this, false);
if (!('gEditItemOverlay' in window) || this.initialized) return;
var container = document.getElementById('editBookmarkPanelGrid');
if (!container) return;
container = container.getElementsByTagName('rows')[0];
/* to be inserted to the container...
<row align="center">
<label value="&bookmark.parent.label;"
control="treestyletab-parent-menulist"/>
<menulist id="treestyletab-parent-menulist"
flex="1"
oncommand="TreeStyleEditableBookmarkService.onParentChange();">
<menupopup id="treestyletab-parent-popup">
<menuseparator id="treestyletab-parent-blank-item-separator"/>
<menuitem id="treestyletab-parent-blank-item"
label="&bookmark.parent.blank.label;"
value=""/>
</menupopup>
</menulist>
</row>
*/
eval('gEditItemOverlay._showHideRows = '+gEditItemOverlay._showHideRows.toSource().replace(
'this._element("keywordRow").collapsed',
@ -56,7 +80,10 @@ var TreeStyleEditableBookmarkService = {
if ('PlacesOrganizer' in window) {
this.instantApply = true;
}
this.initialized = true;
},
initialized : false,
initParentMenuList : function()
{
@ -152,6 +179,7 @@ var TreeStyleEditableBookmarkService = {
switch (aEvent.type)
{
case 'DOMContentLoaded':
window.removeEventListener('DOMContentLoaded', this, false);
this.init();
break;
}
@ -160,3 +188,5 @@ var TreeStyleEditableBookmarkService = {
};
window.addEventListener('DOMContentLoaded', TreeStyleEditableBookmarkService, false);
}

View File

@ -1,6 +1,5 @@
<?xml version="1.0"?>
<?xml-stylesheet href="editBookmarkOverlay.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://treestyletab/locale/treestyletab.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="res/prefs.js" type="application/x-javascript; version=1.7"/>
<script src="res/boxObject.js" type="application/x-javascript; version=1.7"/>
@ -8,29 +7,8 @@
<script src="treestyletab.js" type="application/x-javascript; version=1.7"/>
<script src="bookmarksOverlay.js" type="application/x-javascript; version=1.7"/>
<script src="editBookmarkOverlay.js" type="application/x-javascript; version=1.7"/>
<stringbundleset id="placesStringSet">
<stringbundle id="treestyletab-stringbundle"
src="chrome://treestyletab/locale/treestyletab.properties"/>
</stringbundleset>
<vbox id="editBookmarkPanelContent">
<hbox id="treestyletab-parent-row"
align="center"
collapsed="true">
<label value="&bookmark.parent.label;"
control="treestyletab-parent-menulist"/>
<menulist id="treestyletab-parent-menulist"
flex="1"
oncommand="TreeStyleEditableBookmarkService.onParentChange();">
<menupopup id="treestyletab-parent-popup">
<menuseparator id="treestyletab-parent-blank-item-separator"/>
<menuitem id="treestyletab-parent-blank-item"
label="&bookmark.parent.blank.label;"
value=""/>
</menupopup>
</menulist>
</hbox>
</vbox>
</overlay>

View File

@ -1,3 +1,5 @@
if ('TreeStyleTabService' in window && !('overrideExtensionsPreInit' in TreeStyleTabService)) {
TreeStyleTabService.overrideExtensionsPreInit = function() {
// Highlander
@ -807,3 +809,5 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
}
};
}

View File

@ -1,3 +1,5 @@
if ('TreeStyleTabService' in window && !('preLoadImagesForStyle' in TreeStyleTabService)) {
TreeStyleTabService.preLoadImagesForStyle = function(aStyle) {
if (!aStyle ||
this._preLoadImagesForStyleDone.indexOf(aStyle) > -1)
@ -57,3 +59,5 @@ TreeStyleTabService._preLoadImages = {
[]
)
};
}

View File

@ -1,4 +1,6 @@
var TreeStyleTabService = {
if (!('TreeStyleTabService' in window)) { // start of definition
window.TreeStyleTabService = {
/* attributes */
kID : 'treestyletab-id',
kCHILDREN : 'treestyletab-children',
@ -2689,4 +2691,6 @@ catch(e) {
TreeStyleTabService.__proto__ = window['piro.sakura.ne.jp'].prefs;
window.addEventListener('DOMContentLoaded', TreeStyleTabService, true);
window.addEventListener('load', TreeStyleTabService, false);
} // end of definition

View File

@ -17,6 +17,7 @@
<script src="treestyletabbrowser.js" type="application/x-javascript; version=1.7"/>
<script src="preloadImages.js" type="application/x-javascript; version=1.7"/>
<script src="bookmarksOverlay.js" type="application/x-javascript; version=1.7"/>
<script src="editBookmarkOverlay.js" type="application/x-javascript; version=1.7"/>
<script src="hacks.js" type="application/x-javascript; version=1.7"/>
<script type="application/x-javascript; version=1.7"><![CDATA[
// preload images

View File

@ -1,3 +1,5 @@
if (!('TreeStyleTabBrowser' in window)) { // start of definition
function TreeStyleTabBrowser(aTabBrowser)
{
this.mTabBrowser = aTabBrowser;
@ -4286,4 +4288,7 @@ TreeStyleTabBrowser.prototype = {
};
TreeStyleTabBrowser.prototype.__proto__ = TreeStyleTabService;
window.TreeStyleTabBrowser = TreeStyleTabBrowser;
} // end of definition