Bug#2409 CSV regenerate popup only showed when you are overwriting the previous url
parent
3a94af6df0
commit
3108df4553
|
@ -647,9 +647,7 @@ class CsvExporterController extends taiga.Controller
|
|||
setCsvUuid: =>
|
||||
@scope.csvUuid = @scope.project["#{@.type}_csv_uuid"]
|
||||
|
||||
regenerateUuid: ->
|
||||
#TODO: i18n
|
||||
@confirm.ask("Change URL", "You going to change the CSV data access url. The previous url will be disabled. Are you sure?").then (finish) =>
|
||||
_generateUuid: (finish) =>
|
||||
promise = @rs.projects["regenerate_#{@.type}_csv_uuid"](@scope.projectId)
|
||||
|
||||
promise.then (data) =>
|
||||
|
@ -662,6 +660,13 @@ class CsvExporterController extends taiga.Controller
|
|||
finish()
|
||||
return promise
|
||||
|
||||
regenerateUuid: ->
|
||||
#TODO: i18n
|
||||
if @scope.csvUuid
|
||||
@confirm.ask("Change URL", "You going to change the CSV data access url. The previous url will be disabled. Are you sure?").then @._generateUuid
|
||||
else
|
||||
@._generateUuid(_.identity)
|
||||
|
||||
class CsvExporterUserstoriesController extends CsvExporterController
|
||||
type: "userstories"
|
||||
|
||||
|
|
Loading…
Reference in New Issue