mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Bulk Export redesign... finishing touch.
SVN:trunk[3610]
This commit is contained in:
@@ -795,11 +795,17 @@ class utils
|
||||
new SeparatorPopupMenuItem(),
|
||||
// Static menus: Email this page, CSV Export & Add to Dashboard
|
||||
new URLPopupMenuItem('UI:Menu:EMail', Dict::S('UI:Menu:EMail'), "mailto:?body=".urlencode($sUrl).' '), // Add an extra space to make it work in Outlook
|
||||
new JSPopupMenuItem('UI:Menu:CSVExport', Dict::S('UI:Menu:CSVExport'), "ExportListDlg('$sOQL', '$sDataTableId', 'csv', ".json_encode(Dict::S('UI:Menu:CSVExport')).")"),
|
||||
new JSPopupMenuItem('UI:Menu:ExportXLSX', Dict::S('ExcelExporter:ExportMenu'), "ExportListDlg('$sOQL', '$sDataTableId', 'xlsx', ".json_encode(Dict::S('ExcelExporter:ExportMenu')).")"),
|
||||
new JSPopupMenuItem('UI:Menu:AddToDashboard', Dict::S('UI:Menu:AddToDashboard'), "DashletCreationDlg('$sOQL')"),
|
||||
new JSPopupMenuItem('UI:Menu:ShortcutList', Dict::S('UI:Menu:ShortcutList'), "ShortcutListDlg('$sOQL', '$sDataTableId', '$sContext')"),
|
||||
);
|
||||
|
||||
if (UserRights::IsActionAllowed($param->GetFilter()->GetClass(), UR_ACTION_BULK_READ, $param) && (UR_ALLOWED_YES || UR_ALLOWED_DEPENDS))
|
||||
{
|
||||
// Bulk export actions
|
||||
$aResult[] = new JSPopupMenuItem('UI:Menu:CSVExport', Dict::S('UI:Menu:CSVExport'), "ExportListDlg('$sOQL', '$sDataTableId', 'csv', ".json_encode(Dict::S('UI:Menu:CSVExport')).")");
|
||||
$aResult[] = new JSPopupMenuItem('UI:Menu:ExportXLSX', Dict::S('ExcelExporter:ExportMenu'), "ExportListDlg('$sOQL', '$sDataTableId', 'xlsx', ".json_encode(Dict::S('ExcelExporter:ExportMenu')).")");
|
||||
}
|
||||
$aResult[] = new JSPopupMenuItem('UI:Menu:AddToDashboard', Dict::S('UI:Menu:AddToDashboard'), "DashletCreationDlg('$sOQL')");
|
||||
$aResult[] = new JSPopupMenuItem('UI:Menu:ShortcutList', Dict::S('UI:Menu:ShortcutList'), "ShortcutListDlg('$sOQL', '$sDataTableId', '$sContext')");
|
||||
|
||||
break;
|
||||
|
||||
case iPopupMenuExtension::MENU_OBJDETAILS_ACTIONS:
|
||||
|
||||
@@ -74,7 +74,7 @@ class PDFBulkExport extends HTMLBulkExport
|
||||
}
|
||||
asort($aLabels);
|
||||
|
||||
$sHtml = '<select name="'.$sName.'"/>';
|
||||
$sHtml = '<select name="'.$sName.'">';
|
||||
foreach($aLabels as $sVal => $sLabel)
|
||||
{
|
||||
$sSelected = ($sVal == $sCurrentValue) ? 'selected' : '';
|
||||
|
||||
@@ -539,5 +539,47 @@ Operatoren:<br/>
|
||||
'Core:Duration_Minutes_Seconds' => '%1$dmin %2$ds',
|
||||
'Core:Duration_Hours_Minutes_Seconds' => '%1$dh %2$dmin %3$ds',
|
||||
'Core:Duration_Days_Hours_Minutes_Seconds' => '%1$sd %2$dh %3$dmin %4$ds',
|
||||
|
||||
// Bulk export
|
||||
'Core:BulkExport:MissingParameter_Param' => 'Missing parameter "%1$s"~~',
|
||||
'Core:BulkExport:InvalidParameter_Query' => 'Invalid value for the parameter "query". There is no Query Phrasebook corresponding to the id: "%1$s".~~',
|
||||
'Core:BulkExport:ExportFormatPrompt' => 'Export format:~~',
|
||||
'Core:BulkExport:Identifier' => 'Identifier~~',
|
||||
'Core:BulkExport:Friendlyname' => 'Full name~~',
|
||||
'Core:BulkExportOf_Class' => '%1$s Export~~',
|
||||
'Core:BulkExport:ClickHereToDownload_FileName' => 'Click here to download %1$s~~',
|
||||
'Core:BulkExport:ExportResult' => 'Result of the export:',
|
||||
'Core:BulkExport:RetrievingData' => 'Retrieving data...~~',
|
||||
'Core:BulkExport:HTMLFormat' => 'Web Page (*.html)~~',
|
||||
'Core:BulkExport:CSVFormat' => 'Comma Separated Values (*.csv)~~',
|
||||
'Core:BulkExport:XLSXFormat' => 'Excel 2007 or newer (*.xlsx)~~',
|
||||
'Core:BulkExport:PDFFormat' => 'PDF Document (*.pdf)~~',
|
||||
'Core:BulkExport:DragAndDropHelp' => 'Drag and drop the columns\' headers to arrange the columns. Preview of %1$s lines. Total number of lines to export: %2$s.~~',
|
||||
'Core:BulkExport:EmptyPreview' => 'Select the columns to be exported from the list above~~',
|
||||
'Core:BulkExport:ColumnsOrder' => 'Columns order~~',
|
||||
'Core:BulkExport:AvailableColumnsFrom_Class' => 'Available columns from %1$s~~',
|
||||
'Core:BulkExport:NoFieldSelected' => 'Select at least one column to be exported~~',
|
||||
'Core:BulkExport:CheckAll' => 'Check All~~',
|
||||
'Core:BulkExport:UncheckAll' => 'Uncheck All~~',
|
||||
'Core:BulkExport:ExportCancelledByUser' => 'Export cancelled by the user~~',
|
||||
'Core:BulkExport:CSVOptions' => 'CSV Options~~',
|
||||
'Core:BulkExport:CSVLocalization' => 'Localization~~',
|
||||
'Core:BulkExport:PDFOptions' => 'PDF Options~~',
|
||||
'Core:BulkExport:PDFPageSize' => 'Page Size:~~',
|
||||
'Core:BulkExport:PageSize-A4' => 'A4~~',
|
||||
'Core:BulkExport:PageSize-A3' => 'A3~~',
|
||||
'Core:BulkExport:PageSize-Letter' => 'Letter~~',
|
||||
'Core:BulkExport:PDFPageOrientation' => 'Page Orientation:~~',
|
||||
'Core:BulkExport:PageOrientation-L' => 'Landscape~~',
|
||||
'Core:BulkExport:PageOrientation-P' => 'Portrait~~',
|
||||
'Core:BulkExport:XMLFormat' => 'XML file (*.xml)~~',
|
||||
'Core:BulkExport:XMLOptions' => 'XML Options~~',
|
||||
'Core:BulkExport:SpreadsheetFormat' => 'Spreadsheet HTML format (*.html)~~',
|
||||
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
|
||||
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
|
||||
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
|
||||
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
|
||||
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
|
||||
'Core:BulkExportMessageEmptyOQL' => 'Please enter a valid OQL query.~~',
|
||||
'Core:BulkExportMessageEmptyPhrasebookEntry' => 'Please select a valid phrasebook entry.~~',
|
||||
));
|
||||
?>
|
||||
|
||||
15
js/utils.js
15
js/utils.js
@@ -436,7 +436,20 @@ function ExportListDlg(sOQL, sDataTableId, sFormat, sDlgTitle)
|
||||
}
|
||||
}
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'webservices/export-v2.php', {interactive: 1, advanced: 1, mode: 'dialog', format: sFormat, expression: sOQL, suggested_fields: aFields.join(','), dialog_title: sDlgTitle}, function(data) {
|
||||
var oParams = {
|
||||
interactive: 1,
|
||||
mode: 'dialog',
|
||||
expression: sOQL,
|
||||
suggested_fields: aFields.join(','),
|
||||
dialog_title: sDlgTitle
|
||||
};
|
||||
|
||||
if (sFormat !== null)
|
||||
{
|
||||
oParams.format = sFormat;
|
||||
}
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'webservices/export-v2.php', oParams, function(data) {
|
||||
$('body').append(data);
|
||||
});
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user