confirmation message should be shown immediately, and it should not be closed by page loadings
This commit is contained in:
parent
7d891dd32c
commit
90e4852836
@ -3221,7 +3221,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var closeSetId = !structureRestored && this._restoreCloseSetId(aTab, mayBeDuplicated);
|
var closeSetId = !structureRestored && this._getCloseSetId(aTab, mayBeDuplicated);
|
||||||
|
|
||||||
this.setTabValue(aTab, this.kID, id);
|
this.setTabValue(aTab, this.kID, id);
|
||||||
this.tabsHash[id] = aTab;
|
this.tabsHash[id] = aTab;
|
||||||
@ -3295,7 +3295,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
return [id, mayBeDuplicated];
|
return [id, mayBeDuplicated];
|
||||||
},
|
},
|
||||||
_restoreCloseSetId : function TSTBrowser_restoreCloseSetId(aTab, aMayBeDuplicated)
|
_getCloseSetId : function TSTBrowser_getCloseSetId(aTab, aMayBeDuplicated)
|
||||||
{
|
{
|
||||||
var closeSetId = null;
|
var closeSetId = null;
|
||||||
if (!aMayBeDuplicated) {
|
if (!aMayBeDuplicated) {
|
||||||
@ -3560,7 +3560,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
if (behavior & this.kUNDO_ASK) {
|
if (behavior & this.kUNDO_ASK) {
|
||||||
let self = this;
|
let self = this;
|
||||||
aRestoredTab.addEventListener('SSTabRestored', function(aEvent) {
|
aRestoredTab.addEventListener('SSTabRestoring', function(aEvent) {
|
||||||
aRestoredTab.removeEventListener(aEvent.type, arguments.callee, false);
|
aRestoredTab.removeEventListener(aEvent.type, arguments.callee, false);
|
||||||
self.askUndoCloseTabSetBehavior(aRestoredTab, indexes.length)
|
self.askUndoCloseTabSetBehavior(aRestoredTab, indexes.length)
|
||||||
.next(function(aBehavior) {
|
.next(function(aBehavior) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @fileOverview Tab Related Confirmation Library for Firefox 3.5 or later
|
* @fileOverview Tab Related Confirmation Library for Firefox 3.5 or later
|
||||||
* @author SHIMODA "Piro" Hiroshi
|
* @author SHIMODA "Piro" Hiroshi
|
||||||
* @version 5
|
* @version 7
|
||||||
* Basic usage:
|
* Basic usage:
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@ -72,7 +72,7 @@ if (typeof namespace.Deferred == 'undefined')
|
|||||||
|
|
||||||
var confirmWithTab;
|
var confirmWithTab;
|
||||||
(function() {
|
(function() {
|
||||||
const currentRevision = 6;
|
const currentRevision = 7;
|
||||||
|
|
||||||
var loadedRevision = 'confirmWithTab' in namespace ?
|
var loadedRevision = 'confirmWithTab' in namespace ?
|
||||||
namespace.confirmWithTab.revision :
|
namespace.confirmWithTab.revision :
|
||||||
@ -177,6 +177,9 @@ var confirmWithTab;
|
|||||||
notification.appendChild(container);
|
notification.appendChild(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aOptions.persistence)
|
||||||
|
notification.persistence = aOptions.persistence;
|
||||||
|
|
||||||
var strip = b.tabContainer || b.mTabContainer;
|
var strip = b.tabContainer || b.mTabContainer;
|
||||||
var handleEvent = function handleEvent(aEvent) {
|
var handleEvent = function handleEvent(aEvent) {
|
||||||
if (aEvent.type == 'DOMNodeRemoved' && aEvent.target != notification)
|
if (aEvent.type == 'DOMNodeRemoved' && aEvent.target != notification)
|
||||||
|
@ -684,6 +684,7 @@ var TreeStyleTabUtils = {
|
|||||||
this.treeBundle.getString('undoCloseTabSetBehavior.set'),
|
this.treeBundle.getString('undoCloseTabSetBehavior.set'),
|
||||||
this.treeBundle.getString('undoCloseTabSetBehavior.separate')
|
this.treeBundle.getString('undoCloseTabSetBehavior.separate')
|
||||||
],
|
],
|
||||||
|
persistence : -1, // don't hide automatically by page loadings
|
||||||
checkbox : checkbox,
|
checkbox : checkbox,
|
||||||
cancelEvents : ['TabClose', 'SSTabRestoring']
|
cancelEvents : ['TabClose', 'SSTabRestoring']
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user