Merge pull request #8469 from opf/housekeeping/33508-Move-global-CSS-to-frontend-styles

[33508] Move global CSS to frontend/styles

[ci skip]
pull/8486/head
Oliver Günther 4 years ago committed by GitHub
commit 9d62df8f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Gemfile
  2. 14
      Gemfile.lock
  3. BIN
      app/assets/images/files/image.png
  4. BIN
      app/assets/images/jquery-ui/ui-icons_222222_256x240.png
  5. BIN
      app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png
  6. BIN
      app/assets/images/jquery-ui/ui-icons_454545_256x240.png
  7. BIN
      app/assets/images/jquery-ui/ui-icons_888888_256x240.png
  8. BIN
      app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png
  9. 80
      app/assets/stylesheets/content/_index.sass
  10. 17
      app/assets/stylesheets/content/_preview.lsg
  11. 5
      app/assets/stylesheets/content/editor/_index.sass
  12. 2
      app/assets/stylesheets/fonts/_index.sass
  13. 7
      app/assets/stylesheets/layout/work_packages/_index.sass
  14. 48
      app/assets/stylesheets/openproject.sass
  15. 13
      app/assets/stylesheets/openproject/_index.sass
  16. 5
      app/assets/stylesheets/openproject/_plugins.scss.erb
  17. 11
      app/assets/stylesheets/openproject/_variables.lsg
  18. 41
      app/assets/stylesheets/openproject/_variables.scss.erb
  19. 0
      app/assets/stylesheets/styleguide.css
  20. 109
      app/assets/stylesheets/styleguide.html.lsg
  21. 5
      app/assets/stylesheets/vendor/_index.sass
  22. 431
      app/assets/stylesheets/vendor/_jquery_ui.scss
  23. 49
      app/assets/stylesheets/vendor/foundation-apps/scss/foundation.scss
  24. 56
      app/controllers/custom_styles_controller.rb
  25. 11
      app/models/design_color.rb
  26. 89
      app/services/design/update_design_service.rb
  27. 8
      app/views/common/_favicons.html.erb
  28. 41
      app/views/common/preview.html.erb
  29. 23
      app/views/custom_styles/_inline_css.erb
  30. 23
      app/views/custom_styles/show.html.erb
  31. 5
      app/views/layouts/angular.html.erb
  32. 1
      app/views/layouts/base.html.erb
  33. 1
      app/views/layouts/only_logo.html.erb
  34. 110
      app/views/layouts/styleguide/styleguide.layout.html.erb
  35. 2
      config/initializers/assets.rb
  36. 21
      config/initializers/livingstyleguide_patches.rb
  37. 2
      features/support/env.rb
  38. 56
      features/support/selenium_with_firebug.rb
  39. 15
      frontend/angular.json
  40. 5
      frontend/npm-shrinkwrap.json
  41. 3
      frontend/package.json
  42. 5
      frontend/src/app/global-dynamic-components.const.ts
  43. 12
      frontend/src/app/init-vendors.ts
  44. 111
      frontend/src/app/misc/datepicker-defaults.js
  45. 19
      frontend/src/app/modules/backlogs/backlogs-page/backlogs-page.component.ts
  46. 10
      frontend/src/app/modules/backlogs/backlogs-page/styles/backlogs.sass
  47. 0
      frontend/src/app/modules/backlogs/backlogs-page/styles/global.css
  48. 0
      frontend/src/app/modules/backlogs/backlogs-page/styles/global_print.css
  49. 185
      frontend/src/app/modules/backlogs/backlogs-page/styles/jqplot.css
  50. 8
      frontend/src/app/modules/backlogs/backlogs-page/styles/master_backlog.sass
  51. 0
      frontend/src/app/modules/backlogs/backlogs-page/styles/statistics.css
  52. 24
      frontend/src/app/modules/backlogs/backlogs-page/styles/taskboard.sass
  53. 37
      frontend/src/app/modules/backlogs/openproject-backlogs.module.ts
  54. 45
      frontend/src/app/modules/backlogs/openproject-backlogs.routes.ts
  55. 2
      frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts
  56. 6
      frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
  57. 4
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/context_menu.sass
  58. 25
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/generic.sass
  59. 0
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/loading_modal.sass
  60. 0
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/pivot_point.sass
  61. 26
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/tabs.sass
  62. 0
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/toolbar.sass
  63. 2
      frontend/src/app/modules/bim/ifc_models/pages/viewer/styles/tooltips.sass
  64. 49
      frontend/src/app/modules/reporting/openproject-reporting.module.ts
  65. 44
      frontend/src/app/modules/reporting/openproject-reporting.routes.ts
  66. 19
      frontend/src/app/modules/reporting/reporting-page/reporting-page.component.ts
  67. 0
      frontend/src/app/modules/reporting/reporting-page/styles/_reporting_group_by.sass
  68. 0
      frontend/src/app/modules/reporting/reporting-page/styles/_reporting_table.sass
  69. 0
      frontend/src/app/modules/reporting/reporting-page/styles/_reporting_table_print.sass
  70. 5
      frontend/src/app/modules/reporting/reporting-page/styles/reporting.sass
  71. 22
      frontend/src/app/modules/router/openproject.routes.ts
  72. 0
      frontend/src/assets/fonts/lato/Lato-Bold.woff
  73. 0
      frontend/src/assets/fonts/lato/Lato-Bold.woff2
  74. 0
      frontend/src/assets/fonts/lato/Lato-BoldItalic.woff
  75. 0
      frontend/src/assets/fonts/lato/Lato-BoldItalic.woff2
  76. 0
      frontend/src/assets/fonts/lato/Lato-Italic.woff
  77. 0
      frontend/src/assets/fonts/lato/Lato-Italic.woff2
  78. 0
      frontend/src/assets/fonts/lato/Lato-Light.woff
  79. 0
      frontend/src/assets/fonts/lato/Lato-Light.woff2
  80. 0
      frontend/src/assets/fonts/lato/Lato-LightItalic.woff
  81. 0
      frontend/src/assets/fonts/lato/Lato-LightItalic.woff2
  82. 0
      frontend/src/assets/fonts/lato/Lato-Regular.woff
  83. 0
      frontend/src/assets/fonts/lato/Lato-Regular.woff2
  84. 0
      frontend/src/assets/fonts/lato/OFL.txt
  85. 0
      frontend/src/assets/fonts/openproject_icon/openproject-icon-font.svg
  86. 0
      frontend/src/assets/fonts/openproject_icon/openproject-icon-font.ttf
  87. 0
      frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff
  88. 0
      frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff2
  89. 0
      frontend/src/assets/images/auth_provider-developer.png
  90. 0
      frontend/src/assets/images/draft.png
  91. 0
      frontend/src/assets/images/loading.gif
  92. 9
      frontend/src/assets/sass/_helpers.sass
  93. 0
      frontend/src/global_styles/content/_accounts.lsg
  94. 11
      frontend/src/global_styles/content/_accounts.sass
  95. 0
      frontend/src/global_styles/content/_accounts_mobile.sass
  96. 0
      frontend/src/global_styles/content/_advanced_filters.lsg
  97. 0
      frontend/src/global_styles/content/_advanced_filters.sass
  98. 4
      frontend/src/global_styles/content/_ajax_indicator.sass
  99. 0
      frontend/src/global_styles/content/_attributes_group.lsg
  100. 0
      frontend/src/global_styles/content/_attributes_group.sass
  101. Some files were not shown because too many files have changed in this diff Show More

@ -156,11 +156,8 @@ group :production do
gem 'unicorn-worker-killer', require: false gem 'unicorn-worker-killer', require: false
end end
gem 'autoprefixer-rails', '~> 9.7.4'
gem 'bourbon', '~> 6.0.0'
gem 'i18n-js', '~> 3.6.0' gem 'i18n-js', '~> 3.6.0'
gem 'rails-i18n', '~> 6.0.0' gem 'rails-i18n', '~> 6.0.0'
gem 'sassc-rails', '~> 2.1.0'
gem 'sprockets', '~> 3.7.0' gem 'sprockets', '~> 3.7.0'
# required by Procfile, for deployment on heroku or packaging with packager.io. # required by Procfile, for deployment on heroku or packaging with packager.io.
@ -245,12 +242,15 @@ group :development do
gem 'faker' gem 'faker'
gem 'letter_opener' gem 'letter_opener'
gem 'livingstyleguide', '~> 2.1.0'
gem 'spring' gem 'spring'
gem 'spring-commands-rspec' gem 'spring-commands-rspec'
gem 'rubocop' gem 'rubocop'
# Gems for living styleguide
gem 'sassc-rails'
gem 'livingstyleguide', '~> 2.1.0'
end end
group :development, :test do group :development, :test do

