修改加入课程弹出框样式

This commit is contained in:
sw 2015-03-27 20:05:00 +08:00
parent 72d683bdb7
commit cee08d9c58
3 changed files with 53 additions and 60 deletions

View File

@ -4,6 +4,7 @@
<% if @state %>
<% if @state == 0 %>
alert("加入成功");
hideModal("#popbox02");
<% elsif @state == 1 %>
alert("密码错误");
<% elsif @state == 2 %>

View File

@ -1,3 +1,8 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/new_join', :locals => {:course => @course}) %>');
showModal('ajax-modal', '400px');
$('#ajax-modal').addClass('new-watcher');
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/new_join', locals: { :course => @course}) %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').css('height','100px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos");

View File

@ -1,62 +1,49 @@
<!-- added by fq -->
<style>
input[type="submit"].bid_btn {
vertical-align: middle;
width: 60px;/*modified by ming*/
height: 25px;
line-height: 19px;
font-size: 14px;
color: rgb(0, 0, 0);
background: buttonface;/*url("/images/button/bg103.jpg") no-repeat scroll left top transparent;*/
padding: 0px 0px 4px 0px;
border-radius: 2px;
border: 1px solid rgb(148, 148, 148);
box-shadow: none;
text-shadow: none;
/*margin-top: -10px;*/
/*margin-right: -4px;*/
}
input[type="button"].bid_btn {
width: 60px;/*modified by ming*/
height: 25px;
line-height: 19px;
font-size: 14px;
color: rgb(0, 0, 0);
background: buttonface;/*url("/images/button/bg103.jpg") no-repeat scroll left top transparent;*/
padding: 0px 0px 4px 0px;
border-radius: 2px;
border: 1px solid rgb(148, 148, 148);
box-shadow: none;
text-shadow: none;
/*margin-top: -10px;*/
margin-right: -2px;
}
textarea:focus {
border: #d5dee9 1px solid;
}
</style>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* 匿名评分弹框 */
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:60%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con label{ color:#808181; }
.ni_con a:hover{ text-decoration:none;}
.ni_btn{ width:190px; margin:15px auto; line-height:1.9;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
a:hover.tijiao{ background:#0f99a9;}
.c_blue{ color:#0195bd;}
.c_pink{ color:#e65d5e;}
</style>
<h3 class="title">请输入课程密码</h3>
<script type="text/javascript">
function clickCanel(){hideModal("#popbox02");}
</script>
</head>
<%= form_tag({:controller => 'courses',
:action => 'join',
:object_id => course.id},
:remote => true,
:method => :post,
:id => 'new-watcher-form') do %>
<table border="0">
<tr>
<td align="cneter">
</td>
<div>
<%= text_field_tag 'course_password', nil, :style=>'width:100%'%>
<body>
<div id="popbox02">
<div class="ni_con">
<%= form_tag({:controller => 'courses',
:action => 'join',
:object_id => course.id},
:remote => true,
:method => :post,
:id => 'new_join_course') do %>
<label>请输入课程密码:</label>
<%= text_field_tag 'course_password', nil, :style=>'width:300px;'%>
<div class="ni_btn">
<a href="javascript:" class="tijiao" onclick="$('#new_join_course').submit();" >
确&nbsp;&nbsp;定
</a>
<a href="javascript:" class="tijiao" onclick="clickCanel();">
取&nbsp;&nbsp;消
</a>
</div>
<% end %>
</div>
</div>
</body>
</html>
<p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px">
<%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %>
</p>
</td>
</tr></table>
<% end %>