Skip to content

Commit

Permalink
Implemented #454
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Feb 23, 2017
1 parent e7277cd commit 77aa809
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
24 changes: 15 additions & 9 deletions src/controllers/document-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,29 @@ DocController.controller("DocumentModalController", ['$scope', '$routeParams', '
$scope.selectClass = false;
$scope.reload();
} else {
$scope.selectClass = true;
$scope.listClasses = Database.getClazzVertex();
if ($scope.listClasses.length == 1) {
$scope.selectedClass = $scope.listClasses[0];
}

$scope.selectClass = true;
Database.refreshMetadata($scope.db, () => {
$scope.listClasses = Database.getClazzVertex();
if ($scope.listClasses.length == 1) {
$scope.selectedClass = $scope.listClasses[0];
}
});
}

}]);
DocController.controller("DocumentModalEdgeController", ['$scope', '$routeParams', '$location', 'CommandApi', 'Database', 'Notification', '$controller', function ($scope, $routeParams, $location, CommandApi, Database, Notification, $controller) {

$controller('DocumentModalController', {$scope: $scope});
$scope.listClasses = Database.getClazzEdge();

if ($scope.listClasses.length == 1) {
$scope.selectedClass = $scope.listClasses[0];
}

Database.refreshMetadata($routeParams.database, () => {
$scope.listClasses = Database.getClazzEdge();

if ($scope.listClasses.length == 1) {
$scope.selectedClass = $scope.listClasses[0];
}
})
$scope.lightweight = false;
$scope.save = function (cls) {

Expand Down
1 change: 0 additions & 1 deletion src/controllers/graph-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ GraphModule.controller("VertexModalBrowseController", ['$scope', '$routeParams',
$route.reload();
});


}


Expand Down

0 comments on commit 77aa809

Please sign in to comment.