发送至按钮样式控制

This commit is contained in:
Tim 2016-05-11 15:51:59 +08:00
parent d7add63f56
commit 7957beb64a
5 changed files with 30 additions and 12 deletions

View File

@ -28,7 +28,7 @@
</form>
<div>
<ul class="wlist" id="pages" style="margin-top: 5px;">
<ul class="wlist" id="pages" style="margin-top: 15px;">
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
</ul>
</div>
@ -37,7 +37,7 @@
<!--<div id="upload_box" style="display: none">-->
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
<!--</div>-->
<ul class="resource-list">
<ul>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu">
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li>
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li>
@ -228,4 +228,22 @@
alert('您无法修改此资源!')
}
}
//发送至按钮控制
$("input[name='checkbox1[]']").click(function(){
if($("input[name='checkbox1[]']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border");
$(".resourcesSelectSendButton").mouseover(function(){
$(this).css("backgroundColor","#297fb8");
});
$(".resourcesSelectSendButton").mouseout(function(){
$(this).css("backgroundColor","#fff");
});
$(".sendButtonBlue").removeClass("inactive-text");
}else{
$(".resourcesSelectSendButton").addClass("inactive-border");
$(".sendButtonBlue").addClass("inactive-text");
$(".resourcesSelectSendButton").unbind("mouseover").unbind("mouseout");
}
});
</script>

View File

@ -5,13 +5,16 @@
$(".resource-switch").children().removeClass("resource-tab-active");
$(this).children().addClass("resource-tab-active");
});
$("input[name='subject-list-name']").click(function(){
if($("input[name='subject-list-name']:checked").length >= 1){
$("input[name='checkMenu']").click(function(){
if($("input[name='checkMenu']:checked").length >= 1){
$(".resourcesSelectSendButton").removeClass("inactive-border");
$(".resourcesSelectSendButton").mouseover(function(){
$(this).css("backgroundColor","#297fb8");
});
$(".resourcesSelectSendButton").mouseout(function(){
$(this).css("backgroundColor","#fff");
});
$(".sendButtonBlue").removeClass("inactive-text");
}else {
$(".resourcesSelectSendButton").addClass("inactive-border");
$(".sendButtonBlue").addClass("inactive-text");
}
});
});
@ -33,7 +36,7 @@
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="resource-wrapper">
<div class="resource-wrapper mb10">
<ul class="resource-banner">
<li class="fl resource-switch">
<a href="<%= user_homework_type_user_path(@user,:is_import => 0) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active" data-remote="true">题库</a>

View File

@ -427,7 +427,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;}
.dropdown-menu {

View File

@ -926,7 +926,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;}
.dropdown-menu {
@ -1148,4 +1147,4 @@ a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../i
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
.likeText{color: #7f7f7f}
.likeNum{color: #7f7f7f}
.likeNum{color: #7f7f7f}

View File

@ -495,7 +495,6 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;}
a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
.db {display:block !important;}
.dropdown-menu {