diff --git a/public/javascripts/jquery.autosize.js b/public/javascripts/jquery.autosize.js
new file mode 100644
index 000000000..4a7bc8fd2
--- /dev/null
+++ b/public/javascripts/jquery.autosize.js
@@ -0,0 +1,274 @@
+/*!
+ Autosize 1.18.13
+ license: MIT
+ http://www.jacklmoore.com/autosize
+*/
+(function ($) {
+ var
+ defaults = {
+ className: 'autosizejs',
+ id: 'autosizejs',
+ append: '\n',
+ callback: false,
+ resizeDelay: 10,
+ placeholder: true
+ },
+
+ // border:0 is unnecessary, but avoids a bug in Firefox on OSX
+ copy = '
',
+
+ // line-height is conditionally included because IE7/IE8/old Opera do not return the correct value.
+ typographyStyles = [
+ 'fontFamily',
+ 'fontSize',
+ 'fontWeight',
+ 'fontStyle',
+ 'letterSpacing',
+ 'textTransform',
+ 'wordSpacing',
+ 'textIndent',
+ 'whiteSpace'
+ ],
+
+ // to keep track which textarea is being mirrored when adjust() is called.
+ mirrored,
+
+ // the mirror element, which is used to calculate what size the mirrored element should be.
+ mirror = $(copy).data('autosize', true)[0];
+
+ // test that line-height can be accurately copied.
+ mirror.style.lineHeight = '99px';
+ if ($(mirror).css('lineHeight') === '99px') {
+ typographyStyles.push('lineHeight');
+ }
+ mirror.style.lineHeight = '';
+
+ $.fn.autosize = function (options) {
+ if (!this.length) {
+ return this;
+ }
+
+ options = $.extend({}, defaults, options || {});
+
+ if (mirror.parentNode !== document.body) {
+ $(document.body).append(mirror);
+ }
+
+ return this.each(function () {
+ var
+ ta = this,
+ $ta = $(ta),
+ maxHeight,
+ minHeight,
+ boxOffset = 0,
+ callback = $.isFunction(options.callback),
+ originalStyles = {
+ height: ta.style.height,
+ overflow: ta.style.overflow,
+ overflowY: ta.style.overflowY,
+ wordWrap: ta.style.wordWrap,
+ resize: ta.style.resize
+ },
+ timeout,
+ width = $ta.width(),
+ taResize = $ta.css('resize');
+
+ if ($ta.data('autosize')) {
+ // exit if autosize has already been applied, or if the textarea is the mirror element.
+ return;
+ }
+ $ta.data('autosize', true);
+
+ if ($ta.css('box-sizing') === 'border-box' || $ta.css('-moz-box-sizing') === 'border-box' || $ta.css('-webkit-box-sizing') === 'border-box'){
+ boxOffset = $ta.outerHeight() - $ta.height();
+ }
+
+ // IE8 and lower return 'auto', which parses to NaN, if no min-height is set.
+ minHeight = Math.max(parseInt($ta.css('minHeight'), 10) - boxOffset || 0, $ta.height());
+
+ $ta.css({
+ overflow: 'hidden',
+ overflowY: 'hidden',
+ wordWrap: 'break-word' // horizontal overflow is hidden, so break-word is necessary for handling words longer than the textarea width
+ });
+
+ if (taResize === 'vertical') {
+ $ta.css('resize','none');
+ } else if (taResize === 'both') {
+ $ta.css('resize', 'horizontal');
+ }
+
+ // The mirror width must exactly match the textarea width, so using getBoundingClientRect because it doesn't round the sub-pixel value.
+ // window.getComputedStyle, getBoundingClientRect returning a width are unsupported, but also unneeded in IE8 and lower.
+ function setWidth() {
+ var width;
+ var style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;
+
+ if (style) {
+
+ width = ta.getBoundingClientRect().width;
+
+ if (width === 0 || typeof width !== 'number') {
+ width = parseInt(style.width,10);
+ }
+
+ $.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){
+ width -= parseInt(style[val],10);
+ });
+ } else {
+ width = $ta.width();
+ }
+
+ mirror.style.width = Math.max(width,0) + 'px';
+ }
+
+ function initMirror() {
+ var styles = {};
+
+ mirrored = ta;
+ mirror.className = options.className;
+ mirror.id = options.id;
+ maxHeight = parseInt($ta.css('maxHeight'), 10);
+
+ // mirror is a duplicate textarea located off-screen that
+ // is automatically updated to contain the same text as the
+ // original textarea. mirror always has a height of 0.
+ // This gives a cross-browser supported way getting the actual
+ // height of the text, through the scrollTop property.
+ $.each(typographyStyles, function(i,val){
+ styles[val] = $ta.css(val);
+ });
+
+ $(mirror).css(styles).attr('wrap', $ta.attr('wrap'));
+
+ setWidth();
+
+ // Chrome-specific fix:
+ // When the textarea y-overflow is hidden, Chrome doesn't reflow the text to account for the space
+ // made available by removing the scrollbar. This workaround triggers the reflow for Chrome.
+ if (window.chrome) {
+ var width = ta.style.width;
+ ta.style.width = '0px';
+ var ignore = ta.offsetWidth;
+ ta.style.width = width;
+ }
+ }
+
+ // Using mainly bare JS in this function because it is going
+ // to fire very often while typing, and needs to very efficient.
+ function adjust() {
+ var height, original;
+
+ if (mirrored !== ta) {
+ initMirror();
+ } else {
+ setWidth();
+ }
+
+ if (!ta.value && options.placeholder) {
+ // If the textarea is empty, copy the placeholder text into
+ // the mirror control and use that for sizing so that we
+ // don't end up with placeholder getting trimmed.
+ mirror.value = ($ta.attr("placeholder") || '');
+ } else {
+ mirror.value = ta.value;
+ }
+
+ mirror.value += options.append || '';
+ mirror.style.overflowY = ta.style.overflowY;
+ original = parseInt(ta.style.height,10);
+
+ // Setting scrollTop to zero is needed in IE8 and lower for the next step to be accurately applied
+ mirror.scrollTop = 0;
+
+ mirror.scrollTop = 9e4;
+
+ // Using scrollTop rather than scrollHeight because scrollHeight is non-standard and includes padding.
+ height = mirror.scrollTop;
+
+ if (maxHeight && height > maxHeight) {
+ ta.style.overflowY = 'scroll';
+ height = maxHeight;
+ } else {
+ ta.style.overflowY = 'hidden';
+ if (height < minHeight) {
+ height = minHeight;
+ }
+ }
+
+ height += boxOffset;
+
+ if (original !== height) {
+ ta.style.height = height + 'px';
+ if (callback) {
+ options.callback.call(ta,ta);
+ }
+ $ta.trigger('autosize.resized');
+ }
+ }
+
+ function resize () {
+ clearTimeout(timeout);
+ timeout = setTimeout(function(){
+ var newWidth = $ta.width();
+
+ if (newWidth !== width) {
+ width = newWidth;
+ adjust();
+ }
+ }, parseInt(options.resizeDelay,10));
+ }
+
+ if ('onpropertychange' in ta) {
+ if ('oninput' in ta) {
+ // Detects IE9. IE9 does not fire onpropertychange or oninput for deletions,
+ // so binding to onkeyup to catch most of those occasions. There is no way that I
+ // know of to detect something like 'cut' in IE9.
+ $ta.on('input.autosize keyup.autosize', adjust);
+ } else {
+ // IE7 / IE8
+ $ta.on('propertychange.autosize', function(){
+ if(event.propertyName === 'value'){
+ adjust();
+ }
+ });
+ }
+ } else {
+ // Modern Browsers
+ $ta.on('input.autosize', adjust);
+ }
+
+ // Set options.resizeDelay to false if using fixed-width textarea elements.
+ // Uses a timeout and width check to reduce the amount of times adjust needs to be called after window resize.
+
+ if (options.resizeDelay !== false) {
+ $(window).on('resize.autosize', resize);
+ }
+
+ // Event for manual triggering if needed.
+ // Should only be needed when the value of the textarea is changed through JavaScript rather than user input.
+ $ta.on('autosize.resize', adjust);
+
+ // Event for manual triggering that also forces the styles to update as well.
+ // Should only be needed if one of typography styles of the textarea change, and the textarea is already the target of the adjust method.
+ $ta.on('autosize.resizeIncludeStyle', function() {
+ mirrored = null;
+ adjust();
+ });
+
+ $ta.on('autosize.destroy', function(){
+ mirrored = null;
+ clearTimeout(timeout);
+ $(window).off('resize', resize);
+ $ta
+ .off('autosize')
+ .off('.autosize')
+ .css(originalStyles)
+ .removeData('autosize');
+ });
+
+ // Call adjust in case the textarea already contains text.
+ adjust();
+ });
+ };
+}(jQuery || $)); // jQuery or jQuery-like library, such as Zepto
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index ad1784995..128e0c4bb 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -539,7 +539,7 @@ a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280
a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;}
a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
-a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -10px -360px no-repeat; padding-left:23px;}
+a.homepagePostTypeAll {background:url(../images/homepage_icon2.png) -10px -360px no-repeat; padding-left:23px;}
a.postTypeGrey {color:#888888;}
a.postTypeGrey:hover {color:#269ac9;}
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
From 28d4bae9e7048144b08b1ed2a17784b4fce65c21 Mon Sep 17 00:00:00 2001
From: cxt
Date: Wed, 9 Sep 2015 17:53:34 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B/?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=AF=BC=E8=88=AA=E6=A0=8F=E5=8C=BA?=
=?UTF-8?q?=E5=9F=9F=E7=9A=84=E6=96=87=E5=AD=97=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/header.css | 1 +
public/stylesheets/public_new.css | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css
index 192a4a262..2d6f5e0b8 100644
--- a/public/stylesheets/header.css
+++ b/public/stylesheets/header.css
@@ -79,6 +79,7 @@ a.menuGrey:hover {color:#fe7d68;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
.none{display: none;}
+.db {display:block !important;}
/*myctrip*/
.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;}
diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css
index 165046142..555cef836 100644
--- a/public/stylesheets/public_new.css
+++ b/public/stylesheets/public_new.css
@@ -496,7 +496,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
-.db {display:block;}
+.db {display:block !important;}
.dropdown-menu {
position: absolute;
From 50aa22c5e53ebb68869b6288950c7df5db1b39f3 Mon Sep 17 00:00:00 2001
From: cxt
Date: Thu, 10 Sep 2015 10:01:43 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?=
=?UTF-8?q?=E7=9A=84=E2=80=9C=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80=E6=9B=B4?=
=?UTF-8?q?=E5=A4=9A=E2=80=9D=E6=94=B9=E4=B8=BA=E2=80=9C=E8=BD=BB=E6=8A=9A?=
=?UTF-8?q?=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A=E2=80=9D=EF=BC=8C=E9=BC=A0?=
=?UTF-8?q?=E6=A0=87=E7=A7=BB=E5=88=B0=E6=96=B9=E6=A1=86=E4=B8=8A=E5=8D=B3?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A=E5=8A=A8?=
=?UTF-8?q?=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_activities.html.erb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index f071cbeb4..5ab315fab 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -62,5 +62,12 @@
<% end %>
<% if user_activities.count == 10%>
- <%= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
+ 轻抚展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
+ <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
+
+
\ No newline at end of file
From 5f0aac9265e63597602f5b6a9edb26d4bcc825d8 Mon Sep 17 00:00:00 2001
From: cxt
Date: Thu, 10 Sep 2015 15:01:59 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=89=93=E5=BC=80?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E8=B5=84=E6=96=99=EF=BC=8C=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=9A=84=E6=80=A7=E5=88=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/my/account.html.erb | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 688d7e2ac..0e36d5fd9 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -213,6 +213,7 @@
<% occupation1 = User.current.user_extensions.occupation %>
<% occupation = User.current.user_extensions.occupation %>
<% title = User.current.user_extensions.technical_title %>
+ <% gender = User.current.user_extensions.gender %>
<% language = User.current.language %>
<% else %>
<% province = "湖南省" %>
@@ -510,6 +511,13 @@
}
}
}
+ function init_gender(pField, gender) {
+ for (var i=0; i"
init_identity_and_title(document.getElementById('userIdentity'), identity, document.getElementById('userTechnical_title'), title, language);
+ //sex
+ var gender = "<%= "#{gender}" %>"
+ init_gender(document.getElementById('gender'), gender);
+
$("#userIdentity").change();
<% if( !@act.nil? && @act == 'password') %>
$("#users_tb_2").click();
From e6d5d1785963bb8db69c0de0dcf8125f4559fb8a Mon Sep 17 00:00:00 2001
From: cxt
Date: Thu, 10 Sep 2015 15:08:10 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E8=BD=BB=E6=8A=9A=E5=B1=95=E5=BC=80?=
=?UTF-8?q?=E6=9B=B4=E5=A4=9A->=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_activities.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 5ab315fab..6955f5f69 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -62,7 +62,7 @@
<% end %>
<% if user_activities.count == 10%>
- 轻抚展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
+ 展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>