diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-07-11 20:31:16 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-07-11 20:31:16 +0000 |
commit | 0bbf47da8fe6123592d061ad6f36377af443f1ae (patch) | |
tree | 3310d0fe57763fcbc24746aa6a2b41a9c690be3a | |
parent | 734e44ee79590be6d9f01ca3e815304221a5c88d (diff) | |
parent | 1569dfd6cdf004a7d195dc0b8cd92396019dd54e (diff) | |
download | gitlab-ce-0bbf47da8fe6123592d061ad6f36377af443f1ae.tar.gz |
Merge branch 'cleanup-coffeescripts-from-gitlab-ci' into 'master'
Clean up coffeescript files imported from GitLab CI
## What does this MR do?
This MR cleans up CoffeeScript files imported from GitLab CI along with a strategy #19159. Some files should have been removed in !1987.
## Are there points in the code the reviewer needs to double check?
While I think the `Build` module should be named as `Build`, not `CiBuild` in the JavaScript namespace, please check if it should.
## Why was this MR needed?
Removing unused coffeescript files reduces time to build JS and so time to transfer even in production. The fewer files, the better, too.
## What are the relevant issue numbers?
Closes #19159
## Screenshots (if relevant)
n/a
## Does this MR meet the acceptance criteria?
- [skipped] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [skipped] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [skipped] API support added
- Tests
- [skipped] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !4925
-rw-r--r-- | app/assets/javascripts/application.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/javascripts/build.coffee (renamed from app/assets/javascripts/ci/build.coffee) | 6 | ||||
-rw-r--r-- | app/assets/javascripts/ci/application.js.coffee | 12 | ||||
-rw-r--r-- | app/assets/javascripts/ci/projects.js.coffee | 3 | ||||
-rw-r--r-- | app/views/projects/builds/show.html.haml | 2 |
5 files changed, 4 insertions, 20 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 64da503c35f..c98763d6271 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -47,7 +47,6 @@ #= require date.format #= require_directory ./behaviors #= require_directory ./blob -#= require_directory ./ci #= require_directory ./commit #= require_directory ./extensions #= require_directory ./lib/utils diff --git a/app/assets/javascripts/ci/build.coffee b/app/assets/javascripts/build.coffee index 74691b2c1b5..cf203ea43a0 100644 --- a/app/assets/javascripts/ci/build.coffee +++ b/app/assets/javascripts/build.coffee @@ -1,9 +1,9 @@ -class @CiBuild +class @Build @interval: null @state: null constructor: (@page_url, @build_url, @build_status, @state) -> - clearInterval(CiBuild.interval) + clearInterval(Build.interval) # Init breakpoint checker @bp = Breakpoints.get() @@ -40,7 +40,7 @@ class @CiBuild # Check for new build output if user still watching build page # Only valid for runnig build when output changes during time # - CiBuild.interval = setInterval => + Build.interval = setInterval => if window.location.href.split("#").first() is @page_url @getBuildTrace() , 4000 diff --git a/app/assets/javascripts/ci/application.js.coffee b/app/assets/javascripts/ci/application.js.coffee deleted file mode 100644 index ca24c1d759f..00000000000 --- a/app/assets/javascripts/ci/application.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -#= require pager -#= require jquery_nested_form -#= require_tree . - -$(document).on 'click', '.assign-all-runner', -> - $(this).replaceWith('<i class="fa fa-refresh fa-spin"></i> Assign in progress..') - -window.unbindEvents = -> - $(document).unbind('scroll') - $(document).off('scroll') - -document.addEventListener("page:fetch", unbindEvents) diff --git a/app/assets/javascripts/ci/projects.js.coffee b/app/assets/javascripts/ci/projects.js.coffee deleted file mode 100644 index e6406011d11..00000000000 --- a/app/assets/javascripts/ci/projects.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -$(document).on 'click', '.badge-codes-toggle', -> - $('.badge-codes-block').toggleClass("hide") - return false diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 4e801cc72fe..4421f3b9562 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -67,4 +67,4 @@ = render "sidebar" :javascript - new CiBuild("#{namespace_project_build_url(@project.namespace, @project, @build)}", "#{namespace_project_build_url(@project.namespace, @project, @build, :json)}", "#{@build.status}", "#{trace_with_state[:state]}") + new Build("#{namespace_project_build_url(@project.namespace, @project, @build)}", "#{namespace_project_build_url(@project.namespace, @project, @build, :json)}", "#{@build.status}", "#{trace_with_state[:state]}") |