1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Autohide column context menu in select

This commit is contained in:
Jakub Vrana
2012-07-29 13:55:39 -07:00
parent ac668d1331
commit 57e5896b55
4 changed files with 21 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ pre { margin: 1em 0 0; }
input[type=image] { vertical-align: middle; }
.version { color: #777; font-size: 67%; }
.js .hidden, .nojs .jsonly { display: none; }
.js .column { position: absolute; background: #ddf; padding: .3em 1ex .3em 0; margin-top: -.3em; }
.nowrap td, .nowrap th, td.nowrap { white-space: pre; }
.wrap td { white-space: normal; }
.error { color: red; background: #fee; }

View File

@@ -278,6 +278,21 @@ function selectFieldChange(form) {
/** Toggles column context menu
* @param HTMLElement
* @param [string] extra class name
*/
function columnMouse(el, className) {
var spans = el.getElementsByTagName('span');
for (var i=0; i < spans.length; i++) {
if (/column/.test(spans[i].className)) {
spans[i].className = 'column' + (className || '');
}
}
}
/** Fill column in search field
* @param string
*/