This commit is contained in:
z9hang 2014-10-21 10:40:14 +08:00
commit 60368341ed
17 changed files with 170 additions and 117 deletions

View File

@ -21,29 +21,32 @@ class CoursesController < ApplicationController
before_filter :toggleCourse, only: [:finishcourse, :restartcourse] before_filter :toggleCourse, only: [:finishcourse, :restartcourse]
before_filter :require_login, :only => [:join, :unjoin] before_filter :require_login, :only => [:join, :unjoin]
before_filter :allow_join, :only => [:join] #before_filter :allow_join, :only => [:join]
def join def join
if User.current.logged? if User.current.logged?
course = Course.find(params[:object_id]) course = Course.find_by_id params[:object_id]
unless User.current.member_of_course? course if course
if params[:course_password] == course.password @state = 4
members = []
members << Member.new(:role_ids => [10], :user_id => User.current.id)
course.members << members
StudentsForCourse.create(:student_id => User.current.id, :course_id => params[:object_id])
@state = 0
else
@state = 1
end
else else
@state = 3 unless (allow_join && User.current.member_of_course?(course))
if params[:course_password] == course.password
members = []
members << Member.new(:role_ids => [10], :user_id => User.current.id)
course.members << members
StudentsForCourse.create(:student_id => User.current.id, :course_id => params[:object_id])
@state = 0
else
@state = 1
end
else
@state = 3
end
end end
else else
@state = 4 @state = 5
end end
respond_to do |format| respond_to do |format|
# format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_join', :locals => {:user => User.current, :course => Course.find(params[:object_id]), :object_id => params[:object_id]} } format.js { render :partial => 'set_join', :locals => {:user => User.current, :course => Course.find(params[:object_id]), :object_id => params[:object_id]} }
end end
rescue Exception => e rescue Exception => e

View File

@ -113,7 +113,7 @@ class FilesController < ApplicationController
end end
if order_by.count == 1 if order_by.count == 1
sort += "#{Attachment.table_name}.#{attribute} desc " sort += "#{Attachment.table_name}.#{attribute} asc "
elsif order_by.count == 2 elsif order_by.count == 2
sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} "
end end

View File

@ -113,7 +113,7 @@ class RepositoriesController < ApplicationController
@root_path=RepositoriesHelper::ROOT_PATH @root_path=RepositoriesHelper::ROOT_PATH
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git" @repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
@project_path=@root_path+"htdocs/"+@repository_name @project_path=@root_path+"htdocs/"+@repository_name
@repository_tag=params[:repository][:upassword] @repository_tag=params[:repository][:upassword] || params[:repository][:password]
@repo_name=User.current.login.to_s+"_"+params[:repository][:identifier] @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier]
logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag
logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name

View File

@ -31,8 +31,8 @@ a:hover{ }
没有访问权限!建议您</p> 没有访问权限!建议您</p>
<div class="error_link"> <div class="error_link">
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>----> <!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>---->
<a href="javascript:history.back()" target="_blank">后退一步</a> <a href="javascript:history.back()">后退一步</a>
<a href="http://user.trustie.net/users/5/user_newfeedback" target="_blank">给我留言</a> <a href="http://user.trustie.net/users/5/user_newfeedback">给我留言</a>
</div> </div>
</div> </div>

View File

@ -31,8 +31,8 @@ a:hover{ }
页面不见了!建议您</p> 页面不见了!建议您</p>
<div class="error_link"> <div class="error_link">
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>----> <!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>---->
<a href="javascript:history.back()" target="_blank">后退一步</a> <a href="javascript:history.back()">后退一步</a>
<a href="http://user.trustie.net/users/5/user_newfeedback" target="_blank">给我留言</a> <a href="http://user.trustie.net/users/5/user_newfeedback">给我留言</a>
</div> </div>
</div> </div>

View File

