Skip to content

Commit 7b1433b

Browse files
authored
compatibility fix for IE minor bugfix (#83)
1 parent 27e26ed commit 7b1433b

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

git-webui/release/share/git-webui/webui/js/git-webui.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1733,12 +1733,18 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
17331733
});
17341734
}
17351735

1736-
self.getFileList = function(including, excluding, onlyUnavailable=0, stringifyFilenames = 1) {
1737-
if(stringifyFilenames)
1736+
self.getFileList = function(including, excluding, onlyUnavailable, stringifyFilenames) {
1737+
if(stringifyFilenames || stringifyFilenames == undefined){
1738+
stringifyFilenames = 1
17381739
var files = "";
1740+
}
17391741
else
17401742
var files = [];
17411743

1744+
if(onlyUnavailable == undefined){
1745+
onlyUnavailable = 0
1746+
}
1747+
17421748
for (var i = 0; i < fileList.childElementCount; ++i) {
17431749
var child = fileList.children[i];
17441750
var included = including == undefined || including.indexOf(child.status) != -1;
@@ -1792,6 +1798,7 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
17921798

17931799
self.cancelByAvailability = function() {
17941800
prevScrollTop = fileListContainer.scrollTop;
1801+
self.cancel();
17951802

17961803
var action = "discard"
17971804
var files = self.getFileList(undefined, undefined, 1, 0);

git-webui/src/share/git-webui/webui/js/git-webui.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1733,12 +1733,18 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
17331733
});
17341734
}
17351735

1736-
self.getFileList = function(including, excluding, onlyUnavailable=0, stringifyFilenames = 1) {
1737-
if(stringifyFilenames)
1736+
self.getFileList = function(including, excluding, onlyUnavailable, stringifyFilenames) {
1737+
if(stringifyFilenames || stringifyFilenames == undefined){
1738+
stringifyFilenames = 1
17381739
var files = "";
1740+
}
17391741
else
17401742
var files = [];
17411743

1744+
if(onlyUnavailable == undefined){
1745+
onlyUnavailable = 0
1746+
}
1747+
17421748
for (var i = 0; i < fileList.childElementCount; ++i) {
17431749
var child = fileList.children[i];
17441750
var included = including == undefined || including.indexOf(child.status) != -1;
@@ -1792,6 +1798,7 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
17921798

17931799
self.cancelByAvailability = function() {
17941800
prevScrollTop = fileListContainer.scrollTop;
1801+
self.cancel();
17951802

17961803
var action = "discard"
17971804
var files = self.getFileList(undefined, undefined, 1, 0);

0 commit comments

Comments
 (0)