From 9bbc942534a6d829c7b22316a17fe8c8dbab9869 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 18 Jul 2017 21:59:34 +0300 Subject: [PATCH] table-panel: clickable cell link - draft (#8738) * table-panel: clickable cell link - draft * table-panel: clickable cell link - fix link target option * table-panel: fix undefined columnStyle.link * table-panel: option to highlight cell with link * table-panel: render variables for all cells in row * table-panel: remove cell highlighting * table-panel: add help for URL field * linkPopover directive for link info in table panel * table-panel: add link info popover to cells * table-panel: use native popover instead directive * table-panel: link drop refactor, remove unused code * table-panel: fix unclickable link when drop is opened * refactoring: minor refactoring to #8738, do not think we need a full blown popover for the links, simple tooltip is enough and more efficient, sadly we do not have a modern tooltip framework, still using old bootstrap 2.3 tooltip * table-panel: add tests for link rendering --- .../plugins/panel/table/column_options.html | 30 ++++++++ public/app/plugins/panel/table/module.ts | 10 ++- public/app/plugins/panel/table/renderer.ts | 46 ++++++++++-- .../panel/table/specs/renderer_specs.ts | 72 ++++++++++++++----- public/sass/components/_panel_table.scss | 15 ++++ 5 files changed, 150 insertions(+), 23 deletions(-) diff --git a/public/app/plugins/panel/table/column_options.html b/public/app/plugins/panel/table/column_options.html index db4758ab8f3..53e3c477346 100644 --- a/public/app/plugins/panel/table/column_options.html +++ b/public/app/plugins/panel/table/column_options.html @@ -27,6 +27,7 @@ +
@@ -91,6 +92,35 @@
+
+
Link
+
+ + + +

Specify an URL (relative or absolute)

+ + Use special variables to specify cell values:
+ $__cell refers to current cell value
+ $__cell_n refers to Nth column value in current row. Column indexes are started from 0. For instance, + $__cell_1 refers to second column's value. +
+
+
+
+ + + +

Specify text for link tooltip.

+ + This title appears when user hovers pointer over the cell with link. + Use the same variables as for URL. + +
+
+ +
+