@ -1,60 +1,75 @@
<!-- added by fq --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<style> <html xmlns="http://www.w3.org/1999/xhtml">
input[type="submit"].bid_btn { <head>
vertical-align: middle; <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
width: 60px;/*modified by ming*/ <title>快速进入课程通道</title>
height: 25px; <style>
line-height: 19px; body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
font-size: 14px; div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
color: rgb(0, 0, 0); div,img,tr,td{ border:0;}
background: buttonface;/*url("/images/button/bg103.jpg") no-repeat scroll left top transparent;*/ table,tr,td{border:0; cellspacing:0; cellpadding:0;}
padding: 0px 0px 4px 0px; ul,li{ list-style-type:none}
border-radius: 2px; .cl{ clear:both; overflow:hidden; }
border: 1px solid rgb(148, 148, 148); a{ text-decoration:none; }
box-shadow: none; a:hover{ }
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>
<h3 class="title">加入公开课程或私有课程</h3>
<%= form_tag({:controller => 'courses', #popbox{width:488px;height:308px;}
:action => 'join'}, .alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
:remote => true, .C_top{ margin-top:20px; width:368px; height:100px; background:#e9e9e9; padding:0px 60px; }
:method => :post, .C_top h2{ color:#1c1d1d; font-size:24px; font-style:normal; font-weight:normal;}
:id => 'new-watcher-form') do %> .C_top p{ color:#a9aaaa; line-height:22px;}
<div> .C_form{ margin:20px 0 0 60px;}
<span>课程ID</span> .C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; }
<%= text_field_tag 'object_id', nil, :style=>'width:80%'%> .C_form ul li input{ margin-left:30px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
<span style="padding-left: 55px;color: red;">(课程ID是课程的网址中出现的序号)</span> .C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:90px;}
.width190{ width:190px; height:26px; border-color:#e1e1e1;}
.C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;}
.C_form a:hover{ text-decoration:underline;}
.C_form a.btn{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#15bccf; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
.C_form a.btn:hover{ background:#ff821d;}
</style>
<script type="text/javascript">
function submit_form(obj)
{
hideModal(obj);
$("#new-watcher-form").submit();
}
</script>
</head>
<body>
<div id="popbox">
<div class="C" >
<div class="C_top">
<h2>快速进入课程通道</h2>
<p>只要持有课程ID和密码就课快速加入所在课程。课程页面搜索不到的私有课程只能从此通道进入哦</p>
</div> </div>
<div> <div class="C_form">
<span>密码&nbsp;&nbsp;&nbsp;</span> <%= form_tag({:controller => 'courses',
<%= text_field_tag 'course_password', nil, :style=>'width:80%'%> :action => 'join'},
:remote => true,
:method => :post,
:id => 'new-watcher-form') do %>
<ul>
<li>
<span class="tips">课&nbsp;程&nbsp;ID</span>
<input class=" width190" name="object_id" id="object_id" type="text" value="" >
</li>
<li class="mB5">课程ID是所在课程网址中显示的序号</li>
<li>
<span class="tips">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</span>
<input class=" width190" type="password" name="course_password" id="course_password" value="" >
</li>
<li>
<a href="#" class="btn" onclick="submit_form(this);"><%= l(:label_new_join) %></a>
<a href="#" onclick="hideModal(this);"><%= l(:button_cancel)%></a>
</li>
</ul>
<% end%>
</div> </div>
</div><!---- C end---->
</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>
<% end %>

View File

@ -12,7 +12,7 @@
alert("您已经加入了课程"); alert("您已经加入了课程");
<% elsif @state == 4 %> <% elsif @state == 4 %>
alert("您已经的课程不存在"); alert("您已经的课程不存在");
<% elsif @state == 4 %> <% elsif @state == 5 %>
alert("您还未登录"); alert("您还未登录");
<% else %> <% else %>
alert("未知错误,请稍后再试"); alert("未知错误,请稍后再试");

View File

@ -1,3 +1,4 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>'); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>');
showModal('ajax-modal', '400px'); showModal('ajax-modal', '510px');
$('#ajax-modal').addClass('new-watcher'); $('#ajax-modal').addClass('new-watcher');
$('#ajax-modal').css('height','330px');

View File

@ -1,6 +1,7 @@
<h3><%=l(:label_attachment_new)%></h3> <h3><%=l(:label_attachment_new)%></h3>
<% attachmenttypes = course.attachmenttypes %> <% attachmenttypes = course.attachmenttypes %>
<%= error_messages_for 'attachment' %> <%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;">上传出现错误,请您检查您的网络环境,并刷新页面重新上传。</div>
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %> <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
<div class="box"> <div class="box">
<p> <p>

View File

@ -17,7 +17,7 @@
<%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %> <%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %> <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%>
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>

View File

@ -19,8 +19,11 @@
</div> </div>
<div> <div>
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script> <script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
<%= f.text_area :description, :required => true, :id => 'editor01' %> <p style="max-width:680px">
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01',{height:300});</script> <%= f.text_area :description, :required => true, :id => 'editor01' %>
</p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p> <p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p>
</div> </div>
<div class="actions" style=" padding-top: 10px; float:right"> <div class="actions" style=" padding-top: 10px; float:right">

View File

@ -4,10 +4,10 @@
<table class="list" style="table-layout: fixed;"> <table class="list" style="table-layout: fixed;">
<thead> <thead>
<tr> <tr>
<th><%= l(:field_identifier) %></th> <th style="width: 20%"><%= l(:field_identifier) %></th>
<th><%= l(:field_repository_is_default) %></th> <th style="width: 10%"><%= l(:field_repository_is_default) %></th>
<th><%= l(:label_scm) %></th> <th style="width: 15%"><%= l(:label_scm) %></th>
<th><%= l(:label_repository_path) %></th> <th style="width: 20%"><%= l(:label_repository_path) %></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -37,7 +37,7 @@
<% end %> <% end %>
<% elsif repository.scm_name=="Git"%> <% elsif repository.scm_name=="Git"%>
<%if User.current.allowed_to?(:manage_repository, @project) %> <%if User.current.allowed_to?(:manage_repository, @project) %>
<!-- <%= link_to(l(:button_edit), edit_repository_path(repository), <!-- <%#= link_to(l(:button_edit), edit_repository_path(repository),
:class => 'icon icon-edit') %> --> :class => 'icon icon-edit') %> -->
<%= link_to(l(:label_user_plural), committers_repository_path(repository), <%= link_to(l(:label_user_plural), committers_repository_path(repository),
:class => 'icon icon-user') %> :class => 'icon icon-user') %>

View File

@ -11,20 +11,31 @@
</p> </p>
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p> <p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
<p style="display: none"><%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?, <p style="display: none">
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%> <%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?,
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%>
<% unless @repository.identifier_frozen? %> <% unless @repository.identifier_frozen? %>
<em class="info" ><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %></em> <em class="info" >
<%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %>
<%= l(:text_repository_identifier_info).html_safe %></em>
<% end %></p> <% end %></p>
<!--Modified by tanxianbo--> <!--Modified by tanxianbo-->
<p><%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %> <p>
<em class='info'><%= "#{l(:label_exist_repository_path)}" %></em> <%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %>
<em class='info'>
<%= "#{l(:label_exist_repository_path)}" %>
</em>
</p>
<p>
<%= f.text_field :login, :size => 30 %>
</p>
<p>
<%= f.password_field :password, :size => 30, :name => 'ignore',
:value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)),
:onfocus => "this.value=''; this.name='repository[password]';",
:onchange => "this.name='repository[password]';" %>
</p> </p>
<p><%= f.text_field :login, :size => 30 %></p>
<p><%= f.password_field :password, :size => 30, :name => 'ignore', :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)),
:onfocus => "this.value=''; this.name='repository[password]';",
:onchange => "this.name='repository[password]';" %></p>
</div> </div>
<!--Ended by tanxianbo--> <!--Ended by tanxianbo-->
<p> <p>

