From bc3ecc19050e7b7fcdf366a6720adb2f0f20f3d5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 8 May 2017 16:30:39 +0200 Subject: [PATCH] Improved renderScreen* to accept local el via params. --- .../app/controllers/_application_controller.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index 8c5b09f6e..5952bb0bc 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -579,19 +579,19 @@ class App.Controller extends Spine.Controller renderScreenSuccess: (data) -> App.TaskManager.touch(@task_key) if @task_key - @html App.view('generic/error/success')(data) + (data.el || @).html App.view('generic/error/success')(data) renderScreenError: (data) -> App.TaskManager.touch(@task_key) if @task_key - @html App.view('generic/error/generic')(data) + (data.el || @).html App.view('generic/error/generic')(data) renderScreenNotFound: (data) -> App.TaskManager.touch(@task_key) if @task_key - @html App.view('generic/error/not_found')(data) + (data.el || @).html App.view('generic/error/not_found')(data) renderScreenUnauthorized: (data) -> App.TaskManager.touch(@task_key) if @task_key - @html App.view('generic/error/unauthorized')(data) + (data.el || @).html App.view('generic/error/unauthorized')(data) locationVerify: (e) => newLocation = $(e.currentTarget).attr 'href'