From 19fe973b5b11a373076b9a0540cd7cd516504922 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 23 Apr 2015 10:19:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/avatar/_avatar_form.html.erb | 1 - app/views/avatar/_new_avatar_form.html.erb | 3 +-- public/stylesheets/courses.css | 2 +- public/stylesheets/project.css | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/avatar/_avatar_form.html.erb b/app/views/avatar/_avatar_form.html.erb index f5ecfeadd..56f1f130e 100644 --- a/app/views/avatar/_avatar_form.html.erb +++ b/app/views/avatar/_avatar_form.html.erb @@ -68,7 +68,6 @@ :source_id => source.id.to_s } %> -(个人头像建议90*90大小,或者等比图像) <% content_for :header_tags do %> diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index c94f9f87a..e341bc83a 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -5,7 +5,7 @@ <%= l(:button_upload_photo) %> <%= file_field_tag 'avatar[image]', :id => nil, - :class => 'upload_avatar ', + :class => 'upload_file', :size => "1", :multiple => false, :onchange => 'addInputAvatar(this);', @@ -21,7 +21,6 @@ :source_id => source.id.to_s } %> -(课程和项目logo建议60*60大小,或者等比图像) <% content_for :header_tags do %> <%= javascript_include_tag 'avatars' %> <% end %> diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 904f6a3a8..b8e23f4be 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -331,7 +331,7 @@ a:hover.st_add{ color:#ff8e15;} .upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;} .upbtn:hover{border:1px solid #64bdd9; color:#64bdd9;cursor: pointer;} .upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} -.upload_avatar{margin-left: -350px;margin-top: 40px;width: 60px;position: absolute;height: 24px;opacity: 0;cursor: pointer} + /* 功能倒计时*/ .w_img{ float:left; margin:10px 10px 15px 0px;} .w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; } diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index abd748dce..80903edfa 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -368,7 +368,7 @@ blockquote { } /*上传项目图片*/ .upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} -.upload_avatar{margin-left: -350px;margin-top: 40px;width: 60px;position: absolute;height: 24px;opacity: 0;cursor: pointer} + /*配置*/ .pro_st_ttl{ height:24px;} .pro_st_ctt{height:auto; clear:both;} From 5d0d9de6e88e637460f0c6655381c26196b67ab3 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 23 Apr 2015 16:13:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E5=90=84=E4=B8=BB=E9=A1=B5=E5=86=85=E4=BF=9D=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 62 +++++------------------ public/javascripts/feedback.js | 61 ++++++++++++++++------ 2 files changed, 59 insertions(+), 64 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 7105aff47..89faf39e3 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -1,11 +1,4 @@ - - - - - -<%= l(:label_feedback) %> - - - + +
@@ -184,17 +161,4 @@ function cookieget(n)
<%= l(:label_submit)%>
- - - - \ No newline at end of file diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index a3707b312..dfd3e10b2 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -5,17 +5,18 @@ minStatue : true, skin : 'blue', durationTime : 1000 - }; + } var options = $.extend(defaults, options); this.each(function(){ + //??????? var thisBox = $(this), closeBtn = thisBox.find('.close_btn' ), show_btn = thisBox.find('.show_btn' ), sideContent = thisBox.find('.side_content'), sideList = thisBox.find('.side_list') ; - var defaultTop = thisBox.offset().top; + var defaultTop = thisBox.offset().top; //????????top thisBox.css(options.float, 0); if(options.minStatue == "true"){ @@ -24,34 +25,59 @@ show_btn.css('width', 25); } + //close closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); - cookiesave('minStatue','false','','',''); + cookiesave('minStatue','true','','',''); }); + //show show_btn.bind("click",function() { $(this).animate({width: '0px'},"fast"); sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); - cookiesave('minStatue','true','','',''); + cookiesave('minStatue','false','','',''); }); - }); + + + + }); //end this.each }; })(jQuery); + +$(function(){ + $("#button1").click(function(){ + myTips("<%= l(:label_feedback_success) %>","success"); + }); + +}); + +function f_submit() +{ + var subject = $("#memo_subject").val(); + var content = $("#memo_content_1").val(); + $("#memo_subject").val(subject+":"+ content.substr(0,18)); + $("#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 + "="; @@ -61,18 +87,11 @@ function cookieget(n) while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(name) == 0){ return c.substring(name.length,c.length);} + } return false; } -$(function() { - $("#scrollsidebar").fix({ - float : 'right', //default.left or right - minStatue : cookieget('minStatue'), - skin : 'green', //default.gray or blue - durationTime : 600 - }); -}); $(function(){ $("#button1").click(function(){ @@ -86,4 +105,16 @@ function f_submit() var content = $("#memo_content").val(); $("#memo_subject").val(subject+":"+ content.substr(0,18)); $("#new_memo").submit(); -} \ No newline at end of file +} + + +$(document).ready(function () { + $(function () { + $("#scrollsidebar").fix({ + float: 'right', //default.left or right + minStatue: cookieget('minStatue'), + skin: 'green', //default.gray or blue + durationTime: 600 + }); + }); +}); \ No newline at end of file From 15d7cde0552957ba8c7332438e0169cafda32f42 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 23 Apr 2015 16:57:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/commons/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index b506ce14b..366841e37 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -354,7 +354,7 @@ zh: label_feedback_tips: "有什么想说的,尽管来咆哮吧~~" label_technical_support: "技术支持:" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" - label_feedback_value: "用户意见反馈" + label_feedback_value: "用户反馈"