mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
Fix buttons visability on reports page according to new styleguide
This commit is contained in:
parent
4c1e120f23
commit
1f0d9f3ad7
2 changed files with 8 additions and 8 deletions
|
@ -114,14 +114,14 @@
|
|||
var editReportButton = $('#edit-report-btn');
|
||||
var deleteReportsButton = $('#delete-reports-btn');
|
||||
if (CHECKED_REPORTS.length === 0) {
|
||||
editReportButton.addClass("disabled");
|
||||
deleteReportsButton.addClass("disabled");
|
||||
editReportButton.addClass("disabled hidden");
|
||||
deleteReportsButton.addClass("disabled hidden");
|
||||
} else if (CHECKED_REPORTS.length === 1) {
|
||||
editReportButton.removeClass("disabled");
|
||||
deleteReportsButton.removeClass("disabled");
|
||||
editReportButton.removeClass("disabled hidden");
|
||||
deleteReportsButton.removeClass("disabled hidden");
|
||||
} else {
|
||||
editReportButton.addClass("disabled");
|
||||
deleteReportsButton.removeClass("disabled");
|
||||
editReportButton.removeClass('hidden').addClass('disabled');
|
||||
deleteReportsButton.removeClass("disabled hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
<span class="fas fa-plus" aria-hidden="true"></span>
|
||||
<span class="hidden-xs"><%=t "projects.reports.index.new" %></span>
|
||||
<% end %>
|
||||
<%= link_to "", remote: true, class: "btn btn-secondary", id: "edit-report-btn" do %>
|
||||
<%= link_to "", remote: true, class: "btn btn-light disabled hidden", id: "edit-report-btn" do %>
|
||||
<span class="fas fa-pencil-alt" aria-hidden="true"></span>
|
||||
<span class="hidden-xs"><%=t "projects.reports.index.edit" %></span>
|
||||
<% end %>
|
||||
<%= link_to "", remote: true, class: "btn btn-secondary", id: "delete-reports-btn" do %>
|
||||
<%= link_to "", remote: true, class: "btn btn-light disabled hidden", id: "delete-reports-btn" do %>
|
||||
<span class="fas fa-times" aria-hidden="true"></span>
|
||||
<span class="hidden-xs"><%=t "projects.reports.index.delete" %></span>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue