Commit 84e17ab1 authored by scav's avatar scav

Fixes #4705

It fixes the current issue, however, a central (directive) approach should be created for date formatting.
parent 73e59697
......@@ -4,10 +4,12 @@
<h4>{{currentProject.titl}}</h4>
{{currentProject.producer}}<br/>
{{currentProject.authEnty}}<br/>
{{currentProject.timePrd}}<br/>
Start: {{currentProject.timePrdStart[0]}}-{{currentProject.timePrdStart[1]}}-{{currentProject.timePrdStart[2]}}<br/>
End: {{currentProject.timePrdEnd[0]}}-{{currentProject.timePrdEnd[1]}}-{{currentProject.timePrdEnd[2]}}<br/>
{{currentProject.fundAg}}<br/>
{{currentProject.abs}}<br/>
<a href ng-click="showDataSet(true)">Add DataSet</a>
<hr />
......
......@@ -30,10 +30,19 @@
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="timePrd">TimePrd</label>
<label class="col-md-4 control-label" for="timePrdStart">timePrdStart</label>
<div class="col-md-4">
<input ng-model="project.timePrd" id="timePrd" name="timePrd" type="text" placeholder="TimePrd"
<input ng-model="project.timePrdStart" id="timePrdStart" name="timePrdStart" type="text" placeholder="timePrdStart"
class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="timePrdEnd">timePrdEnd</label>
<div class="col-md-4">
<input ng-model="project.timePrdEnd" id="timePrdEnd" name="timePrdEnd" type="text" placeholder="timePrdEnd"
class="form-control input-md">
</div>
</div>
......
......@@ -28,7 +28,7 @@ var archivingPortalClient = angular.module('archivingPortalClient',
/**
* Set the API host ip.
*/
archivingPortalClient.constant('portalApiUrl', 'http://129.177.92.196:8080/');
archivingPortalClient.constant('portalApiUrl', 'http://localhost:9000/');
/**
* Define all routes, partials and controllers in the application.
......
'use strict';
var ProjectController = function($scope, $log, $http, $upload, ProjectList, Nations, TokenService) {
var ProjectController = function($scope, $log, $http, $upload, ProjectList, Nations, TokenService, portalApiUrl) {
// Form data stuff
$scope.nations = Nations.query();
......@@ -53,7 +53,7 @@ var ProjectController = function($scope, $log, $http, $upload, ProjectList, Nati
* project in scope to the project returned by the server.
*/
$scope.createProject = function() {
$http.post($scope.portalApiUrl+'project/create', $scope.project)
$http.post(portalApiUrl+'project/create', $scope.project)
.success(function(project) {
$scope.currentProject = project;
}).error(function () {
......@@ -72,7 +72,7 @@ var ProjectController = function($scope, $log, $http, $upload, ProjectList, Nati
* returned by the swerver.
*/
$scope.createDataSet = function() {
$http.post($scope.portalApiUrl+'project/'+$scope.currentProject.id+'/create/dataset', $scope.dataSet)
$http.post(portalApiUrl+'project/'+$scope.currentProject.id+'/create/dataset', $scope.dataSet)
.success(function(dataSet) {
$scope.currentDataSet = dataSet;
$scope.showDataSet(false);
......@@ -98,7 +98,7 @@ var ProjectController = function($scope, $log, $http, $upload, ProjectList, Nati
var file = files[0];
$scope.upload = $upload.upload({
url: $scope.portalApiUrl+'project/create/dataset/1/file/',
url: portalApiUrl+'project/create/dataset/1/file/',
method: 'POST',
headers: {'Authorization': 'Bearer ' + TokenService.getToken()},
file: file
......
......@@ -22,7 +22,7 @@ function proxyMiddleware(req, res, next) {
}
function browserSyncInit(baseDir, files, browser) {
browser = browser === undefined ? 'default' : browser;
browser = browser === undefined ? 'chromium-browser' : browser;
browserSync.instance = browserSync.init(files, {
startPath: '/index.html',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment