Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-07 14:49:56 +0300
committerPhil Hughes <me@iamphill.com>2016-06-14 10:36:07 +0300
commitf8a8999a2069dedd9ca21bde2b726a077c057576 (patch)
tree403a6162dad8e7f7789b4bad4e9eb1fb571430f6 /app/views/shared/issuable
parent04c199a0ab2db012e8c5a190ce2836f22e846305 (diff)
Cached jQuery selectors
Diffstat (limited to 'app/views/shared/issuable')
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index e3aacb50c97..26052c47b0f 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -9,12 +9,11 @@
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", aria: { label: "Toggle sidebar" } }
= sidebar_gutter_toggle_icon
- if current_user
- %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", data: { todo_text: "Add Todo", mark_text: "Mark Done", id: (todo.id unless todo.nil?), url: issuable_todo_path(issuable) } }
- - if todo.nil?
- %span
+ %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", aria: { label: (todo.nil? ? "Add Todo" : "Mark Done") }, data: { todo_text: "Add Todo", mark_text: "Mark Done", id: (todo.id unless todo.nil?), url: issuable_todo_path(issuable) } }
+ %span.js-issuable-todo-text
+ - if todo.nil?
Add Todo
- - else
- %span
+ - else
Mark Done
= icon('spin spinner', class: 'hidden js-issuable-todo-loading')