2015-01-22 17:46:12 +08:00
|
|
|
|
<style type="text/css">
|
2015-03-06 14:55:21 +08:00
|
|
|
|
html{ overflow-x:hidden;}
|
2015-03-13 17:27:24 +08:00
|
|
|
|
.scrollsidebar{ position:fixed;bottom:1px; right:1px; background:none; }
|
2015-03-06 14:55:21 +08:00
|
|
|
|
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
|
|
|
|
.side_content .side_list {width:154px;overflow:hidden;}
|
2015-03-13 17:27:24 +08:00
|
|
|
|
.show_btn{ width:0; height:112px; overflow:hidden; float:left;margin-top: 200px; cursor:pointer;}
|
2015-03-06 14:55:21 +08:00
|
|
|
|
.show_btn span { display:none;}
|
|
|
|
|
.close_btn{width:24px;height:24px;cursor:pointer;}
|
|
|
|
|
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat; }
|
|
|
|
|
.side_title {height:35px;}
|
|
|
|
|
.side_bottom { height:8px;}
|
|
|
|
|
.side_center {font-family:Verdana, Geneva, sans-serif; padding:0px 12px; font-size:12px;}
|
|
|
|
|
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
|
|
|
|
|
.close_btn span { display:none;}
|
|
|
|
|
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
|
|
|
|
.msgserver { margin:2px 0px 0px 4px; padding-top: 0px}
|
|
|
|
|
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -115px; padding-left:22px;}
|
|
|
|
|
.opnionText{ width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;}
|
|
|
|
|
.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
|
|
|
|
|
.opnionButton:hover{background: #0fa9bb; }
|
2015-01-10 15:39:02 +08:00
|
|
|
|
|
2015-01-22 17:46:12 +08:00
|
|
|
|
/* blue skin as the default skin */
|
|
|
|
|
.side_title {background-position:-195px 0;}
|
|
|
|
|
.side_center {background:url(/images/blue_line.png) repeat-y center;}
|
|
|
|
|
.side_bottom {background-position:-195px -50px;}
|
|
|
|
|
.close_btn {background-position:-44px 0;}
|
|
|
|
|
.close_btn:hover {background-position:-66px 0;}
|
|
|
|
|
.show_btn {background-position:-119px 0;}
|
|
|
|
|
.msgserver a {color:#15bccf; }
|
|
|
|
|
.msgserver a:hover { text-decoration:underline; }
|
|
|
|
|
</style>
|
2015-01-10 15:39:02 +08:00
|
|
|
|
|
2015-04-23 16:13:01 +08:00
|
|
|
|
<head>
|
|
|
|
|
<script>
|
2015-01-22 17:46:12 +08:00
|
|
|
|
(function($){
|
|
|
|
|
$.fn.fix = function(options){
|
|
|
|
|
var defaults = {
|
2015-01-28 12:13:17 +08:00
|
|
|
|
float : 'right',
|
2015-03-11 11:38:09 +08:00
|
|
|
|
minStatue : true,
|
2015-01-22 17:46:12 +08:00
|
|
|
|
skin : 'blue',
|
2015-01-23 09:17:27 +08:00
|
|
|
|
durationTime : 1000
|
2015-01-22 17:46:12 +08:00
|
|
|
|
}
|
2015-01-23 09:17:27 +08:00
|
|
|
|
var options = $.extend(defaults, options);
|
2015-01-22 17:46:12 +08:00
|
|
|
|
|
2015-01-23 09:17:27 +08:00
|
|
|
|
this.each(function(){
|
|
|
|
|
//???????
|
2015-01-22 17:46:12 +08:00
|
|
|
|
var thisBox = $(this),
|
|
|
|
|
closeBtn = thisBox.find('.close_btn' ),
|
|
|
|
|
show_btn = thisBox.find('.show_btn' ),
|
|
|
|
|
sideContent = thisBox.find('.side_content'),
|
|
|
|
|
sideList = thisBox.find('.side_list')
|
2015-01-23 09:17:27 +08:00
|
|
|
|
;
|
|
|
|
|
var defaultTop = thisBox.offset().top; //????????top
|
|
|
|
|
|
|
|
|
|
thisBox.css(options.float, 0);
|
2015-01-28 12:13:17 +08:00
|
|
|
|
if(options.minStatue == "true"){
|
2015-01-22 17:46:12 +08:00
|
|
|
|
$(".show_btn").css("float", options.float);
|
|
|
|
|
sideContent.css('width', 0);
|
|
|
|
|
show_btn.css('width', 25);
|
2015-01-23 09:17:27 +08:00
|
|
|
|
|
2015-01-22 17:46:12 +08:00
|
|
|
|
}
|
2015-03-27 11:20:15 +08:00
|
|
|
|
//close
|
2015-01-22 17:46:12 +08:00
|
|
|
|
closeBtn.bind("click",function(){
|
|
|
|
|
sideContent.animate({width: '0px'},"fast");
|
|
|
|
|
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
2015-03-20 15:59:30 +08:00
|
|
|
|
cookiesave('minStatue','true','','','');
|
2015-01-10 15:39:02 +08:00
|
|
|
|
});
|
2015-03-27 11:20:15 +08:00
|
|
|
|
//show
|
2015-01-28 12:13:17 +08:00
|
|
|
|
show_btn.bind("click",function() {
|
2015-01-22 17:46:12 +08:00
|
|
|
|
$(this).animate({width: '0px'},"fast");
|
|
|
|
|
sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast");
|
2015-01-28 12:13:17 +08:00
|
|
|
|
cookiesave('minStatue','false','','','');
|
2015-01-22 17:46:12 +08:00
|
|
|
|
});
|
2015-01-23 09:17:27 +08:00
|
|
|
|
|
2015-01-22 17:46:12 +08:00
|
|
|
|
|
2015-01-28 12:13:17 +08:00
|
|
|
|
|
|
|
|
|
}); //end this.each
|
2015-01-22 17:46:12 +08:00
|
|
|
|
};
|
|
|
|
|
})(jQuery);
|
2015-01-10 15:39:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#button1").click(function(){
|
2015-03-11 11:53:42 +08:00
|
|
|
|
myTips("<%= l(:label_feedback_success) %>","success");
|
2015-01-10 15:39:02 +08:00
|
|
|
|
});
|
|
|
|
|
|
2015-03-17 15:57:09 +08:00
|
|
|
|
});
|
2015-01-10 15:39:02 +08:00
|
|
|
|
|
|
|
|
|
function f_submit()
|
|
|
|
|
{
|
2015-04-23 18:18:07 +08:00
|
|
|
|
// var subject = $("#memo_subject").val();
|
|
|
|
|
// var content = $("#memo_content_1").val();
|
|
|
|
|
// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"...");
|
2015-01-10 15:39:02 +08:00
|
|
|
|
$("#new_memo").submit();
|
|
|
|
|
}
|
2015-01-28 12:13:17 +08:00
|
|
|
|
|
|
|
|
|
function cookiesave(n, v, mins, dn, path)
|
|
|
|
|
{
|
|
|
|
|
if(n)
|
|
|
|
|
{
|
2015-03-25 10:20:08 +08:00
|
|
|
|
|
2015-01-28 12:13:17 +08:00
|
|
|
|
if(!mins) mins = 365 * 24 * 60;
|
|
|
|
|
if(!path) path = "/";
|
|
|
|
|
var date = new Date();
|
2015-03-25 10:20:08 +08:00
|
|
|
|
|
2015-01-28 12:13:17 +08:00
|
|
|
|
date.setTime(date.getTime() + (mins * 60 * 1000));
|
2015-03-25 10:20:08 +08:00
|
|
|
|
|
2015-01-28 12:13:17 +08:00
|
|
|
|
var expires = "; expires=" + date.toGMTString();
|
2015-03-25 10:20:08 +08:00
|
|
|
|
|
2015-01-28 12:13:17 +08:00
|
|
|
|
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<ca.length;i++) {
|
|
|
|
|
var c = ca[i];
|
|
|
|
|
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
|
|
|
|
if (c.indexOf(name) == 0){
|
|
|
|
|
return c.substring(name.length,c.length);}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2015-01-10 15:39:02 +08:00
|
|
|
|
</script>
|
|
|
|
|
</head>
|
2015-04-23 16:13:01 +08:00
|
|
|
|
<body>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function() {
|
|
|
|
|
$("#scrollsidebar").fix({
|
|
|
|
|
float : 'right', //default.left or right
|
|
|
|
|
minStatue : cookieget('minStatue'),
|
|
|
|
|
skin : 'green', //default.gray or blue
|
|
|
|
|
durationTime : 600
|
|
|
|
|
});
|
|
|
|
|
});
|
2015-04-23 17:55:48 +08:00
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
2015-04-23 18:18:07 +08:00
|
|
|
|
$("#subject").keydown(function(){
|
|
|
|
|
var curLength=$("#subject").val().length;
|
2015-04-24 15:08:09 +08:00
|
|
|
|
if(curLength>50){
|
|
|
|
|
var num=$("#subject").val().substr(0,50);
|
2015-04-23 18:18:07 +08:00
|
|
|
|
$("#subject").val(num);
|
2015-04-23 17:55:48 +08:00
|
|
|
|
}
|
|
|
|
|
else{
|
2015-04-24 15:08:09 +08:00
|
|
|
|
$("#textCount").text(50-$("#subject").val().length)
|
2015-04-23 17:55:48 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2015-04-24 15:02:32 +08:00
|
|
|
|
$("#subject").keyup(function(){
|
|
|
|
|
var curLength=$("#subject").val().length;
|
2015-04-24 15:08:09 +08:00
|
|
|
|
if(curLength>50){
|
|
|
|
|
var num=$("#subject").val().substr(0,50);
|
2015-04-24 15:02:32 +08:00
|
|
|
|
$("#subject").val(num);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$("#textCount").text(50-$("#subject").val().length)
|
|
|
|
|
}
|
|
|
|
|
})
|
2015-04-23 17:55:48 +08:00
|
|
|
|
})
|
2015-04-24 15:02:32 +08:00
|
|
|
|
|
2015-04-23 16:13:01 +08:00
|
|
|
|
</script>
|
2015-01-28 12:13:17 +08:00
|
|
|
|
<div class="scrollsidebar" id="scrollsidebar" style="float: right">
|
2015-01-22 17:46:12 +08:00
|
|
|
|
<div class="side_content">
|
|
|
|
|
<div class="side_list">
|
2015-03-11 11:53:42 +08:00
|
|
|
|
<div class="side_title"><a title="<%= l(:label_feedback) %>" class="close_btn"><span><%= l(:label_feedback) %></span></a></div>
|
2015-01-23 09:17:27 +08:00
|
|
|
|
<div class="side_center">
|
|
|
|
|
<div class="custom_service">
|
2015-01-22 17:46:12 +08:00
|
|
|
|
<% get_memo %>
|
|
|
|
|
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
2015-04-23 18:18:07 +08:00
|
|
|
|
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
|
|
|
|
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
2015-01-22 17:46:12 +08:00
|
|
|
|
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
2015-04-23 18:18:07 +08:00
|
|
|
|
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
2015-04-23 17:55:48 +08:00
|
|
|
|
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
2015-03-25 10:20:08 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2015-01-22 17:46:12 +08:00
|
|
|
|
<div class="msgserver">
|
2015-01-23 09:47:13 +08:00
|
|
|
|
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
2015-01-22 17:46:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="side_bottom"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2015-03-11 11:53:42 +08:00
|
|
|
|
<div class="show_btn"><span><%= l(:label_submit)%></span></div>
|
2015-01-10 15:39:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
</body>
|