Easy look&feel
This commit is contained in:
parent
65cd5e2b1d
commit
29044dd64e
@ -94,6 +94,7 @@ module DmsfQueriesHelper
|
||||
end
|
||||
unless filter_any?
|
||||
tag = "<span class=\"dmsf-expander\" onclick=\"dmsfToggle(this, '#{item.id}', null,'#{escape_javascript(expand_folder_dmsf_path)}')\"></span>".html_safe + tag
|
||||
tag = content_tag('div', tag, class: 'row-control')
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download))
|
||||
when 'folder'
|
||||
@ -103,6 +104,7 @@ module DmsfQueriesHelper
|
||||
tag = link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.id), class: 'icon icon-folder')
|
||||
unless filter_any?
|
||||
tag = "<span class=\"dmsf-expander\" onclick=\"dmsfToggle(this, '#{item.project.id}', '#{item.id}','#{escape_javascript(expand_folder_dmsf_path)}')\"></span>".html_safe + tag
|
||||
tag = content_tag('div', tag, class: 'row-control')
|
||||
end
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download))
|
||||
|
||||
@ -102,3 +102,21 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render partial: 'dmsf/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% if Redmine::Plugin.installed?(:easy_extensions) %>
|
||||
<%= late_javascript_tag do %>
|
||||
$(function() {
|
||||
$("p.buttons").addClass("filter-buttons form-actions");
|
||||
let buttonApply = $("p.filter-buttons > a.icon-checked");
|
||||
buttonApply.addClass("button-positive");
|
||||
buttonApply.text("<%= l('easy_query.button_apply.issue') %>");
|
||||
let buttonClear = $("p.filter-buttons > a.icon-reload");
|
||||
buttonClear.addClass("button-negative");
|
||||
buttonClear.text("<%= l('easy_query.label.default_fitlers') %>");
|
||||
$("p.filter-buttons > a.icon-save").addClass("button");
|
||||
$("p.filter-buttons > a.icon-edit").addClass("button");
|
||||
$("p.filter-buttons > a.icon-del").addClass("button");
|
||||
$("#query_form_with_buttons > p.buttons").show();
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -41,3 +41,21 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render partial: 'dmsf/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% if Redmine::Plugin.installed?(:easy_extensions) %>
|
||||
<%= late_javascript_tag do %>
|
||||
$(function() {
|
||||
$("p.buttons").addClass("filter-buttons form-actions");
|
||||
let buttonApply = $("p.filter-buttons > a.icon-checked");
|
||||
buttonApply.addClass("button-positive");
|
||||
buttonApply.text("<%= l('easy_query.button_apply.issue') %>");
|
||||
let buttonClear = $("p.filter-buttons > a.icon-reload");
|
||||
buttonClear.addClass("button-negative");
|
||||
buttonClear.text("<%= l('easy_query.label.default_fitlers') %>");
|
||||
$("p.filter-buttons > a.icon-save").addClass("button");
|
||||
$("p.filter-buttons > a.icon-edit").addClass("button");
|
||||
$("p.filter-buttons > a.icon-del").addClass("button");
|
||||
$("#query_form_with_buttons > p.buttons").show();
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -36,11 +36,15 @@ function dmsfToggle(el, project_id, folder_id, url)
|
||||
dmsfExpandRows(project_id, folder_id, selectedRow, url);
|
||||
}
|
||||
|
||||
let span = selectedRow.find('span.dmsf-expander');
|
||||
|
||||
if(expand) {
|
||||
$(selectedRow).switchClass('dmsf-collapsed', 'dmsf-expanded');
|
||||
selectedRow.switchClass('dmsf-collapsed', 'dmsf-expanded');
|
||||
span.addClass('open');
|
||||
}
|
||||
else {
|
||||
$(selectedRow).switchClass('dmsf-expanded', 'dmsf-collapsed');
|
||||
selectedRow.switchClass('dmsf-expanded', 'dmsf-collapsed');
|
||||
span.removeClass('open');
|
||||
}
|
||||
|
||||
// Hide collapsed rows and reset odd/even rows background colour
|
||||
@ -129,6 +133,7 @@ function dmsfExpandRows(project_id, folder_id, parentRow, url) {
|
||||
if( m && (data.indexOf(' ' + m[1] + ' ') < 0)) {
|
||||
|
||||
$(parentRow).removeClass('dmsf-expanded');
|
||||
$(parentRow).find('div.row-control').removeClass('row-control');
|
||||
|
||||
if(!$(parentRow).hasClass('dmsf-child')) {
|
||||
|
||||
|
||||
@ -20,15 +20,15 @@
|
||||
*/
|
||||
|
||||
/* Intendation in the main view's tree */
|
||||
.dmsf-tree.idnt-1 td.dmsf-title { padding-left: 2.5em; }
|
||||
.dmsf-tree.idnt-2 td.dmsf-title { padding-left: 3em; }
|
||||
.dmsf-tree.idnt-3 td.dmsf-title { padding-left: 3.5em; }
|
||||
.dmsf-tree.idnt-4 td.dmsf-title { padding-left: 4em; }
|
||||
.dmsf-tree.idnt-5 td.dmsf-title { padding-left: 4.5em; }
|
||||
.dmsf-tree.idnt-6 td.dmsf-title { padding-left: 5em; }
|
||||
.dmsf-tree.idnt-7 td.dmsf-title { padding-left: 5.5em; }
|
||||
.dmsf-tree.idnt-8 td.dmsf-title { padding-left: 6em; }
|
||||
.dmsf-tree.idnt-9 td.dmsf-title { padding-left: 6.5em; }
|
||||
.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; }
|
||||
|
||||
/* Font icons */
|
||||
#sidebar ul > li > a.icon-only.icon-clear-query {
|
||||
@ -52,6 +52,32 @@ 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: 0px !important;
|
||||
}
|
||||
|
||||
.dmsf-tree.dmsf-collapsed span.dmsf-expander {
|
||||
background: none !important;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
table.dmsf td.dmsf-title {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* Approval workflows */
|
||||
#tab-content-dmsf_workflow table.list ~ p .button {
|
||||
margin-top: 10px;
|
||||
@ -65,3 +91,15 @@ table.dmsf a.sort.asc.icon.icon-sorted-desc {
|
||||
#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: 0px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
width: 0px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user