2007-10-28 16:15:53 +00:00
|
|
|
var gOuterLinkCheck,
|
|
|
|
gAnyLinkCheck,
|
|
|
|
gGroupBookmarkRadio,
|
|
|
|
gGroupBookmarkTree,
|
|
|
|
gGroupBookmarkReplace;
|
2007-10-25 22:59:34 +00:00
|
|
|
var gTabbarPlacePositionInitialized = false;
|
2007-10-20 17:52:42 +00:00
|
|
|
|
2007-10-28 16:15:53 +00:00
|
|
|
function initTabPane()
|
2007-10-20 17:52:42 +00:00
|
|
|
{
|
2007-10-28 16:15:53 +00:00
|
|
|
gOuterLinkCheck = document.getElementById('extensions.treestyletab.openOuterLinkInNewTab-check');
|
|
|
|
gAnyLinkCheck = document.getElementById('extensions.treestyletab.openAnyLinkInNewTab-check');
|
|
|
|
gOuterLinkCheck.disabled = gAnyLinkCheck.checked;
|
|
|
|
|
2007-10-20 17:52:42 +00:00
|
|
|
gGroupBookmarkRadio = document.getElementById('openGroupBookmarkAsTabSubTree-radiogroup');
|
|
|
|
gGroupBookmarkTree = document.getElementById('extensions.treestyletab.openGroupBookmarkAsTabSubTree');
|
|
|
|
gGroupBookmarkReplace = document.getElementById('browser.tabs.loadFolderAndReplace');
|
|
|
|
|
|
|
|
gGroupBookmarkRadio.value =
|
|
|
|
gGroupBookmarkTree.value && !gGroupBookmarkReplace.value ? 'subtree' :
|
|
|
|
!gGroupBookmarkTree.value && !gGroupBookmarkReplace.value ? 'flat' :
|
|
|
|
'replace';
|
|
|
|
}
|
|
|
|
|
|
|
|
function onChangeGroupBookmarkRadio()
|
|
|
|
{
|
|
|
|
gGroupBookmarkTree.value = gGroupBookmarkRadio.value == 'subtree';
|
|
|
|
gGroupBookmarkReplace.value = gGroupBookmarkRadio.value == 'replace';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-25 22:59:34 +00:00
|
|
|
function onChangeTabbarPosition(aOnChange)
|
2007-10-22 03:08:14 +00:00
|
|
|
{
|
2007-10-23 06:05:44 +00:00
|
|
|
var pos = document.getElementById('extensions.treestyletab.tabbar.position-radiogroup').value;
|
|
|
|
document.getElementById('extensions.treestyletab.tabbar.invertScrollbar-check').disabled = pos != 'left';
|
|
|
|
document.getElementById('extensions.treestyletab.tabbar.invertUI-check').disabled = pos != 'right';
|
2007-10-25 22:59:34 +00:00
|
|
|
|
|
|
|
var indentPref = document.getElementById('extensions.treestyletab.enableSubtreeIndent');
|
|
|
|
var collapsePref = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand');
|
2007-11-09 04:17:41 +00:00
|
|
|
var autoHidePref = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled');
|
2007-10-25 22:59:34 +00:00
|
|
|
var indentCheck = document.getElementById('extensions.treestyletab.enableSubtreeIndent-check');
|
|
|
|
var collapseCheck = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand-check');
|
2007-11-09 04:17:41 +00:00
|
|
|
var autoHideCheck = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled-check');
|
2007-10-25 22:59:34 +00:00
|
|
|
if (aOnChange) {
|
|
|
|
indentPref.value = indentCheck.checked =
|
|
|
|
collapsePref.value = collapseCheck.checked = (pos == 'left' || pos == 'right');
|
|
|
|
}
|
2007-11-09 04:17:41 +00:00
|
|
|
if (pos == 'left' || pos == 'right') {
|
|
|
|
indentCheck.setAttribute('style', 'visibility:collapse');
|
|
|
|
autoHideCheck.removeAttribute('style');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
indentCheck.removeAttribute('style');
|
|
|
|
autoHideCheck.setAttribute('style', 'visibility:collapse');
|
|
|
|
}
|
2007-10-25 22:59:34 +00:00
|
|
|
|
|
|
|
gTabbarPlacePositionInitialized = true;
|
2007-10-22 03:08:14 +00:00
|
|
|
}
|