A filter UI for permission select. with Harry's JS

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-04-06 17:46:50 +08:00
1 parent fd5c082225
commit fa441814f3
6 files changed
+25 -61

No files matched your search

@@ -1,14 +1,20 @@
$(document).ready(function() {
$('.check[checked="checked"]').parents(".checkbox").addClass("checked");
$('.check[checked="checked"]').parents(".checkbox").addClass("checked")
$(".checkbox").click(function(){
if($(this).children(".check").attr("checked")){
// uncheck
$(this).children(".check").attr('checked', false);
$(this).removeClass("checked");
$(this).children(".check").attr('checked', false);
$(this).removeClass("checked");
}else{
// check
$(this).children(".check").attr({checked: "checked"});
$(this).addClass("checked");
}
});
$(".checkbox").popover({
trigger: 'hover',
placement: 'bottom',
delay: { show: 100, hide: 300 },
});
//$(".checkbox").popover('toggle');
});
@@ -1,53 +0,0 @@
.checkblock {
display: inline-block;
float: left;
width: 200px;
}
.check[type="checkbox"]{
display:none;
}
.checkbox{
padding:5px;
margin:5px;
display: inline-block;
color:#777777;
text-shadow: 0 1px 0px rgba(255,255,255,.4);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
height: 30px;
position: relative;
cursor: pointer;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.checkbox .check-icon {
display: none;
position: absolute;
width: 22px;
height: 22px;
border-radius: 11px;
background-color: #d0f311;
right: -5px;
top: -5px;
box-shadow: 0px 0px 5px rgba(0,0,0,.05);
}
.checkbox .check-icon i {
margin: 1px 0 0 3px;
}
.checkbox .member-name {
line-height: 30px;
padding: 0 10px;
}
img.member-img {
display: inline-block;
float: left;
max-width: 30px;
}
.checked .check-icon {
display: block;
}