View File

@ -12,10 +12,16 @@
#end%> #end%>
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 --> <!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %> <% if object_flag == '3' %>
<span><%= image_tag("/images/sidebar/tags.png") %></span> <span>
<span class="font_title_tag"><%= l(:label_tag) %>:</span> <%= image_tag("/images/sidebar/tags.png") %>
</span>
<span class="font_title_tag">
<%= l(:label_tag) %>:
</span>
<% if User.current.logged? %> <% if User.current.logged? %>
<span> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %></span> <span>
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %>
</span>
<% end %> <% end %>
<div id="tags_show_issue"> <div id="tags_show_issue">
@ -36,7 +42,9 @@
<% elsif object_flag == '6' %> <% elsif object_flag == '6' %>
<span><%#= image_tag("/images/sidebar/tags.png") %></span> <span><%#= image_tag("/images/sidebar/tags.png") %></span>
<span> <span>
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);', :class => "tags_icona", :onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %> <%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
:class => "tags_icona",
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
<%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %> <%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>
</span> </span>
&nbsp;&nbsp; &nbsp;&nbsp;
@ -47,21 +55,24 @@
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %> <%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
</div> </div>
<% else %> <% else %>
<span>
<span><%= image_tag("/images/sidebar/tags.png") %></span> <%= image_tag("/images/sidebar/tags.png") %>
<span class="font_title_tag"><%= l(:label_tag) %>:</span> </span>
<span class="font_title_tag">
<%= l(:label_tag) %>:
</span>
<% if User.current.logged? %> <% if User.current.logged? %>
<span><%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %></span> <span>
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %>
</span>
<% end %> <% end %>
<div id="tags_show"> <div id="tags_show">
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> <%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div> </div>
<div id="put-tag-form" style="display: none"> <div id="put-tag-form" style="display: none">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path, <%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show", :update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %> :complete => '$("#put-tag-form").hide();' do |f| %>
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %> <%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>

View File

@ -1,20 +1,18 @@
<% if @obj_flag == '3'%> <% if @obj_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$('#put-tag-form-issue').hide(); //$('#put-tag-form-issue').hide();
$('#name-issue').val(""); $('#name-issue').val("");
<% elsif @obj_flag == '6'%> <% elsif @obj_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%>").hide(); //$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val(""); $("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
<% else %> <% else %>
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); $('#tags_name').val("");
$('#put-tag-form #name').val("");
//$('#put-tag-form').hide(); //$('#put-tag-form').hide();
<% end %> <% end %>

View File

@ -69,6 +69,10 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
}) })
.fail(function(result) { .fail(function(result) {
progressSpan.text(result.statusText); progressSpan.text(result.statusText);
if($("#network_issue"))
{
$("#network_issue").show();
}
}).always(function() { }).always(function() {
ajaxUpload.uploading--; ajaxUpload.uploading--;
fileSpan.removeClass('ajax-loading'); fileSpan.removeClass('ajax-loading');

View File

@ -467,6 +467,12 @@ a.attachments_list_color {
font-size: 10pt; font-size: 10pt;
} }
.new-watcher{
-webkit-border-radius: 5px;
border-radius: 5px;
box-shadow: 0px 0px 8px #194a81;
}
/************************** 贴吧动态 结束 ****************************/ /************************** 贴吧动态 结束 ****************************/
/************************** 学校课程 开始 ****************************/ /************************** 学校课程 开始 ****************************/
.course{ .course{