From fde06a2327529901961e2742280b18da43ed754f Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 20 Jun 2016 16:35:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_show_attachment_history.html.erb | 12 ++--- app/views/files/_org_subfield_list.html.erb | 7 +-- app/views/files/_project_file_list.html.erb | 7 +-- app/views/files/_project_list.html.erb | 11 ++--- app/views/files/_resource_detail.html.erb | 7 +-- public/assets/kindeditor/pasteimg.js | 44 +++++++++---------- public/stylesheets/courses.css | 6 +++ public/stylesheets/new_user.css | 6 +++ public/stylesheets/project.css | 6 +++ 9 files changed, 56 insertions(+), 50 deletions(-) diff --git a/app/views/attachments/_show_attachment_history.html.erb b/app/views/attachments/_show_attachment_history.html.erb index 6e2994a8d..ee607cec4 100644 --- a/app/views/attachments/_show_attachment_history.html.erb +++ b/app/views/attachments/_show_attachment_history.html.erb @@ -39,19 +39,19 @@ +
+ (未选择文件) + 您可以上传小于50MB的文件 +
- +

描述:

- +
-
-
(未选择文件)
-
您可以上传小于50MB的文件
-
diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb index fcf0e9982..1bbdc0e93 100644 --- a/app/views/files/_org_subfield_list.html.erb +++ b/app/views/files/_org_subfield_list.html.erb @@ -43,15 +43,12 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
-
<% else %>
- <% unless file.description.blank? %> -
-
资源描述:<%= file.description %>
- <% end %> + 资源描述:<% if file.description.blank? %>未添加<% else %><%= file.description %><% end %>
<% end %> diff --git a/app/views/files/_project_file_list.html.erb b/app/views/files/_project_file_list.html.erb index b8b38f7b9..4d3645a33 100644 --- a/app/views/files/_project_file_list.html.erb +++ b/app/views/files/_project_file_list.html.erb @@ -48,15 +48,12 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
- <% else %>
- <% unless file.description.blank? %> -
-
资源描述:<%= file.description %>
- <% end %> + 资源描述:<% if file.description.blank? %>未添加<% else %><%= file.description %><% end %>
<% end %>
diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb index 48fb4c86f..36dc80a18 100644 --- a/app/views/files/_project_list.html.erb +++ b/app/views/files/_project_list.html.erb @@ -40,16 +40,13 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
-
<% else %> -
- <% unless file.description.blank? %> -
-
资源描述:<%= file.description %>
- <% end %> -
+
+ 资源描述:<% if file.description.blank? %>未添加<% else %><%= file.description %><% end %> +
<% end %>
diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index 8aedc3c03..0edf22e58 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -42,15 +42,12 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
-
<% else %>
- <% unless file.description.blank? %> -
-
资源描述:<%= file.description %>
- <% end %> + 资源描述:<% if file.description.blank? %>未添加<% else %><%= file.description %><% end %>
<% end %> <%# end %> diff --git a/public/assets/kindeditor/pasteimg.js b/public/assets/kindeditor/pasteimg.js index d7ffead5b..479b1101a 100644 --- a/public/assets/kindeditor/pasteimg.js +++ b/public/assets/kindeditor/pasteimg.js @@ -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; }; diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 393903177..ed99217b8 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -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;} \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 5fc6110fd..ee3ddf6df 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -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;} \ No newline at end of file diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index ac65d34c2..d8b8cc74a 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -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;} \ No newline at end of file From d3f3f019a0c664871c31a060cfecf6e431087973 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 20 Jun 2016 16:40:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=9C=89=E6=97=B6=E5=80=99=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/public.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index ff71bf5c4..333c410ca 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -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;}