kopia lustrzana https://github.com/c9/core
Renaming functions to be clearer
rodzic
347441397d
commit
e04e89178a
|
@ -178,7 +178,7 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
|
|
||||||
function isTabSaving(tab) {
|
function isTabSaving(tab) {
|
||||||
return tab.document.meta.$saving;
|
return !!tab.document.meta.$saving;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addChangedTab(tab, doubleCheckComparisonType) {
|
function addChangedTab(tab, doubleCheckComparisonType) {
|
||||||
|
@ -231,9 +231,10 @@ define(function(require, exports, module) {
|
||||||
if (tabManager.focussedTab && !changedPaths[tabManager.focussedTab.path]) {
|
if (tabManager.focussedTab && !changedPaths[tabManager.focussedTab.path]) {
|
||||||
doc.tab.classList.add("conflict");
|
doc.tab.classList.add("conflict");
|
||||||
// Let's try again later, maybe then one of our paths gets focus
|
// Let's try again later, maybe then one of our paths gets focus
|
||||||
return tabManager.once("focus", function() {
|
tabManager.once("focus", function() {
|
||||||
showChangeDialog(tab, data);
|
showChangeDialog(tab, data);
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tabManager.findTab(path)) // drat! tab is gone
|
if (!tabManager.findTab(path)) // drat! tab is gone
|
||||||
|
@ -402,7 +403,7 @@ define(function(require, exports, module) {
|
||||||
changedPaths[path].tab.document.undoManager.bookmark(-2);
|
changedPaths[path].tab.document.undoManager.bookmark(-2);
|
||||||
changedPaths[path].resolve();
|
changedPaths[path].resolve();
|
||||||
}
|
}
|
||||||
checkEmptyQueue();
|
checkIfQueueIsEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
function yes(all) { // Remote | Yes
|
function yes(all) { // Remote | Yes
|
||||||
|
@ -415,7 +416,7 @@ define(function(require, exports, module) {
|
||||||
getLatestValue(path, updateChangedPath);
|
getLatestValue(path, updateChangedPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEmptyQueue();
|
checkIfQueueIsEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (merge) {
|
if (merge) {
|
||||||
|
@ -438,7 +439,7 @@ define(function(require, exports, module) {
|
||||||
getLatestValue(path, mergeChangedPath);
|
getLatestValue(path, mergeChangedPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEmptyQueue();
|
checkIfQueueIsEmpty();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
merge: true,
|
merge: true,
|
||||||
|
@ -544,7 +545,7 @@ define(function(require, exports, module) {
|
||||||
showDeleteDialog();
|
showDeleteDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEmptyQueue();
|
checkIfQueueIsEmpty();
|
||||||
},
|
},
|
||||||
function(all, cancel) { // No
|
function(all, cancel) { // No
|
||||||
if (all) {
|
if (all) {
|
||||||
|
@ -559,7 +560,7 @@ define(function(require, exports, module) {
|
||||||
showDeleteDialog();
|
showDeleteDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEmptyQueue();
|
checkIfQueueIsEmpty();
|
||||||
},
|
},
|
||||||
{ all: Object.keys(removedPaths).length > 1 }
|
{ all: Object.keys(removedPaths).length > 1 }
|
||||||
);
|
);
|
||||||
|
@ -576,7 +577,9 @@ define(function(require, exports, module) {
|
||||||
tabManager.focusTab(tab);
|
tabManager.focusTab(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkEmptyQueue(){
|
function checkIfQueueIsEmpty(){
|
||||||
|
showChangeDialog();
|
||||||
|
|
||||||
for (var prop in changedPaths) return;
|
for (var prop in changedPaths) return;
|
||||||
for (var prop in removedPaths) return;
|
for (var prop in removedPaths) return;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue