diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 057d962c8..1cd5b0f15 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 # Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # @@ -378,6 +379,8 @@ class FilesController < ApplicationController tag_name = l(:label_media) when "4" tag_name = l(:label_code) + when "6" + tag_name = "论文" else tag_name = "" end diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0acf75c62..1f252cc24 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -224,10 +224,6 @@ update #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? - # g = Gitlab.client - # project = g.project(20) - # rr = g.trees(project.id, @path) - # r = g.get ("/projects/#{@project}/repository/tree") # :name, :path, :kind, :size, :lastrev, :changeset @entries = @repository.entries(@path, @rev) # @trees = g.trees(project, @path) @@ -241,10 +237,18 @@ update #Modified by young # (show_error_not_found; return) unless @entries g = Gitlab.client - @changesets = g.get ("/projects/#{@project.gpid}/repository/commits") + count = 0 + (0..100).each do |page| + if g.commits(@project.gpid,:page => page).count == 0 + break + else + count = count + g.commits(@project.gpid,:page => page).count + end + end + @changesets = g.commits(@project.gpid) # @changesets = @repository.latest_changesets(@path, @rev) # @changesets_count = @repository.latest_changesets(@path, @rev).count - @changesets_count = @changesets.count + @changesets_all_count = count @changesets_latest_coimmit = @changesets[0] @properties = @repository.properties(@path, @rev) @repositories = @project.repositories @@ -271,7 +275,9 @@ update @entry = @repository.entry(@path, @rev) (show_error_not_found; return) unless @entry g = Gitlab.client - @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}") + @commits = g.commits(@project.gpid, page:params[:pamge]) + @commit = g.commit(@project.gpid,@rev) + # @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}") #@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) @properties = @repository.properties(@path, @rev) @changeset = @repository.find_changeset_by_name(@rev) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 74580632f..c8af509f8 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -303,6 +303,7 @@ class CoursesService #@state == 7 您已经发送过申请了,请耐心等待 #@state == 8 您已经是该课程的教师了 #@state == 9 您已经是该课程的教辅了 + #@state == 10 您已经是该课程的管理员了 #@state 其他 未知错误,请稍后再试 def join_course params,current_user course = Course.find_by_id params[:object_id] @@ -325,6 +326,8 @@ class CoursesService #如果加入的角色教辅并且当前为教辅 elsif params[:role] == "7" && roleName == "TeachingAsistant" @state = 9 + elsif roleName == "Manager" + @state = 10 #如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求 elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" ) #如果已经发送过消息了,那么就要给个提示 diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index ed43f455a..fadf5e465 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -86,6 +86,9 @@ } function register(){ + if($("#loginUpButton").hasClass('loginUpDisableButton')){ + return; + } if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){ $("#main_reg_form").submit(); }else{ @@ -182,6 +185,16 @@ $('#main_login_form').submit(); } } + + function changeRegisterBtn(checkbox){ + if(checkbox.checked == true){ + $("#loginUpButton").removeClass('loginUpDisableButton'); + $("#loginUpButton").addClass('loginUpButton'); + }else{ + $("#loginUpButton").removeClass('loginUpButton') + $("#loginUpButton").addClass('loginUpDisableButton'); + } + }
@@ -270,11 +283,11 @@
- +
我已阅读并接受Trustie服务协议条款
-
- 注册 +
+ 注册
<% end %> diff --git a/app/views/courses/join.js.erb b/app/views/courses/join.js.erb index 2b4927f48..8102098d5 100644 --- a/app/views/courses/join.js.erb +++ b/app/views/courses/join.js.erb @@ -32,6 +32,10 @@ window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @co alert("您已经是该课程的教辅了"); hidden_join_course_form(); window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" +<% elsif @state == 10%> +alert("您已经是该课程的管理员了"); +hidden_join_course_form(); +window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" <% else %> alert("未知错误,请稍后再试"); <% end %> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index 4c631d22f..01e5dca5f 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -1,26 +1,4 @@ -
- -<% if defined?(container) && container && container.saved_attachments %> - <% container.attachments.each_with_index do |attachment, i| %> - - <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> - <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> - <%= l(:field_is_public)%>: - <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> - <%= if attachment.id.nil? - #待补充代码 - else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') - end - %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> - - <% end %> -<% end %> - -
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> <% if @course %> @@ -68,3 +46,29 @@ (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +
+ +
+ +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> +<% end %> + +
+
\ No newline at end of file diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 8283e15b7..4176b72d0 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -26,6 +26,9 @@ case 4: $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 4}) %>'); break; + case 6: + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 6}) %>'); + break; default: $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 5}) %>'); } @@ -77,6 +80,7 @@ 软件 |  媒体 |  代码 |  + 论文 |  其他

