Merge branch 'yuanke' into develop

This commit is contained in:
yuanke 2016-06-20 16:41:23 +08:00
commit 301556b9c3
10 changed files with 57 additions and 51 deletions

View File

@ -39,19 +39,19 @@
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
</div>
<div class="W300 uploadResourceIntr fontGrey2">
<span id="upload_file_count" class="mr15">(未选择文件)</span>
<span>您可以上传小于<span class="c_red">50MB</span>的文件</span>
</div>
<div class="cl"></div>
<div class="mb5 mt5">
<label class="fl c_dark f14" style="line-height:30px;">描述:</label>
<p class="c_dark f14" style="line-height:30px;">描述:</p>
<div class="fl">
<input type="text" name="description" class="InputBox fl W160" value="<%= @attachment.description %>">
<textarea style="resize:none" type="text" name="description" class="InputBox fl H60 W420" value="<%= @attachment.description %>"></textarea>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
<div class="uploadResourceIntr">
<div class="uploadResourceName fl"><span id="upload_file_count">(未选择文件)</span></div>
<div class="uploadResourceIntr2 fl">您可以上传小于<span class="c_red">50MB</span>的文件</div>
</div>
</div>
<div class="cl"></div>
<div style="margin-top: 10px" >

View File

@ -43,15 +43,12 @@
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W600 none " placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
onblur="edit_file_description('<%= update_file_description_org_subfield_file_path(file.container,file)%>','<%= file.id %>');"><%= file.description %></textarea>
</div>
<% else %>
<div class="fontGrey2 mb4">
<% unless file.description.blank? %>
<div class="cl"></div>
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
<% end %>
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE;">未添加</span><% else %><%= file.description %><% end %>
</div>
<% end %>

View File

@ -48,15 +48,12 @@
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W600 none " placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
onblur="edit_file_description('<%= update_file_description_project_file_path(project,file)%>','<%= file.id %>');"><%= file.description %></textarea>
</div>
<% else %>
<div class="fontGrey2 mb4">
<% unless file.description.blank? %>
<div class="cl"></div>
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
<% end %>
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE;">未添加</span><% else %><%= file.description %><% end %>
</div>
<% end %>
<div class="tag_h">

View File

@ -40,16 +40,13 @@
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W600 none " placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
onblur="edit_file_description('<%= update_file_description_project_file_path(project,file)%>','<%= file.id %>');"><%= file.description %></textarea>
</div>
<% else %>
<div class="fontGrey2 mb4">
<% unless file.description.blank? %>
<div class="cl"></div>
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
<% end %>
</div>
<div class="fontGrey2 mb4">
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE;">未添加</span><% else %><%= file.description %><% end %>
</div>
<% end %>
<div class="tag_h">
<!-- container_type = 1 代表是课程里的资源 -->

View File

@ -42,15 +42,12 @@
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W600 none " placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
onblur="edit_file_description('<%= update_file_description_course_file_path(@course,file)%>','<%= file.id %>');"><%= file.description %></textarea>
</div>
<% else %>
<div class="fontGrey2 mb4">
<% unless file.description.blank? %>
<div class="cl"></div>
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
<% end %>
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE;">未添加</span><% else %><%= file.description %><% end %>
</div>
<% end %>
<%# end %>

View File

@ -327,28 +327,28 @@ function enablePasteImg(_editor) {
};
$(nodeBody).on('pasteImage', function(ev, data) {
console.log('pasteImage');
console.log("dataURL: " + data.dataURL);
console.log("width: " + data.width);
console.log("height: " + data.height);
var blob = dataURItoBlob(data.dataURL);
if (data.blob !== null) {
var data = new FormData();
data.append("imgFile",blob, "imageFilename.png");
console.log(data);
$.ajax({
url: '/kindeditor/upload?dir=image',
contentType: false,
type: 'POST',
data: data,
processData: false,
success: function(data) {
console.log(data);
editor.exec('insertimage', JSON.parse(data).url);
}
});
}
//粘贴图片时走这里会出现两张图片走df()即可
// console.log('pasteImage');
// console.log("dataURL: " + data.dataURL);
// console.log("width: " + data.width);
// console.log("height: " + data.height);
// var blob = dataURItoBlob(data.dataURL);
// if (data.blob !== null) {
// var data = new FormData();
// data.append("imgFile",blob, "imageFilename.png");
// console.log(data);
// $.ajax({
// url: '/kindeditor/upload?dir=image',
// contentType: false,
// type: 'POST',
// data: data,
// processData: false,
// success: function(data) {
// console.log(data);
// editor.exec('insertimage', JSON.parse(data).url);
// }
// });
// }
});
return;
};

View File

@ -1421,3 +1421,9 @@ a.pages-big{ width:50px;}
/*未登录回复提示*/
.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
/*更新资源文件的描述框*/
.H60 {height:60px !important;}
.W420 {width:420px;}
.W300 {width:300px !important;}
.W600{ width:600px;}

View File

@ -1796,3 +1796,9 @@ input.new_loggin_input{
/*未登录回复提示*/
.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
/*更新资源文件的描述框*/
.H60 {height:60px !important;}
.W420 {width:420px;}
.W300 {width:300px !important;}
.W600{ width:600px;}

View File

@ -1249,3 +1249,9 @@ a.pages-big{ width:50px;}
/*未登录回复提示*/
.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
/*更新资源文件的描述框*/
.H60 {height:60px !important;}
.W420 {width:420px;}
.W300 {width:300px !important;}
.W600{ width:600px;}

View File

@ -533,7 +533,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:50px; position:relative; display:inline-block;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
.navHomepageProfile ul li ul {display:none;}
.navHomepageProfile ul li:hover ul {display:block;}