move boxObject module to JS module
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5630 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
1f32ccbe33
commit
ed9af90859
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
<script src="res/boxObject.js" type="application/x-javascript; version=1.7"/>
|
|
||||||
<script src="res/stringBundle.js" type="application/x-javascript; version=1.7"/>
|
<script src="res/stringBundle.js" type="application/x-javascript; version=1.7"/>
|
||||||
<script src="res/animationManager.js" type="application/x-javascript; version=1.7"/>
|
<script src="res/animationManager.js" type="application/x-javascript; version=1.7"/>
|
||||||
<script src="treestyletab.js" type="application/x-javascript; version=1.7"/>
|
<script src="treestyletab.js" type="application/x-javascript; version=1.7"/>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
string bundle utility
|
string bundle utility
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
// use instead of HTMLDocument.getBoxObjectFor(HTMLElement)
|
|
||||||
var bundle = window['piro.sakura.ne.jp']
|
var bundle = window['piro.sakura.ne.jp']
|
||||||
.stringBundle
|
.stringBundle
|
||||||
.get('chrome://example/locale/example.properties');
|
.get('chrome://example/locale/example.properties');
|
||||||
|
@ -111,11 +111,6 @@ var TreeStyleTabService = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
getBoxObjectFor : function TSTService_getBoxObjectFor(aNode)
|
|
||||||
{
|
|
||||||
return window['piro.sakura.ne.jp'].boxObject.getBoxObjectFor(aNode);
|
|
||||||
},
|
|
||||||
|
|
||||||
getPropertyPixelValue : function TSTService_getPropertyPixelValue(aElementOrStyle, aProp)
|
getPropertyPixelValue : function TSTService_getPropertyPixelValue(aElementOrStyle, aProp)
|
||||||
{
|
{
|
||||||
var style = aElementOrStyle instanceof Components.interfaces.nsIDOMCSSStyleDeclaration ?
|
var style = aElementOrStyle instanceof Components.interfaces.nsIDOMCSSStyleDeclaration ?
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<overlay id="treestyletab-overlay"
|
<overlay id="treestyletab-overlay"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<script src="res/boxObject.js" type="application/x-javascript; version=1.7"/>
|
|
||||||
<script src="res/stringBundle.js" type="application/x-javascript; version=1.7"/>
|
<script src="res/stringBundle.js" type="application/x-javascript; version=1.7"/>
|
||||||
<script src="res/autoScroll.js" type="application/x-javascript; version=1.7"/>
|
<script src="res/autoScroll.js" type="application/x-javascript; version=1.7"/>
|
||||||
<script src="res/animationManager.js" type="application/x-javascript; version=1.7"/>
|
<script src="res/animationManager.js" type="application/x-javascript; version=1.7"/>
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
var EXPORTED_SYMBOLS = ['window'];
|
||||||
|
var window = {};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"getBoxObjectFor()" compatibility library for Firefox 3.6 or later
|
"getBoxObjectFor()" compatibility library for Firefox 3.6 or later
|
||||||
|
|
@ -38,6 +38,12 @@ var EXPORTED_SYMBOLS = ['TreeStyleTabUtils'];
|
|||||||
var Cc = Components.classes;
|
var Cc = Components.classes;
|
||||||
var Ci = Components.interfaces;
|
var Ci = Components.interfaces;
|
||||||
|
|
||||||
|
var prefs = {};
|
||||||
|
Components.utils.import('resource://treestyletab-modules/prefs.js', prefs);
|
||||||
|
|
||||||
|
var boxObject = {};
|
||||||
|
Components.utils.import('resource://treestyletab-modules/boxObject.js', boxObject);
|
||||||
|
|
||||||
var TreeStyleTabUtils = {
|
var TreeStyleTabUtils = {
|
||||||
|
|
||||||
/* attributes */
|
/* attributes */
|
||||||
@ -253,6 +259,11 @@ var TreeStyleTabUtils = {
|
|||||||
|
|
||||||
/* utilities */
|
/* utilities */
|
||||||
|
|
||||||
|
getBoxObjectFor : function TSTUtils_getBoxObjectFor(aNode)
|
||||||
|
{
|
||||||
|
return boxObject.window['piro.sakura.ne.jp'].boxObject.getBoxObjectFor(aNode);
|
||||||
|
},
|
||||||
|
|
||||||
get browserWindow()
|
get browserWindow()
|
||||||
{
|
{
|
||||||
return this.WindowMediator.getMostRecentWindow('navigator:browser');
|
return this.WindowMediator.getMostRecentWindow('navigator:browser');
|
||||||
@ -1397,6 +1408,5 @@ var TreeStyleTabUtils = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Components.utils.import('resource://treestyletab-modules/prefs.js');
|
TreeStyleTabUtils.__proto__ = prefs.window['piro.sakura.ne.jp'].prefs;
|
||||||
TreeStyleTabUtils.__proto__ = window['piro.sakura.ne.jp'].prefs;
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user