Skip to content

Commit b653f15

Browse files
authored
Merge pull request #661 from intersystems/654-push-option-doesnt-appear-on-local-branch-after-commit
fix push button not appearing
2 parents 2e6a1a2 + a9e9b56 commit b653f15

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
### Fixed
1414
- Fixed errors on production page when item settings need to be XML escaped (#667)
15+
- Fixed push button not appearing after commit (#654)
1516

1617
## [2.8.0] - 2024-12-06
1718

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,12 @@ webui.SideBarView = function(mainView, noEventHandlers) {
975975
});
976976
};
977977

978+
self.refreshSideBar = function() {
979+
self.fetchSection($("#sidebar-local-branches", self.element)[0], "Local Branches", "local-branches", "branch --verbose --verbose");
980+
self.fetchSection($("#sidebar-remote-branches", self.element)[0], "Remote Branches", "remote-branches", "branch --remotes");
981+
self.fetchSection($("#sidebar-tags", self.element)[0], "Tags", "tags", "tag");
982+
}
983+
978984
self.mainView = mainView;
979985
self.currentContext = self.getCurrentContext();
980986
self.element = $( '<div id="sidebar">' +
@@ -1059,12 +1065,11 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10591065
if ((window !== window.parent) || (navigator.userAgent.indexOf('MSIE 7') > -1) || (navigator.userAgent.indexOf(" Code/") > -1)) {
10601066
$("#sidebar-home", self.element).remove();
10611067
}
1068+
10621069

10631070
self.getPackageVersion();
10641071
self.getEnvironment()
1065-
self.fetchSection($("#sidebar-local-branches", self.element)[0], "Local Branches", "local-branches", "branch --verbose --verbose");
1066-
self.fetchSection($("#sidebar-remote-branches", self.element)[0], "Remote Branches", "remote-branches", "branch --remotes");
1067-
self.fetchSection($("#sidebar-tags", self.element)[0], "Tags", "tags", "tag");
1072+
self.refreshSideBar();
10681073

10691074
if(!noEventHandlers){
10701075
$(document).on('click', '.btn-checkout-local-branch', self.checkoutLocalBranch);
@@ -2620,6 +2625,8 @@ webui.NewChangedFilesView = function(workspaceView) {
26202625
} else {
26212626
var commitMessage = $('#commitMsg').val();
26222627
self.commit(commitMessage, $("#commitMsgDetail").val());
2628+
setTimeout(updateSideBar, 2000);
2629+
;
26232630
}
26242631
}
26252632
})

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,12 @@ webui.SideBarView = function(mainView, noEventHandlers) {
975975
});
976976
};
977977

978+
self.refreshSideBar = function() {
979+
self.fetchSection($("#sidebar-local-branches", self.element)[0], "Local Branches", "local-branches", "branch --verbose --verbose");
980+
self.fetchSection($("#sidebar-remote-branches", self.element)[0], "Remote Branches", "remote-branches", "branch --remotes");
981+
self.fetchSection($("#sidebar-tags", self.element)[0], "Tags", "tags", "tag");
982+
}
983+
978984
self.mainView = mainView;
979985
self.currentContext = self.getCurrentContext();
980986
self.element = $( '<div id="sidebar">' +
@@ -1059,12 +1065,11 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10591065
if ((window !== window.parent) || (navigator.userAgent.indexOf('MSIE 7') > -1) || (navigator.userAgent.indexOf(" Code/") > -1)) {
10601066
$("#sidebar-home", self.element).remove();
10611067
}
1068+
10621069

10631070
self.getPackageVersion();
10641071
self.getEnvironment()
1065-
self.fetchSection($("#sidebar-local-branches", self.element)[0], "Local Branches", "local-branches", "branch --verbose --verbose");
1066-
self.fetchSection($("#sidebar-remote-branches", self.element)[0], "Remote Branches", "remote-branches", "branch --remotes");
1067-
self.fetchSection($("#sidebar-tags", self.element)[0], "Tags", "tags", "tag");
1072+
self.refreshSideBar();
10681073

10691074
if(!noEventHandlers){
10701075
$(document).on('click', '.btn-checkout-local-branch', self.checkoutLocalBranch);
@@ -2620,6 +2625,8 @@ webui.NewChangedFilesView = function(workspaceView) {
26202625
} else {
26212626
var commitMessage = $('#commitMsg').val();
26222627
self.commit(commitMessage, $("#commitMsgDetail").val());
2628+
setTimeout(updateSideBar, 2000);
2629+
;
26232630
}
26242631
}
26252632
})

0 commit comments

Comments
 (0)