Skip to content

Commit 99de29a

Browse files
committed
Moved Print style directly into layout avoiding user condition, CSS fix, removed unused file
1 parent 90f23e3 commit 99de29a

File tree

3 files changed

+24
-32
lines changed

3 files changed

+24
-32
lines changed

assets/stylesheets/issue_dynamic_edit.css

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ body.controller-issues.action-show .dynamicEditField button.action.valid {
9999

100100

101101
body.controller-issues.action-show .dynamicEditField select {
102-
border:none;
103-
display:none;
104-
background-image:none;
102+
background-image:none;
105103
background-color:transparent;
106104
-webkit-box-shadow: none;
107105
-moz-box-shadow: none;
@@ -112,6 +110,11 @@ body.controller-issues.action-show .dynamicEditField select {
112110
border-radius: 3px;
113111
}
114112

113+
body.controller-issues.action-show .dynamicEditField select[multiple="multiple"] {
114+
display: block;
115+
width: 100%;
116+
}
117+
115118
body.controller-issues.action-show .dynamicEditField select option[disabled="disabled"] {
116119
display:none;
117120
}
@@ -171,18 +174,4 @@ body.controller-issues.action-show .dynamicEditField .check_box_group {
171174
height: auto;
172175
padding: 10px;
173176
}
174-
}
175-
176-
/* PRINT MEDIAQUERY */
177-
@media print {
178-
body.controller-issues.action-show div.issue.details .subject .refreshData,
179-
body.controller-issues.action-show div.issue.details .iconEdit,
180-
body.controller-issues.action-show .dynamicEditField {
181-
display : none !important;
182-
height: 0;
183-
width: 0;
184-
overflow: hidden;
185-
padding : 0;
186-
margin: 0;
187-
}
188177
}

config/locales/ru.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/details_issue_hooks.rb

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,24 @@ def view_layouts_base_body_bottom(context)
2525
end
2626

2727
def view_issues_show_details_bottom(context)
28-
if User.current.allowed_to?(:edit_issues, context[:project])
29-
content = "<script>\n"
30-
content << " var _TXT_CONFLICT_TITLE = \"" + l(:ide_txt_notice_conflict_title) + "\";\n"
31-
content << " var _TXT_CONFLICT_TXT = \"" + l(:ide_txt_notice_conflict_text) + "\";\n"
32-
content << "</script>\n"
33-
return content.html_safe
34-
end
28+
content = "<script>\n"
29+
content << " var _TXT_CONFLICT_TITLE = \"" + l(:ide_txt_notice_conflict_title) + "\";\n"
30+
content << " var _TXT_CONFLICT_TXT = \"" + l(:ide_txt_notice_conflict_text) + "\";\n"
31+
content << "</script>\n"
32+
content << "<style>/* PRINT MEDIAQUERY */\n"
33+
content << "@media print {\n"
34+
content << "body.controller-issues.action-show div.issue.details .subject .refreshData,\n"
35+
content << "body.controller-issues.action-show div.issue.details .iconEdit,\n"
36+
content << "body.controller-issues.action-show .dynamicEditField {\n"
37+
content << "display : none !important;\n"
38+
content << "height: 0;\n"
39+
content << "width: 0;\n"
40+
content << "overflow: hidden;\n"
41+
content << "padding : 0;\n"
42+
content << "margin: 0;\n"
43+
content << "}\n"
44+
content << "}</style>\n"
45+
return content.html_safe
3546
end
3647

3748
end

0 commit comments

Comments
 (0)