TableView - Dev
by tara5
HTML
<div id="dataView">
<div id="table" style="margin-top: 20px;"></div>
<div id="filterPanels"></div>
</div>
<link rel="stylesheet" href="http://build-master.jaspersoft.com:7680/jrs-pro-feature-amber-adv/scripts/adhoc/api/css/adHocView.css" type="text/css" media="screen">
<script type="text/javascript" src="http://build-master.jaspersoft.com:7680/jrs-pro-feature-amber-adv/scripts/client/jasper.js"></script>
CSS
#typeChooser {
width: 250px;
}
#dataSelector {
width: 250px;
}
#table{
height: 300px;
}
.slider {
width: 200px;
}
body {
font-size: 11px;
line-height: 1.182em;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: normal;
}
.tooltip {
position: absolute;
padding: 4px;
text-align: center;
background: #eee;
border: solid 1px #ccc;
z-index: 1000;
display: none;
white-space: nowrap;
}
.sliderTick {
position: absolute;
background: url(http://gavmacbook.local:8080/jasperserver-pro-adv/themes/default/images/slider_tickMark.png);
width: 3px;
height: 23px;
top: -4px;
z-index: 0;
margin-left: -1px;
}
.sliderContainer {
padding-top: 15px;
}
.tickOverlay {
position: absolute;
height: 23px;
width: 20px;
left: -10px;
}
#container {
background-color: #E6E6FA;
overflow: hidden;
}
#container > div {
border: 1px solid #aaa;
}
/*! perfect-scrollbar - v0.4.6
* http://noraesae.github.com/perfect-scrollbar/
* Copyright (c) 2013 HyeonJe Jun; Licensed MIT */
.ps-container .ps-scrollbar-x-rail{position:absolute;bottom:3px;height:8px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;opacity:0.7;filter:alpha(opacity=70);-o-transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color.2s linear,opacity .2s linear;-moz-transition:background-color .2s linear,opacity .2s linear;transition:background-color .2s linear,opacity .2s linear}.ps-container:hover .ps-scrollbar-x-rail,.ps-container.hover .ps-scrollbar-x-rail{opacity:.6;filter:alpha(opacity=60)}.ps-container .ps-scrollbar-x-rail:hover,.ps-container .ps-scrollbar-x-rail.hover{/*background-color:#eee;*/opacity:.9;filter:alpha(opacity=90)}.ps-container .ps-scrollbar-x-rail.in-scrolling{opacity:.9;filter:alpha(opacity=90)}.ps-container...
JavaScript
var bi = jasper("http://build-master.jaspersoft.com:7680/jrs-pro-feature-amber-adv");
//use configured script loader
bi([
"jquery",
"adhoc/api/AdHocViewFacade"
], function($, AdHocView){
"use strict";
var adHocView = new AdHocView({
baseUrl: "http://build-master.jaspersoft.com:5780/jrs-pro-feature-amber-adhoc-rest-api",
url: "/public/Samples/Ad_Hoc_Views/04__Product_Results_by_Store_Type",
container: "#dataView",
table:{
layout: {
container: "#table"
}
},
filters: "#filterPanels"
});
adHocView.run().then(function () {
/* Methods
adHocView.components.table.detailsAndTotals();
adHocView.components.table.detailsOnly();
adHocView.components.table.totalsOnly();
*/
});
});