From a3bb20ad28db2f2f26c9e13149c45aaee31a9c02 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 22 Sep 2006 17:05:50 +0000 Subject: [PATCH] more work on transform display and mangling git-svn-id: svn://svn.open-ils.org/ILS/trunk@6193 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/reports/oils_rpt.css | 8 +- Open-ILS/web/reports/oils_rpt_builder.js | 23 +++- Open-ILS/web/reports/oils_rpt_builder.xhtml | 9 +- .../web/reports/oils_rpt_tform_date.xhtml | 111 +++++++++++------- .../web/reports/oils_rpt_tform_numeric.xhtml | 12 +- .../web/reports/oils_rpt_tform_string.xhtml | 17 ++- Open-ILS/web/reports/oils_rpt_utils.js | 5 +- 7 files changed, 119 insertions(+), 66 deletions(-) diff --git a/Open-ILS/web/reports/oils_rpt.css b/Open-ILS/web/reports/oils_rpt.css index 59d8cfa459..0c332da010 100644 --- a/Open-ILS/web/reports/oils_rpt.css +++ b/Open-ILS/web/reports/oils_rpt.css @@ -1,4 +1,6 @@ body { font-size: 9pt; font-family: Helvetica, Arial, Tahoma, sans-serif; font-size: 9pt;} +table { border-collapse: collapse; } + .hide_me { display: none; visibility: hidden; } .welcome_box { position:absolute; top: 5px; right: 5px; } @@ -130,8 +132,6 @@ button { .oils_rpt_tree_link_ref { color: #A52A2A; - /*color: darkblue;*/ - /*font-family: courier; */ } @@ -139,3 +139,7 @@ button { background: red; } +#oils_rpt_tform_tbody td { + border-bottom: 1px solid #A0A0A0; + padding: 4px; +} diff --git a/Open-ILS/web/reports/oils_rpt_builder.js b/Open-ILS/web/reports/oils_rpt_builder.js index cfe6844f9a..cc5f8c789a 100644 --- a/Open-ILS/web/reports/oils_rpt_builder.js +++ b/Open-ILS/web/reports/oils_rpt_builder.js @@ -335,6 +335,7 @@ function oilsRptDrawTransformWindow(path, col, cls, field) { DOM.oils_rpt_tform_label_input.focus(); DOM.oils_rpt_tform_label_input.select(); oilsRptHideTformFields(); + oilsRptUnHideTformFields(dtype); _debug("Transforming item with datatype "+dtype); unHideMe($('oils_rpt_tform_'+dtype+'_div')); @@ -342,8 +343,22 @@ function oilsRptDrawTransformWindow(path, col, cls, field) { } function oilsRptHideTformFields() { - for( var t in oilsRptTransforms ) - hideMe($('oils_rpt_tform_'+t+'_div')); + var rows = DOM.oils_rpt_tform_tbody.childNodes; + for( var i = 0; i < rows.length; i++ ) + if( rows[i] && rows[i].nodeType == 1 ) + hideMe(rows[i]); +} + +function oilsRptUnHideTformFields(dtype) { + var rows = DOM.oils_rpt_tform_tbody.childNodes; + for( var i = 0; i < rows.length; i++ ) { + var row = rows[i] + if( row && row.nodeType == 1 && + (row.getAttribute('datatype')=='all' + || row.getAttribute('datatype') == dtype)) { + unHideMe(row); + } + } } function oilsRptGetTform(datatype) { @@ -368,7 +383,9 @@ function getRptTformParams(type, tform) { case 'string' : switch(tform) { case 'substring' : - return []; + return [ + DOM.oils_rpt_tform_string_substring_offset.value, + DOM.oils_rpt_tform_string_substring_length.value]; } } } diff --git a/Open-ILS/web/reports/oils_rpt_builder.xhtml b/Open-ILS/web/reports/oils_rpt_builder.xhtml index 8ab1b19e82..8e41c59d66 100644 --- a/Open-ILS/web/reports/oils_rpt_builder.xhtml +++ b/Open-ILS/web/reports/oils_rpt_builder.xhtml @@ -106,14 +106,7 @@
Select how this field should be displayed:
- Raw Data
- Count
- Count Distinct
- Min
- Max
- - - +


diff --git a/Open-ILS/web/reports/oils_rpt_tform_date.xhtml b/Open-ILS/web/reports/oils_rpt_tform_date.xhtml index 748168bd15..c7c11a5944 100644 --- a/Open-ILS/web/reports/oils_rpt_tform_date.xhtml +++ b/Open-ILS/web/reports/oils_rpt_tform_date.xhtml @@ -1,46 +1,69 @@ -
- Month Trunc
- - - - Month(s) Ago -
+ + + Month Trunc
+ + + + + + Month(s) Ago + + + + + + + + + + Quarter(s) Ago + + + + + + + + + Age
+ + - - - - Quarter(s) Ago -
- Age
-
diff --git a/Open-ILS/web/reports/oils_rpt_tform_numeric.xhtml b/Open-ILS/web/reports/oils_rpt_tform_numeric.xhtml index ec90b15038..f60949b716 100644 --- a/Open-ILS/web/reports/oils_rpt_tform_numeric.xhtml +++ b/Open-ILS/web/reports/oils_rpt_tform_numeric.xhtml @@ -1,4 +1,8 @@ -
- Sum
- Average
-
+ + + Sum
+ + + Average
+ + diff --git a/Open-ILS/web/reports/oils_rpt_tform_string.xhtml b/Open-ILS/web/reports/oils_rpt_tform_string.xhtml index c3769246c2..b1068499c9 100644 --- a/Open-ILS/web/reports/oils_rpt_tform_string.xhtml +++ b/Open-ILS/web/reports/oils_rpt_tform_string.xhtml @@ -1,3 +1,14 @@ -
- Substring
-
+ + + + Substring + + + Offset: + + Length: + + + diff --git a/Open-ILS/web/reports/oils_rpt_utils.js b/Open-ILS/web/reports/oils_rpt_utils.js index 9672d9fcc7..933ed48e15 100644 --- a/Open-ILS/web/reports/oils_rpt_utils.js +++ b/Open-ILS/web/reports/oils_rpt_utils.js @@ -86,8 +86,9 @@ function setMousePos(e) { function buildFloatingDiv(div, width) { var left = parseInt((window.innerWidth / 2) - (width/2)); - var top = oilsMouseY; - var dbot = oilsMouseY + div.clientHeight; + var halfh = parseInt(div.clientHeight / 2); + var top = oilsMouseY - halfh + 50; + var dbot = top + halfh; if( dbot > window.innerHeight ) { top = oilsMouseY - div.clientHeight - 10; } -- 2.43.2