diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-26 05:17:40 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-26 05:17:40 +0000 |
commit | 6fafe000f8a86daca762e4d17d9c116d29f84453 (patch) | |
tree | 174a843e9cb68564bb875a1b0bf8b2497c22e2f5 | |
parent | 12430b65d44f93bb77979d7bb546814c637fd5c6 (diff) | |
parent | a1d09190e3311cfe7744e9792a4c69822ff84b39 (diff) | |
download | gitlab-ce-6fafe000f8a86daca762e4d17d9c116d29f84453.tar.gz |
Merge branch 'prevent-duobling-ready-events' into 'master'
Prevent unnecessary doubling of js events on import pages and user calendar
Adding document.ready in Turbolinks make duplicating of events EVERY visit of page.
In example of user calendar it causes N+1 times ajax request every time you visit user page.
cc @vsizov
See merge request !456
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/import/bitbucket/status.html.haml | 3 | ||||
-rw-r--r-- | app/views/import/github/status.html.haml | 3 | ||||
-rw-r--r-- | app/views/import/gitlab/status.html.haml | 3 | ||||
-rw-r--r-- | app/views/import/gitorious/status.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/issues/_issue_context.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show/_context.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/new.html.haml | 11 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 3 |
9 files changed, 13 insertions, 22 deletions
diff --git a/CHANGELOG b/CHANGELOG index f9bd0940a71..d16f20266cb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -42,6 +42,7 @@ v 7.10.0 (unreleased) - Send EmailsOnPush email when branch or tag is created or deleted. - Faster merge request processing for large repository - Prevent doubling AJAX request with each commit visit via Turbolink + - Prevent unnecessary doubling of js events on import pages and user calendar v 7.9.0 - Add HipChat integration documentation (Stan Hu) diff --git a/app/views/import/bitbucket/status.html.haml b/app/views/import/bitbucket/status.html.haml index 9da3c920c62..4e49bbbc7fa 100644 --- a/app/views/import/bitbucket/status.html.haml +++ b/app/views/import/bitbucket/status.html.haml @@ -42,5 +42,4 @@ = button_tag "Import", class: "btn js-add-to-import" :coffeescript - $ -> - new ImporterStatus("#{jobs_import_bitbucket_path}", "#{import_bitbucket_path}") + new ImporterStatus("#{jobs_import_bitbucket_path}", "#{import_bitbucket_path}") diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml index 9c4d91013ec..f0bc3e6b1ac 100644 --- a/app/views/import/github/status.html.haml +++ b/app/views/import/github/status.html.haml @@ -42,5 +42,4 @@ = button_tag "Import", class: "btn js-add-to-import" :coffeescript - $ -> - new ImporterStatus("#{jobs_import_github_path}", "#{import_github_path}") + new ImporterStatus("#{jobs_import_github_path}", "#{import_github_path}") diff --git a/app/views/import/gitlab/status.html.haml b/app/views/import/gitlab/status.html.haml index e809643d8d4..33b0a21acf3 100644 --- a/app/views/import/gitlab/status.html.haml +++ b/app/views/import/gitlab/status.html.haml @@ -42,5 +42,4 @@ = button_tag "Import", class: "btn js-add-to-import" :coffeescript - $ -> - new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_path}") + new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_path}") diff --git a/app/views/import/gitorious/status.html.haml b/app/views/import/gitorious/status.html.haml index 645241a6c69..78c5e957be0 100644 --- a/app/views/import/gitorious/status.html.haml +++ b/app/views/import/gitorious/status.html.haml @@ -42,5 +42,4 @@ = button_tag "Import", class: "btn js-add-to-import" :coffeescript - $ -> - new ImporterStatus("#{jobs_import_gitorious_path}", "#{import_gitorious_path}") + new ImporterStatus("#{jobs_import_gitorious_path}", "#{import_gitorious_path}") diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml index 91fe0b68371..c3d6dc2e50b 100644 --- a/app/views/projects/issues/_issue_context.html.haml +++ b/app/views/projects/issues/_issue_context.html.haml @@ -43,7 +43,6 @@ You're receiving notifications because you're subscribed to this thread. :coffeescript - $ -> - new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}") + new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}") diff --git a/app/views/projects/merge_requests/show/_context.html.haml b/app/views/projects/merge_requests/show/_context.html.haml index 14ad89a2000..80e5c223d60 100644 --- a/app/views/projects/merge_requests/show/_context.html.haml +++ b/app/views/projects/merge_requests/show/_context.html.haml @@ -45,7 +45,4 @@ You're receiving notifications because you're subscribed to this thread. :coffeescript - $ -> - new Subscription("#{toggle_subscription_namespace_project_merge_request_path(@merge_request.project.namespace, @project, @merge_request)}") - -
\ No newline at end of file + new Subscription("#{toggle_subscription_namespace_project_merge_request_path(@merge_request.project.namespace, @project, @merge_request)}") diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 9687c8ad87c..42af2f32239 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -109,9 +109,8 @@ %p Please wait a moment, this page will automatically refresh when ready. :coffeescript - $ -> - $('.how_to_import_link').bind 'click', (e) -> - e.preventDefault() - import_modal = $(this).next(".modal").show() - $('.modal-header .close').bind 'click', -> - $(".modal").hide() + $('.how_to_import_link').bind 'click', (e) -> + e.preventDefault() + import_modal = $(this).next(".modal").show() + $('.modal-header .close').bind 'click', -> + $(".modal").hide() diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 0653fb871ae..5e1d65e2ed8 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -47,5 +47,4 @@ = render 'projects' :coffeescript - $ -> - $(".user-calendar").load("#{user_calendar_path}") + $(".user-calendar").load("#{user_calendar_path}") |