From e9c5e31281e4ad3c84083c39d5e50087ce909144 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Thu, 3 Mar 2016 18:02:18 -0500 Subject: Add icon as a opt for notifier --- app/assets/javascripts/lib/notify.js.coffee | 6 +++--- app/views/projects/merge_requests/widget/_show.html.haml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/lib/notify.js.coffee b/app/assets/javascripts/lib/notify.js.coffee index 26924d87d68..2cb4481fa00 100644 --- a/app/assets/javascripts/lib/notify.js.coffee +++ b/app/assets/javascripts/lib/notify.js.coffee @@ -1,11 +1,11 @@ -# Written by Jacob Schatz @jakecodes +# Written by GitLab @gitlab ((w) -> - notifyMe = (message,body) -> + notifyMe = (message,body, icon) -> notification = undefined opts = body: body - icon: "#{document.location.origin}/assets/gitlab_logo.png" + icon: icon # Let's check if the browser supports notifications if !('Notification' of window) # do nothing diff --git a/app/views/projects/merge_requests/widget/_show.html.haml b/app/views/projects/merge_requests/widget/_show.html.haml index 73ec56d170a..ac7daa54ebe 100644 --- a/app/views/projects/merge_requests/widget/_show.html.haml +++ b/app/views/projects/merge_requests/widget/_show.html.haml @@ -13,6 +13,7 @@ url_to_automerge_check: "#{merge_check_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}", check_enable: #{@merge_request.unchecked? ? "true" : "false"}, url_to_ci_check: "#{ci_status_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}", + gitlab_icon: #{asset_path "gitlab_logo.png"}, ci_enable: #{@project.ci_service ? "true" : "false"} }; -- cgit v1.2.1