@@ -11,12 +11,13 @@ if (reportName) {
1111}
1212
1313$ ( function ( ) {
14+ var url = location . host ;
1415 $ ( "#container" ) . boldReportDesigner ( {
1516 // Specifies the URL of the WebAPI service. It will be used for processing the report.
1617 serviceUrl : window . Globals . DESIGNER_SERVICE_URL ,
1718 // This event will be triggered when the Report Designer widget is created
1819 create : controlCreate ,
19- permissionSettings : { dataSource : ej . ReportDesigner . Permission . All & ~ ej . ReportDesigner . Permission . Create } ,
20+ permissionSettings : url . indexOf ( "demos.boldreports.com" ) !== - 1 ? { dataSource : ej . ReportDesigner . Permission . All & ~ ej . ReportDesigner . Permission . Create } : { dataSource : ej . ReportDesigner . Permission . All } ,
2021 reportItemExtensions : [ {
2122 name : 'barcode' ,
2223 className : 'EJBarcode' ,
@@ -39,9 +40,31 @@ $(function () {
3940 description : 'Display the barcode lines as report item.' ,
4041 title : '2D Barcode'
4142 }
43+ } , {
44+ name : 'ESignature' ,
45+ className : 'EJSignature' ,
46+ imageClass : 'customitem-signature' ,
47+ displayName : 'Electronic' ,
48+ category : 'Signature' ,
49+ toolTip :{
50+ requirements : 'Add a report item to the designer area.' ,
51+ description : 'This report item is used to add a graphic signature.' ,
52+ title : 'Signature'
53+ }
54+ } , {
55+ name : 'Shape' ,
56+ className : 'EJShape' ,
57+ imageClass : 'customitem-shape' ,
58+ displayName : 'Shape' ,
59+ category : 'Shapes' ,
60+ toolTip : {
61+ requirements : 'Add a report item to the designer area' ,
62+ description : 'Display the different types of shapes as report item' ,
63+ title : 'Shapes'
64+ }
4265 } ] ,
4366 toolbarSettings : {
44- items : ej . ReportDesigner . ToolbarItems . All & ~ ej . ReportDesigner . ToolbarItems . Save & ~ ej . ReportDesigner . ToolbarItems . Open
67+ items : ej . ReportDesigner . ToolbarItems . All & ~ ej . ReportDesigner . ToolbarItems . New & ~ ej . ReportDesigner . ToolbarItems . Save & ~ ej . ReportDesigner . ToolbarItems . Open
4568 } ,
4669 ajaxBeforeLoad : onAjaxBeforeLoad ,
4770 toolbarRendering : window . Globals . DESIGNER_TOOLBAR_RENDERING ,
@@ -74,6 +97,15 @@ function controlCreate() {
7497 }
7598 } ) ;
7699 }
100+ if ( reportName == "powerpoint-report.rdl" ) {
101+ designerInst . setModel ( {
102+ previewOptions : {
103+ exportSettings : {
104+ exportOptions : ej . ReportViewer . ExportOptions . PPT
105+ }
106+ }
107+ } ) ;
108+ }
77109}
78110
79111function onAjaxBeforeLoad ( args ) {
@@ -93,10 +125,12 @@ function updateDescription() {
93125 metaDes = metaDes . replace ( / { { sampleName} } / g, title ) ;
94126 document . getElementsByName ( 'description' ) [ 0 ] . content = metaDes ;
95127 title += ' | JavaScript Report Designer' ;
96- document . title = title . length < 45 ? title += ' | Bold Reports' : title ;
128+ const titleWithBoldReports = ( title . length < 45 ) ? title += ' | Bold Reports' : title ;
129+ document . title = titleWithBoldReports ;
130+ document . querySelector ( 'meta[property="og:title"]' ) . setAttribute ( 'content' , titleWithBoldReports ) ;
97131}
98132
99133function getReportName ( ) {
100134 const reportNameRegex = / [ \\ ? & ] r e p o r t - n a m e = ( [ ^ & # ] * ) / . exec ( location . search ) ;
101135 return reportNameRegex ? reportNameRegex [ 1 ] : undefined ;
102- } ;
136+ } ;
0 commit comments