BUGFIX: #6934 allow whole TreeDropdownField to be clicked

This commit is contained in:
Will Rossiter 2012-03-24 11:30:13 +13:00
parent 767aef9794
commit 39d3761eb9
4 changed files with 18 additions and 9 deletions

View File

@ -1,6 +1,6 @@
div.TreeDropdownField { width: 400px; background: #fff; border: 1px solid #aaa; cursor: pointer; overflow: hidden; }
div.TreeDropdownField input { border: none; background: none; padding: 0; margin: 0; }
div.TreeDropdownField .treedropdownfield-title { float: left; padding: 7px; line-height: 16px; overflow: hidden; }
div.TreeDropdownField .treedropdownfield-title { float: left; padding: 7px; width: 90%; line-height: 16px; overflow: hidden; outline: none; }
div.TreeDropdownField .treedropdownfield-panel { clear: left; position: absolute; overflow: auto; display: none; cursor: default; border: 1px solid #aaa; border-top: none; margin: 1px 0 0 -1px; /* account for border on container div */ height: 200px; background-color: #fff; z-index: 50; -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); -o-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); }
div.TreeDropdownField .treedropdownfield-panel ul.tree { margin: 0; }
div.TreeDropdownField .treedropdownfield-panel ul.tree a { font-size: 12px; }

View File

@ -8,17 +8,17 @@ table.details tr { background: #eeeee0; }
p { line-height: 1.5em; margin-top: 0.5em; margin-bottom: 1.0em; }
h1 { margin: 0px 0px 5px; font: 165% verdana, arial, helvetica; }
h1 { margin: 0px 0px 5px; font: 165% verdana,arial,helvetica; }
h2 { margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana, arial, helvetica; }
h2 { margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica; }
h3 { margin-bottom: 0.5em; font: bold 115% verdana, arial, helvetica; }
h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica; }
h4 { margin-bottom: 0.5em; font: bold 100% verdana, arial, helvetica; }
h4 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica; }
h5 { margin-bottom: 0.5em; font: bold 100% verdana, arial, helvetica; }
h5 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica; }
h6 { margin-bottom: 0.5em; font: bold 100% verdana, arial, helvetica; }
h6 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica; }
.Error { font-weight: bold; color: red; }

View File

@ -243,9 +243,16 @@
}
});
$('.TreeDropdownField .treedropdownfield-toggle-panel-link, .TreeDropdownField span.treedropdownfield-title').entwine({
$('.TreeDropdownField').entwine({
onclick: function(e) {
this.togglePanel();
return false;
}
});
$('.TreeDropdownField .treedropdownfield-panel').entwine({
onclick: function(e) {
this.getField().togglePanel();
return false;
}
});

View File

@ -15,8 +15,10 @@ div.TreeDropdownField {
.treedropdownfield-title {
float: left;
padding: 7px;
width: 90%;
line-height: 16px;
overflow:hidden;
outline: none;
}
.treedropdownfield-panel {