Revision 50485
Added by Michele Artini about 6 years ago
addRepo.js | ||
---|---|---|
102 | 102 |
$scope.repo = { |
103 | 103 |
latitude : '0.0', |
104 | 104 |
longitude : '0.0', |
105 |
timezone : '0.0' |
|
105 |
timezone : '0.0',
|
|
106 | 106 |
}; |
107 |
|
|
108 |
$scope.org = {}; |
|
107 | 109 |
} |
108 | 110 |
|
109 | 111 |
$scope.registerRepo = function() { |
110 |
if (confirm('Add new datasource \n\n' + $scope.repo.officialName + '?')) {
|
|
112 |
if (confirm('Add new datasource \n\n' + $scope.repo.officialname + '?')) {
|
|
111 | 113 |
$scope.showSpinner(); |
112 | 114 |
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"; |
115 |
|
|
116 |
$scope.org.id = 'openaire____::' + $scope.repo.id; |
|
117 |
$scope.repo.organizations = [$scope.org]; |
|
118 |
|
|
113 | 119 |
$http.post('repo.new', $.param({ |
114 | 120 |
'repo' : JSON.stringify($scope.repo) |
115 | 121 |
})).success(function(res) { |
Also available in: Unified diff
merged branch dsm into trunk