<% end %> diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb new file mode 100644 index 000000000..022486413 --- /dev/null +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -0,0 +1,71 @@ +<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> + +<% if @course %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");', + :style => ie8? ? '': 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js'), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all) + } %> +<% else %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => 'addInputFiles(this);', + :style => ie8? ? '': 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js'), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all) + } %> +<% end %> + + + + + <%= l(:label_no_file_uploaded)%> + +(<%= l(:label_max_size) %>: +<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +
+
+ +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> +<% end %> + +
\ No newline at end of file diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb new file mode 100644 index 000000000..62d5c68e4 --- /dev/null +++ b/app/views/files/_upload_course_files.erb @@ -0,0 +1,42 @@ + +
+
+

<%= l(:label_upload_files)%>

+
+ <%= error_messages_for 'attachment' %> + + + <%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> + + +
+ 课件 |  + 软件 |  + 媒体 |  + 代码 |  + 论文 |  + 其他 +
+
+
+ <%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %> +
+
+ <%= l(:button_cancel)%> + <%= l(:button_confirm)%> + + <% end %> +
+ +
+ <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
+ + \ No newline at end of file diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index e11a4bf38..21cd94d8d 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -1,7 +1,7 @@ -
+
-

<%= l(:label_upload_files)%>

+

<%= l(:label_upload_files)%>

<%= error_messages_for 'attachment' %> diff --git a/app/views/files/_upload_show_project.html.erb b/app/views/files/_upload_show_project.html.erb index 25a03b347..8223f071e 100644 --- a/app/views/files/_upload_show_project.html.erb +++ b/app/views/files/_upload_show_project.html.erb @@ -1,16 +1,16 @@ -
+
-

<%= l(:label_upload_files)%>

+

<%= l(:label_upload_files)%>

<%= error_messages_for 'attachment' %> <%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> - <%= render :partial => 'attachement_list',:locals => {:project => project} %> + <%= render :partial => 'files/attachement_list',:locals => {:project => project} %>
- <%= l(:button_cancel)%> + <%= l(:button_cancel)%> <%= l(:button_confirm)%> <% end %>
diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 81810344e..f24d60811 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -22,7 +22,7 @@ $("#attachments_fields").children().remove(); $("#upload_file_count").text("未上传文件"); $('#upload_file_div').slideToggle('slow'); <% if @project %> - closeModal(); + hideModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); $("#project_files_count_info").html("<%= @all_attachments.count%>"); $("#project_files_count_nav").html("(<%= @all_attachments.count%>)") diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 782efbb22..3dad88868 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -247,7 +247,7 @@ tagId = id; taggableType = type; width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100 - domEle.html(''); + domEle.html(''); domEle.parent().css("border", "1px solid #ffffff"); $("#renameTagName").focus(); } @@ -295,8 +295,8 @@ // }else{ //否则就要更新tag名称了 //// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问 // $.post( -// '<%= update_tag_name_path %>', -// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>} +// '<%#= update_tag_name_path %>', +// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%#= @course.id%>} // ) //// }else{ //// ele.parent().css("border",""); diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 305187b02..ffec82bce 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -21,12 +21,11 @@ <% end %>
-
+
<%#= l(:label_technical_support) %> - -

请加入师姐答疑群

173184401

+

请加入师姐师兄答疑群

QQ群号:173184401

diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 98e8f378d..39de4faeb 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -138,7 +138,10 @@
123
diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 1f4fabde5..e51683295 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -34,7 +34,8 @@ <%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %> <% end %> <% if User.current.member_of?(@project) %> - <%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> + <%#= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> + +上传资源 <% end %>
<% end %> diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index f4037cb36..428799f07 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -14,7 +14,7 @@ <%= render_properties(@properties) %>
- <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %> + <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @commits, :entry => @entry }) unless @commits.empty? %>
<% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 83f1a07ed..9601e5188 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -40,7 +40,7 @@ - <%=link_to @changesets_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %> 提交 + <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %> 提交
<% end %> diff --git a/config/settings.yml b/config/settings.yml index d0af6d7a1..4286e0930 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -259,7 +259,7 @@ tags_min_length: default: 1 tags_max_length: format: int - default: 14 + default: 120 tags_show_search_results: format: int default: 5 diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake index 1c1f5a36e..3c7d119f2 100644 --- a/lib/tasks/update_rep_if_fault.rake +++ b/lib/tasks/update_rep_if_fault.rake @@ -1,23 +1,11 @@ #coding=utf-8 namespace :rep_fault do - desc "update fault rep" + desc "set ossean's type value" task :rep_update => :environment do - Project.all.each do |project| - if project.repositories.count > 0 - unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? - project.repositories.each do |repository| - repository.is_default =1 - repository.save - end - end - end - end + rep = Repository.find(400) + rep.type = "Repository::Gitlab" + rep.save end - # desc "update ossean's data" - # task :update_type => :environment do - # repository = Repository.find(400) - # repository.update_attributes(:type => "Repository::Git") - # end end \ No newline at end of file diff --git a/public/images/sidebar_bg.png b/public/images/sidebar_bg.png index 9ceea0f91..e4d12da4d 100644 Binary files a/public/images/sidebar_bg.png and b/public/images/sidebar_bg.png differ diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 329d0db5a..813c10dee 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -37,27 +37,27 @@ function addFile_board(inputEl, file, eagerUpload, id) { fileSpan.append( $('', { 'type': 'text', - 'class': 'filename readonly', + 'class': 'upload_filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly' }).val(file.name), - $('', { - 'type': 'text', - 'class': 'description', - 'name': 'attachments[' + attachmentId + '][description]', - 'maxlength': 254, - 'placeholder': $(inputEl).data('descriptionPlaceholder') - }).toggle(!eagerUpload), - $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ - 'class': 'ispublic-label' - }), - $('', { - 'type': 'checkbox', - 'class': 'is_public_checkbox', - 'value': 1, - 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', - checked: 'checked' - }).toggle(!eagerUpload), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), +// $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ +// 'class': 'ispublic-label' +// }), +// $('', { +// 'type': 'checkbox', +// 'class': 'is_public_checkbox', +// 'value': 1, +// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', +// checked: 'checked' +// }).toggle(!eagerUpload), $(' ').attr({ 'href': "#", 'class': 'remove-upload', @@ -103,27 +103,27 @@ function addFile(inputEl, file, eagerUpload) { fileSpan.append( $('', { 'type': 'text', - 'class': 'filename readonly', + 'class': 'upload_filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly' }).val(file.name), - $('', { - 'type': 'text', - 'class': 'description', - 'name': 'attachments[' + attachmentId + '][description]', - 'maxlength': 254, - 'placeholder': $(inputEl).data('descriptionPlaceholder') - }).toggle(!eagerUpload), - $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ - 'class': 'ispublic-label' - }), - $('', { - 'type': 'checkbox', - 'class': 'is_public_checkbox', - 'value': 1, - 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', - checked: 'checked' - }).toggle(!eagerUpload), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), +// $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ +// 'class': 'ispublic-label' +// }), +// $('', { +// 'type': 'checkbox', +// 'class': 'is_public_checkbox', +// 'value': 1, +// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', +// checked: 'checked' +// }).toggle(!eagerUpload), $(' ').attr({ 'href': "#", 'class': 'remove-upload' @@ -532,17 +532,17 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) { fileSpan.append( $('', { 'type': 'text', - 'class': 'filename readonly', + 'class': 'upload_filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly' }).val(file.name), - $('', { - 'type': 'text', - 'class': 'description', - 'name': 'attachments[' + attachmentId + '][description]', - 'maxlength': 254, - 'placeholder': $(inputEl).data('descriptionPlaceholder') - }).toggle(!eagerUpload), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), $('
', { 'class': 'div_attachments', 'name': 'div_' + 'attachments_' + attachmentId @@ -552,27 +552,27 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) { fileSpan.append( $('', { 'type': 'text', - 'class': 'filename readonly', + 'class': 'upload_filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly' }).val(file.name), - $('', { - 'type': 'text', - 'class': 'description', - 'name': 'attachments[' + attachmentId + '][description]', - 'maxlength': 254, - 'placeholder': $(inputEl).data('descriptionPlaceholder') - }).toggle(!eagerUpload), - $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ - 'class': 'ispublic-label' - }), - $('', { - 'type': 'checkbox', - 'class': 'is_public_checkbox', - 'value': 1, - 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', - checked: 'checked' - }).toggle(!eagerUpload), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), +// $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ +// 'class': 'ispublic-label' +// }), +// $('', { +// 'type': 'checkbox', +// 'class': 'is_public_checkbox', +// 'value': 1, +// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', +// checked: 'checked' +// }).toggle(!eagerUpload), $(' ').attr({ 'href': "#", 'class': 'remove-upload' diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index f8b5395d5..5646737f5 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2745,15 +2745,31 @@ h2 img { vertical-align:middle; } /*added by william*/ #tag { - background: url(../images/issue_tag.png) no-repeat right -19px; - border-radius: 3px; - color: #3a587d !important; - padding: 1px 4px 2px 4px; - margin: 3px; - display: inline-block; - font-size: 13px; /*modified by linchun*/ - text-decoration: none; - cursor: pointer; + /*background: url(../images/issue_tag.png) no-repeat right -19px;*/ + /*border-radius: 3px;*/ + /*color: #3a587d !important;*/ + /*padding: 1px 4px 2px 4px;*/ + /*margin: 3px;*/ + /*display: inline-block;*/ + /*font-size: 13px; *//*modified by linchun*/ + /*text-decoration: none;*/ + /*cursor: pointer;*/ + border-radius: 3px; + color: #3a587d !important; + padding: 1px 4px 2px 4px; + margin: 3px; + display: inline-block; + font-size: 13px; + text-decoration: none; + cursor: pointer; + width: auto; + padding: 0 5px; + padding-top: 2px; + border: 1px solid #f8df8c; + background: #fffce6; + margin-right: 5px; + word-wrap: break-word; + word-break: break-all; } /*tanxianbo*/ diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 5612a774e..e4b31c61c 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -552,7 +552,7 @@ blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: bre #attachments_fields input.description {margin-left: 4px;width: 100px;} #attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;} -#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;} +#attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px; white-space: nowrap; } span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields span {display: block;white-space: nowrap;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} @@ -570,7 +570,7 @@ a.remove-upload:hover {text-decoration:none !important;} .attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;} -.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;} +.attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px;} span.add_attachment {font-size: 80%;line-height: 2.5em;} .attachments_fields span {display: block;white-space: nowrap;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} @@ -889,6 +889,7 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} .student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; } diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 990c02d54..26976343e 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index f753b191b..0c7cda2c7 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -726,6 +726,8 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} .loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} .loginInButton:hover {background-color: #297fb8} .loginUpButton:hover {background-color: #297fb8} +.loginUpDisableButton {width:315px; height:40px; background-color:#C1C1C1; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} +.loginUpDisableButton:hover {background-color: #C1C1C1} .loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;} .loginSign {width:405px; background-color:#ffffff;} .loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;} @@ -1144,6 +1146,7 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } +.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index 1f48c9166..1ce12bdda 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -59,7 +59,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 2623fe65e..4594d0c51 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,7 +369,7 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } - +.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} .attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } diff --git a/public/stylesheets/user_leftside.css b/public/stylesheets/user_leftside.css index e33e2c7d6..c8dfbe316 100644 --- a/public/stylesheets/user_leftside.css +++ b/public/stylesheets/user_leftside.css @@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;}