Commit 9b0205d9 authored by Kristof Csillag's avatar Kristof Csillag

Merge pull request #534 from hypothesis/521-streamer-updates-are-broken

fixes #521
parents eef0811f cbfc19fe
......@@ -90,7 +90,7 @@ class Displayer
@idTable[annotation.id] = annotation
replies.splice pos, 0, annotation
when 'edit'
when 'update'
$scope.change_annotation_content annotation.id, annotation
when 'delete'
......
......@@ -50,11 +50,11 @@ class Streamer
@sfilter.setActionCreate(params.action_create)
else
@sfilter.setActionCreate(params.action_create is 'true')
if params.action_edit
if (typeof params.action_edit) is 'boolean'
@sfilter.setActionEdit(params.action_edit)
if params.action_update
if (typeof params.action_update) is 'boolean'
@sfilter.setActionUpdate(params.action_update)
else
@sfilter.setActionEdit(params.action_edit is 'true')
@sfilter.setActionUpdate(params.action_update is 'true')
if params.action_delete
if (typeof params.action_delete) is 'boolean'
@sfilter.setActionDelete(params.action_delete)
......@@ -140,7 +140,7 @@ class Streamer
$location.search
'match_policy': $scope.filter.match_policy
'action_create': $scope.filter.actions.create
'action_edit': $scope.filter.actions.edit
'action_update': $scope.filter.actions.update
'action_delete': $scope.filter.actions.delete
'load_past': $scope.filter.past_data.load_past
'go_back': $scope.filter.past_data.go_back
......
......@@ -67,7 +67,7 @@ class StreamFilter
clauses : []
actions :
create: true
edit: true
update: true
delete: true
past_data:
load_past: "none"
......@@ -81,7 +81,7 @@ class StreamFilter
getClauses: -> return @filter.clauses
getActions: -> return @filter.actions
getActionCreate: -> return @filter.actions.create
getActionEdit: -> return @filter.actions.edit
getActionUpdate: -> return @filter.actions.update
getActionDelete: -> return @filter.actions.delete
setPastDataNone: ->
......@@ -129,8 +129,8 @@ class StreamFilter
@filter.actions.create = action
this
setActionEdit: (action) ->
@filter.actions.edit = action
setActionUpdate: (action) ->
@filter.actions.update = action
this
setActionDelete: (action) ->
......@@ -171,7 +171,7 @@ class StreamFilter
resetFilter: ->
@setMatchPolicyIncludeAny()
@setActionCreate(true)
@setActionEdit(true)
@setActionUpdate(true)
@setActionDelete(true)
@setPastDataNone()
@noClauses()
......
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