Add export tab to admin reports
This commit is contained in:
@@ -8,6 +8,7 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
|
|
||||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||||
<li class="active"><a id="tabReport" href="#tabPageReport"><?=t('Reports')?></a></li>
|
<li class="active"><a id="tabReport" href="#tabPageReport"><?=t('Reports')?></a></li>
|
||||||
|
<li class=""><a id="tabExports" href="#tabPageExports"><?=t('Exports')?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@@ -19,18 +20,27 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-pane" id="tabPageExports">
|
||||||
|
<div id="Exports" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="ExportsForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var modJsList = new Array();
|
var modJsList = new Array();
|
||||||
|
|
||||||
modJsList['tabReport'] = new ReportAdapter('Report','Report','','report_group');
|
modJsList['tabReport'] = new ReportAdapter('Report','Report','{"type":"Reports"}','report_group');
|
||||||
modJsList['tabReport'].setShowAddNew(false);
|
modJsList['tabReport'].setShowAddNew(false);
|
||||||
modJsList['tabReport'].setRemoteTable(true);
|
modJsList['tabReport'].setRemoteTable(true);
|
||||||
|
|
||||||
|
modJsList['tabExports'] = new ReportAdapter('Report','Exports','{"type":"Exports"}','report_group');
|
||||||
|
modJsList['tabExports'].setShowAddNew(false);
|
||||||
|
modJsList['tabExports'].setRemoteTable(true);
|
||||||
|
|
||||||
var modJs = modJsList['tabReport'];
|
var modJs = modJsList['tabReport'];
|
||||||
|
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ ReportAdapter.method('addSuccessCallBack', function(callBackData,serverData) {
|
|||||||
}
|
}
|
||||||
link = link.replace(/_BASE_/g,this.baseUrl);
|
link = link.replace(/_BASE_/g,this.baseUrl);
|
||||||
|
|
||||||
if(this.currentReport.output == "PDF"){
|
if(this.currentReport.output == "PDF" || this.currentReport.output == "JSON"){
|
||||||
|
|
||||||
this.showMessage("Download Report",link);
|
this.showMessage("Download Report",link);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user