Fix creating tasks/lists with special characters

This commit is contained in:
raimund-schluessler 2014-04-12 11:32:51 +02:00
parent 69edad25fa
commit 6e38fd5dea
3 changed files with 15 additions and 18 deletions

View file

@ -47,7 +47,7 @@ $this->create('getLists', '/lists')
}
);
$this->create('list_add', '/lists/add/{name}')
$this->create('list_add', '/lists/add')
->post()
->action(
function($params){
@ -131,7 +131,7 @@ $this->create('task_uncomplete', '/tasks/{taskID}/uncomplete')
}
);
$this->create('task_add', '/tasks/add/{calendarID}/{name}')
$this->create('task_add', '/tasks/add')
->post()
->action(
function($params){

View file

@ -66,14 +66,13 @@ angular.module('Tasks').factory 'Persistence',
onSuccess or= ->
onFailure or= ->
params =
routeParams:
name: list.displayname
data:
name: list.displayname
tmpID: list.tmpID
onSuccess: onSuccess
onFailure: onFailure
@_request.post '/apps/tasks_enhanced/lists/add/{name}', params
@_request.post '/apps/tasks_enhanced/lists/add', params
setListName: (list) ->
params =
@ -144,17 +143,19 @@ angular.module('Tasks').factory 'Persistence',
onSuccess or= ->
onFailure or= ->
params =
routeParams:
name: task.name
calendarID: task.calendarID
# routeParams:
# name: task.name
# calendarID: task.calendarID
data:
name: task.name
calendarID: task.calendarID
starred: task.starred
due: task.due
tmpID: task.tmpID
onSuccess: onSuccess
onFailure: onFailure
@_request.post '/apps/tasks_enhanced/tasks/add/{calendarID}/{name}', params
@_request.post '/apps/tasks_enhanced/tasks/add', params
deleteTask: (taskID) ->
params =

View file

@ -1487,16 +1487,14 @@
onSuccess || (onSuccess = function() {});
onFailure || (onFailure = function() {});
params = {
routeParams: {
name: list.displayname
},
data: {
name: list.displayname,
tmpID: list.tmpID
},
onSuccess: onSuccess,
onFailure: onFailure
};
return this._request.post('/apps/tasks_enhanced/lists/add/{name}', params);
return this._request.post('/apps/tasks_enhanced/lists/add', params);
};
Persistence.prototype.setListName = function(list) {
@ -1602,11 +1600,9 @@
onSuccess || (onSuccess = function() {});
onFailure || (onFailure = function() {});
params = {
routeParams: {
name: task.name,
calendarID: task.calendarID
},
data: {
name: task.name,
calendarID: task.calendarID,
starred: task.starred,
due: task.due,
tmpID: task.tmpID
@ -1614,7 +1610,7 @@
onSuccess: onSuccess,
onFailure: onFailure
};
return this._request.post('/apps/tasks_enhanced/tasks/add/{calendarID}/{name}', params);
return this._request.post('/apps/tasks_enhanced/tasks/add', params);
};
Persistence.prototype.deleteTask = function(taskID) {