dev_library
caishi 6 years ago
parent cefa6fa68b
commit d0496b45be

@ -0,0 +1,62 @@
<div class="librariesField">
<li>
<a href="javascript:void(0)" class="color-blue font-18" onclick="$('#_file').click();" data-tip-down="请选择文件上传">上传附件</a>
<!--<p class="color-grey-c">(单个文件<%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>以内)</p>-->
<p class="color-grey-c mt7">从我的电脑选择要上传的文档按住CTRL可以上传多份文档</p>
<div id="network_issue" class="fl ml10 color-red none">上传出现错误,请检查您的网络环境,并刷新页面重新上传。</div>
</li>
</div>
<div id="attachments_fields" class="attachments_fields">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span class="attachment clearfix" id="attachments_p<%= i %>">
<i class="iconfont icon-fujian mr5 color-green fl mt7 font-14" aria-hidden="true"></i>
<% size = judge_Chinese_num attachment.filename %>
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden color-grey fl', :size => size, :style => 'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;font-family: Consolas;', :readonly => 'readonly') %>
<span class="color-grey mr10 fl"><%= number_to_human_size attachment.filesize %></span>
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<span class="attachment clearfix" id="attachments_p<%= i %>">
<label class="panel-form-label fl">&nbsp;</label>
<i class="iconfont icon-fujian mr5 color-green fl mt8 font-14" aria-hidden="true"></i>
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'hidden atta_input readonly color-grey fl', :style => 'border:none; max-width:980px;', :readonly => 'readonly') %>
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload fl mt2') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</div>
<%= 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',:project =>nil),
: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),
:lebel_file_uploding => l(:lebel_file_uploding),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<%= javascript_include_tag 'attachments' %>
<style>
.ui-widget-content{
/*height: 16px;*/
/*width: 200px;*/
top: 320px !important;
float: left;
margin: 5px 10px 0px 10px;
}
</style>

@ -0,0 +1,61 @@
<div class="educontent">
<div class="edu-back-white mb30 mt30">
<p class="padding20-30 clearfix bor-bottom-greyE">
<span class="font-18 fl color-grey-3">文库</span>
<a href="javascript:void(0)" class="fr color-blue font-16 mt3">新建</a>
</p>
<div class="clearfix pt20 pl30 pr30">
<ul class="fl library_nav">
<li class="active">全部</li>
<li>我的</li>
</ul>
<div class="pr fr"></div>
</div>
</div>
<div class="library_list">
<li class="library_list_item">
<img src="http://img4.duitang.com/uploads/item/201412/01/20141201183854_TRArc.thumb.700_0.png" width="50" height="50" class="radius mr15 mt3">
<div class="flex1">
<p class="task-hide font-16 mb15 lineh-20">软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格</p>
<p class="clearfix lineh-20">
<span class="color-grey-3 mr20">张莉</span>
<span class="color-grey-c mr20">188 浏览</span>
<span class="color-grey-c mr20">发布时间2018-05-15 15:45</span>
</p>
</div>
</li>
<li class="library_list_item">
<img src="http://img4.duitang.com/uploads/item/201412/01/20141201183854_TRArc.thumb.700_0.png" width="50" height="50" class="radius mr15 mt3">
<div class="flex1">
<p class="task-hide font-16 mb15 lineh-20">软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格</p>
<p class="clearfix lineh-20">
<span class="color-grey-3 mr20">张莉</span>
<span class="color-grey-c mr20">188 浏览</span>
<span class="color-grey-c mr20">发布时间2018-05-15 15:45</span>
</p>
</div>
</li>
<li class="library_list_item">
<img src="http://img4.duitang.com/uploads/item/201412/01/20141201183854_TRArc.thumb.700_0.png" width="50" height="50" class="radius mr15 mt3">
<div class="flex1">
<p class="task-hide font-16 mb15 lineh-20">软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格</p>
<p class="clearfix lineh-20">
<span class="color-grey-3 mr20">张莉</span>
<span class="color-grey-c mr20">188 浏览</span>
<span class="color-grey-c mr20">发布时间2018-05-15 15:45</span>
</p>
</div>
</li>
</div>
<div class="mt30 mb50 edu-txt-center clearfix">
<!--这里放分页-->
</div>
</div>
<script>
$(function(){
$(".library_nav").on("click","li",function(){
$(".library_nav li").removeClass("active");
$(this).addClass("active");
})
})
</script>

