From f71ca2391f379e24d173fb96eb0508f4f8a7f6d8 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 8 Oct 2015 10:00:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E8=A1=8C=E9=97=B4=E8=B7=9D=E5=B7=A8=E5=A4=A7=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/plugins/code/previewcode.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css index 5cb46628b..5fcdebe92 100644 --- a/public/assets/kindeditor/plugins/code/previewcode.css +++ b/public/assets/kindeditor/plugins/code/previewcode.css @@ -33,8 +33,8 @@ } .ke-content p { - margin: 0 0 15px 0; - margin-bottom:15pt; + /*margin: 0 0 15px 0;*/ + /*margin-bottom:15pt;*/ line-height:1.5; letter-spacing: 1px; } From 56db8b423296653987b3a3030e94b26af264ed99 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 8 Oct 2015 11:08:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9tag?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_tag_yun.html.erb | 7 +++++-- app/views/files/index.html.erb | 13 ++++++++----- public/javascripts/course.js | 30 ++++++++++++++++++++---------- public/stylesheets/courses.css | 2 +- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb index f5e22002a..6d3ebdf68 100644 --- a/app/views/files/_tag_yun.html.erb +++ b/app/views/files/_tag_yun.html.erb @@ -1,9 +1,12 @@ <% unless tag_list.nil?%> <% tag_list.each do |k,v|%> <% if tag_name && tag_name == k%> - <%= k%>×<%= v%> + <%= k%>×<%= v%> <% else%> - <%= k%>×<%= v%> + + <%= k%>×<%= v%> <% end%> <% end%> <% end%> \ No newline at end of file diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 34f7452a7..3825a9b09 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -234,6 +234,8 @@ //第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。 //目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id,就是第一种情况。如果没有id。就是第二种情况 function rename_tag(domEle,name,id,type){ + isdb = true; //这是双击 + //clearTimeout(clickFunction); if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动 return; } @@ -250,6 +252,7 @@ } //监听所有的单击事件 $(document.body).click(function(e){ + isdb = false; //这是单击 node = document.elementFromPoint(e.clientX, e.clientY); if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了 return; @@ -260,15 +263,15 @@ ele.parent().html(tagNameHtml); }else{ //否则就要更新tag名称了 - if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ +// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问 $.post( '<%= update_tag_name_path %>', {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>} ) - }else{ - ele.parent().css("border",""); - ele.parent().html(tagNameHtml); - } +// }else{ +// ele.parent().css("border",""); +// ele.parent().html(tagNameHtml); +// } } } }); diff --git a/public/javascripts/course.js b/public/javascripts/course.js index eeb11575a..6102801df 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -744,20 +744,30 @@ $(function(){ }); //查找TAG资源 +var clickFunction = null; //单击事件函数 +var isdb = false; //是否双击 function search_tag_attachment(url,tag_name,q,course_id,sort) { //alert("111"); - $.get( - url, - { - tag_name: tag_name, - q: q, - course_id:course_id - }, - function (data) { + //clearTimeout(clickFunction); + clickFunction = setTimeout(function() { + search_func() + }, 200); + function search_func(){ + if(isdb!= false ) return; + $.get( + url, + { + tag_name: tag_name, + q: q, + course_id:course_id + }, + function (data) { + + } + ); + } - } - ); } // 课程讨论区 diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 328570345..c6e9b27d3 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -723,7 +723,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px /*padding:1px 10px 修改原因,padding会导致内部输入框和外边框有边距*/ a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; } span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; } -a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;} +a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px;}/* padding:1px 10px;*/ /* 20150423作业评分*/ .ml14{ margin-left:14px;}