$rank++;
$names[$key] = $name;
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
- echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
+ echo '<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">';
+ echo '<a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
+ echo "<span class='column hidden'>";
echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
if (!$val["fun"]) {
echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>';
}
+ echo "</span>";
}
$functions[$key] = $val["fun"];
next($select);
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; }
+/** 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
*/
Adminer 3.4.1-dev:
Links for column search in select
+Autohide column context menu in select
Display assigned auto_increment after clone
SQLite: Full alter table
SQLite: Better editing in tables without primary key