diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index bf4b12daf..2039735bc 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -63,7 +63,7 @@ a:hover.opnionButton{ text-decoration:underline;} (function($){ $.fn.fix = function(options){ var defaults = { - float : 'left', + float : 'right', minStatue : false, skin : 'blue', durationTime : 1000 @@ -81,7 +81,7 @@ a:hover.opnionButton{ text-decoration:underline;} var defaultTop = thisBox.offset().top; //????????top thisBox.css(options.float, 0); - if(options.minStatue){ + if(options.minStatue == "true"){ $(".show_btn").css("float", options.float); sideContent.css('width', 0); show_btn.css('width', 25); @@ -106,15 +106,18 @@ a:hover.opnionButton{ text-decoration:underline;} closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); + cookiesave('minStatue','true','','',''); }); //show??? - show_btn.click(function() { + show_btn.bind("click",function() { $(this).animate({width: '0px'},"fast"); sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); + cookiesave('minStatue','false','','',''); }); - }); //end this.each + + }); //end this.each }; })(jQuery); @@ -130,6 +133,38 @@ function f_submit() { $("#new_memo").submit(); } + +function cookiesave(n, v, mins, dn, path) +{ + if(n) + { + + if(!mins) mins = 365 * 24 * 60; + if(!path) path = "/"; + var date = new Date(); + + date.setTime(date.getTime() + (mins * 60 * 1000)); + + var expires = "; expires=" + date.toGMTString(); + + if(dn) dn = "domain=" + dn + "; "; + document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; + + } +} +function cookieget(n) +{ + var name = n + "="; + var ca = document.cookie.split(';'); + for(var i=0;i @@ -138,9 +173,9 @@ function f_submit() 意见反馈 - + -
+
@@ -171,7 +206,7 @@ function f_submit() $(function() { $("#scrollsidebar").fix({ float : 'right', //default.left or right - //minStatue : true, + minStatue : cookieget('minStatue'), skin : 'green', //default.gray or blue durationTime : 600 });