@ -288,8 +288,6 @@ GEM
attr_required (1.0.1) attr_required (1.0.1)
auto_strip_attributes (2.5.0) auto_strip_attributes (2.5.0)
activerecord (>= 4.0) activerecord (>= 4.0)
autoprefixer-rails (9.7.4)
execjs
awesome_nested_set (3.2.0) awesome_nested_set (3.2.0)
activerecord (>= 4.0.0, < 7.0) activerecord (>= 4.0.0, < 7.0)
aws-eventstream (1.0.3) aws-eventstream (1.0.3)
@ -318,8 +316,6 @@ GEM
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootsnap (1.4.6) bootsnap (1.4.6)
msgpack (~> 1.0) msgpack (~> 1.0)
bourbon (6.0.0)
thor (~> 0.19)
brakeman (4.8.0) brakeman (4.8.0)
browser (2.6.1) browser (2.6.1)
builder (3.2.4) builder (3.2.4)
@ -483,7 +479,6 @@ GEM
eventmachine (1.2.7) eventmachine (1.2.7)
eventmachine_httpserver (0.2.1) eventmachine_httpserver (0.2.1)
excon (0.72.0) excon (0.72.0)
execjs (2.7.0)
factory_bot (5.1.1) factory_bot (5.1.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
factory_bot_rails (5.1.1) factory_bot_rails (5.1.1)
@ -870,10 +865,9 @@ GEM
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.8.0) nokogiri (>= 1.8.0)
nokogumbo (~> 2.0) nokogumbo (~> 2.0)
sassc (2.0.1) sassc (2.4.0)
ffi (~> 1.9) ffi (~> 1.9)
rake sassc-rails (2.1.2)
sassc-rails (2.1.0)
railties (>= 4.0.0) railties (>= 4.0.0)
sassc (>= 2.0) sassc (>= 2.0)
sprockets (> 3.0) sprockets (> 3.0)
@ -988,13 +982,11 @@ DEPENDENCIES
addressable (~> 2.7.0) addressable (~> 2.7.0)
airbrake (~> 9.4.3) airbrake (~> 9.4.3)
auto_strip_attributes (~> 2.5) auto_strip_attributes (~> 2.5)
autoprefixer-rails (~> 9.7.4)
awesome_nested_set (~> 3.2.0) awesome_nested_set (~> 3.2.0)
aws-sdk-core (~> 3.91.0) aws-sdk-core (~> 3.91.0)
aws-sdk-s3 (~> 1.61.0) aws-sdk-s3 (~> 1.61.0)
bcrypt (~> 3.1.6) bcrypt (~> 3.1.6)
bootsnap (~> 1.4.5) bootsnap (~> 1.4.5)
bourbon (~> 6.0.0)
brakeman (~> 4.8.0) brakeman (~> 4.8.0)
browser (~> 2.6.1) browser (~> 2.6.1)
capybara (~> 3.32.0) capybara (~> 3.32.0)
@ -1117,7 +1109,7 @@ DEPENDENCIES
ruby-progressbar (~> 1.10.0) ruby-progressbar (~> 1.10.0)
rubytree (~> 1.0.0) rubytree (~> 1.0.0)
sanitize (~> 5.2.1) sanitize (~> 5.2.1)
sassc-rails (~> 2.1.0) sassc-rails
secure_headers (~> 6.3.0) secure_headers (~> 6.3.0)
selenium-webdriver (~> 3.14) selenium-webdriver (~> 3.14)
semantic (~> 1.6.1) semantic (~> 1.6.1)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

@ -1,80 +0,0 @@
@import content/accounts
@import content/accounts_mobile
@import content/augmented
@import content/badges
@import content/blockquotes
@import content/context_menu
@import content/editable_toolbar
@import content/forms
@import content/forms_mobile
@import content/calendars
@import content/comments
@import content/collapsible_section
@import content/copy_to_clipboard
@import content/custom_logo
@import content/notifications
@import content/notifications_mobile
@import content/links
@import content/loading_indicator
@import content/enterprise
@import content/members
@import content/my_account
@import content/my_page
@import content/project_overview
@import content/news
@import content/buttons
@import content/icon_control
@import content/drag_and_drop
@import content/boxes
@import content/info_boxes
@import content/headings
@import content/watchers
@import content/simple_filters
@import content/advanced_filters
@import content/attributes_key_value
@import content/attributes_group
@import content/information_section
@import content/widget_box
@import content/wiki
@import content/list
@import content/work_packages
@import content/table
@import content/tables
@import content/tabular
@import content/types_form_configuration
@import content/user
@import content/preview
@import content/modal
@import content/journal
@import content/pagination
@import content/progress_bar
@import content/request_for_confirmation
@import content/form_error_messages
@import content/ajax_indicator
@import content/tooltips
@import content/tabs
@import content/autocomplete
@import content/diff
@import content/projects_list
@import content/datepicker
@import content/focus_within
@import content/help_texts
@import content/on_off_status
@import content/custom_actions
@import content/user_mention
@import content/hide_section
@import content/hide_until_initialized
@import content/hidden
@import content/search
@import content/security_badge
@import content/contextual
@import content/tooltip
@import content/grid
@import content/grid_mobile
@import content/resizer
@import content/version
@import content/project_status
@import content/menus/_project_autocompletion
@import content/menus/_menu_blocks
@import content/editor/index

@ -1,17 +0,0 @@
# Preview
```
<fieldset class="preview">
<legend class="preview--legend">Preview - Description</legend>
<div class="wiki">
<h2>An article that's still being written.</h2>
</div>
</fieldset>
```
```
<fieldset class="preview">
<legend class="preview--legend">Preview - Description</legend>
<span class="preview--nothing-to-preview">Nothing to preview</span>
</fieldset>
```

@ -1,5 +0,0 @@
@import './markdown'
@import './ckeditor'
@import './macros'
@import './rouge'
@import './codemirror'

@ -1,2 +0,0 @@
@import fonts/lato
@import fonts/openproject_icon_font

@ -1,7 +0,0 @@
@import ./table
@import ./table_embedded
@import ./details_view
@import ./full_view
@import ./mobile
@import ./print
@import ./query_menu

@ -1,48 +0,0 @@
/*-- copyright
* OpenProject is an open source project management software.
* Copyright (C) 2012-2020 the OpenProject GmbH
*
* 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 docs/COPYRIGHT.rdoc for more details. ++
*/
// Enable asset pipeline for Bourbon mixins (e.g. +font-face)
// @see http://bourbon.io/docs/#asset-pipeline
$bourbon: ("rails-asset-pipeline": function-exists(font-url))
// Variables
@import openproject/variables
// Foundation variables
@import openproject/settings
// Dependencies
@import bourbon
@import foundation
// Core styles
@import fonts/index
@import openproject/index
@import vendor/index
@import layout/index
@import content/index

@ -1,13 +0,0 @@
@import openproject/accessibility
@import openproject/announcements
@import openproject/functions
@import openproject/homescreen
@import openproject/generic
@import openproject/mixins
@import openproject/onboarding
@import openproject/scm
// allow plugins to hook into global assets
@import openproject/plugins

@ -1,5 +0,0 @@
<% Redmine::Plugin.all.collect do |plugin| %>
<% plugin.registered_global_assets[:css].each do |path| %>
@import "<%= path %>";
<% end %>
<% end %>

@ -1,11 +0,0 @@
Color Variables
===============
## Global Color Variables
@colors {
- $body-font-color - -
- $gray-lighter $gray-light $gray $gray-dark
- $primary-color $primary-color-dark $alternative-color
- $secondary-color
}

@ -1,41 +0,0 @@
<%#
Depend on the design file so that this is recompiled on core changes.
Doesn't work for theme plugins, sorry :-/ just update the core design.rb as well to reload!
%>
<% depend_on Rails.root.join('lib', 'open_project', 'custom_styles', 'design.rb') %>
<%#
Set defaults for the following variables
primary-color
primary-color-dark
alternative-color
This allows us to dynamically define CSS4 + Sass variables from a single map
%>
<% ::OpenProject::CustomStyles::Design.variables.each do |var, hexcode| %>
$<%= var %>: <%= hexcode %>;
<% end %>
:root {
<% ::OpenProject::CustomStyles::Design.variables.each do |var, definition| %>
<% css4definition = definition.gsub(/\$([\w-]+)/, 'var(--\1)') %>
--<%= var %>: <%= css4definition %>;
<% end %>
}
<%# Construct a sass map to lookup variables in the mixin below %>
$variable-map: (
<% ::OpenProject::CustomStyles::Design.variables.each do |var, definition| %>
<%= var %>: #{<%= definition %>},
<% end %>
);
// use CSS4 + Sass variable fallback for the given property
// e.g., @include varprop(background-color, primary-color)
@mixin varprop($prop, $name, $suffix:"") {
#{$prop}: map-get($variable-map, $name) unquote($suffix);
#{$prop}: var(--#{$name}) unquote($suffix);
}
// Other variables
$work-package-details--tab-height: 40px;

