Merge pull request #1802 from opf/fix/whitespace-fixes

Whitespace fixes
pull/1806/head
Martin Linkhorst 10 years ago
commit 47cb3069c8
  1. 4
      app/assets/stylesheets/content/_components_add_comments_default.sass
  2. 2
      app/assets/stylesheets/content/_components_add_comments_onclick.sass
  3. 6
      app/assets/stylesheets/content/_modal.sass
  4. 2
      app/assets/stylesheets/content/_work_packages_details_pane_tables.sass
  5. 2
      app/assets/stylesheets/content/_work_packages_relations.sass
  6. 2
      app/models/copy_project_job.rb
  7. 2
      app/models/custom_field.rb
  8. 1
      app/services/authorization_service.rb
  9. 2
      app/views/user_mailer/copy_project_succeeded.html.erb
  10. 1
      db/migrate/20130807083716_change_attachment_journals_description_length.rb
  11. 2
      karma/tests/controllers/details-tab-overview-controller-test.js
  12. 1
      karma/tests/work_packages/directives/work-package-details-toolbar-test.js
  13. 1
      karma/tests/work_packages/models/work-package-authorization-test.js
  14. 1
      karma/tests/work_packages/work-package-context-menu-test.js
  15. 1
      lib/api/v3/work_packages/statuses_api.rb
  16. 20
      lib/redmine/default_data/loader.rb
  17. 1
      public/templates/work_packages/tabs/_attachments_table.html
  18. 1
      public/templates/work_packages/tabs/_editable_comment.html
  19. 1
      public/templates/work_packages/tabs/_user_field.html
  20. 1
      spec/controllers/types_controller_spec.rb
  21. 1
      spec/lib/api/v3/statuses/shared/status_collection_representer.rb
  22. 2
      spec/lib/api/v3/support/action_link.rb
  23. 42
      spec/models/custom_field_spec.rb

@ -24,7 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* See doc/COPYRIGHT.rdoc for more details. ++*/
.activity-comment
textarea
border: 1px solid #cacaca
@ -40,6 +40,6 @@
&:hover
border: 1px solid #aaaaaa
&:focus
box-shadow: 1px 1px 1px #dddddd inset
box-shadow: 1px 1px 1px #dddddd inset
.add-comment-text
resize: none

@ -24,5 +24,3 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* See doc/COPYRIGHT.rdoc for more details. ++*/

@ -103,13 +103,11 @@ ul.export-options
a
cursor: pointer
text-decoration: none
color: $global_font_color
color: $global_font_color
font-weight: normal
&:hover, &:active
text-decoration: none
color: $global_font_color
color: $global_font_color
span.export-label
display: block
padding: 10px 0 0 0

@ -44,4 +44,4 @@ table.attachments-table
&:nth-child(4)
width: 15%
&:last-of-type
width: 25%
width: 25%

@ -41,4 +41,4 @@
width: 400px
text-overflow: ellipsis
white-space: nowrap
overflow: hidden
overflow: hidden

@ -71,7 +71,7 @@ class CopyProjectJob < Struct.new(:user,
end
if target_project.save && validate_parent_id(target_project, parent_id)
target_project.set_allowed_parent!(parent_id) if parent_id
target_project.set_allowed_parent!(parent_id) if parent_id
target_project.copy_associations(source_project, only: associations_to_copy)

@ -74,7 +74,7 @@ class CustomField < ActiveRecord::Base
validate :validate_default_value_in_translations
validate :validate_name
validates :min_length, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
validates :max_length, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
validates :min_length, numericality: { less_than_or_equal_to: :max_length, message: :smaller_than_or_equal_to_max_length}, unless: Proc.new { |cf| cf.max_length.blank?}

@ -48,4 +48,3 @@ class AuthorizationService
@user.allowed_to?(@permission, @context, :global => @global)
end
end

@ -35,5 +35,3 @@ See doc/COPYRIGHT.rdoc for more details.
<hr />
<%= render partial: 'errors', locals: { errors: @errors } %>
<% end %>

@ -35,4 +35,3 @@ class ChangeAttachmentJournalsDescriptionLength < ActiveRecord::Migration
:text
end
end

@ -31,7 +31,7 @@
describe('DetailsTabOverviewController', function() {
var DEFAULT_WORK_PACKAGE_PROPERTIES = ['status', 'assignee', 'responsible',
'date', 'percentageDone', 'priority',
'estimatedTime', 'versionName', 'spentTime']
'estimatedTime', 'versionName', 'spentTime']
var scope;
var buildController;

@ -1,4 +1,3 @@
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)

@ -1,4 +1,3 @@
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)

@ -1,4 +1,3 @@
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)

@ -64,4 +64,3 @@ module API
end
end
end

@ -104,7 +104,7 @@ module Redmine
:view_changesets,
:commit_access,
:view_commit_author_statistics]
reader = Role.create! :name => l(:default_role_reader),
:position => 5,
:permissions => [:view_work_packages,
@ -189,7 +189,7 @@ module Redmine
:in_aggregation => true,
:is_milestone => false,
:position => 5
feature = Type.create! :name => l(:default_type_feature),
:is_default => false,
:color_id => colors[:Blue],
@ -197,7 +197,7 @@ module Redmine
:in_aggregation => true,
:is_milestone => false,
:position => 6
none = Type.standard_type
# Issue statuses
@ -220,8 +220,8 @@ module Redmine
statuses_for_phase = statuses_for_milestone
statuses_for_bug = [new, confirmed, in_progress, tested, on_hold, rejected, closed]
statuses_for_feature = [new, specified, confirmed, in_progress, tested, on_hold, rejected, closed]
#Give each type its own workflow. Possible statuses are stored in one of the arrays above.
#Every status from the array gets a workflow to every other status from the array.
#Give each type its own workflow. Possible statuses are stored in one of the arrays above.
#Every status from the array gets a workflow to every other status from the array.
["task", "deliverable", "none", "milestone", "phase", "bug", "feature"].each { |t|
(eval "statuses_for_".concat(t)).each { |os|
(eval "statuses_for_".concat(t)).each { |ns|
@ -245,21 +245,21 @@ module Redmine
TimeEntryActivity.create!(:name => l(:default_activity_testing), :position => 4)
TimeEntryActivity.create!(:name => l(:default_activity_Support), :position => 5)
TimeEntryActivity.create!(:name => l(:default_activity_Other), :position => 6)
ReportedProjectStatus.create!(:name => l(:default_reported_project_status_green), :is_default => true)
ReportedProjectStatus.create!(:name => l(:default_reported_project_status_amber), :is_default => false)
ReportedProjectStatus.create!(:name => l(:default_reported_project_status_red), :is_default => false)
# Project types
ProjectType.create!(:name => l(:default_project_type_customer))
ProjectType.create!(:name => l(:default_project_type_internal))
reported_status_ids = ReportedProjectStatus.find(:all).map { |rps| rps.id }
ProjectType.find(:all).each { |project|
project.update_attributes(reported_project_status_ids: reported_status_ids)
}
Setting['notified_events'] = ['work_package_added', \
'work_package_updated',\
'work_package_note_added',\

@ -1,4 +1,3 @@
<table ng-if="attachments.length" class="detail-pane-table attachments-table">
<thead>
<tr>

@ -1,4 +1,3 @@
<span class="message"
ng-show="activity.props._type == 'Activity::Comment'"
ng-bind-html="activity.props.comment"/>

@ -11,4 +11,3 @@
</span>
<span ng-if="!userName"> - </span>
</p>

@ -250,4 +250,3 @@ describe TypesController, :type => :controller do
end
end
end

@ -1,4 +1,3 @@
RSpec.shared_examples "status collection representer" do
let(:statuses) { FactoryGirl.build_list(:status, 3) }
let(:models) { statuses.map { |status|

@ -32,7 +32,7 @@ shared_examples_for 'action link' do
let(:role) { FactoryGirl.create(:role, permissions: [:view_work_packages, :edit_work_packages]) }
let(:user) { FactoryGirl.create(:user, member_in_project: project,
member_through_role: role) }
before { allow(User).to receive(:current).and_return(user) }
it { expect(subject).not_to have_json_path("_links/#{action}/href") }

@ -336,69 +336,69 @@ describe CustomField, :type => :model do
it { expect(field).to be_valid }
end
describe "WITH a text field
WITH minimum length blank" do
before do
field.field_format = 'text'
field.min_length = nil
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH maximum length blank" do
before do
field.field_format = 'text'
field.max_length = nil
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH minimum length not an integer" do
before do
field.field_format = 'text'
field.min_length = 'a'
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH maximum length not an integer" do
before do
field.field_format = 'text'
field.max_length = 'a'
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH minimum length greater than maximum length" do
before do
field.field_format = 'text'
field.min_length = 2
field.max_length = 1
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH negative minimum length" do
before do
field.field_format = 'text'
field.min_length = -2
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
describe "WITH a text field
WITH negative maximum length" do
before do
field.field_format = 'text'
field.max_length = -2
end
it { expect(field).not_to be_valid }
end
it { expect(field).not_to be_valid }
end
end
end

Loading…
Cancel
Save