@ -0,0 +1,81 @@
<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint", "/codemirror/addon/selection/active-line", "/codemirror/addon/lint/javascript-lint", "/codemirror/addon/lint/css-lint", "/codemirror/addon/lint/lint", "/codemirror/addon/lint/json-lint", "/editormd/lib/codemirror/addon/lint/css-lint" %>
<%= stylesheet_link_tag "/codemirror/lib/codemirror" %>
<%= stylesheet_link_tag '/editormd/css/editormd' %>
<%= javascript_include_tag '/editormd/editormd' %>
<div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20">
<a href="javascript:void(0)" class="color-grey-9">胡莎莎</a> &gt;
<a href="javascript:void(0)" class="color-grey-9">文库</a> &gt;
<span class="color-grey-3">新建</span>
</p>
<p class="lineh-25 font-22 mb20">上传文档</p>
<div class="edu-back-white">
<div class="padding30">
<p class="clearfix mb20">
<span class="upload_Title">标题</span>
<input type="text" class="greyInput winput-240-35 mr20 fl" placeholder="例如:软件工程教学案例"/>
<span class="color-grey-c font-12 fl mt5">简明扼要介绍文档&视频所包含的主要的内容</span>
</p>
<div>
<%= render :partial => 'attachments/from_libraries', :locals => {:container => @homework} %>
</div>
</div>
<div class="padding30 bor-top-greyE">
<div class="clearfix df">
<span class="upload_Title">描述</span>
<div class="flex1">
<div id="libraries_description">
<textarea name="libraries[description]"><%#= @introduction_sample || @shixun.description %></textarea>
</div>
</div>
</div>
</div>
<div class="padding30 bor-top-greyE">
<li class="lineh-25 color-grey-6 font-18 mb20">审核说明</li>
<ul class="font-16">
<li>平台管理员将对每天新上传的文档进行审核,审核通过的文档将公开显示,否则将私有化或移除</li>
</ul>
</div>
<div class="padding30 bor-top-greyE">
<li class="lineh-25 color-grey-6 font-18 mb20">温馨提示</li>
<ul class="font-16">
<li>1.请勿上传已设置加密或只读的文档资源</li>
<li>2.可以上传教学积累和撰写的文档资料如教学案例、总结、心得等上传支持的文件最大容量100MB</li>
<li>3.上传涉及侵权内容的文档将会被移除。</li>
<li>4.为营造绿色网络环境,严禁上传违反国家关于互联网相关规定的内容</li>
<li>5.ChromeFirefoxSafariIE11及以上版本浏览器上传</li>
</ul>
</div>
</div>
</div>
<script>
/* ------------------------------- 描述md ------------------------------*/
var shixun_editormd = editormd("libraries_description", {
width: "100%",
height: 210,
syncScrolling: "single",
//你的lib目录的路径我这边用JSP做测试的
path: "/editormd/lib/",
tex: true,
watch:false,
toolbarIcons: function () {
// Or return editormd.toolbarModes[name]; // full, simple, mini
// Using "||" set icons align right.
return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"]
},
toolbarCustomIcons: {
testIcon: "<a type=\"inline\" class=\"latex\" ><div class='zbg'></div></a>",
testIcon1: "<a type=\"latex\" class=\"latex\" ><div class='zbg_latex'></div></a>"
},
//这个配置在simple.html中并没有但是为了能够提交表单使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中方便post提交表单。
saveHTMLToTextarea: true,
autoFocus: false,
// 用于增加自定义工具栏的功能可以直接插入HTML标签不使用默认的元素创建图标
dialogMaskOpacity: 0.6,
placeholder: "请输入参考答案",
imageUpload: true,
imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
imageUploadURL: "<%#= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
});
</script>

@ -0,0 +1,15 @@
<div class="educontent edu-back-white mt20 successPage">
<div>
<img src="/images/educoder/success.png" width="100" class="mb30">
<div class="lineh-30 ed-txt-center font-24 color-grey-3 font-bd mb15">
<p>恭喜!</p>
<p>文档上传成功</p>
</div>
<p class="lineh-30 ed-txt-center font-16 color-grey-9 font-bd mb15">通过平台管理员审核后,即可公开显示</p>
<li class="inline">
<a href="javascript:void(0)" class="white-btn edu-blueline-btn changebtn mr20 fl">查看已上传文档</a>
<a href="javascript:void(0)" class="white-btn edu-blueback-btn changebtn fl">继续上传</a>
</li>
</div>
</div>