@ -1,108 +1 @@
@require sassc @import ../../../frontend/src/global_styles/**/_*.lsg
@sass ../stylesheets/openproject.sass
@title "Living Style Guide for OpenProject"
@style base-font: Lato
@style base-font-size: 16px
@style background-color: white
@default preprocessor: sass
@css
.livingstyleguide--header {
@include grid-content;
}
.livingstyleguide--footer {
@include grid-content;
}
.livingstyleguide--intro {
@include grid-content;
}
.styleguide-banner {
height: 280px;
padding: 200px 0 0;
background: url('/assets/styleguide/logo_openproject.png');
background-position: top center;
background-repeat: no-repeat;
}
.styleguide-banner--text {
text-align: center;
}
.styleguide-nav--menu-items {
@extend %menu-bar;
@include menu-bar-layout;
@include menu-bar-style(#eee);
}
.livingstyleguide--code-block {
max-height: 300px;
}
.livingstyleguide--example {
overflow: visible;
}
.lsg-search-box {
width: 40%;
margin: 0 auto;
}
.icon-list {
display: flex;
flex-flow: row wrap;
width: 640px;
margin: 0 auto;
}
.icon-list li {
flex: 1;
flex-basis: 15%;
display: block;
text-align: center;
margin: 10px;
font-size: 12px;
}
.icon-list span.icon {
display: block;
font-size: 30px;
}
@header
<header class="livingstyleguide--header">
<div class="styleguide-banner">
<h1 class="styleguide-banner--text">Living Style Guide</h1>
</div>
</header>
<nav class="styleguide-nav">
<ul class="styleguide-nav--menu-items">
<li><a target="_self" href="#color-variables">Colors</a></li>
<li><a target="_self" href="#fonts">Fonts</a></li>
<li><a target="_self" href="#forms">Forms</a></li>
<li><a target="_self" href="#notifications">Notifications</a></li>
<li><a target="_self" href="#buttons">Buttons</a></li>
<li><a target="_self" href="#pagination">Pagination</a></li>
</ul>
</nav>
<section class="livingstyleguide--intro">
<p>&nbsp;</p>
</section>
@javascript-before /assets/styleguide.js
@search-box
@footer
<footer class="livingstyleguide--footer">
Copyright © 2019 OpenProject - All rights reserved.
</footer>
@import ../stylesheets/**/_*.lsg

@ -1,5 +0,0 @@
// Vendor definitions from plugins/gems
@import vendor/dragula
@import vendor/jquery_ui
@import vendor/enjoyhint

@ -1,431 +0,0 @@
//-- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// 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 docs/COPYRIGHT.rdoc for more details.
//++
/*!
* jQuery UI CSS Framework 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: $body-font-family;
font-size: rem-calc(15px);
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: $body-font-family;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #aaaaaa/*{borderColorContent}*/;
background: #ffffff/*{bgColorContent}*/;
color: #222222/*{fcContent}*/;
}
.ui-widget-content a {
color: #222222/*{fcContent}*/;
}
.ui-widget-header {
border: 1px solid #aaaaaa/*{borderColorHeader}*/;
background: #cccccc/*{bgColorHeader}*/;
color: #222222/*{fcHeader}*/;
font-weight: bold;
}
.ui-widget-header a {
color: #222222/*{fcHeader}*/;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #d3d3d3/*{borderColorDefault}*/;
background: #e6e6e6/*{bgColorDefault}*/;
font-weight: normal/*{fwDefault}*/;
color: #555555/*{fcDefault}*/;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #555555/*{fcDefault}*/;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #999999/*{borderColorHover}*/;
background: #dadada/*{bgColorHover}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcHover}*/;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #212121/*{fcHover}*/;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #aaaaaa/*{borderColorActive}*/;
background: #ffffff/*{bgColorActive}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcActive}*/;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #212121/*{fcActive}*/;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fcefa1/*{borderColorHighlight}*/;
background: #fbf9ee/*{bgColorHighlight}*/;
color: #363636/*{fcHighlight}*/;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636/*{fcHighlight}*/;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a/*{borderColorError}*/;
background: #fef1ec/*{bgColorError}*/;
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #cd0a0a/*{fcError}*/;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
background-image: none;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: image-url('jquery-ui/ui-icons_222222_256x240.png')/*{iconsContent}*/;
}
.ui-widget-header .ui-icon {
background-image: image-url('jquery-ui/ui-icons_222222_256x240.png')/*{iconsHeader}*/;
}
.ui-state-default .ui-icon {
background-image: image-url('jquery-ui/ui-icons_888888_256x240.png')/*{iconsDefault}*/;
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: image-url('jquery-ui/ui-icons_454545_256x240.png')/*{iconsHover}*/;
}
.ui-state-active .ui-icon {
background-image: image-url('jquery-ui/ui-icons_454545_256x240.png')/*{iconsActive}*/;
}
.ui-state-highlight .ui-icon {
background-image: image-url('jquery-ui/ui-icons_2e83ff_256x240.png')/*{iconsHighlight}*/;
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: image-url('jquery-ui/ui-icons_cd0a0a_256x240.png')/*{iconsError}*/;
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px/*{cornerRadius}*/;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa/*{bgColorOverlay}*/;
opacity: .3/*{opacityOverlay}*/;
}
.ui-widget-shadow {
margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
padding: 8px/*{thicknessShadow}*/;
background: #aaaaaa/*{bgColorShadow}*/;
opacity: .3/*{opacityShadow}*/;
border-radius: 8px/*{cornerRadiusShadow}*/;
}

@ -1,49 +0,0 @@
// Foundation for Apps
// by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
$foundation-version: '1.1.0';
// Make sure the charset is set appropriately
@charset "UTF-8";
// Libraries (let's make Normalize an external dependency eventually)
@import
"vendor/normalize";
// Helpers
@import
"helpers/functions",
"helpers/mixins",
"helpers/breakpoints",
"helpers/images";
// Global styles
@import
"global";
// Components
@import
"components/action-sheet",
"components/block-list",
"components/button",
"components/button-group",
"components/card",
"components/extras",
"components/forms",
"components/grid",
"components/title-bar",
"components/label",
"components/list",
"components/menu-bar",
"components/modal",
"components/motion",
"components/notification",
"components/off-canvas",
"components/popup",
"components/switch",
"components/tabs",
"components/accordion",
"components/typography",
"components/utilities";

@ -89,20 +89,28 @@ class CustomStylesController < ApplicationController
def update_colors def update_colors
variable_params = params[:design_colors].first variable_params = params[:design_colors].first
set_colors(variable_params)
set_theme(params) ::Design::UpdateDesignService
.new(colors: variable_params, theme: params[:theme])
.call
redirect_to action: :show redirect_to action: :show
end end
def update_themes def update_themes
theme = OpenProject::CustomStyles::ColorThemes::THEMES.find { |t| t[:name] == params[:theme] } theme = OpenProject::CustomStyles::ColorThemes.themes.find { |t| t[:theme] == params[:theme] }
color_params = theme[:colors]
logo = theme[:logo] call = ::Design::UpdateDesignService
.new(theme)
.call
call.on_success do
flash[:notice] = I18n.t(:notice_successful_update)
end
set_logo(logo) call.on_failure do
set_colors(color_params) flash[:error] = call.message
set_theme(params) end
redirect_to action: :show redirect_to action: :show
end end
@ -114,40 +122,12 @@ class CustomStylesController < ApplicationController
private private
def options_for_theme_select def options_for_theme_select
options = OpenProject::CustomStyles::ColorThemes::THEMES.map { |val| val[:name] } options = OpenProject::CustomStyles::ColorThemes.themes.map { |val| val[:theme] }
options << [t('admin.custom_styles.color_theme_custom'), '', disabled: true] if @current_theme.empty? options << [t('admin.custom_styles.color_theme_custom'), '', selected: true, disabled: true] unless @current_theme.present?
options options
end end
def set_logo(logo)
get_or_create_custom_style.update(theme_logo: logo)
end
def set_colors(variable_params)
variable_params.each do |param_variable, param_hexcode|
if design_color = DesignColor.find_by(variable: param_variable)
if param_hexcode.blank?
design_color.destroy
elsif design_color.hexcode != param_hexcode
design_color.hexcode = param_hexcode
design_color.save
end
else
# create that design_color
design_color = DesignColor.new variable: param_variable, hexcode: param_hexcode
design_color.save
end
end
end
def set_theme(params)
theme = ActionController::Parameters.new(theme: params[:theme] || '').permit(:theme)
@custom_style = get_or_create_custom_style
@custom_style.update(theme)
end
def get_or_create_custom_style def get_or_create_custom_style
CustomStyle.current || CustomStyle.create! CustomStyle.current || CustomStyle.create!
end end

