commit
2dc21bcd0a
@ -1,19 +0,0 @@ |
||||
project: |
||||
after: |
||||
- npm install npm |
||||
stage: |
||||
before: |
||||
- pushd frontend; |
||||
npm install --unsafe-perm --ignore-scripts; |
||||
bower install --allow-root; |
||||
popd |
||||
- cp config/configuration.yml.example config/configuration.yml |
||||
- cp config/database.teatro.yml config/database.yml |
||||
- bundle exec rake generate_secret_token |
||||
|
||||
database: |
||||
- bundle exec rake db:create db:migrate |
||||
- bundle exec rake db:seed RAILS_ENV=development |
||||
|
||||
assets: bundle exec rake assets:precompile RAILS_ENV=development |
||||
run: foreman start -f Procfile.dev -c all=1,assets=0 |
@ -1,450 +0,0 @@ |
||||
//-- copyright |
||||
// OpenProject is a project management system. |
||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License version 3. |
||||
// |
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
// Copyright (C) 2010-2013 the ChiliProject Team |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License |
||||
// as published by the Free Software Foundation; either version 2 |
||||
// of the License, or (at your option) any later version. |
||||
// |
||||
// This program is distributed in the hope that it will be useful, |
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
// GNU General Public License for more details. |
||||
// |
||||
// You should have received a copy of the GNU General Public License |
||||
// along with this program; if not, write to the Free Software |
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
// |
||||
// See doc/COPYRIGHT.rdoc for more details. |
||||
//++ |
||||
|
||||
%inline-date-picker-container-position-absolute |
||||
display: none |
||||
z-index: 99999 |
||||
position: absolute |
||||
|
||||
.inplace-edit |
||||
@include grid-block |
||||
position: inherit |
||||
overflow: visible |
||||
|
||||
.-preview |
||||
button |
||||
visibility: hidden |
||||
.jstb_preview |
||||
visibility: visible |
||||
|
||||
&.-busy |
||||
opacity: 0.5 |
||||
.jstElements button |
||||
opacity: 0.5 |
||||
* |
||||
cursor: wait!important |
||||
|
||||
.inplace-edit--date |
||||
margin: 0 |
||||
position: relative |
||||
& > * |
||||
margin-bottom: 0 |
||||
& > .inplace-edit--date-picker |
||||
@extend %inline-date-picker-container-position-absolute |
||||
left: 0 |
||||
|
||||
&.attribute-date |
||||
.inplace-edit--read-value |
||||
span |
||||
display: inline-block |
||||
vertical-align: middle |
||||
|
||||
.inplace-edit--date-range |
||||
display: table |
||||
width: 100% |
||||
position: relative |
||||
& > * |
||||
display: table-cell |
||||
margin-bottom: 0 |
||||
& > .delimeter |
||||
padding-right: 5px |
||||
padding-left: 5px |
||||
text-align: center |
||||
vertical-align: middle |
||||
& > .inplace-edit--date-range-start-date-picker |
||||
@extend %inline-date-picker-container-position-absolute |
||||
left: 0 |
||||
& > .inplace-edit--date-range-end-date-picker |
||||
@extend %inline-date-picker-container-position-absolute |
||||
right: 0 |
||||
|
||||
&.-editable.-no-label:not(.-active) |
||||
margin-left: -0.375rem |
||||
|
||||
&.-small |
||||
margin-top: 3px |
||||
padding-bottom: 0px |
||||
padding-top: 0px |
||||
|
||||
.inplace-edit--read-value |
||||
padding-top: 0 |
||||
padding-bottom: 0 |
||||
|
||||
select, input |
||||
height: 24px |
||||
padding-top: 0 |
||||
padding-bottom: 0 |
||||
line-height: normal |
||||
font-size: 14px |
||||
|
||||
&.-shrink |
||||
.inplace-edit--read-value, |
||||
flex: 0 1 auto |
||||
|
||||
.textarea-wrapper |
||||
margin-bottom: 39px |
||||
|
||||
// This is just a neutral element that one can |
||||
// put in so that it does no longer interfere |
||||
// with the flex boxes |
||||
.inplace-edit--block |
||||
@include grid-block |
||||
overflow: visible |
||||
|
||||
|
||||
#ui-datepicker-div |
||||
z-index: 9999 !important |
||||
|
||||
.inplace-edit--form, |
||||
.user-comment--form |
||||
flex: 1 1 auto |
||||
display: block |
||||
position: relative |
||||
|
||||
.inplace-edit |
||||
.textarea-wrapper |
||||
.jstHandle, .jstSpacer |
||||
display: none |
||||
.jstElements |
||||
button |
||||
display: none |
||||
.jstb_strong, |
||||
.jstb_em, |
||||
.jstb_ins, |
||||
.jstb_del, |
||||
.jstb_ul, |
||||
.jstb_ol, |
||||
.jstb_preview, |
||||
.jstb_help |
||||
display: inline-flex |
||||
justify-content: center |
||||
|
||||
// Enable greater clickable area for constrained movable users |
||||
.wp-inline-edit--boolean-field |
||||
width: 100% |
||||
|
||||
.inplace-edit--select |
||||
.select2-display-none |
||||
display: none |
||||
&.-full-width |
||||
max-width: 100% |
||||
|
||||
.inplace-edit--textarea |
||||
min-height: 20px |
||||
width: 100% |
||||
margin-bottom: -1px |
||||
overflow-y: auto !important |
||||
|
||||
// Resize done by angular-elastic |
||||
&[msd-elastic] |
||||
resize: none |
||||
|
||||
&.-animated:focus |
||||
transition: height 50ms ease-in-out |
||||
|
||||
.inplace-edit--text-field |
||||
margin-bottom: 0!important |
||||
padding: 0.375rem |
||||
font-size: inherit |
||||
line-height: inherit |
||||
|
||||
.inplace-edit--dashboard |
||||
position: relative |
||||
width: 100% |
||||
z-index: 100 |
||||
font-size: 0.875rem |
||||
|
||||
.inplace-edit--errors |
||||
line-height: 1.2em |
||||
width: 100% |
||||
padding: 5px |
||||
left: 251px |
||||
bottom: -11px |
||||
background: rgb(254, 208, 209) |
||||
border: 1px solid $inplace-edit--color--very-dark |
||||
min-height: 42px |
||||
color: $body-font-color |
||||
.inplace-edit--errors--icon |
||||
position: absolute |
||||
top: 8px |
||||
.inplace-edit--errors--text |
||||
white-space: pre-line |
||||
padding-left: 18px |
||||
|
||||
.wp-edit-field |
||||
.jstHandle, .jstSpacer |
||||
display: none |
||||
|
||||
.inplace-edit--write |
||||
@include grid-block |
||||
|
||||
.inplace-edit--read |
||||
@include grid-block |
||||
overflow: visible |
||||
|
||||
.inplace-edit--read-value |
||||
@include grid-block |
||||
|
||||
&.-default |
||||
font-style: italic |
||||
|
||||
p |
||||
font-size: inherit |
||||
|
||||
&:last-of-type |
||||
margin-bottom: 0 |
||||
|
||||
.user-field-user-link |
||||
display: inline |
||||
|
||||
.macro-unavailable.permanent |
||||
position: relative |
||||
top: 0 |
||||
|
||||
span |
||||
overflow: hidden |
||||
text-overflow: ellipsis |
||||
|
||||
p |
||||
overflow: inherit |
||||
text-overflow: inherit |
||||
|
||||
.inplace-edit--read-value--value, |
||||
@include grid-block |
||||
|
||||
&.-placeholder |
||||
font-style: italic |
||||
|
||||
.progress-bar-legend |
||||
font-style: initial |
||||
|
||||
// When user is not allowed to edit the field |
||||
#work-package-description |
||||
span:not(.inplace-editing--container) |
||||
.inplace-edit--read-value span |
||||
width: 100% |
||||
.macro-unavailable.permanent |
||||
width: 50% |
||||
|
||||
.inplace-edit--preview |
||||
border: 1px solid $inplace-edit--border-color |
||||
min-height: 114px |
||||
padding: 0.375rem |
||||
|
||||
.inplace-edit--icon-wrapper |
||||
@include grid-block(shrink) |
||||
text-align: center |
||||
width: 33px |
||||
background: $gray-light |
||||
border-left: 1px solid $inplace-edit--border-color |
||||
align-items: center |
||||
justify-content: center |
||||
visibility: hidden |
||||
font-size: rem-calc(14px) |
||||
|
||||
.icon-edit:before, |
||||
.icon-delete:before, |
||||
.icon-remove:before |
||||
// HACK: overriding default padding here |
||||
padding-right: 0 |
||||
|
||||
a.inplace-edit--icon-wrapper |
||||
color: $body-font-color |
||||
|
||||
&:hover |
||||
color: $body-font-color |
||||
text-decoration: none |
||||
|
||||
.inplace-editing--trigger-container |
||||
@include grid-block |
||||
overflow: visible |
||||
width: 100% |
||||
|
||||
// need to specify the a explicitly as otherwise |
||||
// the default class will win |
||||
a.inplace-editing--trigger-link, |
||||
.inplace-editing--trigger-link, |
||||
@include grid-block |
||||
color: $body-font-color |
||||
font-weight: inherit |
||||
overflow: visible |
||||
width: 100% |
||||
|
||||
&:hover, |
||||
&:focus, |
||||
&.-focus |
||||
text-decoration: none |
||||
color: $body-font-color |
||||
|
||||
.inplace-editing--container, |
||||
.wp-edit-field |
||||
border-color: $inplace-edit--border-color |
||||
|
||||
&.-active |
||||
border-color: transparent |
||||
|
||||
.inplace-edit--icon-wrapper |
||||
visibility: visible |
||||
display: flex |
||||
|
||||
// Otherwise the description will show up in one line on IE10 |
||||
.inplace-edit--read-value |
||||
display: block |
||||
|
||||
// Do not hover trigger-link when element is read-only |
||||
.-read-only |
||||
.inplace-editing--trigger-link:hover .inplace-editing--container |
||||
border-color: transparent |
||||
|
||||
.inplace-editing--container, |
||||
@include grid-block |
||||
border-color: transparent |
||||
border-style: solid |
||||
border-radius: 2px |
||||
border-width: 1px |
||||
overflow: visible |
||||
width: 100% |
||||
|
||||
.inplace-edit--controls |
||||
display: inline-block |
||||
background: $inplace-edit--dark-background |
||||
border: 1px solid $inplace-edit--color--very-dark |
||||
box-shadow: 2px 2px 4px $inplace-edit--border-color |
||||
text-align: center |
||||
float: right |
||||
padding: 5px |
||||
line-height: 1.6rem |
||||
margin-top: -1px |
||||
// Having to get the element out of the normal dom flow to |
||||
// prevent the element overlapping and thereby blocking the click on |
||||
// inplace-editable elements below the current one. |
||||
position: absolute |
||||
right: 0 |
||||
|
||||
// Disabled submit styles when not applicable |
||||
.inplace-edit--control--save[disabled], |
||||
.inplace-edit--control--send[disabled] |
||||
background-color: $inplace-edit--bg-color--disabled |
||||
|
||||
span |
||||
color: $inplace-edit--color--disabled |
||||
cursor: not-allowed |
||||
|
||||
.inplace-edit--control |
||||
width: 1.75rem |
||||
height: 1.75rem |
||||
line-height: 1.75rem |
||||
display: inline-block |
||||
font-size: 0.9rem |
||||
|
||||
a |
||||
display: inline-block |
||||
width: 100% |
||||
height: 100% |
||||
border: 1px solid transparent |
||||
color: $body-font-color |
||||
text-decoration: none |
||||
|
||||
&:hover, &:active |
||||
border-color: $inplace-edit--border-color |
||||
border-radius: 2px |
||||
|
||||
.icon-context:before |
||||
padding: 0 |
||||
// custom hack to have the jsToolbar in the same line as the "Description" title |
||||
.inplace-edit.attribute-description |
||||
|
||||
.inplace-edit--write |
||||
margin-top: -46px |
||||
|
||||
// for non-textile description we need to not overlap the 'Description' header |
||||
// which in textile is shown due to edit buttons on the right side |
||||
&.edit-strategy-textarea |
||||
margin-top: auto |
||||
|
||||
.jstElements |
||||
margin-bottom: 18px !important |
||||
|
||||
// Explicit styles for input-esque trigger appearance |
||||
.work-packages--activity--add-comment, |
||||
.work-package--watchers-lookup |
||||
.inplace-editing--container |
||||
border: 1px solid #eee |
||||
|
||||
.work-packages--activity--add-comment |
||||
margin: 20px 0 |
||||
|
||||
.inplace-edit--read-value |
||||
padding: 10px 5px |
||||
|
||||
.inplace-editing--trigger-link |
||||
font-size: 1rem |
||||
|
||||
.work-package--watchers-lookup .inplace-edit--read-value |
||||
padding: 0.375rem |
||||
|
||||
.work-packages--split-view |
||||
.work-packages--details--title, |
||||
.work-packages--details--description |
||||
|
||||
a.inplace-editing--trigger-link |
||||
margin-left: 1px |
||||
|
||||
&:focus |
||||
outline-offset: -2px |
||||
outline-width: 1px |
||||
|
||||
.inplace-edit--highlight |
||||
border-color: $inplace-edit--color-highlight !important |
||||
|
||||
.work-packages--details |
||||
.inplace-edit--read-value .macro-unavailable.permanent |
||||
width: 75% |
||||
margin-left: -10rem |
||||
|
||||
.work-package--details--long-field |
||||
margin-top: 10px |
||||
|
||||
.inplace-editing--trigger-container |
||||
line-height: 1.6 |
||||
|
||||
.inplace-edit--read |
||||
margin-left: 0px |
||||
max-width: 100% |
||||
padding-bottom: 5px |
||||
|
||||
.inplace-edit--read-value |
||||
span.deleting |
||||
opacity: 0.5 |
||||
|
||||
img.avatar-mini |
||||
float: inherit |
||||
|
||||
i |
||||
vertical-align: text-top |
||||
|
@ -1 +0,0 @@ |
||||
# Work packages |
@ -1,67 +0,0 @@ |
||||
//-- copyright |
||||
// OpenProject is a project management system. |
||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License version 3. |
||||
// |
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
// Copyright (C) 2010-2013 the ChiliProject Team |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License |
||||
// as published by the Free Software Foundation; either version 2 |
||||
// of the License, or (at your option) any later version. |
||||
// |
||||
// This program is distributed in the hope that it will be useful, |
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
// GNU General Public License for more details. |
||||
// |
||||
// You should have received a copy of the GNU General Public License |
||||
// along with this program; if not, write to the Free Software |
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
// |
||||
// See doc/COPYRIGHT.rdoc for more details. |
||||
//++ |
||||
|
||||
|
||||
.wp-inline-create-button-row td |
||||
padding: 0 |
||||
|
||||
.wp-inline-create-button |
||||
border-bottom: none |
||||
|
||||
a |
||||
width: 100% |
||||
padding: 0.5rem 0 |
||||
display: block |
||||
line-height: 1.6 |
||||
|
||||
&:hover |
||||
background: #e4f7fb |
||||
|
||||
|
||||
.wp-inline-create--add-link |
||||
font-weight: bold |
||||
|
||||
.icon::before |
||||
padding-left: 7px |
||||
padding-right: 10px |
||||
font-size: 11px |
||||
|
||||
&:hover |
||||
text-decoration: none |
||||
|
||||
.wp--row.-new, |
||||
tr.context-menu-selection.-new |
||||
background: #BEF3CA |
||||
|
||||
&:hover |
||||
background: darken(#BEF3CA, 5%) |
||||
|
||||
.wp-table--cell-span:hover |
||||
border-color: #35c53f |
||||
|
||||
|
@ -1 +0,0 @@ |
||||
# Work Packages - [Details Pane] - Attachments |
@ -0,0 +1,93 @@ |
||||
//-- copyright |
||||
// OpenProject is a project management system. |
||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License version 3. |
||||
// |
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
// Copyright (C) 2010-2013 the ChiliProject Team |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License |
||||
// as published by the Free Software Foundation; either version 2 |
||||
// of the License, or (at your option) any later version. |
||||
// |
||||
// This program is distributed in the hope that it will be useful, |
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
// GNU General Public License for more details. |
||||
// |
||||
// You should have received a copy of the GNU General Public License |
||||
// along with this program; if not, write to the Free Software |
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
// |
||||
// See doc/COPYRIGHT.rdoc for more details. |
||||
//++ |
||||
|
||||
// *** NOTE *** |
||||
// Following code handles trigger-links and inplace icons |
||||
// It is used for example for the attachements list and comment form |
||||
|
||||
// need to specify the a explicitly as otherwise |
||||
// the default class will win |
||||
a.inplace-editing--trigger-link, |
||||
.inplace-editing--trigger-link, |
||||
&:hover, |
||||
&:focus, |
||||
&.-focus |
||||
text-decoration: none |
||||
color: $body-font-color |
||||
|
||||
.inplace-editing--container, |
||||
.wp-edit-field |
||||
border-color: $inplace-edit--border-color |
||||
|
||||
&.-active |
||||
border-color: transparent |
||||
|
||||
.inplace-edit--icon-wrapper |
||||
visibility: visible |
||||
|
||||
.inplace-edit--read-value |
||||
display: inline-block |
||||
span |
||||
line-height: 2 |
||||
i |
||||
vertical-align: middle |
||||
|
||||
.work-package--details--long-field |
||||
.inplace-edit--read .inplace-edit--read-value |
||||
// Use the whole space and leave room for the icon on the right |
||||
width: calc(100% - 42px) |
||||
padding: 3px |
||||
line-height: 2 |
||||
span.deleting |
||||
opacity: 0.5 |
||||
|
||||
img.avatar-mini |
||||
float: inherit |
||||
|
||||
// Do not hover trigger-link when element is read-only |
||||
.-read-only |
||||
.inplace-editing--trigger-link:hover .inplace-editing--container |
||||
border-color: transparent |
||||
|
||||
.inplace-edit--icon-wrapper |
||||
display: inline-block |
||||
text-align: center |
||||
width: 32px |
||||
line-height: 2.5 |
||||
background: $gray-light |
||||
border-left: 1px solid $inplace-edit--border-color |
||||
color: $body-font-color |
||||
visibility: hidden |
||||
float: right |
||||
|
||||
.icon-context:before |
||||
// HACK: overriding default padding here |
||||
padding-right: 0 |
||||
|
||||
&:hover |
||||
text-decoration: none |
@ -0,0 +1,103 @@ |
||||
//-- copyright |
||||
// OpenProject is a project management system. |
||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License version 3. |
||||
// |
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
// Copyright (C) 2010-2013 the ChiliProject Team |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License |
||||
// as published by the Free Software Foundation; either version 2 |
||||
// of the License, or (at your option) any later version. |
||||
// |
||||
// This program is distributed in the hope that it will be useful, |
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
// GNU General Public License for more details. |
||||
// |
||||
// You should have received a copy of the GNU General Public License |
||||
// along with this program; if not, write to the Free Software |
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
// |
||||
// See doc/COPYRIGHT.rdoc for more details. |
||||
//++ |
||||
|
||||
|
||||
// Avoid overlapping text selection in FF |
||||
// https://community.openproject.com/work_packages/23742 |
||||
.inplace-edit--textarea |
||||
line-height: normal |
||||
|
||||
.inplace-edit--write-value |
||||
textarea |
||||
font-size: 1rem |
||||
line-height: 1.6 |
||||
|
||||
.inplace-edit |
||||
.textarea-wrapper |
||||
// Leave room below textarea for inplace edit controls |
||||
position: relative |
||||
margin-bottom: 50px |
||||
|
||||
// Don't show all jstb buttons in inplace-edit textareas |
||||
.jstHandle, .jstSpacer |
||||
display: none |
||||
.jstElements |
||||
button |
||||
display: none |
||||
.jstb_strong, |
||||
.jstb_em, |
||||
.jstb_ins, |
||||
.jstb_del, |
||||
.jstb_ul, |
||||
.jstb_ol, |
||||
.jstb_preview, |
||||
.jstb_help |
||||
display: inline-flex |
||||
justify-content: center |
||||
|
||||
// Styles for the Save | Cancel controls below textareas |
||||
.inplace-edit--controls |
||||
position: absolute |
||||
right: 0 |
||||
width: 80px |
||||
height: 40px |
||||
bottom: -39px // 40px - border |
||||
background: $inplace-edit--dark-background |
||||
border: 1px solid $inplace-edit--color--very-dark |
||||
box-shadow: 2px 2px 4px $inplace-edit--border-color |
||||
text-align: center |
||||
// Align controls via flex |
||||
display: flex |
||||
|
||||
// Disabled submit styles when not applicable |
||||
.inplace-edit--control--save[disabled] a, |
||||
.inplace-edit--control--send[disabled] a |
||||
background-color: $inplace-edit--bg-color--disabled |
||||
color: $inplace-edit--color--disabled |
||||
cursor: not-allowed |
||||
|
||||
// A single save/cancel control |
||||
.inplace-edit--control |
||||
font-size: 0.9rem |
||||
flex: 1 |
||||
padding: 5px |
||||
a |
||||
// Center save/cancel links |
||||
width: 100% |
||||
line-height: 27px |
||||
border: 1px solid transparent |
||||
display: inline-block |
||||
color: $body-font-color |
||||
text-decoration: none |
||||
|
||||
&:hover, &:active |
||||
border-color: $inplace-edit--border-color |
||||
|
||||
.icon-context:before |
||||
padding: 0 |
||||
|
@ -0,0 +1,43 @@ |
||||
// Explicit styles for input-esque trigger appearance |
||||
.work-packages--activity--add-comment, |
||||
.work-package--watchers-lookup |
||||
.inplace-editing--container |
||||
border: 1px solid #eee |
||||
|
||||
// Explicit styling for the comment and watcher container |
||||
.work-packages--activity--add-comment, |
||||
.work-package--watchers-lookup |
||||
margin: 20px 0 |
||||
|
||||
// Styles the comment trigger link similar to attachment |
||||
// but without icon and actual link |
||||
a.inplace-editing--trigger-link |
||||
color: $body-font-color |
||||
font-style: italic |
||||
|
||||
.inplace-edit--read-value |
||||
padding-left: 5px |
||||
|
||||
|
||||
// Editing existing comments |
||||
.comments-form |
||||
float: left |
||||
width: 100% |
||||
margin: 10px 0 100px 0 |
||||
textarea |
||||
border: 1px solid #dddddd |
||||
padding: 8px |
||||
border-radius: 2px |
||||
font-size: 0.8125rem |
||||
width: 100% |
||||
button |
||||
float: right |
||||
font-size: 0.8125rem |
||||
background: linear-gradient(to bottom, white 0%, #eeeeee 74%, #eeeeee 100%) repeat scroll 0 0 rgba(0, 0, 0, 0) |
||||
border: 1px solid #CCCCCC |
||||
border-radius: 2px |
||||
color: #222222 |
||||
margin: 10px 0 0 0 |
||||
padding: 4px 10px 2px |
||||
cursor: pointer |
||||
height: 32px |
@ -0,0 +1,136 @@ |
||||
//-- copyright |
||||
// OpenProject is a project management system. |
||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License version 3. |
||||
// |
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
// Copyright (C) 2010-2013 the ChiliProject Team |
||||
// |
||||
// This program is free software; you can redistribute it and/or |
||||
// modify it under the terms of the GNU General Public License |
||||
// as published by the Free Software Foundation; either version 2 |
||||
// of the License, or (at your option) any later version. |
||||
// |
||||
// This program is distributed in the hope that it will be useful, |
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
// GNU General Public License for more details. |
||||
// |
||||
// You should have received a copy of the GNU General Public License |
||||
// along with this program; if not, write to the Free Software |
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
// |
||||
// See doc/COPYRIGHT.rdoc for more details. |
||||
//++ |
||||
$work-package-details--tab-height: 40px |
||||
|
||||
// Subject field |
||||
@mixin details-pane--form-field |
||||
@include grid-visible-overflow |
||||
padding: 0 |
||||
|
||||
.work-packages--details--title |
||||
@include grid-block |
||||
@include details-pane--form-field |
||||
align-items: center |
||||
font-size: 1.125rem |
||||
font-weight: bold |
||||
|
||||
|
||||
.work-packages--details--subject |
||||
@include grid-content |
||||
@include grid-size(expand) |
||||
@include details-pane--form-field |
||||
|
||||
// overriding default in place editing padding |
||||
// because the heigt will otherwise be too much |
||||
// and the change from read to write will flicker |
||||
.inplace-edit--text-field |
||||
padding: 0.15625rem 0.375rem |
||||
|
||||
.work-packages--details-content |
||||
font-size: 0.875rem |
||||
.inplace-edit--write-value |
||||
textarea |
||||
overflow: hidden |
||||
|
||||
|
||||
div[class*='work-packages--details--'] |
||||
width: calc(100% + 0.375rem) |
||||
.inplace-edit--read |
||||
&>span:first-of-type |
||||
width: 100% |
||||
.inplace-edit--read-value |
||||
width: 100% |
||||
.dynamic-attribute |
||||
width: 100% |
||||
|
||||
.version-wrapper, |
||||
.spent-time-wrapper |
||||
width: 100% |
||||
|
||||
.report-category-actions |
||||
margin-top: -28px |
||||
width: 100% |
||||
text-align: right |
||||
|
||||
.detail-panel-description |
||||
margin: 0 |
||||
line-height: 18px |
||||
|
||||
i |
||||
&.icon-left |
||||
padding: 0 5px 0 0 |
||||
&.icon-right |
||||
vertical-align: -2px |
||||
padding: 0 0 0 4px |
||||
|
||||
|
||||
.work-package--new-state |
||||
padding: 0 20px 0px 0 |
||||
overflow-y: auto |
||||
|
||||
.work-packages--edit-actions |
||||
margin-left: -20px |
||||
|
||||
// TABS row styling |
||||
#tabs |
||||
position: relative |
||||
width: 100% |
||||
|
||||
|
||||
.tabrow |
||||
text-align: left |
||||
list-style: none |
||||
margin: 0 0 0 10px |
||||
padding: 4px 0 0 0 |
||||
line-height: $work-package-details--tab-height - 10px |
||||
height: $work-package-details--tab-height |
||||
overflow: hidden |
||||
position: relative |
||||
width: 97.5% |
||||
font-weight: bold |
||||
text-transform: uppercase |
||||
|
||||
li |
||||
background: #ffffff |
||||
display: inline-block |
||||
position: relative |
||||
margin: 0 |
||||
padding: 0 |
||||
text-align: center |
||||
width: 23.25% |
||||
cursor: pointer |
||||
a |
||||
color: #333 |
||||
text-decoration: none |
||||
&:hover |
||||
text-decoration: none |
||||
li.selected |
||||
color: #999 |
||||
border-bottom: 2px solid $content-link-color |
||||
a |
||||
color: $content-link-color |
@ -0,0 +1,57 @@ |
||||
class WikiMenuTitlesToSlug < ActiveRecord::Migration |
||||
def up |
||||
migrate_menu_items |
||||
end |
||||
|
||||
def down |
||||
rollback_menu_items |
||||
end |
||||
|
||||
## |
||||
# Fix lookup of wiki pages in menu items by referencing the actual slug in the title attribute. |
||||
# As the title attribute is fixed from MenuItem, and the name was used, swap the two around |
||||
# to avoid confusing the actual title of the menu item (previously == name). |
||||
def migrate_menu_items |
||||
ActiveRecord::Base.transaction do |
||||
::MenuItems::WikiMenuItem.includes(:wiki).find_each do |item| |
||||
# Find the page |
||||
wiki_page = item.wiki.find_page(item.title) |
||||
|
||||
# Set the title to the actual slug |
||||
# If the page could not be found, migrate the title to form a slug |
||||
slug = wiki_page.nil? ? item.title.to_url : wiki_page.slug |
||||
|
||||
# Use the name to set the title. |
||||
# This clears up the previously irritating mixup of the two. |
||||
menu_item_title = item.name |
||||
|
||||
item.update_columns(title: menu_item_title, name: slug) |
||||
end |
||||
end |
||||
end |
||||
|
||||
## |
||||
# |
||||
# Restore the old title wherever possible |
||||
# This tries to remove the slug usages without guaranteeing that links |
||||
# will be valid afterwards. |
||||
def rollback_menu_items |
||||
ActiveRecord::Base.transaction do |
||||
::MenuItems::WikiMenuItem.includes(:wiki).find_each do |item| |
||||
# Find the page |
||||
wiki_page = item.wiki.find_page(item.title) |
||||
|
||||
# Restore the switch of title and name |
||||
old_name = item.title |
||||
old_title = |
||||
if wiki_page.present? |
||||
wiki_page.title |
||||
else |
||||
item.name |
||||
end |
||||
|
||||
item.update_columns(title: old_title, name: old_name) |
||||
end |
||||
end |
||||
end |
||||
end |
@ -1,4 +1,3 @@ |
||||
<a id ="{{ activityHtmlId }}-link" |
||||
ng-bind="'#' + activityNo" |
||||
tabindex="-1" |
||||
ui-sref="work-packages.show.activity({ workPackageId: workPackageId, '#': activityHtmlId})"></a> |
||||
|
@ -0,0 +1,78 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
require 'spec_helper' |
||||
require Rails.root.join('db/migrate/20160803094931_wiki_menu_titles_to_slug.rb') |
||||
|
||||
describe 'Wiki menu_items migration', type: :feature do |
||||
let(:project) { FactoryGirl.create :project } |
||||
let(:wiki_page) { |
||||
FactoryGirl.create :wiki_page_with_content, |
||||
wiki: project.wiki, |
||||
title: 'Base de donées' |
||||
} |
||||
let!(:menu_item) { |
||||
FactoryGirl.create(:wiki_menu_item, |
||||
:with_menu_item_options, |
||||
wiki: project.wiki, |
||||
name: 'My linked page', |
||||
title: wiki_page.title) |
||||
} |
||||
|
||||
before do |
||||
project.wiki.pages << wiki_page |
||||
|
||||
# Run the title replacement of the migration |
||||
::WikiMenuTitlesToSlug.new.migrate_menu_items |
||||
|
||||
menu_item.reload |
||||
end |
||||
|
||||
it 'updates the menu item' do |
||||
expect(menu_item.name).to eq(wiki_page.slug) |
||||
expect(menu_item.title).to eq('My linked page') |
||||
end |
||||
|
||||
|
||||
describe 'visiting the wiki' do |
||||
let(:user) { FactoryGirl.create :admin } |
||||
|
||||
before do |
||||
login_as(user) |
||||
end |
||||
|
||||
it 'shows the menu item' do |
||||
visit project_wiki_path(project, project.wiki) |
||||
link = page.find('#menu-sidebar a.icon-wiki', text: menu_item.name) |
||||
link.click |
||||
|
||||
expect(page).to have_selector('.wiki-title', text: wiki_page.title) |
||||
expect(current_path).to eq(project_wiki_path(project, wiki_page.slug)) |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,152 @@ |
||||
# -- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
# ++ |
||||
|
||||
require 'spec_helper' |
||||
|
||||
describe 'Cancel editing work package', js: true do |
||||
let(:user) { FactoryGirl.create(:admin) } |
||||
let(:project) { FactoryGirl.create(:project) } |
||||
let(:work_package) { FactoryGirl.create(:work_package, project: project) } |
||||
let(:work_package2) { FactoryGirl.create(:work_package, project: project) } |
||||
let(:wp_page) { ::Pages::AbstractWorkPackage.new(work_package) } |
||||
let(:wp_table) { ::Pages::WorkPackagesTable.new } |
||||
let(:paths) { |
||||
[ |
||||
new_work_packages_path, |
||||
new_split_work_packages_path, |
||||
new_project_work_packages_path(project), |
||||
new_split_project_work_packages_path(project) |
||||
] |
||||
} |
||||
|
||||
before do |
||||
work_package |
||||
work_package2 |
||||
login_as(user) |
||||
end |
||||
|
||||
def expect_active_edit(path) |
||||
visit path |
||||
loading_indicator_saveguard |
||||
expect(page).to have_selector('.wp-edit-field.subject.-active') |
||||
end |
||||
|
||||
def expect_subject(val) |
||||
subject = page.find('#wp-new-inline-edit--field-subject') |
||||
expect(subject.value).to eq(val) |
||||
end |
||||
|
||||
def move_to_home_page(alert: true) |
||||
find('.home-link').click |
||||
|
||||
page.driver.browser.switch_to.alert.accept if alert |
||||
expect(page).to have_selector('h2', text: 'OpenProject') |
||||
end |
||||
|
||||
it 'shows an alert when moving to other pages' do |
||||
paths.each do |path| |
||||
expect_active_edit(path) |
||||
move_to_home_page |
||||
end |
||||
end |
||||
|
||||
it 'shows an alert when moving to other states' do |
||||
expect_active_edit(new_split_work_packages_path) |
||||
loading_indicator_saveguard |
||||
wp_table.expect_work_package_listed(work_package2) |
||||
|
||||
wp_table.open_split_view(work_package2) |
||||
page.driver.browser.switch_to.alert.dismiss |
||||
|
||||
expect(page).to have_selector('.wp-edit-field.subject.-active') |
||||
expect(wp_page).not_to have_alert_dialog |
||||
|
||||
# Actually move somewhere to accept the beforeunload |
||||
move_to_home_page |
||||
end |
||||
|
||||
it 'cancels the editing when clicking the button' do |
||||
paths.each do |path| |
||||
expect_active_edit(path) |
||||
find('#work-packages--edit-actions-cancel').click |
||||
|
||||
expect(wp_page).not_to have_alert_dialog |
||||
end |
||||
end |
||||
|
||||
it 'allows to move from split to full screen in edit mode' do |
||||
# Start creating on split view |
||||
expect_active_edit(new_split_work_packages_path) |
||||
|
||||
find('#wp-new-inline-edit--field-subject').set 'foobar' |
||||
|
||||
# Expect editing works when moving to full screen |
||||
find('#work-packages-show-view-button').click |
||||
|
||||
expect(wp_page).not_to have_alert_dialog |
||||
expect(page).to have_selector('.wp-edit-field.subject.-active') |
||||
expect_subject('foobar') |
||||
|
||||
# Moving back also works |
||||
page.evaluate_script('window.history.back()') |
||||
|
||||
expect(wp_page).not_to have_alert_dialog |
||||
expect(page).to have_selector('.wp-edit-field.subject.-active') |
||||
expect_subject('foobar') |
||||
|
||||
# Cancel edition |
||||
find('#work-packages--edit-actions-cancel').click |
||||
expect(wp_page).not_to have_alert_dialog |
||||
|
||||
# Visiting another page does not create alert |
||||
find('.home-link').click |
||||
expect(wp_page).not_to have_alert_dialog |
||||
end |
||||
|
||||
context 'when user does not want to be warned' do |
||||
before do |
||||
FactoryGirl.create(:user_preference, user: user, others: { warn_on_leaving_unsaved: false }) |
||||
end |
||||
|
||||
it 'does not alert when moving anywhere' do |
||||
# Moving to angular states |
||||
expect_active_edit(new_split_work_packages_path) |
||||
wp_table.expect_work_package_listed(work_package2) |
||||
|
||||
wp_table.open_split_view(work_package2) |
||||
expect(wp_page).not_to have_alert_dialog |
||||
|
||||
expect(page).to have_no_selector('.wp-edit-field.subject.-active') |
||||
expect(page).to have_selector('.work-packages--details--subject', text: work_package2.subject) |
||||
|
||||
# Moving somewhere else |
||||
expect_active_edit(new_split_work_packages_path) |
||||
move_to_home_page(alert: false) |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,35 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
# Scrolls a native element into view using JS |
||||
def scroll_to_element(element) |
||||
script = <<-JS |
||||
arguments[0].scrollIntoView(true); |
||||
JS |
||||
Capybara.current_session.driver.browser.execute_script(script, element.native) |
||||
end |
Loading…
Reference in new issue