Remove meta params of form.
This commit is contained in:
parent
5fd5f4318a
commit
5c94682caf
1 changed files with 11 additions and 5 deletions
|
@ -602,11 +602,17 @@ class App.TicketZoom extends App.Controller
|
|||
|
||||
# get diff of model
|
||||
modelDiff =
|
||||
ticket: App.Utils.formDiff(currentParams.ticket, currentStore.ticket)
|
||||
article: App.Utils.formDiff(currentParams.article, currentStore.article)
|
||||
|
||||
ticket: @forRemoveMeta(App.Utils.formDiff(currentParams.ticket, currentStore.ticket))
|
||||
article: @forRemoveMeta(App.Utils.formDiff(currentParams.article, currentStore.article))
|
||||
modelDiff
|
||||
|
||||
forRemoveMeta: (params = {}) ->
|
||||
paramsNew = {}
|
||||
for key, value of params
|
||||
if !key.match(/_completion$/)
|
||||
paramsNew[key] = value
|
||||
paramsNew
|
||||
|
||||
markFormDiff: (diff = {}) =>
|
||||
ticketForm = @$('.edit')
|
||||
ticketSidebar = @$('.tabsSidebar-tab[data-tab="ticket"]')
|
||||
|
@ -614,8 +620,8 @@ class App.TicketZoom extends App.Controller
|
|||
resetButton = @$('.js-reset')
|
||||
|
||||
params = {}
|
||||
params.ticket = @formParam(ticketForm)
|
||||
params.article = @formParam(articleForm)
|
||||
params.ticket = @forRemoveMeta(@formParam(ticketForm))
|
||||
params.article = @forRemoveMeta(@formParam(articleForm))
|
||||
|
||||
# clear all changes
|
||||
if _.isEmpty(diff.ticket) && _.isEmpty(diff.article)
|
||||
|
|
Loading…
Reference in a new issue