diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-04-06 21:46:12 -0400 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-04-06 21:46:12 -0400 |
commit | b471c76bcb3348506c2ec96e212433d473db16c1 (patch) | |
tree | 3c1a6f2a5f888bc72dc7ce0ad7799910fcb86406 | |
parent | 936be025cde7fad6857410ef2cd842f2b1fc2a67 (diff) | |
download | gitlab-ce-b471c76bcb3348506c2ec96e212433d473db16c1.tar.gz |
Reset MR optsanti-memoizer-mr-fix
-rw-r--r-- | app/assets/javascripts/merge_request_widget.js.coffee | 8 | ||||
-rw-r--r-- | app/views/projects/merge_requests/widget/_show.html.haml | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee index 7102a0673e9..84a8887fbce 100644 --- a/app/assets/javascripts/merge_request_widget.js.coffee +++ b/app/assets/javascripts/merge_request_widget.js.coffee @@ -15,6 +15,8 @@ class @MergeRequestWidget @pollCIStatus() notifyPermissions() + setOpts: (@opts) -> + mergeInProgress: (deleteSourceBranch = false)-> $.ajax type: 'GET' @@ -48,7 +50,7 @@ class @MergeRequestWidget @getCIStatus(true) @readyForCICheck = false - ), 5000 + ), 10000 getCIStatus: (showNotification) -> _this = @ @@ -61,6 +63,10 @@ class @MergeRequestWidget @firstCICheck = false @opts.ci_status = data.status + if @opts.ci_status is '' + @opts.ci_status = data.status + return + if data.status isnt @opts.ci_status @showCIStatus data.status if data.coverage diff --git a/app/views/projects/merge_requests/widget/_show.html.haml b/app/views/projects/merge_requests/widget/_show.html.haml index 2be06aebe6c..92d95358937 100644 --- a/app/views/projects/merge_requests/widget/_show.html.haml +++ b/app/views/projects/merge_requests/widget/_show.html.haml @@ -22,4 +22,6 @@ if(typeof merge_request_widget === 'undefined') { merge_request_widget = new MergeRequestWidget(opts); + } else { + merge_request_widget.setOpts(opts); } |