Skip to content

Commit

Permalink
reload branches when we create a new version
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Dec 4, 2013
1 parent 9977cf4 commit d1118ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/js/fabricHelpers.ts
Expand Up @@ -251,6 +251,12 @@ module Fabric {
var success = function (response) {
notification('success', "Created version " + response.value.id);
$scope.createVersionDialog.newVersionName = "";

// broadcast events to force reloads
var $rootScope = $scope.$root || $scope.$rootScope || $scope;
if ($rootScope) {
$rootScope.$broadcast('wikiBranchesUpdated');
}
};

var error = function (response) {
Expand Down
5 changes: 5 additions & 0 deletions hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -66,6 +66,11 @@ module Wiki {
var maybeUpdateView = Core.throttled(updateView, 1000);


$scope.$on('wikiBranchesUpdated', function () {
log.info("Wiki branches updated!");
updateView();
});

/*
if (!$scope.nameOnly) {
$scope.gridOptions.columnDefs.push({
Expand Down

0 comments on commit d1118ed

Please sign in to comment.