@ -46,10 +46,6 @@ class DesignColor < ApplicationRecord
validates_format_of :hexcode, with: /\A#[0-9A-F]{6}\z/, unless: lambda { |e| e.hexcode.blank? } validates_format_of :hexcode, with: /\A#[0-9A-F]{6}\z/, unless: lambda { |e| e.hexcode.blank? }
class << self class << self
def defaults
OpenProject::CustomStyles::Design.resolved_variables
end
def setables def setables
overwritten_values = self.overwritten overwritten_values = self.overwritten
OpenProject::CustomStyles::Design.customizable_variables.map do |varname| OpenProject::CustomStyles::Design.customizable_variables.map do |varname|
@ -62,16 +58,11 @@ class DesignColor < ApplicationRecord
overridable = OpenProject::CustomStyles::Design.customizable_variables overridable = OpenProject::CustomStyles::Design.customizable_variables
all.to_a.select do |color| all.to_a.select do |color|
overridable.include?(color.variable) && self.defaults[color] != color.get_hexcode overridable.include?(color.variable) && color.hexcode.present?
end end
end end
end end
# shortcut to get the color's value
def get_hexcode
hexcode.presence || self.class.defaults[variable]
end
protected protected
# This could be DRY! This method is taken from model Color. # This could be DRY! This method is taken from model Color.

@ -0,0 +1,89 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# 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-2017 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 docs/COPYRIGHT.rdoc for more details.
#++
module Design
class UpdateDesignService
attr_reader :params
def initialize(params)
@params = params
end
def call
CustomStyle.transaction do
set_logo
set_colors
set_theme
custom_style.save!
ServiceResult.new success: true, result: custom_style
end
rescue StandardError => e
ServiceResult.new success: false, message: e.message
end
private
def set_logo
custom_style.theme_logo = params[:logo].presence
end
def set_colors
return unless params[:colors]
# reset all colors if a new theme is set
if params[:theme].present?
DesignColor.delete_all
end
params[:colors].each do |param_variable, param_hexcode|
if design_color = DesignColor.find_by(variable: param_variable)
if param_hexcode.blank?
design_color.destroy
elsif design_color.hexcode != param_hexcode
design_color.hexcode = param_hexcode
design_color.save
end
else
# create that design_color
design_color = DesignColor.new variable: param_variable, hexcode: param_hexcode
design_color.save
end
end
end
def set_theme
custom_style.theme = params[:theme].presence
end
def custom_style
@custom_style ||= (CustomStyle.current || CustomStyle.create!)
end
end
end

@ -1,3 +1,5 @@
<% begin %>
<% unless (EnterpriseToken.allows_to?(:define_custom_style) && CustomStyle.try(:current).present? && CustomStyle.current.favicon.present?) %> <% unless (EnterpriseToken.allows_to?(:define_custom_style) && CustomStyle.try(:current).present? && CustomStyle.current.favicon.present?) %>
<%= favicon_link_tag OpenProject::CustomStyles::Design.favicon_asset_path %> <%= favicon_link_tag OpenProject::CustomStyles::Design.favicon_asset_path %>
<% end %> <% end %>
@ -8,3 +10,9 @@
type: 'image/png', type: 'image/png',
sizes: "120x120" %> sizes: "120x120" %>
<% end %> <% end %>
<% rescue => e
binding.pry
warn e
end
%>

@ -1,41 +0,0 @@
<%#-- copyright
OpenProject is an open source project management software.
Copyright (C) 2012-2020 the OpenProject GmbH
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-2017 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 docs/COPYRIGHT.rdoc for more details.
++#%>
<% texts.each_pair do |caption, text| %>
<fieldset class="preview">
<legend class="preview--legend"><%= "#{l(:label_preview)} - #{caption}" %></legend>
<% if text.blank? %>
<span class="preview--nothing-to-preview"><%= l(:nothing_to_preview) %></span>
<% else %>
<div class="wiki">
<%= format_text text, attachments: attachments, object: previewed %>
</div>
<% end %>
</fieldset>
<% end %>

