Fixing PR #112 as discussed with Arik

This commit is contained in:
Christopher Valles
2014-03-03 16:41:53 +00:00
parent 3c24e76eb4
commit 2bcb56d249
2 changed files with 8 additions and 23 deletions

View File

@@ -282,6 +282,13 @@
});
}
};
unbind = $scope.$watch('selectedTab == "add"', function(newPanel) {
if (newPanel && $routeParams.queryId == undefined) {
unbind();
$scope.saveQuery();
}
});
}
var QueriesCtrl = function($scope, $http, $location, $filter, Query) {