From 26d2b2a6029df06f3158ca62daca39967a464be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 7 Aug 2024 09:58:45 +0200 Subject: [PATCH] Easy styles moved elsewhere --- assets/stylesheets/easy_dmsf.css | 244 ------------------ .../hooks/views/base_view_hooks.rb | 14 +- 2 files changed, 5 insertions(+), 253 deletions(-) delete mode 100644 assets/stylesheets/easy_dmsf.css diff --git a/assets/stylesheets/easy_dmsf.css b/assets/stylesheets/easy_dmsf.css deleted file mode 100644 index 10797354..00000000 --- a/assets/stylesheets/easy_dmsf.css +++ /dev/null @@ -1,244 +0,0 @@ -/* -* Redmine plugin for Document Management System "Features" -* -* Vit Jonas , Karel Pičman -* -* 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. -*/ - -/* Intendation in the main view's tree */ -.dmsf-tree.idnt-1 td.dmsf-title { padding-left: 1.5em; } -.dmsf-tree.idnt-2 td.dmsf-title { padding-left: 2em; } -.dmsf-tree.idnt-3 td.dmsf-title { padding-left: 2.5em; } -.dmsf-tree.idnt-4 td.dmsf-title { padding-left: 3em; } -.dmsf-tree.idnt-5 td.dmsf-title { padding-left: 3.5em; } -.dmsf-tree.idnt-6 td.dmsf-title { padding-left: 4em; } -.dmsf-tree.idnt-7 td.dmsf-title { padding-left: 4.5em; } -.dmsf-tree.idnt-8 td.dmsf-title { padding-left: 5em; } -.dmsf-tree.idnt-9 td.dmsf-title { padding-left: 5.5em; } - -/* Unlock icon */ -span.dmsf-icon-unlock { - margin-left: 4px; -} - -/* Font icons */ -#sidebar ul > li > a.icon-only.icon-clear-query { - background-image: url(../../../images/close_hl.png); - background-repeat: no-repeat; - padding-left: 16px; - margin-left: 8px; -} - -table.dmsf a.sort { - padding-right: 16px; - background-position: 100% 50%; - background-repeat: no-repeat; -} - -table.dmsf a.sort.desc.icon.icon-sorted-asc { - background-image: url("../../../images/arrow_up.png") !important; -} - -table.dmsf a.sort.asc.icon.icon-sorted-desc { - background-image: url("../../../images/arrow_down.png") !important; -} - -.dmsf-tree.dmsf-expanded span.dmsf-expander { - background: none !important; - padding-left: 0 !important; -} - -.dmsf-tree.dmsf-collapsed span.dmsf-expander { - background: none !important; - padding-left: 0 !important; -} - -table.dmsf td.dmsf-title { - padding-left: 0; -} - -td.dmsf-title a.icon::before { - padding-right: 5px; -} - -tr:not(.dmsf-expanded):not(.dmsf-collapsed) td.dmsf-title a.icon::before { - padding-left: 5px; -} - -td.dmsf-title a.icon-folder::before { - color: #FFE9A2; -} - -.dmsf-icon-link:before { - content: "\F0337" !important; - font-family: "Material Icons"; -} - -/* +/- icons */ -.dmsf-row-control { - width: auto; - margin-right: 5px; -} - -.dmsf-row-control > .dmsf-expander::before { - content: "\F0416" !important; - font-family: "Material Icons"; - display: inline-block; - width: 1.5em !important; - font-size: 1.125em; -} - -.dmsf-row-control > .dmsf-expander.open::before { - content: "\F0375" !important; - font-family: "Material Icons"; -} - -.dmsf-row-control > span.dmsf-expander:hover::before { - background-color: lightgreen; - color: white; - -moz-border-radius: 5000px; - -webkit-border-radius: 5000px; - border-radius: 5000px; - border: 1px solid green; -} - -.icon-file.filetype-doc, .icon-file.filetype-docx { background-image: none; } -.icon-file.filetype-xls, .icon-file.filetype-xlsx, .icon-file.filetype-xlsm { background-image: none; } -.icon-file.filetype-ppt, .icon-file.filetype-pptx { background-image: none; } -.icon-file.filetype-vsd, .icon-file.filetype-vsdx { background-image: none; } -.icon-file.filetype-mpp { background-image: none; } -.icon-file.filetype-odt { background-image: none; } -.icon-file.filetype-ods { background-image: none; } -.icon-file.filetype-ott { background-image: none; } -.icon-file.filetype-odp { background-image: none; } -.icon-file.filetype-odg { background-image: none; } - -.dmsf-gray .icon-file.filetype-doc { background-image: none; } -.dmsf-gray .icon-file.filetype-docx { background-image: none; } -.dmsf-gray .icon-file.filetype-xls { background-image: none; } -.dmsf-gray .icon-file.filetype-xlsx { background-image: none; } -.dmsf-gray .icon-file.filetype-xlsm { background-image: none; } -.dmsf-gray .icon-file.filetype-ppt { background-image: none; } -.dmsf-gray .icon-file.filetype-pptx { background-image: none; } -.dmsf-gray .icon-file.filetype-vsd { background-image: none; } -.dmsf-gray .icon-file.filetype-vsdx { background-image: none; } -.dmsf-gray .icon-file.filetype-mpp { background-image: none; } -.dmsf-gray .icon-file.filetype-odt { background-image: none; } -.dmsf-gray .icon-file.filetype-ott { background-image: none; } -.dmsf-gray .icon-file.filetype-ods { background-image: none; } -.dmsf-gray .icon-file.filetype-odp { background-image: none; } -.dmsf-gray .icon-file.filetype-odg { background-image: none; } - -.dmsf-gray .icon-file.text-x-c { background-image: none; } -.dmsf-gray .icon-file.text-x-csharp { background-image: none; } -.dmsf-gray .icon-file.text-x-java { background-image: none; } -.dmsf-gray .icon-file.text-x-javascript { background-image: none; } -.dmsf-gray .icon-file.text-x-php { background-image: none; } -.dmsf-gray .icon-file.text-x-ruby { background-image: none; } -.dmsf-gray .icon-file.text-xml { background-image: none; } -.dmsf-gray .icon-file.text-css { background-image: none; } -.dmsf-gray .icon-file.text-html { background-image: none; } -.dmsf-gray .icon-file.image-gif { background-image: none; } -.dmsf-gray .icon-file.image-jpeg { background-image: none; } -.dmsf-gray .icon-file.image-png { background-image: none; } -.dmsf-gray .icon-file.image-tiff { background-image: none; } -.dmsf-gray .icon-file.application-pdf { background-image: none; } -.dmsf-gray .icon-file.application-zip { background-image: none; } -.dmsf-gray .icon-file.application-x-gzip { background-image: none; } - -/* Approval workflows */ -#tab-content-dmsf_workflow table.list ~ p .button { - margin-top: 10px; -} - -/* Query filters */ -#query_form.dmsf-query-form .collapsed#filters { - opacity: 1; -} - -#query_form.dmsf-query-form td.values span[style]:first-child { - display: inline !important; -} - -#query_form_with_buttons p.buttons { - display: none; -} - -#sidebar ul > li > a.icon-only.icon-clear-query { - font-size: 0; - display: inline-block; - overflow: hidden; - width: 0; - height: 16px; -} - -/* Revision box */ -div.dmsf-id-box label { - display: inline; -} - -.dmsf-widget-header-text { - padding: 0 !important; -} - -div.dmsf-controls.contextual { - padding-top: 2px; -} - -div.autoscroll.dmsf-revision-access { - width: auto; -} - -/* Filters */ -#dmsf-query-form .add-filter { - width: 35%; - float: right; - text-align: right; - vertical-align: top; - padding-right: 10px; -} - -#dmsf-query-form div.add-filter label { - display: inline; -} - -#dmsf-query-form table#filters-table { - width: 60%; - float: left; -} - -#dmsf-query-form select#add_filter_select { - width: auto; - position: static; -} - -/* Plugin's settings */ -.dmsf-info { - display: block; -} - -.dmsf-info-title { - font-weight: bold; -} - -/* Also available as */ -.other-formats a.csv::before { - content: "" !important; -} - -.other-formats a::before { - content: "|" !important; -} \ No newline at end of file diff --git a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb index 2a32d93f..68e949a2 100644 --- a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb @@ -30,15 +30,11 @@ def view_layouts_base_html_head(context = {}) return end - meta = "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) + - "\n".html_safe + stylesheet_link_tag('select2.min.css', plugin: :redmine_dmsf) + - "\n".html_safe + javascript_include_tag('select2.min.js', plugin: :redmine_dmsf, defer: true) + - "\n".html_safe + javascript_include_tag('redmine_dmsf.js', plugin: :redmine_dmsf, defer: true) + - "\n".html_safe + javascript_include_tag('attachments_dmsf.js', plugin: :redmine_dmsf, defer: true) - if defined?(EasyExtensions) - meta << ("\n".html_safe + stylesheet_link_tag('easy_dmsf.css', plugin: :redmine_dmsf)) - end - meta + "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) + + "\n".html_safe + stylesheet_link_tag('select2.min.css', plugin: :redmine_dmsf) + + "\n".html_safe + javascript_include_tag('select2.min.js', plugin: :redmine_dmsf, defer: true) + + "\n".html_safe + javascript_include_tag('redmine_dmsf.js', plugin: :redmine_dmsf, defer: true) + + "\n".html_safe + javascript_include_tag('attachments_dmsf.js', plugin: :redmine_dmsf, defer: true) end end end