diff --git a/module/pivot/js/preview.ui.js b/module/pivot/js/preview.ui.js index 365f4978c8..c2b664ae7a 100644 --- a/module/pivot/js/preview.ui.js +++ b/module/pivot/js/preview.ui.js @@ -125,6 +125,12 @@ function loadCustomPivot() postAndLoadPage(link, form, '#table-pivot-preview'); } +exportData = function() +{ + const $domObj = $(".table-condensed")[0]; + exportFile($domObj); +} + /** * 把日期字符串转换成日期对象。 * Convert date string to date object. @@ -227,9 +233,3 @@ getHeight = function(height) return Math.min(windowHeight - headerHeight - menuHeight - conditionHeight - parentGapHeight - panelHeadingHeight - panelBodyPaddingY, height); } - -exportData = function() -{ - const $domObj = $(".table-condensed")[0]; - exportFile($domObj); -} diff --git a/module/pivot/ui/preview.html.php b/module/pivot/ui/preview.html.php index 64b2efeb25..ae722bb981 100644 --- a/module/pivot/ui/preview.html.php +++ b/module/pivot/ui/preview.html.php @@ -18,7 +18,7 @@ if(file_exists($viewFile)) include_once $viewFile; if($this->config->edition != 'open') { - $pivotPath = $this->app->getModuleExtPath('pivot', 'view'); + $pivotPath = $this->app->getModuleExtPath('pivot', 'ui'); include $pivotPath['common'] . 'exportdata.html.php'; } @@ -43,7 +43,8 @@ if($config->edition != 'open') 'icon' => 'export', 'class' => 'ghost', 'data-target' => '#export', - 'data-toggle' => 'modal' + 'data-toggle' => 'modal', + 'data-size' => 'sm' ))) : null, hasPriv('pivot', 'browse') ? item(set(array ( diff --git a/module/pivot/ui/show.html.php b/module/pivot/ui/show.html.php index 63d21fe32c..fe993617ec 100644 --- a/module/pivot/ui/show.html.php +++ b/module/pivot/ui/show.html.php @@ -115,7 +115,9 @@ $generateData = function() use ($lang, $pivotName, $pivot, $filters, $data, $con div ( setID('exportData'), - setClass('hidden') + setClass('hidden'), + rawContent(), + $this->pivot->buildPivotTable($data, $configs), ) ) );