This commit is contained in:
Sagi Dayan 2015-08-03 01:40:24 +03:00
parent 9955bae56c
commit 3b1a2dbd07

View file

@ -1,4 +1,4 @@
angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService', '$cookies', '$location' ,
angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService', '$cookies', '$location',
function($scope, apiService, $cookies, $location) {
$scope.newComp = {};
@ -45,9 +45,9 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
}
apiService.createTask(token, payload).success(function(data){
apiService.createTask(token, payload).success(function(data) {
$location.path('/tasks');
}).error(function(err){
}).error(function(err) {
console.error(err);
})
} else {
@ -95,10 +95,10 @@ angular.module('SeHub').controller('newTasksController', ['$scope', 'apiService'
var type = $scope.newComp.type;
comp.type = type;
comp.order = compOrder;
compOrder ++;
compOrder++;
comp.isMandatory = $scope.newComp.isMandatory;
comp.label = "";
var i = 0
var i = 0;
if (!(type === 'textbox' || type === 'textarea' || type === 'checkbox'))
while ($scope.newComp.label[i]) {
comp.label += $scope.newComp.label[i] + "|";