Show/hide UI to manage parent tab correctly on Firefox 40 and later #887
This commit is contained in:
parent
289057ce55
commit
dd2f17dd53
@ -118,21 +118,16 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService,
|
||||
document.getElementById('treestyletab-parent-label').setAttribute('value', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.label'));
|
||||
this.blankItem.setAttribute('label', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.blank.label'));
|
||||
|
||||
|
||||
TreeStyleTabUtils.doPatching(gEditItemOverlay._showHideRows, 'gEditItemOverlay._showHideRows', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
/(\}\)?)$/,
|
||||
' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' +
|
||||
'$1'
|
||||
));
|
||||
}, 'TreeStyleTab');
|
||||
|
||||
if (Services.vc.compare(Services.appinfo.platformVersion, '40') >= 0) {
|
||||
// for Firefox 40 and later, after Bug 951651
|
||||
TreeStyleTabUtils.doPatching(gEditItemOverlay.initPanel, 'gEditItemOverlay.initPanel', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'let showOrCollapse =',
|
||||
'TreeStyleTabBookmarksServiceEditable.initParentMenuList(); $&'
|
||||
).replace(
|
||||
/(\}\)?)$/,
|
||||
' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' +
|
||||
'$1'
|
||||
));
|
||||
}, 'TreeStyleTab');
|
||||
}
|
||||
@ -144,6 +139,14 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService,
|
||||
'$& TreeStyleTabBookmarksServiceEditable.initParentMenuList();'
|
||||
));
|
||||
}, 'TreeStyleTab');
|
||||
|
||||
TreeStyleTabUtils.doPatching(gEditItemOverlay._showHideRows, 'gEditItemOverlay._showHideRows', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
/(\}\)?)$/,
|
||||
' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' +
|
||||
'$1'
|
||||
));
|
||||
}, 'TreeStyleTab');
|
||||
}
|
||||
|
||||
TreeStyleTabUtils.doPatching(gEditItemOverlay.onItemMoved, 'gEditItemOverlay.onItemMoved', function(aName, aSource) {
|
||||
|
Loading…
Reference in New Issue
Block a user