Skip to content

Commit

Permalink
Rely more on bootstrap's (new) dropdown disabled class, rather than r…
Browse files Browse the repository at this point in the history
…olling our own. fixes #26
  • Loading branch information
aroman committed Mar 24, 2013
1 parent d411e04 commit 3c64688
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
19 changes: 6 additions & 13 deletions static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,11 @@ select.input-xlarge {
font-size: 12px;
}

/*
Styling for disabled drop-drop menu item
Adapted from: http://stackoverflow.com/questions/9682082
*/
a.disabled-dropdown-item {
color:#aaa !important;
background-color: white !important;
background-image: none !important;
pointer-events: none;
cursor: default;
}

a.disabled-dropdown-item > i {
/* Patch bootstrap's dropdown disabled style to grey out icons */
li.disabled {
pointer-events: none;
}

li.disabled i {
opacity: 0.4;
}
4 changes: 2 additions & 2 deletions static/js/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ AppView = Backbone.View.extend({
_.defer(function () {
$(".btn, input[type='checkbox']").not('.details-show').prop('disabled', true);
});
$("#force-refresh, #nickname, #logout").addClass('disabled-dropdown-item');
$("#force-refresh, #nickname, #logout").parent().addClass('disabled');
},

enableControls: function () {
Expand All @@ -979,7 +979,7 @@ AppView = Backbone.View.extend({
_.defer(function () {
$(".btn, input[type='checkbox']").not('.details-show').prop('disabled', false);
});
$("#force-refresh, #nickname, #logout").removeClass('disabled-dropdown-item');
$("#force-refresh, #nickname, #logout").parent().removeClass('disabled');
},

refresh: function () {
Expand Down

0 comments on commit 3c64688

Please sign in to comment.