Fix nextmatch hierarchy display

This commit is contained in:
Nathan Gray 2013-04-24 19:53:51 +00:00
parent 8262dc54e7
commit 4759d19d25
3 changed files with 59 additions and 13 deletions

View File

@ -498,7 +498,18 @@ var et2_dataview_controller = Class.extend({
var d = this.self.getDepth();
if (d > 0)
{
$j(tr).addClass("subentry level_" + d);
$j(tr).addClass("subentry");
$j("td:first",tr).children("div").last().addClass("level_" + d + " indentation");
if(this.entry.idx == 0)
{
// Set the CSS for the level - required so columns line up
var indent = $j("<span class='indentation'/>").appendTo(tr);
egw.css(".subentry td div.innerContainer.level_"+d,
"margin-right:" + (parseInt(indent.css("margin-right")) * d) + "px"
);
indent.remove();
}
}
var links = null;

View File

@ -69,14 +69,15 @@ var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange,
{
this.expansionButton = $j(document.createElement("span"));
this.expansionButton.addClass("arrow closed");
var self = this;
this.expansionButton.click(function () {
self._handleExpansionButtonClick(_callback, _context);
});
$j("td:first", this.tr).prepend(this.expansionButton);
}
// Update context
var self = this;
this.expansionButton.off("click").on("click", function () {
self._handleExpansionButtonClick(_callback, _context);
});
$j("td:first", this.tr).prepend(this.expansionButton);
}
else
{

View File

@ -772,8 +772,7 @@ label input, label span, label div, label select, label textarea {
.nextmatch_header .header_count {
padding: 0px 20px;
margin: 0px 20px;
margin-top: 5px;
margin: 5px 20px 0px;
border: 1px solid #E0E0E0;
float:right;
font-size: 150%;
@ -807,20 +806,28 @@ label input, label span, label div, label select, label textarea {
}
/* Favorites */
.nextmatch_header div#favorite_wrapper {
margin-top: 5px;
margin-top: 8px;
vertical-align: middle;
}
#nm_favorites_popup_filters .filter_id, #nm_favorites_popup_filters .filter_value {
width: 45%;
display: inline-block;
}
.favorites li a {
.nextmatch_header ul.favorites {
min-width: 20ex;
}
.nextmatch_header .favorites li a {
text-indent: -22px;
margin-left: 21px;
}
.nextmatch_header .favorites.ui-menu li.ui-menu-item a.ui-state-hover {
margin-left: 20px;
}
.favorites li span.ui-state-active {
border: none;
}
.favorites input, .favorites img {
margin-right: 2ex;
margin-right: 1ex;
}
.favorites div.ui-icon-trash {
float:right;
@ -889,6 +896,33 @@ label input, label span, label div, label select, label textarea {
opacity: 0.5;
}
/**
* Grid / nextmatch Hierarchy
*/
/* Make sure arrow & cell content don't overlap */
.egwGridView_grid span.arrow {
margin: 6px -12px 4px 4px;
float: left;
position:relative;
}
.egwGridView_grid span.arrow ~ div.innerContainer {
display: inline-block;
}
/* Indent the sub-grid */
.egwGridView_grid .egwGridView_grid {
margin-left: 10px;
border-left: 1px solid silver;
}
/**
* This class' margin-right is used to line up columns at each indent level
* Classes level_# are created programmatically with margin-right * depth
* Margin-right = -(indent + border)
*/
.indentation { margin-right:-11px; }
/* End of hierarchy */
.et2_clickable {
cursor: pointer;
}