Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-04-22 14:54:52 +08:00
commit 00910efebc
12 changed files with 237 additions and 236 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.swp *.swp
/config/database.yml /config/database.yml
/config/configuration.yml /config/configuration.yml
/config/additional_environment.rb
/files/* /files/*
/log/* /log/*
/public/tmp/* /public/tmp/*

View File

@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'iconv' gem 'iconv'
end end
gem 'redis-rails'
gem 'rubyzip' gem 'rubyzip'
gem 'delayed_job_active_record'#, :group => :production gem 'delayed_job_active_record'#, :group => :production
gem 'daemons' gem 'daemons'

View File

@ -332,7 +332,7 @@ class AccountController < ApplicationController
token = Token.create(:user => user, :action => 'autologin') token = Token.create(:user => user, :action => 'autologin')
cookie_options = { cookie_options = {
:value => token.value, :value => token.value,
:expires => 1.year.from_now, :expires => 7.days.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'), :path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
:httponly => true :httponly => true

View File

@ -68,7 +68,7 @@
<td align="left"> <td align="left">
<% if Setting.autologin? %> <% if Setting.autologin? %>
<label for="autologin"> <label for="autologin">
<%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
<%= l(:label_stay_logged_in) %> <%= l(:label_stay_logged_in) %>
</label> </label>
<% end %> <% end %>

View File

@ -114,6 +114,9 @@ $(function(){
function f_submit() 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(); $("#new_memo").submit();
} }
@ -166,8 +169,8 @@ function cookieget(n)
<div class="custom_service"> <div class="custom_service">
<% get_memo %> <% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> <%= f.text_area :content,:class => "opnionText",:id=>"memo_content_1" ,:placeholder => l(:label_feedback_tips) %>
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a> <a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
<% end %> <% end %>

View File

@ -13,8 +13,8 @@
<div class="custom_service"> <div class="custom_service">
<% get_memo %> <% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %>
<%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %> <%= f.text_area :content,:class => "opnionText" , :placeholder => l(:label_feedback_tips) %>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"> <a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();">
<%= l(:label_submit)%> <%= l(:label_submit)%>
</a> </a>

View File

@ -1,10 +0,0 @@
# Copy this file to additional_environment.rb and add any statements
# that need to be passed to the Rails::Initializer. `config` is
# available in this context.
#
# Example:
#
# config.log_level = :debug
# ...
#
#config.relative_url_root = '/socialforge'

View File

@ -67,8 +67,6 @@ module RedmineApp
# Do not include all helpers # Do not include all helpers
config.action_controller.include_all_helpers = false config.action_controller.include_all_helpers = false
config.session_store :cookie_store, :key => '_redmine_session'
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
end end

View File

@ -19,7 +19,12 @@ RedmineApp::Application.configure do
# Full error reports are disabled and caching is turned on # Full error reports are disabled and caching is turned on
config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
# to additional_environment.rb
# config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
# config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes }
#
# Enable serving of images, stylesheets, and javascripts from an asset server # Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"

View File

@ -347,7 +347,7 @@ en:
label_feedback_tips: "Anything you want to say roar it here ~~" label_feedback_tips: "Anything you want to say roar it here ~~"
label_technical_support: "Support: " label_technical_support: "Support: "
label_feedback_success: "Your comments have been sent to the public bar in the home page, thanks for your support!" label_feedback_success: "Your comments have been sent to the public bar in the home page, thanks for your support!"
label_feedback_value: "The post comes from user feedback box!" label_feedback_value: "User feedback"
# #
# #

View File

@ -354,7 +354,7 @@ zh:
label_feedback_tips: "有什么想说的,尽管来咆哮吧~~" label_feedback_tips: "有什么想说的,尽管来咆哮吧~~"
label_technical_support: "技术支持:" label_technical_support: "技术支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该贴来自用户反馈" label_feedback_value: "用户意见反馈"

View File

@ -82,5 +82,8 @@ $(function(){
function f_submit() function f_submit()
{ {
var subject = $("#memo_subject").val();
var content = $("#memo_content").val();
$("#memo_subject").val(subject+""+ content.substr(0,18));
$("#new_memo").submit(); $("#new_memo").submit();
} }