@ -0,0 +1,96 @@
<div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20">
<a href="javascript:void(0)" class="color-grey-9">胡莎莎</a> &gt;
<a href="javascript:void(0)" class="color-grey-9">文库</a> &gt;
<span class="color-grey-3">新建</span>
</p>
<p class="lineh-25 mb20 clearfix">
<span class="font-22 fl mr10 task-hide" style="max-width: 800px">C语言程序教学案例</span>
<span class="fl edu-filter-btn edu-activity-green mt5">草稿</span>
<a href="javascript:void(0)" class="fr color-grey-9 mt5">返回</a>
</p>
<div class="edu-back-white">
<div class="padding30">
<p class="mb10 clearfix">
<span class="color-grey-6 font-16 mr10">私有化原因</span>
<span class="color-grey-c font-12">(请按照提示修改,并在完成编辑后重新提交)</span>
<a href="javascript:void(0)" class="color-blue fr" at="0" onclick="getMore(this)">点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i></a>
</p>
<div class="private_reason">
<li>
<p class="color-grey-9">2018-12-25 03:58</p>
<p class="lineh-25 font-16 break-word">文档&视频的任何位置(包括文档标题、简介、文档等),都不允许出现任何有推广或宣传目的内容,如电话号码、电子邮箱地址、即时通讯工具号码等具体联系信息以及广告宣传语等,其中被警告多次而仍然添加广告内容的用户会被判定为广告用户,将接受封号处罚。</p>
</li>
<li>
<p class="color-grey-9">2018-12-25 03:58</p>
<p class="lineh-25 font-16 break-word">文档&视频的任何位置(包括文档标题、简介、文档等),都不允许出现任何有推广或宣传目的内容,如电话号码、电子邮箱地址、即时通讯工具号码等具体联系信息宣传语等,其中被警告多次而仍然添加广告内容的用户会被判定为广告用户,将接受封号处罚。</p>
</li>
</div>
</div>
<div class="padding30 bor-top-greyE">
<p class="mb10 clearfix">
<span class="color-grey-6 font-16 mr10">详情</span>
<a href="javascript:void(0)" class="white-btn edu-blueline-btn fr">编辑</a>
</p>
<div class="df mb20">
<img src="http://img4.duitang.com/uploads/item/201412/01/20141201183854_TRArc.thumb.700_0.png" width="50" height="50" class="radius mr15 mt3"/>
<div class="flex1">
<li class="font-16">胡莎莎</li>
<li class="clearfix">
<span class="fl color-grey-9 mr20">国防科技大学</span>
<span class="fl color-grey-9">教授</span>
<span class="fr">
<span class="fl color-grey-9 mr30">编码:<span class="color-grey-6">2018120409235950611737</span></span>
<span class="fl color-grey-9">上传时间:<span class="color-grey-6">2018-12-04 09:23</span></span>
</span>
</li>
</div>
</div>
<div>
<div class="break_full_word new_li" id="labraries_editorMd_content">
<textarea style="display:none;"><!---内容---></textarea>
</div>
<div class="mt10">
<!--附件-->
</div>
</div>
</div>
</div>
</div>
<script>
function getMore(item) {
var at=$(item).attr("at");
if(at=="0"){
$(item).html('点击收起<i class="iconfont icon-shangjiantou color-blue font-14 ml5"></i>');
$(item).attr("at","1");
$(".private_reason").css({height:"auto"});
}else{
$(item).html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>');
$(item).attr("at","0");
$(".private_reason").css({height:"166px"});
}
}
var homeworkDescr = editormd.markdownToHTML("labraries_editorMd_content", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
</script>
<div class="educontent edu-back-white mt20 successPage">
<div>
<img src="/images/educoder/success.png" width="100" class="mb30">
<div class="lineh-30 ed-txt-center font-24 color-grey-3 font-bd mb15">
<p>恭喜!</p>
<p>文档上传成功</p>
</div>
<p class="lineh-30 ed-txt-center font-16 color-grey-9 font-bd mb15">通过平台管理员审核后,即可公开显示</p>
<li class="inline">
<a href="javascript:void(0)" class="white-btn edu-blueline-btn changebtn mr20 fl">查看已上传文档</a>
<a href="javascript:void(0)" class="white-btn edu-blueback-btn changebtn fl">继续上传</a>
</li>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -3249,4 +3249,40 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
position:absolute;
top: 12px;
right: 20px;
}
/*文库*/
.library_nav li{
float: left;cursor: pointer;margin-right: 30px;position: relative;color: #05101A;height: 40px;line-height: 20px;
font-size: 16px;
}
.library_nav li.active,.library_nav li:hover{
color: #4cacff;
}
.library_nav li.active:after{
position: absolute;content: '';background: #4cacff;color: #4cacff;width: 100%;height: 2px;bottom: 0px;left:0px;
}
.library_list{
margin-bottom: 30px;
}
.library_list_item{
background: #fff;padding:30px;margin-bottom: 15px;display: flex;
}
.upload_Title{
position: relative;margin-right: 30px;float: left;line-height: 35px;font-size: 16px;
}
.upload_Title:before{
position: absolute;left: -10px;top:2px;content: '*';color: #FE4F4C;
}
.librariesField{
width: 100%;background: #F2F9FF;justify-content: center;align-items: center;display: -webkit-flex;text-align: center;
height: 120px;border-radius: 4px;border:1px dashed #4cacff;
}
.private_reason{overflow: hidden}
.private_reason li{margin-bottom: 10px;}
.successPage{
justify-content: center;align-items: center;display: -webkit-flex;height: 570px;text-align: center;margin-bottom: 50px;
}
.changebtn{
width: 127px;font-size: 16px;height: 40px; line-height: 40px;
}

@ -180,7 +180,7 @@ a.decoration{text-decoration: underline}
/*定位*/
.pr{position: relative}
.df {display:flex;display: -webkit-flex;display: -ms-flex;}
.flex1{flex: 1;}
.flex1{flex: 1;width: 0}
/*去掉IE input框输入时自带的清除按钮*/
input::-ms-clear{display:none;}
/*自定义滚动条宽度*/

Loading…
Cancel
Save