Merge branch 'dev' into feature/18329-foundation-apps-framework-forms-refactor

pull/2612/head
Alex Coles 10 years ago
commit a8b7bcd6de
  1. 1
      Gemfile
  2. 4
      Gemfile.lock
  3. 9
      app/assets/stylesheets/content/_in_place_editing.sass
  4. 8
      browserslist
  5. 4
      config/initializers/module_handler.rb
  6. 9
      frontend/app/ui_components/inplace-editor-dispatcher.js
  7. 2
      lib/open_project/configuration/helpers.rb
  8. 2
      packaging/setup
  9. 89
      spec/lib/open_project/configuration/helpers_spec.rb

@ -96,6 +96,7 @@ gem 'sprockets-rails', git: 'https://github.com/finnlabs/sprockets-rails.git',
gem 'non-stupid-digest-assets'
gem 'sass-rails', git: 'https://github.com/guilleiguaran/sass-rails.git', branch: 'backport'
gem 'sass', '~> 3.4.9'
gem 'autoprefixer-rails'
gem 'bourbon', '~> 4.1.1'
gem 'uglifier', '>= 1.0.3', require: false
gem 'livingstyleguide', '~> 1.2.2'

@ -85,6 +85,9 @@ GEM
activerecord (>= 3.0)
addressable (2.3.4)
arel (3.0.3)
autoprefixer-rails (5.1.5)
execjs
json
awesome_nested_set (2.1.6)
activerecord (>= 3.0.0)
axiom-types (0.1.1)
@ -447,6 +450,7 @@ DEPENDENCIES
activerecord-jdbcpostgresql-adapter
activerecord-tableless (~> 1.0)
acts_as_list (~> 0.2.0)
autoprefixer-rails
awesome_nested_set
bourbon (~> 4.1.1)
capybara (~> 2.3.0)

@ -1,6 +1,6 @@
.inplace-editor
display: inline
font-size: initial
font-size: medium
.ined-input-wrapper-inner
display: inline
&.busy
@ -58,9 +58,7 @@
.ng-invalid
background: lightpink!important
.ined-dashboard
padding-left: 29px
min-height: 42px
width: 502px
.ined-errors
float: right
display: inline-block
@ -88,6 +86,9 @@
text-decoration: none
&:hover
background: #f0f0f0
&.type-text
.ined-dashboard
width: 90%
&.type-wiki_textarea
textarea
min-height: 200px
@ -108,7 +109,7 @@
float: right
.ined-dashboard
padding-left: 0px
width: 526px
width: 100%
.ined-controls
left: 0px
z-index: 1

@ -0,0 +1,8 @@
# OpenProject supported browsers
# https://www.openproject.org/systemrequirements/
#
> 5%
last 2 Chrome versions
last 2 Safari versions
Firefox >= 31
IE >= 10

@ -27,7 +27,7 @@
# See doc/COPYRIGHT.rdoc for more details.
#++
unless OpenProject::Configuration['disabled_modules'].empty?
to_disable = OpenProject::Configuration['disabled_modules']
if OpenProject::Configuration.disabled_modules.any?
to_disable = OpenProject::Configuration.disabled_modules
OpenProject::Plugins::ModuleHandler.disable_modules(to_disable)
end

@ -147,6 +147,15 @@ module.exports = function($sce, $http, $timeout, AutoCompleteHelper, TextileServ
text: {
link: function(scope, element) {
enableAutoCompletion(element);
scope.$on('startEditing', function() {
$timeout(function() {
element.find('.ined-dashboard').css({
'margin-left': element
.closest('.work-packages--details-content')
.find('.select-type:first').width()
});
}, 0, false);
});
}
},

@ -99,7 +99,7 @@ module OpenProject
if value =~ / /
value.split ' '
else
value
Array(value)
end
end

@ -1,5 +1,5 @@
#!/usr/bin/env bash
echo "ruby '2.1.4'" > Gemfile.local
echo "ruby '2.1.5'" > Gemfile.local
cp -f packaging/conf/configuration.yml config/configuration.yml
sed -i "s|config.serve_static_assets = false|config.serve_static_assets = true|" config/environments/production.rb

@ -0,0 +1,89 @@
#-- copyright
# OpenProject is a project management system.
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'spec_helper'
require 'open_project/configuration/helpers'
describe OpenProject::Configuration::Helpers do
let(:config) {
{}.tap do |config|
config.extend OpenProject::Configuration::Helpers
end
}
describe '#array' do
def array(value)
config.send :array, value
end
context 'with single string value' do
it 'returns an array containing the value' do
arr = array 'test'
expect(arr).to eq ['test']
end
end
context 'with an array' do
it 'returns the array' do
arr = ['arrgh']
expect(array(arr)).to eq arr
end
end
context 'with a space separated string' do
it 'returns an array of the values' do
value = 'one two three'
expect(array(value)).to eq ['one', 'two', 'three']
end
end
end
describe '#hidden_menu_items' do
before do
items = config['hidden_menu_items'] = {}
items['admin_menu'] = 'users colors'
items['project_menu'] = 'info'
items['top_menu'] = []
end
it 'works with arrays' do
expect(config.hidden_menu_items['top_menu']).to eq []
end
it 'works with single string values' do
expect(config.hidden_menu_items['project_menu']).to eq ['info']
end
it 'work with space separated string values' do
expect(config.hidden_menu_items['admin_menu']).to eq ['users', 'colors']
end
end
end
Loading…
Cancel
Save