From cb1dc2e258384c270cd3ef190cef3c5cc968f259 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Wed, 4 Jun 2014 15:06:44 +0200 Subject: [PATCH 1/3] Fix wiki toc styling --- app/assets/stylesheets/content/_wiki.css.sass | 6 +++--- app/assets/stylesheets/global/_variables.sass | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/content/_wiki.css.sass b/app/assets/stylesheets/content/_wiki.css.sass index a44dfe7846..e8dfbff873 100644 --- a/app/assets/stylesheets/content/_wiki.css.sass +++ b/app/assets/stylesheets/content/_wiki.css.sass @@ -57,7 +57,7 @@ div.wiki margin-right: 12px margin-left: 0 display: table - font-size: 0.8em + font-size: $wiki_toc_ul_font_size &.right float: right margin-left: 12px @@ -83,9 +83,9 @@ div.wiki margin: 0 li li margin-left: 1.5em - fieldset legend + fieldset.collapsible legend font-weight: bold - font-size: 10px + font-size: $wiki_toc_header_font_size img vertical-align: middle diff --git a/app/assets/stylesheets/global/_variables.sass b/app/assets/stylesheets/global/_variables.sass index 465f043c0e..a0e2d81fc4 100644 --- a/app/assets/stylesheets/global/_variables.sass +++ b/app/assets/stylesheets/global/_variables.sass @@ -163,3 +163,5 @@ $content_box_border: 1px solid #EAEAEA !default $content_box_bg_color: #FFFFFF !default $my_page_edit_box_border_color: #06799F !default +$wiki_toc_header_font_size: 10px !default +$wiki_toc_ul_font_size: 0.8em !default From 931b1c0cfa838e728aa48083d82d4c917d8b95f7 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Wed, 4 Jun 2014 15:08:14 +0200 Subject: [PATCH 2/3] Move journal styles to SASS --- .../stylesheets/content/_journal.css.sass | 101 ++++++++++++++++++ app/assets/stylesheets/default.css.sass | 1 + app/assets/stylesheets/default/main.css.erb | 96 +---------------- app/assets/stylesheets/timelines.css.erb | 4 - 4 files changed, 107 insertions(+), 95 deletions(-) create mode 100644 app/assets/stylesheets/content/_journal.css.sass diff --git a/app/assets/stylesheets/content/_journal.css.sass b/app/assets/stylesheets/content/_journal.css.sass new file mode 100644 index 0000000000..7d4d5adf57 --- /dev/null +++ b/app/assets/stylesheets/content/_journal.css.sass @@ -0,0 +1,101 @@ +/*-- copyright + * OpenProject is a project management system. + * Copyright (C) 2012-2013 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. ++ + */ + +#content #history + padding-bottom: 11px + +#history + width: 700px + margin: + top: 1em + bottom: 0px + h3 + margin-bottom: 20px + .journal + min-height: 40px + margin: + bottom: 20px + left: 3px + clear: left + img.gravatar + float: none + margin: 0 + padding: 0 + +.journal + width: 700px + clear: left + position: relative + z-index: 11 + top: -8px + padding-top: 8px + margin-bottom: 8px + .profile-wrap + float: left + position: relative + left: 0 + top: 0 + padding: + left: 4px + right: 4px + h4 + padding-right: 5px + font-size: $global_font_size + font-weight: normal + position: relative + z-index: 5 + border: 0 + margin-bottom: 0px + .history-id + float: right + color: #999 + .wiki + padding: 0 + overflow: visible + margin-left: 50px + .contextual + float: right + a + float: left + display: block + margin-left: 5px + height: 16px + width: 16px + background: + repeat: no-repeat + position: center center + +.journal-attributes + color: #333333 + font-size: 11px + +ul.journal-attributes + list-style-type: disc + margin: + bottom: 10px + left: 75px diff --git a/app/assets/stylesheets/default.css.sass b/app/assets/stylesheets/default.css.sass index 5c090dae13..d6ad600aea 100644 --- a/app/assets/stylesheets/default.css.sass +++ b/app/assets/stylesheets/default.css.sass @@ -54,4 +54,5 @@ @import content/control_colors @import content/tabular @import content/headings +@import content/journal @import default/main diff --git a/app/assets/stylesheets/default/main.css.erb b/app/assets/stylesheets/default/main.css.erb index e339b174de..45cdb14c9f 100644 --- a/app/assets/stylesheets/default/main.css.erb +++ b/app/assets/stylesheets/default/main.css.erb @@ -757,8 +757,7 @@ td.username img.gravatar { margin-right: 4px; } -#activity dt, -.journal { +#activity dt { clear: left; } @@ -1020,59 +1019,6 @@ table.files { #content table.files td a { position: relative; } -#history { - margin-top: 1em; - margin-bottom: 0px; -} -#history h3 { - margin-bottom: 20px; -} -#history .journal { - position: relative; - margin: 0 0 15px; - margin-bottom: 20px; - min-height: 40px; - clear: left; - margin-left: 3px; -} -.journal .profile-wrap { - float: left; - position: relative; - left: 0; - top: 0; - padding-left: 4px; - padding-right: 4px; -} -.journal h4 { - padding-right: 5px; - font-size: 12px; - font-weight: normal; - position: relative; - z-index: 5; - border: 0; - margin-bottom: 0px; -} -.journal h4 .history-id { - float: right; - color: #999; -} -.journal .wiki { - padding: 0; - overflow: auto; - margin-left: 50px; -} -.journal .contextual { - float: right; -} -.journal .contextual a { - float: left; - display: block; - margin: 0 0 0 5px; - height: 16px; - width: 16px; - background-repeat: no-repeat; - background-position: center center; -} .question-line { display: block; } @@ -1109,18 +1055,6 @@ blockquote { border: 0; } -.journal-attributes { - color: #333333; - font-size: 11px; -} -ul.journal-attributes { - list-style-type: disc; - margin-bottom: 10px; -} -ul.journal-attributes li { - margin-left: 75px; -} - /*------------------------------------------------------------------------------- * =06 - Projects Page * @@ -1195,7 +1129,7 @@ ul.projects li div.root { display: none; z-index: 10; } -.issue .profile-box ul, .journal .profile-box ul { +.issue .profile-box ul { background: url(<%= asset_path 'profile-arrow-up.png' %>) no-repeat 175px top; position: relative; z-index: 11; @@ -1203,13 +1137,6 @@ ul.projects li div.root { padding-top: 8px; margin-bottom: -8px; } -.journal .profile-box { - right: auto; - left: 0; -} -.journal .profile-box ul { - background-position: 13px top; -} .profile-box ul li { border-top: 1px solid #fff; border-bottom: 1px solid #ddd; @@ -1412,13 +1339,13 @@ div.issue hr { .wiki ol, .wiki ul { margin-bottom: 6px; } -#content h3, #history h3 { +#content h3 { margin: 12px 0 6px; } #content h2 + h3 { margin-top: 12px; } -div.issue img.gravatar, #history img.gravatar { +div.issue img.gravatar { float: none; margin: 0; padding: 0; @@ -1481,10 +1408,6 @@ tr.time-entry { /*===== Replacement Images =====*/ -.journal .contextual a[title=Edit] img { - display: none; -} - /* comments */ .wiki ol li { list-style: decimal inside; @@ -1660,10 +1583,6 @@ select#available_columns { #menu-sidebar.hidden { display: none; } -div#history div.journal div.journal-notes { - overflow: visible; -} - div#watchers{ margin-top: 25px; @@ -1751,19 +1670,14 @@ content { #content #history { background: url(<%= asset_path 'dotted-separator.gif' %>) repeat-x scroll 0 bottom transparent; - padding-bottom: 11px; } -#history .journal, #content .wiki-content p, #content .wiki-content li { +#content .wiki-content p, #content .wiki-content li { width: 700px; } .required {color: #008BD0;} -/* Disable the css-override for the edit links in issue journals */ -.journal .contextual a[title=Edit] {background: none;} -.journal .contextual a[title=Edit] img {display: inline;} - /***** Ajax indicator ******/ #ajax-indicator { position: absolute; /* fixed not supported by IE */ diff --git a/app/assets/stylesheets/timelines.css.erb b/app/assets/stylesheets/timelines.css.erb index 394cf58e23..b83f94f596 100644 --- a/app/assets/stylesheets/timelines.css.erb +++ b/app/assets/stylesheets/timelines.css.erb @@ -587,7 +587,3 @@ a:hover.tl-project, a.tl-project, .tl-project { dt.timelines\2F planning-element { background-image: url(<%= asset_path 'webalys/new_planning_element.png' %>); } - -#history .journal { - background: none; -} From 666e2acac0880f97a9a46355882c8be4b11017d6 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Wed, 4 Jun 2014 15:08:33 +0200 Subject: [PATCH 3/3] Allow theme to decide journal attribute font size --- app/assets/stylesheets/content/_journal.css.sass | 2 +- app/assets/stylesheets/global/_variables.sass | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/content/_journal.css.sass b/app/assets/stylesheets/content/_journal.css.sass index 7d4d5adf57..5ec5a92618 100644 --- a/app/assets/stylesheets/content/_journal.css.sass +++ b/app/assets/stylesheets/content/_journal.css.sass @@ -92,7 +92,7 @@ .journal-attributes color: #333333 - font-size: 11px + font-size: $journal_attribute_font_size ul.journal-attributes list-style-type: disc diff --git a/app/assets/stylesheets/global/_variables.sass b/app/assets/stylesheets/global/_variables.sass index a0e2d81fc4..0b4b2b708a 100644 --- a/app/assets/stylesheets/global/_variables.sass +++ b/app/assets/stylesheets/global/_variables.sass @@ -165,3 +165,5 @@ $my_page_edit_box_border_color: #06799F !default $wiki_toc_header_font_size: 10px !default $wiki_toc_ul_font_size: 0.8em !default + +$journal_attribute_font_size: 11px !default