Skip to content

Commit

Permalink
Disabled download patients button when no patients in test. Also edit…
Browse files Browse the repository at this point in the history
…ed _markup so the xml all colors correctly
  • Loading branch information
Michael O'Keefe authored and ssayer committed Mar 3, 2015
1 parent 97803a5 commit e377422
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 8 additions & 1 deletion app/assets/stylesheets/cypress/_buttons.scss
Expand Up @@ -12,9 +12,16 @@ a.cmd, input.cmd {
text-align: center;
text-decoration: none;
cursor: pointer;
}


a.cmd[disabled], a.cmd[disabled]:hover {
@include bordered(grey);
pointer-events: none;
color: grey;
background-color: $btnBkgColor;
cursor: not-allowed;
}

a.cmd:hover, input.cmd:hover {
background-color: $btnHoverBkg;
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/cypress/_markup.scss
Expand Up @@ -16,7 +16,7 @@
}

.start-tag { color: #00008b;}
.end_tag { color: #00008b;}
.end-tag { color: #00008b;}


.pi { color: #9932CC; }
Expand Down
14 changes: 12 additions & 2 deletions app/views/product_tests/_status.html.erb
Expand Up @@ -32,11 +32,21 @@ $(document).ready(function(){
<p>
1. Download Test Data
</p><p>
<%= link_to 'Test Data', '', {
<%=
if test.records.empty?
link_to 'No Data Available', 'javascript:;', {
:id => 'share_menu',
:class => "cmd",
:disabled => "disabled"
}
else
link_to 'Test Data', '', {
:id => 'share_menu',
:class => "cmd",
:onmouseover => "$.cypress.showMenu($('#share_menu'), $('#share_options'));"
} %></p>
}
end
%></p>
<ul id="share_options" style="display: none" role="listbox"
class="ui-menu ui-widget ui-widget-content ui-corner-all dialog-menu" aria-activedescendant="ui-active-menuitem">
<li class="ui-menu-item" role="menuitem">
Expand Down

0 comments on commit e377422

Please sign in to comment.