@ -28,15 +28,20 @@ See docs/COPYRIGHT.rdoc for more details.
++#%> ++#%>
<style type="text/css"> <style type="text/css">
<% if CustomStyle.current.logo.present? %> <%
#logo .home-link { logo_url =
background-image: url("<%= custom_style_logo_path(digest: CustomStyle.current.digest, filename: CustomStyle.current.logo_identifier) %>"); if CustomStyle.current.logo.present?
} custom_style_logo_path(digest: CustomStyle.current.digest, filename: CustomStyle.current.logo_identifier)
<% elsif CustomStyle.current.theme_logo %> elsif CustomStyle.current.theme_logo.present?
#logo .home-link { asset_path(CustomStyle.current.theme_logo)
background-image: url("<%= asset_path(CustomStyle.current.theme_logo) %>"); else
} asset_path("logo_openproject_white_big.png")
<% end %> end
%>
#logo .home-link {
background-image: url(<%= logo_url %>);
}
:root { :root {
<% DesignColor.overwritten.each do |design_color| %> <% DesignColor.overwritten.each do |design_color| %>

@ -46,7 +46,7 @@ See docs/COPYRIGHT.rdoc for more details.
</div> </div>
<%= styled_button_tag t(:button_save), <%= styled_button_tag t(:button_save),
data:({ confirm: t('admin.custom_styles.theme_warning') } if @current_theme.empty?) %> data:({ confirm: t('admin.custom_styles.theme_warning') } unless @current_theme.present?) %>
</fieldset> </fieldset>
</section> </section>
<% end %> <% end %>
@ -157,7 +157,7 @@ See docs/COPYRIGHT.rdoc for more details.
<%= form_tag update_design_colors_path, method: :post, class: "form" do %> <%= form_tag update_design_colors_path, method: :post, class: "form" do %>
<section class="form--section"> <section class="form--section">
<fieldset class="form--fieldset -collapsible <%= 'collapsed' unless @current_theme.empty? %> "> <fieldset class="form--fieldset -collapsible <%= 'collapsed' if @current_theme.present? %> ">
<legend class="form--fieldset-legend"><%= I18n.t(:label_advanced_settings) %></legend> <legend class="form--fieldset-legend"><%= I18n.t(:label_advanced_settings) %></legend>
<% DesignColor.setables.each do |design_color| %> <% DesignColor.setables.each do |design_color| %>
@ -166,13 +166,15 @@ See docs/COPYRIGHT.rdoc for more details.
<span class="form--field-container"> <span class="form--field-container">
<div class="form--field-affix"> <div class="form--field-affix">
<%= icon_for_color(OpenStruct.new(variable: design_color.variable, <%= icon_for_color(OpenStruct.new(variable: design_color.variable,
hexcode: design_color.get_hexcode), hexcode: design_color.hexcode),
data: { target: "#design_colors_" + design_color.variable }) %> data: { target: "#design_colors_" + design_color.variable }) %>
</div> </div>
<span class="form--text-field-container"> <span class="form--text-field-container">
<%= styled_text_field_tag "design_colors[]" + design_color.variable, <%= styled_text_field_tag "design_colors[]" + design_color.variable,
design_color.hexcode, design_color.hexcode,
placeholder: DesignColor.defaults[design_color.variable] %> class: 'design-color--variable-input',
data: { 'variable-name': design_color.variable }
%>
</span> </span>
</span> </span>
<div class="form--field-instructions"> <div class="form--field-instructions">
@ -188,4 +190,17 @@ See docs/COPYRIGHT.rdoc for more details.
</fieldset> </fieldset>
</section> </section>
<%# Fill in the computed css variables in the inputs as their defaults %>
<%= nonced_javascript_tag do %>
var computedStyle = getComputedStyle(document.documentElement);
document
.querySelectorAll('.design-color--variable-input')
.forEach(function(el) {
if (!el.value || el.value === '') {
el.placeholder = computedStyle.getPropertyValue('--' + el.dataset.variableName).trim();
}
});
<% end %>
<% end %> <% end %>

@ -37,6 +37,11 @@ See docs/COPYRIGHT.rdoc for more details.
<%= content_for :content_body do %> <%= content_for :content_body do %>
<openproject-base></openproject-base> <openproject-base></openproject-base>
<%# Allow projection pages to show rails rendered content after initialization %>
<div id="projected-content" hidden>
<%= yield %>
</div>
<% end -%> <% end -%>
<%= render template: 'layouts/base', locals: local_assigns.merge({ no_action_menu: true }) %> <%= render template: 'layouts/base', locals: local_assigns.merge({ no_action_menu: true }) %>

@ -71,7 +71,6 @@ See docs/COPYRIGHT.rdoc for more details.
<%= call_hook :view_layouts_base_html_meta %> <%= call_hook :view_layouts_base_html_meta %>
<%= render 'common/favicons' %> <%= render 'common/favicons' %>
<%= stylesheet_link_tag 'openproject', media: "all" %>
<%# Include CLI assets (development) or prod build assets %> <%# Include CLI assets (development) or prod build assets %>
<%= include_frontend_assets %> <%= include_frontend_assets %>

@ -37,7 +37,6 @@ See docs/COPYRIGHT.rdoc for more details.
<%= output_title_and_meta_tags %> <%= output_title_and_meta_tags %>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= render 'common/favicons' %> <%= render 'common/favicons' %>
<%= stylesheet_link_tag 'openproject', media: "all" %>
</head> </head>
<body> <body>
<div id="wrapper"> <div id="wrapper">

@ -0,0 +1,110 @@
<!doctype html>
<html>
<head>
<base href="/" />
<meta charset="utf-8">
<meta content="ie=edge" http-equiv="x-ua-compatible">
<meta content="width=device-width,initial-scale=1" name="viewport">
<meta content="livingstyleguide.org <%= LivingStyleGuide::VERSION %>" name="generator">
<title>Living Style Guide for OpenProject</title>
<script src="http://localhost:4200/assets/frontend/vendor.js"></script>
<script src="http://localhost:4200/assets/frontend/polyfills.js"></script>
<script src="http://localhost:4200/assets/frontend/runtime.js"></script>
<script src="http://localhost:4200/assets/frontend/main.js"></script>
<script src="http://localhost:4200/assets/frontend/styles.js"></script>
<style>
body {
max-width: 65vw;
margin: 0 auto;
font-family: Lato;
font-size: 16px;
background-color: white;
}
.lsg-code {
display: block;
margin: 10px 0;
}
.styleguide-banner {
height: 280px;
padding: 200px 0 0;
background: url('/assets/styleguide/logo_openproject.png');
background-position: top center;
background-repeat: no-repeat;
}
.styleguide-banner--text {
text-align: center;
}
.styleguide-nav--menu-items {
display: flex;
justify-content: space-between;
list-style: none;
}
.livingstyleguide--code-block {
max-height: 300px;
}
.livingstyleguide--example {
overflow: visible;
}
.lsg-search-box {
width: 40%;
margin: 0 auto;
}
.icon-list {
display: flex;
flex-flow: row wrap;
width: 640px;
margin: 0 auto;
}
.icon-list li {
flex: 1;
flex-basis: 15%;
display: block;
text-align: center;
margin: 10px;
font-size: 12px;
}
.icon-list span.icon {
display: block;
font-size: 30px;
}
</style>
</head>
<body class="lsg">
<header class="livingstyleguide--header grid-content">
<div class="styleguide-banner">
<h1 class="styleguide-banner--text">Living Style Guide</h1>
</div>
</header>
<nav class="styleguide-nav">
<ul class="styleguide-nav--menu-items">
<li><a target="_self" href="#color-variables">Colors</a></li>
<li><a target="_self" href="#fonts">Fonts</a></li>
<li><a target="_self" href="#forms">Forms</a></li>
<li><a target="_self" href="#notifications">Notifications</a></li>
<li><a target="_self" href="#buttons">Buttons</a></li>
<li><a target="_self" href="#pagination">Pagination</a></li>
</ul>
</nav>
<section class="livingstyleguide--intro grid-content">
<p>&nbsp;</p>
</section>
<article class="lsg-container">
<%= html %>
</article>
<footer class="livingstyleguide--footer grid-content">
Copyright © 2020 OpenProject - All rights reserved.
</footer>
</body>
</html>

@ -3,8 +3,6 @@ OpenProject::Application.configure do
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w( config.assets.precompile += %w(
favicon.ico favicon.ico
openproject.css
accessibility.css
admin_users.js admin_users.js
autocompleter.js autocompleter.js
copy_issue_actions.js copy_issue_actions.js

@ -1,3 +1,5 @@
#-- encoding: UTF-8
#-- copyright #-- copyright
# OpenProject is an open source project management software. # OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH # Copyright (C) 2012-2020 the OpenProject GmbH
@ -25,9 +27,22 @@
# #
# See docs/COPYRIGHT.rdoc for more details. # See docs/COPYRIGHT.rdoc for more details.
#++ #++
#
if defined?(LivingStyleGuide) if defined?(LivingStyleGuide)
LivingStyleGuide.default_options[:scss_template] = OpenProject::LivingStyleGuide::Template ##
# Override CSS to never be called
module DocumentTemplatePatch
##
# Define our own template
def template_erb
if @template == :layout
File.read(Rails.root.join('app/views/layouts/styleguide/styleguide.layout.html.erb'))
else
super
end
end
end
LivingStyleGuide::Document.prepend DocumentTemplatePatch
end end
Rails.application.config.sass.load_paths << Rails.root.join('app', 'assets', 'stylesheets', 'vendor', 'foundation-apps', 'scss')

@ -135,7 +135,7 @@ Cucumber::Rails::Database.javascript_strategy = :truncation
# Remove any modal dialog remaining from the scenarios which finish in an unclean state # Remove any modal dialog remaining from the scenarios which finish in an unclean state
Before do |_scenario| Before do |_scenario|
page.driver.browser.switch_to.alert.accept rescue Selenium::WebDriver::Error::NoAlertOpenError page.driver.browser.switch_to.alert.accept rescue Selenium::WebDriver::Error::NoSuchAlertError
end end
Before do Before do

@ -1,56 +0,0 @@
#-- encoding: UTF-8
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# 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-2017 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 docs/COPYRIGHT.rdoc for more details.
#++
Capybara.register_driver :selenium_with_firebug do |app|
Capybara::Selenium::Driver
profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension(File.expand_path('../firebug-1.11.4.xpi', __FILE__))
profile.add_extension(File.expand_path('../firepath-0.9.7-fx.xpi', __FILE__))
# Prevent "Welcome!" tab
profile['extensions.firebug.currentVersion'] = '999'
# Enable for all sites.
profile['extensions.firebug.allPagesActivation'] = 'on'
# Enable all features.
['console', 'net', 'script'].each do |feature|
profile["extensions.firebug.#{feature}.enableSites"] = true
end
profile['intl.accept_languages'] = 'en,en-us'
Capybara::Selenium::Driver.new(app,
browser: :firefox,
profile: profile)
end
Before '@firebug' do
Capybara.current_driver = :selenium_with_firebug
end

@ -19,9 +19,11 @@
"main": "src/main.ts", "main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"assets": [], "assets": [
"src/assets"
],
"styles": [ "styles": [
"src/styles.css", "src/styles.scss",
"node_modules/codemirror/lib/codemirror.css", "node_modules/codemirror/lib/codemirror.css",
"node_modules/jquery-ui/themes/base/core.css", "node_modules/jquery-ui/themes/base/core.css",
"node_modules/jquery-ui/themes/base/datepicker.css", "node_modules/jquery-ui/themes/base/datepicker.css",
@ -91,9 +93,12 @@
"karmaConfig": "./karma.conf.js", "karmaConfig": "./karma.conf.js",
"tsConfig": "src/tsconfig.spec.json", "tsConfig": "src/tsconfig.spec.json",
"scripts": [], "scripts": [],
"styles": [ "styles": [],
"src/styles.css" "stylePreprocessorOptions": {
], "includePaths": [
"src/assets/sass/"
]
},
"assets": [] "assets": []
} }
}, },

@ -4393,11 +4393,6 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
}, },
"bourbon": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/bourbon/-/bourbon-6.0.0.tgz",
"integrity": "sha512-Skds0R1+GY3c1oBddh9BggYVq39Uo4ySvW33zttPk+4+nfGYpbZqwaDwENkbtV7PYhCk0ctTFkzfTNFv5365ag=="
},
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",

