From 26e0f7db0bda202fd017b5851405c70234af30ba Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 13 Oct 2015 15:48:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=98=AF=E8=80=81=E5=B8=88=EF=BC=8C?= =?UTF-8?q?=E5=B0=B1=E9=83=BD=E8=83=BD=E7=BC=96=E8=BE=91=EF=BC=8C=E6=9C=89?= =?UTF-8?q?id=EF=BC=8C=E5=B0=B1=E6=98=AF=E5=8F=AA=E8=83=BD=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=B5=84=E6=BA=90=E9=87=8C=E7=9A=84tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/index.html.erb | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 656baaf63..782efbb22 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -234,21 +234,23 @@ //第二种是改变某个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; + if(String(id) != '' || '<%=User.current.allowed_to?(:as_teacher,@course)%>' == 'true' ) { //如果有id ,或者是老师就都能编辑,否则,没有id,不是老师就不能编辑 + isdb = true; //这是双击 + //clearTimeout(clickFunction); + if (domEle.children().get(0) != undefined) { //已经是编辑框的情况下不要动 + return; + } + tagNameHtml = domEle.parent().html() + tagName = name; + parentCssBorder = domEle.parent().css("border"); + ele = domEle; + tagId = id; + taggableType = type; + width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100 + domEle.html(''); + domEle.parent().css("border", "1px solid #ffffff"); + $("#renameTagName").focus(); } - tagNameHtml = domEle.parent().html() - tagName = name; - parentCssBorder = domEle.parent().css("border"); - ele = domEle; - tagId = id; - taggableType = type; - width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100 - domEle.html(''); - domEle.parent().css("border","1px solid #ffffff"); - $("#renameTagName").focus(); } //监听所有的单击事件 $(function(){ From c9b23c55976e34e1c3db61227a28ab6486c5fb15 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 13 Oct 2015 15:59:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B4=B4=E5=90=A7=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=20=E5=BA=94=E8=AF=A5=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/nyan.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index b64e60831..b476210b1 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -724,6 +724,10 @@ div.actions input[type="text"] { word-wrap: break-word; } +.memo-content li { + list-style-type: decimal; +} + .memo-timestamp { position: absolute; bottom: 0px; From 2d6055504158b9d801c9c172958c89daf15acbab Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 13 Oct 2015 16:06:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8D=95=E4=B8=AA=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E5=85=A8=E9=83=A8=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 4224d0987..d6acabd9e 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -86,15 +86,15 @@