diff options
author | Bibiko <bibiko@eva.mpg.de> | 2011-01-05 12:15:15 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2011-01-05 12:15:15 +0000 |
commit | b1dc43ce1aa2871753321174239c973a9637a602 (patch) | |
tree | 2ce3a1e67dc369959484b550d9908fa542cee95c /SharedSupport/Default Bundles/DB Report.spBundle/Support | |
parent | 2d6c795da8a79126bb25c646f43369df02593f19 (diff) | |
download | sequelpro-b1dc43ce1aa2871753321174239c973a9637a602.tar.gz sequelpro-b1dc43ce1aa2871753321174239c973a9637a602.tar.bz2 sequelpro-b1dc43ce1aa2871753321174239c973a9637a602.zip |
• fixed bug for Bundle commands to detect if current textview is the Query Editor
• added some more Default Bundles
Diffstat (limited to 'SharedSupport/Default Bundles/DB Report.spBundle/Support')
-rw-r--r-- | SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html | 41 | ||||
-rwxr-xr-x | SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl | 32 |
2 files changed, 73 insertions, 0 deletions
diff --git a/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html b/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html new file mode 100644 index 00000000..b67b633c --- /dev/null +++ b/SharedSupport/Default Bundles/DB Report.spBundle/Support/header.html @@ -0,0 +1,41 @@ +<html> + <head> + <title>Database Report</title> + <style type="text/css"> + hr { + background: #606060; + color: #606060; + border-style: solid; + border-color: #606060; + border-width: 2px 0 0 0; + margin-top: 0; + } + a:hover { + text-decoration: none; + } + a { + text-decoration: none; + } + a:hover:after { + content: " ➪"; + } + .nonVisible { + display:none; + } + </style> + <script type="text/javascript" charset="utf-8"> + function toggle_display(elt) + { + var e; var p; + e = elt.getAttribute("id") + ":data"; + if (window.document.getElementById(e).className != "") { + window.document.getElementById(e).className = ""; + elt.innerHTML = "▼"; + } else { + window.document.getElementById(e).className = "nonVisible"; + elt.innerHTML = "▶"; + } + } + </script> + </head> +<body> diff --git a/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl b/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl new file mode 100755 index 00000000..7d0b5545 --- /dev/null +++ b/SharedSupport/Default Bundles/DB Report.spBundle/Support/processTableData.pl @@ -0,0 +1,32 @@ +#!/usr/bin/env perl -w + +while(<>) { + + # split tab delimited data + @data = split(/\t/); + + $pid = $ENV{"PID"}; + $db = $ENV{"DB"}; + $res = $ENV{"RES"}; + $itemType = "table"; + + # $data[1] is NULL indicates item is a view + if($data[1] eq "NULL") { + $img = "file://$res/table-view-small-square.tiff"; + $itemType = "view"; + } else { + $img = "file://$res/table-small-square.tiff"; + } + + print <<HTML4; + <tr> + <td align=center width='40px'><img src=\"$img\"></td> + <td><a href=\"sequelpro://$pid\@passToDoc/SelectDatabase/$db/$data[0]/\" title=\"Click to select $itemType “$db.$data[0]”\">$data[0]</a></td> + <td>$data[1]</td> + <td align=right>$data[4]</td> + <td align=right>$data[6]</td> + <td align=right>$data[11]</td> + <td align=right>$data[12]</td> + </tr> +HTML4 +}
\ No newline at end of file |