From 84c2e39e6c6642ceda85c296fed9581f5482dcfe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 3 Apr 2015 17:06:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E9=97=BB=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF=E3=80=82=E8=AF=AF=E5=B0=86?= =?UTF-8?q?safe=5Fattributes=E6=8D=A2=E4=B8=BA=E7=9B=B4=E6=8E=A5=E5=B1=9E?= =?UTF-8?q?=E6=80=A7comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index bb84b1fa4..57ad9d4ce 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -27,7 +27,7 @@ class CommentsController < ApplicationController raise Unauthorized unless @news.commentable? @comment = Comment.new - @comment.comments = params[:comment] + @comment.safe_attributes = params[:comment] @comment.author = User.current if @news.comments << @comment if params[:asset_id] From 7b09fd0489e237dfedc7b2449f22d57ea6c81a3d Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 3 Apr 2015 17:33:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8=E9=80=89=E6=8B=A9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=90=8E=E4=B8=8D=E8=83=BD=E8=87=AA=E5=8A=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 8 +++++++- public/javascripts/iPass.packed.js | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 public/javascripts/iPass.packed.js diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 3536478a8..5758a8412 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -404,4 +404,10 @@ $(function(){ //将右侧的最小高度设置成左侧高度,美化界面 $(document).ready(function () { $("#RSide").css("min-height",$("#LSide").height()-30); -}); \ No newline at end of file +}); + +// 日历选择日期后关闭 +function regexDeadLine() +{ + ('#ui-datepicker-div').hide; +} \ No newline at end of file diff --git a/public/javascripts/iPass.packed.js b/public/javascripts/iPass.packed.js new file mode 100644 index 000000000..d553a9c31 --- /dev/null +++ b/public/javascripts/iPass.packed.js @@ -0,0 +1,8 @@ +// ---------------------------------------------------------------------- // +// iPass - Iphone-like masked password input +// version 1.0 +// author: pixelboi8 (pixelboi8@gmail.com) +// created: 12/12/2010 +// ---------------------------------------------------------------------- // + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){$.1e.1l=8(D){2 c={\'I\':1r,\'1a\':1q,\'e\':\'%1w\'};5(D){$.1p(c,D)}2 v=[];2 l=[];2 T=1n 1s(\'[^\'+c[\'e\']+\']\',\'1v\');2 i=0;4.W(8(6){2 G=\'-\'+6;2 t=$(4);2 3=4.3;2 q=4.q;2 h=3+G;2 11=3+G;5(!3||!q){1t("1m 1d 1c \'3\' 1b \'q\' 1f w 1g!");12 16}$(\'\').1M(t);2 A=$(\'#\'+h);2 g=$(\'#\'+h)[0];5(4.x){g.x=4.x}5(4.F){g.F=4.F}5(4.E){g.E=4.E}5(4.z&&4.z!=\'-1\'){g.z=4.z}5(4.N){g.N=4.N}5(4.H){g.H=4.H}5(4.B){g.B=4.B}5(4.L){g.L=4.L}4.x=\'\';4.B=\'\';t.1O();A.Z(\'1J\',8(){2 m=A.j();v[6]=V(8(){M(6,3,h,m)},c[\'I\'])});A.Z(\'1A\',8(){e(6,h);18(v[6])});$(\'X\').W(8(){5(4.J==3){4.J=h}n 5(t[0].13.1y.1C()==\'X\'){t[0].13.J=h}})});M=8(6,r,3,m){2 o=$(\'#\'+3).j();5(o!=m){19(6,r,3)}n{e(6,3)}m=o;v[6]=V(8(){M(6,r,3,m)},c[\'I\'])};19=8(6,r,3){2 7=P(3);2 K=16;2 p=$(\'#\'+3);2 C=$(\'#\'+r);2 9=p.j().17(\'\');2 d=C.j().17(\'\');5(l[6]){18(l[6]);l[6]=10}w(i=0;i<9.f;i++){5(9[i]!=d[i]){5(9[i]!=u(c[\'e\'])){d.O(i,0,9[i])}n{d[i]=d[i]}}n{d.O(i,0,9[i])}}5(9.f