Conflicts:
	app/views/courses/_course_form.html.erb
This commit is contained in:
sw 2014-08-23 13:52:49 +08:00
commit 889af8be5f
4 changed files with 64 additions and 9 deletions

View File

@ -42,15 +42,14 @@
<ul class="sub_menu"> <ul class="sub_menu">
<% if @show_course == 1 %> <% if @show_course == 1 %>
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%> <% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
<% hasCourse=true%>
<% _bool=false %> <% hasCourse=false %>
<% User.current.courses.each do |course| %> <% User.current.courses.each do |course| %>
<% if !course_endTime_timeout?(course) %> <% if !course_endTime_timeout?(course) %>
<% _bool=true %> <% hasCourse=true %>
<% end %> <% end %>
<% end %> <% end %>
<% if _bool %> <% if hasCourse %>
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %> <li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
<ul class="course_sub_menu"> <ul class="course_sub_menu">
<% User.current.courses.each do |course| %> <% User.current.courses.each do |course| %>
@ -71,7 +70,7 @@
<% if hasCourse %> <% if hasCourse %>
<ul class="project_sub_menu" style="top: 35px"> <ul class="project_sub_menu" style="top: 35px">
<% else %> <% else %>
<ul class="project_sub_menu"> <ul class="project_sub_menu" style="top: 0px">
<% end %> <% end %>
<% User.current.projects.each do |project| %> <% User.current.projects.each do |project| %>
<li><%= link_to project.name.truncate(10, omission: '...'), {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %></li> <li><%= link_to project.name.truncate(10, omission: '...'), {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %></li>

View File

@ -46,7 +46,7 @@
</div> </div>
<div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div> <div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>" style="word-break: break-all;"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
<div class="memo-content"> <div class="memo-content">
<%= textAreailizable(@memo,:content) %> <%= textAreailizable(@memo,:content) %>
<p> <p>

View File

@ -6,9 +6,9 @@
<li> <li>
<table width="660px" border="0" align="center"> <table width="660px" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), <td colspan="2" valign="top" width="50">
user_path(user), <%= link_to image_tag(url_to_avatar(user), :class => "avatar"),user_path(user),:title => "#{user.name}" %>
:title => "#{user.name}" %></td> </td>
<td> <td>
<table width="580px" border="0"> <table width="580px" border="0">
<tr> <!-- modified by bai --> <tr> <!-- modified by bai -->
@ -27,6 +27,8 @@
<% for member in memberships %> <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %> <% end %>
<% else %>
<%= l(:label_x_contribute_to, :count => 0) %>
<% end %> <% end %>
</p> </p>
@ -38,6 +40,8 @@
<% for member in memberships %> <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %> <% end %>
<% else %>
<%= l(:label_x_course_contribute_to, :count => 0) %>
<% end %> <% end %>
</p> </p>
</td> </td>

View File

@ -633,3 +633,55 @@ function img_thumbnails() {
}); });
} }
$(document).ready(img_thumbnails); $(document).ready(img_thumbnails);
function TimeClose(dateText, inst) {
if(inst.id=="issue_start_date"){
time=dateText;
}
}
var time=new Date();
function TimeBeforeShow(input){
if(input.id=="issue_due_date"){
//var minDate = $(input).datepicker('option', 'minDate');
var tempdata=$("#issue_start_date").attr("value");
$(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/")));
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
}
}
function SetMinValue(){
/// var tempdata=$("#issue_start_date").attr("value");
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
//alert(tempdata);
//$("#issue_due_date").datepicker({
// minDate: new Date(2014,08,23)
//var datepickerOptions=
//{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
//alert( $('.issue_due_date').length);
//$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23));
//$("#issue_due_date").datepicker(datepickerOptions);
//$("##{issue_due_date}").datepicker(datepickerOptions);
//$("#issue_due_date").datepicker(
// {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}
//)
//});
}
function PrecentChange(obj){
var _v= obj;
if(_v==100)
{
//var select=$("select[id='issue_status_id']");
$("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected");
}
else if(_v==0)
{
//alert(1);
$("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected");
}
else if(_v!=100&&_v!=0)
{
// alert(2);
$("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected");
}
}