@ -77,7 +77,6 @@
"angular-dragula": "^1.2.8", "angular-dragula": "^1.2.8",
"atoa": "^1.0.0", "atoa": "^1.0.0",
"autoprefixer": "^9.6.1", "autoprefixer": "^9.6.1",
"bourbon": "~6.0.0",
"browserslist": "^4.9.1", "browserslist": "^4.9.1",
"bundle-loader": "^0.5.4", "bundle-loader": "^0.5.4",
"caniuse-lite": "^1.0.30001019", "caniuse-lite": "^1.0.30001019",
@ -133,7 +132,7 @@
"scripts": { "scripts": {
"analyze": "ng build --prod --stats-json && webpack-bundle-analyzer -p 9999 ../public/assets/frontend/stats.json", "analyze": "ng build --prod --stats-json && webpack-bundle-analyzer -p 9999 ../public/assets/frontend/stats.json",
"prebuild": "./scripts/link_plugin_placeholder.js", "prebuild": "./scripts/link_plugin_placeholder.js",
"build": "ng build --prod --named-chunks --source-map", "build": "ng build --prod --named-chunks --source-map --extract-css",
"preserve": "./scripts/link_plugin_placeholder.js", "preserve": "./scripts/link_plugin_placeholder.js",
"serve": "node --max_old_space_size=8096 ./node_modules/@angular/cli/bin/ng serve --public-host http://localhost:4200", "serve": "node --max_old_space_size=8096 ./node_modules/@angular/cli/bin/ng serve --public-host http://localhost:4200",
"pretest": "./scripts/link_plugin_placeholder.js", "pretest": "./scripts/link_plugin_placeholder.js",

@ -134,6 +134,10 @@ import {
TriggerActionsEntryComponent, TriggerActionsEntryComponent,
triggerActionsEntryComponentSelector triggerActionsEntryComponentSelector
} from "core-app/modules/time_entries/edit/trigger-actions-entry.component"; } from "core-app/modules/time_entries/edit/trigger-actions-entry.component";
import {
BacklogsPageComponent,
backlogsPageComponentSelector
} from "core-app/modules/backlogs/backlogs-page/backlogs-page.component";
export const globalDynamicComponents:OptionalBootstrapDefinition[] = [ export const globalDynamicComponents:OptionalBootstrapDefinition[] = [
{ selector: appBaseSelector, cls: ApplicationBaseComponent }, { selector: appBaseSelector, cls: ApplicationBaseComponent },
@ -175,6 +179,7 @@ export const globalDynamicComponents:OptionalBootstrapDefinition[] = [
{ selector: wpOverviewGraphSelector, cls: WorkPackageOverviewGraphComponent }, { selector: wpOverviewGraphSelector, cls: WorkPackageOverviewGraphComponent },
{ selector: wpQuerySelectSelector, cls: WorkPackageQuerySelectDropdownComponent }, { selector: wpQuerySelectSelector, cls: WorkPackageQuerySelectDropdownComponent },
{ selector: triggerActionsEntryComponentSelector, cls: TriggerActionsEntryComponent, embeddable: true }, { selector: triggerActionsEntryComponentSelector, cls: TriggerActionsEntryComponent, embeddable: true },
{ selector: backlogsPageComponentSelector, cls: BacklogsPageComponent },
]; ];

@ -54,17 +54,11 @@ require('@uirouter/angular');
// Jquery UI // Jquery UI
require('jquery-ui/ui/core.js'); require('jquery-ui/ui/core.js');
require('jquery-ui/ui/position.js'); require('jquery-ui/ui/position.js');
require('jquery-ui/ui/widgets/datepicker.js'); require('jquery-ui/ui/disable-selection.js');
require('jquery-ui/ui/widgets/dialog.js');
require('jquery-ui/ui/widgets/autocomplete.js');
require('jquery-ui/ui/widgets/sortable.js'); require('jquery-ui/ui/widgets/sortable.js');
require('jquery-ui/ui/widgets/tooltip.js'); require('jquery-ui/ui/widgets/autocomplete.js');
require('./misc/datepicker-defaults');
require('jquery-ui/ui/i18n/datepicker-en-GB.js');
require('jquery-ui/ui/i18n/datepicker-de.js');
require('jquery-ui/ui/widgets/dialog.js'); require('jquery-ui/ui/widgets/dialog.js');
require('jquery-ui/ui/widgets/tooltip.js');
require('expose-loader?moment!moment'); require('expose-loader?moment!moment');
require('moment/locale/en-gb.js'); require('moment/locale/en-gb.js');

@ -1,111 +0,0 @@
//-- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// 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-2017 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 docs/COPYRIGHT.rdoc for more details.
//++
jQuery(function($) {
var regions = $.datepicker.regional;
var regional = regions[I18n.locale] || regions[''];
// see ./app/helpers/application_helper.rb:508
if (typeof I18n.firstDayOfWeek === 'number') {
regional.firstDay = I18n.firstDayOfWeek;
}
$.datepicker.setDefaults(regional);
var gotoToday = $.datepicker._gotoToday;
$.datepicker._gotoToday = function (id) {
gotoToday.call(this, id);
var target = $(id),
inst = this._getInst(target[0]),
dateStr = $.datepicker._formatDate(inst);
target.val(dateStr);
target.blur();
$.datepicker._hideDatepicker();
};
var defaults = {
showWeek: true,
changeMonth: true,
changeYear: true,
yearRange: 'c-100:c+10',
dateFormat: 'yy-mm-dd',
showButtonPanel: true,
calculateWeek: function (day) {
var dayOfWeek = new Date(+day);
if (day.getDay() != 1) {
dayOfWeek.setDate(day.getDate() - day.getDay() + 1);
}
return $.datepicker.iso8601Week(dayOfWeek);
}
};
$.datepicker.setDefaults(defaults);
$.extend($.datepicker, {
_originalGotoToday: $.datepicker._gotoToday,
_gotoToday: function(id) {
var target = $(id),
inst = this._getInst(target[0]),
today = new Date(),
date = this._formatDate(inst, today.getDate(), today.getMonth(), today.getFullYear());
this._originalGotoToday(id);
this._selectDate(id, date);
},
// Reference the orignal function so we can override it and call it later
_inlineDatepicker2: $.datepicker._inlineDatepicker,
// Override the _inlineDatepicker method
_inlineDatepicker: function (target, inst) {
// Call the original
this._inlineDatepicker2(target, inst);
var beforeShow = $.datepicker._get(inst, 'beforeShow');
if (beforeShow) {
beforeShow.apply(target, [target, inst]);
}
},
_checkOffsetOriginal: $.datepicker._checkOffset,
_checkOffset: function(inst, offset, isFixed) {
var _offset = $.datepicker._checkOffsetOriginal(inst, offset, isFixed);
var alterOffset = this._get(inst, 'alterOffset');
if (alterOffset) {
var inp = inst.input ? inst.input[0] : null;
// trigger custom callback
return alterOffset.apply(inp, [_offset]);
}
return _offset;
}
});
});

@ -0,0 +1,19 @@
import {Component, OnInit, ViewEncapsulation} from "@angular/core";
export const backlogsPageComponentSelector = 'op-backlogs-page';
@Component({
selector: backlogsPageComponentSelector,
// Empty wrapper around legacy backlogs for CSS loading
// that got removed in the Rails assets pipeline
encapsulation: ViewEncapsulation.None,
template: '',
styleUrls: [
'./styles/backlogs.sass'
]
})
export class BacklogsPageComponent implements OnInit {
ngOnInit() {
document.getElementById('projected-content')!.hidden = false;
}
}

@ -33,7 +33,9 @@
* See docs/COPYRIGHT.rdoc for more details. * See docs/COPYRIGHT.rdoc for more details.
*/ */
@import backlogs/global @import global
@import backlogs/global_print @import global_print
@import backlogs/jqplot @import jqplot
@import backlogs/statistics @import statistics
@import master_backlog
@import taskboard

@ -0,0 +1,185 @@
/*-- copyright
OpenProject Backlogs Plugin
Copyright (C)2013-2014 the OpenProject Foundation (OPF)
Copyright (C)2011 Stephan Eckardt, Tim Felgentreff, Marnen Laibow-Koser, Sandro Munda
Copyright (C)2010-2011 friflaj
Copyright (C)2010 Maxime Guilbot, Andrew Vit, Joakim Kolsjö, ibussieres, Daniel Passos, Jason Vasquez, jpic, Emiliano Heyns
Copyright (C)2009-2010 Mark Maglana
Copyright (C)2009 Joe Heck, Nate Lowrie
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 Backlogs is a derivative work based on ChiliProject Backlogs.
The copyright follows:
Copyright (C) 2010-2011 - Emiliano Heyns, Mark Maglana, friflaj
Copyright (C) 2011 - Jens Ulferts, Gregor Schmidt - Finn GmbH - Berlin, Germany
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 docs/COPYRIGHT.rdoc for more details.
++*/
.jqplot-target {
position: relative;
color: #666;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 1em;
}
.jqplot-axis {
font-size: .75em;
}
.jqplot-xaxis {
margin-top: 10px;
}
.jqplot-x2axis {
margin-bottom: 10px;
}
.jqplot-yaxis {
margin-right: 10px;
}
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis {
margin-left: 10px;
margin-right: 10px;
}
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
position: absolute;
}
.jqplot-xaxis-tick {
top: 0;
left: 15px;
vertical-align: top;
}
.jqplot-x2axis-tick {
bottom: 0;
left: 15px;
vertical-align: bottom;
}
.jqplot-yaxis-tick {
right: 0;
top: 15px;
text-align: right;
}
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
left: 0;
top: 15px;
text-align: left;
}
.jqplot-xaxis-label {
margin-top: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-x2axis-label {
margin-bottom: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-yaxis-label {
margin-right: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
font-size: 11pt;
position: absolute;
}
table.jqplot-table-legend, table.jqplot-cursor-legend {
background-color: rgba(255, 255, 255, 0.6);
border: 1px solid #ccc;
position: absolute;
font-size: .75em;
}
td.jqplot-table-legend {
vertical-align: middle;
}
td.jqplot-table-legend > div {
border: 1px solid #ccc;
padding: .2em;
}
div.jqplot-table-legend-swatch {
width: 0;
height: 0;
border-top-width: .35em;
border-bottom-width: .35em;
border-left-width: .6em;
border-right-width: .6em;
border-top-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-style: solid;
}
.jqplot-title {
top: 0;
left: 0;
padding-bottom: .5em;
font-size: 1.2em;
}
table.jqplot-cursor-tooltip {
border: 1px solid #ccc;
font-size: .75em;
}
.jqplot-cursor-tooltip {
border: 1px solid #ccc;
font-size: .75em;
white-space: nowrap;
background: rgba(208, 208, 208, 0.5);
padding: 1px;
}
.jqplot-highlighter-tooltip {
border: 1px solid #ccc;
font-size: .75em;
white-space: nowrap;
background: rgba(208, 208, 208, 0.5);
padding: 1px;
}
.jqplot-point-label {
font-size: .75em;
}
td.jqplot-cursor-legend-swatch {
vertical-align: middle;
text-align: center;
}
div.jqplot-cursor-legend-swatch {
width: 1.2em;
height: .7em;
}

@ -163,10 +163,6 @@
width: auto width: auto
margin-left: 30px margin-left: 30px
margin-right: 50px margin-right: 50px
&.saving
background-image: image-url("loading.gif")
background-repeat: no-repeat
background-position: center
&.error.icon-bug &.error.icon-bug
background: none background: none
text-align: center text-align: center
@ -214,10 +210,6 @@
background-color: #F6F7F8 background-color: #F6F7F8
&.even &.even
background-color: #FFF background-color: #FFF
&.saving
background-image: image-url("loading.gif")
background-repeat: no-repeat
background-position: center
&.error.icon-bug &.error.icon-bug
background: none background: none
text-align: center text-align: center

@ -26,8 +26,8 @@
* See docs/COPYRIGHT.rdoc for more details. ++ * See docs/COPYRIGHT.rdoc for more details. ++
*/ */
@import openproject/variables @import "~global_styles/openproject/variables"
@import helpers/functions @import "~global_styles/openproject/functions"
@mixin story-header @mixin story-header
background-color: #FFFFFF background-color: #FFFFFF
@ -60,7 +60,7 @@
line-height: inherit line-height: inherit
white-space: inherit white-space: inherit
#rb #rb #taskboard
overflow-x: auto overflow-x: auto
#assigned_to_id_options #assigned_to_id_options
display: none display: none
@ -180,20 +180,6 @@
.indicator .indicator
display: none display: none
&.saving .indicator
background-color: #FFFFFF
background-position: center
background-repeat: no-repeat
border: 2px solid #000000
height: 16px
padding: 2px
position: absolute
left: 36px
top: 38px
width: 16px
background-image: image-url("loading.gif")
display: block
&.error .indicator &.error .indicator
background: none background: none
border: none border: none
@ -233,12 +219,12 @@
.ui-dialog-title .ui-dialog-title
float: right float: right
margin-right: 0 margin-right: 0
color: $body-font-color color: var(--body-font-color)
&.ui-widget-content &.ui-widget-content
background: none background: none
border: none border: none
.editor .editor
color: $body-font-color color: var(--body-font-color)
.ui-dialog-buttonpane.ui-widget-content .ui-dialog-buttonpane.ui-widget-content
background: none background: none
background-color: none background-color: none

@ -1,4 +1,4 @@
//-- copyright // -- copyright
// OpenProject is an open source project management software. // OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH // Copyright (C) 2012-2020 the OpenProject GmbH
// //
@ -6,7 +6,7 @@
// modify it under the terms of the GNU General Public License version 3. // 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: // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2017 Jean-Philippe Lang // Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team // Copyright (C) 2010-2013 the ChiliProject Team
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
@ -24,21 +24,24 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
// See docs/COPYRIGHT.rdoc for more details. // See docs/COPYRIGHT.rdoc for more details.
//++ // ++
$lato-file-formats: ("woff" "woff2") import {NgModule} from '@angular/core';
import {UIRouterModule} from "@uirouter/angular";
import {BacklogsPageComponent} from "core-app/modules/backlogs/backlogs-page/backlogs-page.component";
import {BACKLOGS_ROUTES} from "core-app/modules/backlogs/openproject-backlogs.routes";
+font-face(LatoLight, 'lato/Lato-Light', $file-formats: $lato-file-formats) @NgModule({
+font-face(LatoLight, 'lato/Lato-LightItalic', $file-formats: $lato-file-formats) imports: [
font-style: italic // Routes for /backlogs
UIRouterModule.forChild({
states: BACKLOGS_ROUTES
}),
],
declarations: [
BacklogsPageComponent
]
})
export class OpenprojectBacklogsModule {
}
+font-face(Lato, 'lato/Lato-Regular', $file-formats: $lato-file-formats)
+font-face(Lato, 'lato/Lato-Italic', $file-formats: $lato-file-formats)
font-style: italic
+font-face(Lato, 'lato/Lato-Bold', $file-formats: $lato-file-formats)
font-weight: bold
+font-face(Lato, 'lato/Lato-BoldItalic', $file-formats: $lato-file-formats)
font-weight: bold
font-style: italic

@ -0,0 +1,45 @@
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// 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 docs/COPYRIGHT.rdoc for more details.
// ++
import {Ng2StateDeclaration, UIRouter} from "@uirouter/angular";
import {BacklogsPageComponent} from "core-app/modules/backlogs/backlogs-page/backlogs-page.component";
export const BACKLOGS_ROUTES:Ng2StateDeclaration[] = [
{
name: 'backlogs',
parent: 'root',
url: '/backlogs',
component: BacklogsPageComponent
},
{
name: 'backlogs_sprint',
parent: 'root',
url: '/sprints/{sprintId:int}/taskboard',
component: BacklogsPageComponent
},
];

@ -35,8 +35,6 @@ import {BcfListContainerComponent} from "core-app/modules/bim/ifc_models/bcf/lis
import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component";
import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service";
export const IFC_ROUTES:Ng2StateDeclaration[] = [ export const IFC_ROUTES:Ng2StateDeclaration[] = [
{ {
name: 'bim', name: 'bim',

@ -1,4 +1,4 @@
import {ChangeDetectionStrategy, Component, Injector} from "@angular/core"; import {ChangeDetectionStrategy, Component, Injector, ViewEncapsulation} from "@angular/core";
import {GonService} from "core-app/modules/common/gon/gon.service"; import {GonService} from "core-app/modules/common/gon/gon.service";
import { import {
PartitionedQuerySpacePageComponent, PartitionedQuerySpacePageComponent,
@ -26,8 +26,10 @@ import {componentDestroyed} from "@w11k/ngx-componentdestroyed";
@Component({ @Component({
templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html', templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',
styleUrls: [ styleUrls: [
'/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass' '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass',
'./styles/generic.sass'
], ],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
providers: [ providers: [
QueryParamListenerService, QueryParamListenerService,

@ -1,5 +1,5 @@
@import "layout/colors" @import "~global_styles/layout/colors"
@import "layout/drop_down" @import "~global_styles/layout/drop_down"
.xeokit-context-menu .xeokit-context-menu
@extend .dropdown @extend .dropdown

@ -1,8 +1,9 @@
// -------------------------- GENERIC -------------------------- // Global helpers
@import "openproject/variables" @import "helpers"
@import "openproject/mixins"
@import "fonts/openproject_icon_definitions" // Need to import the icon mixins
@import "fonts/openproject_icon_font" @import "~global_styles/fonts/openproject_icon_definitions"
@import "~global_styles/fonts/openproject_icon_font"
@import "tabs" @import "tabs"
@import "toolbar" @import "toolbar"
@ -45,22 +46,22 @@
.xeokit-btn .xeokit-btn
position: relative position: relative
background-color: $button--background-color background-color: var(--button--background-color)
vertical-align: middle vertical-align: middle
padding: .375rem .75rem padding: .375rem .75rem
border-radius: 2px border-radius: 2px
border: 1px solid $button--border-color border: 1px solid var(--button--border-color)
@include default-transition @include default-transition
&:hover &:hover
@include varprop(background-color, button--background-hover-color) background-color: var(--button--background-hover-color)
&.disabled &.disabled
opacity: .55 opacity: .55
&.active &.active
@include varprop(color, button--active-font-color) color: var(--button--active-font-color)
@include varprop(background-color, button--active-background-color) background-color: var(--button--active-background-color)
@include varprop(border-color, button--active-border-color) border-color: var(--button--active-border-color)
box-shadow: 0 0 3px $button--active-border-color inset box-shadow: 0 0 3px var(--button--active-border-color) inset

@ -1,7 +1,7 @@
// -------------------------- GENERIC -------------------------- // -------------------------- GENERIC --------------------------
.ifc-model-viewer--tree-panel .ifc-model-viewer--tree-panel
padding: 0 15px padding: 0 15px
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
// -------------------------- XEOKIT specific rules for TABS -------------------------- // -------------------------- XEOKIT specific rules for TABS --------------------------
.xeokit-tabs .xeokit-tabs
@ -18,10 +18,10 @@
.xeokit-tab-btn .xeokit-tab-btn
border-bottom: 2px solid border-bottom: 2px solid
@include varprop(border-color, main-menu-font-color) border-color: var(--main-menu-font-color)
.xeokit-form-check .xeokit-form-check
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
@include text-shortener @include text-shortener
// As the button and the content are in the same container, // As the button and the content are in the same container,
@ -45,14 +45,14 @@
margin-bottom: 10px margin-bottom: 10px
.xeokit-btn .xeokit-btn
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
background-color: transparent background-color: transparent
border: 1px solid border: 1px solid
@include varprop(border-color, main-menu-font-color) border-color: var(--main-menu-font-color)
.xeokit-tab-btn .xeokit-tab-btn
display: inline-block display: inline-block
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
font-weight: bold font-weight: bold
padding: 0 5px !important padding: 0 5px !important
@ -79,18 +79,18 @@ $pill-padding-left: 8px
height: 30px height: 30px
width: 20px width: 20px
// Workaround to hide the actual text of the link and show our icons instead // Workaround to hide the actual text of the link and show our icons instead
@include varprop(color, main-menu-bg-color) color: var(--main-menu-bg-color)
&:hover, &:hover,
&:focus, &:focus,
&:active, &:active,
li:hover & li:hover &
@include varprop(background-color, main-menu-bg-color) background-color: var(--main-menu-bg-color)
@include varprop(color, main-menu-bg-color) color: var(--main-menu-bg-color)
&:before &:before
font-family: "openproject-icon-font" !important font-family: "openproject-icon-font" !important
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
font-size: 0.7rem font-size: 0.7rem
&.plus:before &.plus:before
@ -99,8 +99,8 @@ $pill-padding-left: 8px
@include icon-mixin-arrow-down1 @include icon-mixin-arrow-down1
.highlighted-node .highlighted-node
@include varprop(background, main-menu-bg-selected-background) background: var(--main-menu-bg-selected-background)
@include varprop(color, main-menu-selected-font-color) color: var(--main-menu-selected-font-color)
border-radius: 3px border-radius: 3px
input input
@ -125,7 +125,7 @@ $pill-padding-left: 8px
vertical-align: middle vertical-align: middle
span span
@include varprop(color, main-menu-font-color) color: var(--main-menu-font-color)
padding-left: 3px padding-left: 3px
width: calc(100% - 16px) width: calc(100% - 16px)
vertical-align: middle vertical-align: middle

@ -1,4 +1,4 @@
@import "content/tooltips" @import "~global_styles/content/tooltips"
.xeokit-toolbar [data-tippy-content] .xeokit-toolbar [data-tippy-content]
@extend .tooltip--bottom @extend .tooltip--bottom

@ -0,0 +1,49 @@
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// 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 docs/COPYRIGHT.rdoc for more details.
// ++
import {NgModule} from '@angular/core';
import {UIRouterModule} from "@uirouter/angular";
import {
REPORTING_ROUTES,
} from "core-app/modules/reporting/openproject-reporting.routes";
import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/reporting-page.component";
@NgModule({
imports: [
// Routes for /cost_reports
UIRouterModule.forChild({
states: REPORTING_ROUTES
}),
],
declarations: [
ReportingPageComponent
]
})
export class OpenprojectReportingModule {
}

@ -0,0 +1,44 @@
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// 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 docs/COPYRIGHT.rdoc for more details.
// ++
import {Ng2StateDeclaration, UIRouter} from "@uirouter/angular";
import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/reporting-page.component";
export const REPORTING_ROUTES:Ng2StateDeclaration[] = [
{
name: 'reporting',
parent: 'root',
url: '/cost_reports',
component: ReportingPageComponent
},
{
name: 'reporting.show',
url: '/:id',
component: ReportingPageComponent
},
];

@ -0,0 +1,19 @@
import {Component, OnInit, ViewEncapsulation} from "@angular/core";
export const reportingPageComponentSelector = 'op-reporting-page';
@Component({
selector: reportingPageComponentSelector,
// Empty wrapper around legacy backlogs for CSS loading
// that got removed in the Rails assets pipeline
encapsulation: ViewEncapsulation.None,
template: '',
styleUrls: [
'./styles/reporting.sass'
]
})
export class ReportingPageComponent implements OnInit {
ngOnInit() {
document.getElementById('projected-content')!.hidden = false;
}
}

@ -1,4 +1,7 @@
@import "fonts/openproject_icon_definitions" @import "~global_styles/fonts/openproject_icon_definitions"
@import _reporting_group_by
@import _reporting_table
@import _reporting_table_print
@mixin sort-icons @mixin sort-icons
font-family: "openproject-icon-font" !important font-family: "openproject-icon-font" !important

@ -63,6 +63,24 @@ export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [
url: '/bcf', url: '/bcf',
loadChildren: () => import('../bim/ifc_models/openproject-ifc-models.module').then(m => m.OpenprojectIFCModelsModule) loadChildren: () => import('../bim/ifc_models/openproject-ifc-models.module').then(m => m.OpenprojectIFCModelsModule)
}, },
{
name: 'backlogs.**',
parent: 'root',
url: '/backlogs',
loadChildren: () => import('../backlogs/openproject-backlogs.module').then(m => m.OpenprojectBacklogsModule)
},
{
name: 'backlogs_sprint.**',
parent: 'root',
url: '/sprints',
loadChildren: () => import('../backlogs/openproject-backlogs.module').then(m => m.OpenprojectBacklogsModule)
},
{
name: 'reporting.**',
parent: 'root',
url: '/cost_reports',
loadChildren: () => import('../reporting/openproject-reporting.module').then(m => m.OpenprojectReportingModule)
},
{ {
name: 'job-statuses.**', name: 'job-statuses.**',
parent: 'root', parent: 'root',
@ -144,8 +162,8 @@ export function initializeUiRouterListeners(injector:Injector) {
let wpBase = document.querySelector(appBaseSelector); let wpBase = document.querySelector(appBaseSelector);
// Uncomment to trace route changes // Uncomment to trace route changes
// const uiRouter = injector.get(UIRouter); const uiRouter = injector.get(UIRouter);
// uiRouter.trace.enable(); uiRouter.trace.enable();
// Apply classes from bodyClasses in each state definition // Apply classes from bodyClasses in each state definition
// This was defined as onEnter, onExit functions in each state before // This was defined as onEnter, onExit functions in each state before

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -1,2 +1,7 @@
@import "../../../../app/assets/stylesheets/openproject/_mixins" /**
@import "../../../../app/assets/stylesheets/content/drag_and_drop" * Ensure you're exposing only mixins and sass stuff here
* as all CSS output will be duplicated in EVERY component
* importing these helpers!
*/
@import "~global_styles/openproject/_mixins"
@import "~global_styles/content/drag_and_drop"

@ -67,7 +67,7 @@
// line behind title // line behind title
// from http://codepen.io/ericrasch/pen/Irlpm // from http://codepen.io/ericrasch/pen/Irlpm
&:before &:before
border-top: 2px solid $content-form-separator-color border-top: 2px solid var(--content-form-separator-color)
content: "" content: ""
// this centers the line to the full width specified // this centers the line to the full width specified
margin: 0 auto margin: 0 auto
@ -85,7 +85,7 @@
span span
// to hide the lines from behind the text, you have to set the // to hide the lines from behind the text, you have to set the
// background color the same as the container // background color the same as the container
background: $content-form-bg-color background: var(--content-form-bg-color)
padding: 0 15px padding: 0 15px
.login-auth-provider-list .login-auth-provider-list
@ -96,13 +96,12 @@
padding: 0.5rem 0.5rem 0.5rem 2rem padding: 0.5rem 0.5rem 0.5rem 2rem
margin-left: 10px margin-left: 10px
margin-bottom: 10px margin-bottom: 10px
background-image: image-url('auth_provider-developer.png')
background-size: 20px 20px background-size: 20px 20px
background-repeat: no-repeat background-repeat: no-repeat
background-position: 5px center background-position: 5px center
background-color: light-grey background-color: light-grey
font-weight: normal font-weight: normal
color: $body-font-color color: var(--body-font-color)
&:hover &:hover
text-decoration: none text-decoration: none
@ -112,14 +111,14 @@
white-space: normal white-space: normal
.modal-wrapper .login-auth-providers h3 span .modal-wrapper .login-auth-providers h3 span
background: $header-drop-down-bg-color background: var(--header-drop-down-bg-color)
#top-menu #nav-login-content .login-auth-providers #top-menu #nav-login-content .login-auth-providers
h3 h3
&:before &:before
width: 100% width: 100%
span span
background: $header-drop-down-bg-color background: var(--header-drop-down-bg-color)
.login-auth-provider-list .login-auth-provider-list
margin-top: -15px margin-top: -15px
margin-bottom: 10px margin-bottom: 10px

@ -48,9 +48,7 @@ html > body #ajax-indicator
#ajax-indicator span, .ajax-indicator #ajax-indicator span, .ajax-indicator
background-position: 0% 40% background-position: 0% 40%
background-repeat: no-repeat background-repeat: no-repeat
background-image: image-url("loading.gif") background-image: url('~assets/images/loading.gif')
padding-left: 26px
vertical-align: bottom
.ajax_appended_information.loading .ajax-indicator .ajax_appended_information.loading .ajax-indicator
padding-left: 22px padding-left: 22px

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save