@boldreports/javascript-reporting-extensions 9.1.15 → 10.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,19 @@
1
1
  var EJPDFSignature = (function () {
2
- function EJPDFSignature(instance) {
2
+ function EJPDFSignature(rptDesigner) {
3
3
  this.customJSON = null;
4
4
  this.rootElement = null;
5
5
  this.customItemDiv = null;
6
6
  this.instance = null;
7
- this.canvasTag = null;
8
7
  this.customItemInstance = null;
9
- this.instance = instance;
8
+ this.instance = rptDesigner;
9
+ if (this.hasDesignerInstance(this.instance)) {
10
+ this.designPanel = this.instance.getInstance('DesignPanel');
11
+ }
10
12
  }
11
13
  EJPDFSignature.prototype.initializeItem = function (args) {
12
14
  args.isBuildInService = false;
13
- args.defaultHeight = 120;
14
- args.defaultWidth = 180;
15
+ args.defaultHeight = 160;
16
+ args.defaultWidth = 360;
15
17
  args.minimumHeight = 15;
16
18
  args.minimumWidth = 90;
17
19
  };
@@ -20,19 +22,188 @@ var EJPDFSignature = (function () {
20
22
  this.customJSON = customJson;
21
23
  this.rootElement = target;
22
24
  this.customItemInstance = target.data('CustomItem');
23
- this.renderSignature();
25
+ this.renderPDFSignature();
24
26
  }
25
27
  };
26
- EJPDFSignature.prototype.renderSignature = function () {
27
- var bgColor = (this.customJSON && this.customJSON.Style) ? (this.customJSON.Style.BackgroundColor === 'Transparent' ?
28
- 'white' : this.customJSON.Style.BackgroundColor) : 'white';
29
- this.customItemDiv = this.buildElement('div', 'customitem e-rptdesigner-customItem-pdfsign', '', { 'id': this.customJSON.Name + '_customItem' }, { 'background-color': bgColor });
30
- this.canvasTag = this.buildElement('canvas', '', '', { 'id': this.customJSON.Name + '_customItem_canvas' }, { width: '100%', height: '100%' });
31
- this.customItemDiv.append(this.canvasTag);
28
+ EJPDFSignature.prototype.renderPDFSignature = function () {
29
+ var canDataConfig = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'DataConfig'));
30
+ var bgColor = this.customJSON.Style.BackgroundColor === 'Transparent' ? 'White' : this.customJSON.Style.BackgroundColor;
31
+ this.customItemDiv = this.buildElement('div', 'customitem e-rptdesigner-pdfsign', '', {}, { 'background-color': canDataConfig ? bgColor : 'Transparent' });
32
+ var isSignedName = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'SignedName'));
33
+ var isContactInfo = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'ContactInfo'));
34
+ var isReason = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Reason'));
35
+ var isDate = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Date'));
36
+ var isLocation = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Location'));
37
+ var isDataPresent = isSignedName || isContactInfo || isReason || isDate || isLocation;
38
+ var defaultDiv = this.buildElement('div', 'e-pdfsign-default', this.getLocale('defaulttxt'), {}, { 'display': canDataConfig ? 'none' : 'flex' });
39
+ var configDiv = this.buildElement('div', 'e-pdfsign-config', '', {}, { 'display': canDataConfig ? 'flex' : 'none' });
40
+ var imgDiv = this.buildElement('div', 'e-pdfsign-signImg', '', {}, { 'display': 'flex', 'width': '50%', 'height': '100%' });
41
+ var dataDiv = this.buildElement('div', 'e-pdfsign-dataConfig', '', {}, { 'display': isDataPresent ? 'flex' : 'none' });
42
+ this.appendElement(dataDiv, 'e-pdfsign-signedName', this.getLocale('signednamelabel') + ': ' + this.getLocale('signednamevalue'), isSignedName);
43
+ this.appendElement(dataDiv, 'e-pdfsign-contactInfo', this.getLocale('contactinfolabel') + ': ' + this.getLocale('contactinfovalue'), isContactInfo);
44
+ this.appendElement(dataDiv, 'e-pdfsign-reason', this.getLocale('reasonLabel') + ': ' + this.getLocale('reasonvalue'), isReason);
45
+ this.appendElement(dataDiv, 'e-pdfsign-location', this.getLocale('locationLabel') + ': ' + this.getLocale('locationvalue'), isLocation);
46
+ this.appendElement(dataDiv, 'e-pdfsign-date', this.getLocale('dateLabel') + ': ' + this.getFormattedDate(this.instance.model.locale), isDate);
47
+ this.customItemDiv.append(defaultDiv, configDiv);
48
+ configDiv.append(imgDiv, dataDiv);
32
49
  this.rootElement.append(this.customItemDiv);
33
- var imgData = this.getPropertyVal('SignatureValue');
34
- imgData = imgData && imgData.length > 0 ? 'data:image/png;base64,' + imgData : imgData;
35
- this.setSign(imgData, document.getElementById(this.customJSON.Name + '_customItem_canvas'), bgColor);
50
+ var base64Prefix = 'data:image/png;base64,';
51
+ var signatureValue = this.getPropertyValue(this.customJSON.CustomProperties, 'SignatureValue');
52
+ if (signatureValue) {
53
+ var signatureData = "" + base64Prefix + signatureValue;
54
+ this.setSign(signatureData, imgDiv);
55
+ }
56
+ else {
57
+ this.clearSign(imgDiv);
58
+ }
59
+ };
60
+ EJPDFSignature.prototype.getPropertyGridItems = function (baseProperties) {
61
+ var isDataPresent = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'DataConfig'));
62
+ var itemProperties = [{
63
+ 'CategoryId': 'basicsettings',
64
+ 'DisplayName': 'categoryBasicSettings',
65
+ 'IsExpand': true,
66
+ 'IsIgnoreCommon': true,
67
+ 'Items': [
68
+ {
69
+ 'ItemId': 'showdata',
70
+ 'Name': 'showdata',
71
+ 'DisplayName': 'showdata',
72
+ 'ItemType': 'Bool',
73
+ 'Value': isDataPresent,
74
+ 'EnableExpression': false,
75
+ 'DependentItems': [
76
+ {
77
+ 'DisableItems': ['basicsettings_reason', 'basicsettings_location', 'basicsettings_date', 'basicsettings_signature', 'basicsettings_signedname', 'basicsettings_contactinfo'],
78
+ 'Value': [false]
79
+ },
80
+ {
81
+ 'EnableItems': ['basicsettings_reason', 'basicsettings_location', 'basicsettings_date', 'basicsettings_signature', 'basicsettings_signedname', 'basicsettings_contactinfo'],
82
+ 'Value': [true]
83
+ }
84
+ ],
85
+ IsVisible: true
86
+ },
87
+ {
88
+ 'ItemId': 'signature',
89
+ 'Name': 'signature',
90
+ 'DisplayName': 'signature',
91
+ 'ItemType': 'CustomBtn',
92
+ 'EnableExpression': false,
93
+ 'IsVisible': isDataPresent
94
+ },
95
+ {
96
+ 'ItemId': 'signedname',
97
+ 'Name': 'signedname',
98
+ 'DisplayName': 'prptysignedname',
99
+ 'ItemType': 'Bool',
100
+ 'Value': this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'SignedName')),
101
+ 'ParentId': 'basicsettings_default',
102
+ 'EnableExpression': false,
103
+ 'IsVisible': isDataPresent
104
+ },
105
+ {
106
+ 'ItemId': 'contactinfo',
107
+ 'Name': 'contactinfo',
108
+ 'DisplayName': 'prptycontactinfo',
109
+ 'ItemType': 'Bool',
110
+ 'Value': this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'ContactInfo')),
111
+ 'ParentId': 'basicsettings_default',
112
+ 'EnableExpression': false,
113
+ 'IsVisible': isDataPresent
114
+ },
115
+ {
116
+ 'ItemId': 'reason',
117
+ 'Name': 'reason',
118
+ 'DisplayName': 'prptyreason',
119
+ 'ItemType': 'Bool',
120
+ 'Value': this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Reason')),
121
+ 'ParentId': 'basicsettings_default',
122
+ 'EnableExpression': false,
123
+ 'IsVisible': isDataPresent
124
+ }, {
125
+ 'ItemId': 'location',
126
+ 'Name': 'location',
127
+ 'DisplayName': 'prptylocation',
128
+ 'ItemType': 'Bool',
129
+ 'Value': this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Location')),
130
+ 'ParentId': 'basicsettings_default',
131
+ 'EnableExpression': false,
132
+ 'IsVisible': isDataPresent
133
+ }, {
134
+ 'ItemId': 'date',
135
+ 'Name': 'date',
136
+ 'DisplayName': 'prptydate',
137
+ 'ItemType': 'Bool',
138
+ 'Value': this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'Date')),
139
+ 'ParentId': 'basicsettings_default',
140
+ 'EnableExpression': false,
141
+ 'IsVisible': isDataPresent
142
+ }
143
+ ]
144
+ }];
145
+ baseProperties.HeaderText = this.customJSON.Name;
146
+ baseProperties.PropertyType = 'pdfsign';
147
+ baseProperties.SubType = 'pdfsignature';
148
+ baseProperties.IsEditHeader = true;
149
+ baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
150
+ baseProperties.getItemProperty = {
151
+ event: $.proxy(this.customAction, this), eventData: {}
152
+ };
153
+ return baseProperties;
154
+ };
155
+ EJPDFSignature.prototype.appendElement = function (target, className, text, display) {
156
+ var elementDiv = this.buildElement('div', 'e-pdfsign-label' + ' ' + className, text, {}, { 'display': display ? 'flex' : 'none' });
157
+ target.append(elementDiv);
158
+ };
159
+ EJPDFSignature.prototype.isDataConfigured = function () {
160
+ if (this.hasDesignerInstance(this.instance)) {
161
+ var target = this.designPanel.designArea.find('.e-customitem .e-rptdesigner-pdfsign');
162
+ return target.toArray().some(function (targetElement) {
163
+ var itemJSON = ej.ReportUtil.getReportItem($(targetElement.parentElement)).getReportItemJson();
164
+ var customProperties = itemJSON.CustomProperties || [];
165
+ return customProperties.some(function (_a) {
166
+ var Name = _a.Name, Value = _a.Value;
167
+ return Name === 'DataConfig' && Value === 'true';
168
+ });
169
+ });
170
+ }
171
+ };
172
+ EJPDFSignature.prototype.updateDataConfig = function (value) {
173
+ var _this = this;
174
+ var defaultDiv = this.customItemDiv.find('.e-pdfsign-default');
175
+ var configDiv = this.customItemDiv.find('.e-pdfsign-config');
176
+ defaultDiv.css('display', value ? 'none' : 'flex');
177
+ configDiv.css('display', value ? 'flex' : 'none');
178
+ this.updatePropertyVal('DataConfig', value.toString());
179
+ this.customItemDiv.css('background-color', value ? this.customJSON.Style.BackgroundColor === 'Transparent' ? 'white' : this.customJSON.Style.BackgroundColor : 'Transparent');
180
+ if (value && this.hasDesignerInstance(this.instance)) {
181
+ var targets = this.designPanel.designArea.find('.e-customitem .e-rptdesigner-pdfsign');
182
+ targets.toArray().forEach(function (targetElement) {
183
+ var target = $(targetElement.parentElement);
184
+ var itemJSON = ej.ReportUtil.getReportItem(target).getReportItemJson();
185
+ if (itemJSON.Name !== _this.customJSON.Name) {
186
+ var customProperties = itemJSON.CustomProperties || [];
187
+ customProperties.some(function (property) {
188
+ if (property.Name === 'DataConfig' && property.Value === 'true') {
189
+ property.Value = 'false';
190
+ target.find('.e-pdfsign-config').css('display', 'none');
191
+ target.find('.e-pdfsign-default').css('display', 'flex');
192
+ target.find('.e-rptdesigner-pdfsign').css('background-color', 'Transparent');
193
+ return true;
194
+ }
195
+ return false;
196
+ });
197
+ }
198
+ });
199
+ }
200
+ };
201
+ EJPDFSignature.prototype.undoRedoAction = function (imgInfo) {
202
+ if (imgInfo) {
203
+ if (imgInfo.propertyName && imgInfo.propertyName.toLowerCase() === 'pdfsignature') {
204
+ ej.ReportUtil.invokeMethod(this, imgInfo.method, [imgInfo.undoRedo, { imageData: imgInfo.imageData }]);
205
+ }
206
+ }
36
207
  };
37
208
  EJPDFSignature.prototype.onPropertyChange = function (name, oldValue, newValue) {
38
209
  var args = [];
@@ -40,27 +211,47 @@ var EJPDFSignature = (function () {
40
211
  args[_i - 3] = arguments[_i];
41
212
  }
42
213
  switch (name.toLowerCase()) {
214
+ case 'showdata':
215
+ this.updateDataConfig(newValue);
216
+ break;
217
+ case 'signedname':
218
+ this.updateDisplay('e-pdfsign-signedName', newValue, 'SignedName');
219
+ break;
220
+ case 'contactinfo':
221
+ this.updateDisplay('e-pdfsign-contactInfo', newValue, 'ContactInfo');
222
+ break;
223
+ case 'reason':
224
+ this.updateDisplay('e-pdfsign-reason', newValue, 'Reason');
225
+ break;
226
+ case 'location':
227
+ this.updateDisplay('e-pdfsign-location', newValue, 'Location');
228
+ break;
229
+ case 'date':
230
+ this.updateDisplay('e-pdfsign-date', newValue, 'Date');
231
+ break;
43
232
  case 'backgroundcolor':
44
- var bgColor = newValue === 'Transparent' ? 'white' : newValue;
45
- this.customItemDiv.css('background-color', bgColor);
46
- this.canvasTag.css('background-color', bgColor);
233
+ var showData = this.booleanValue(this.getPropertyValue(this.customJSON.CustomProperties, 'DataConfig'));
234
+ var color = showData ? newValue === 'Transparent' ? 'White' : newValue : 'Transparent';
235
+ this.customItemDiv.css('background-color', color);
47
236
  break;
48
237
  }
49
238
  };
50
239
  EJPDFSignature.prototype.updatePropertyUIValue = function (name, value) {
51
- if (this.hasDesignerInstance(this.instance)) {
52
- switch (name.toLowerCase()) {
53
- case 'backgroundcolor':
54
- this.instance.propertyPanel.updatePropertyUIValue('backgroundcolor', value, this.customJSON.UniqueId);
55
- break;
56
- }
240
+ switch (name.toLowerCase()) {
241
+ case 'backgroundcolor':
242
+ case 'reason':
243
+ case 'location':
244
+ case 'date':
245
+ case 'showdata':
246
+ case 'signedname':
247
+ case 'contactinfo':
248
+ this.instance.propertyPanel.updatePropertyUIValue(name, value.toString(), this.customJSON.UniqueId);
249
+ break;
57
250
  }
58
251
  };
59
252
  EJPDFSignature.prototype.onPositionChanged = function (top, left) {
60
253
  };
61
254
  EJPDFSignature.prototype.onSizeChanged = function (height, width) {
62
- var imgData = this.getPropertyVal('SignatureValue');
63
- imgData = imgData && imgData.length > 0 ? 'data:image/png;base64,' + imgData : imgData;
64
255
  if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
65
256
  this.customItemDiv.css({
66
257
  width: width,
@@ -77,66 +268,83 @@ var EJPDFSignature = (function () {
77
268
  width: width
78
269
  });
79
270
  }
80
- this.setSign(imgData, document.getElementById(this.customJSON.Name + '_customItem_canvas'), this.customJSON.Style.BackgroundColor === 'Transparent' ? 'white' : this.customJSON.Style.BackgroundColor);
271
+ };
272
+ EJPDFSignature.prototype.updateDisplay = function (className, newValue, propertyName) {
273
+ var elementDiv = this.customItemDiv.find('.' + className);
274
+ var dataConfig = this.customItemDiv.find('.e-pdfsign-dataConfig');
275
+ elementDiv.css('display', newValue ? 'flex' : 'none');
276
+ this.updatePropertyVal(propertyName, newValue.toString());
277
+ dataConfig.css('display', this.getDataConfigDisplay(this.customJSON.CustomProperties) ? 'flex' : 'none');
81
278
  };
82
279
  EJPDFSignature.prototype.customAction = function (paramInfo) {
83
- var imgData = this.getPropertyVal('SignatureValue');
280
+ var imgData = this.getPropertyValue(this.customJSON.CustomProperties, 'SignatureValue');
84
281
  imgData = imgData && imgData.length > 0 ? 'data:image/png;base64,' + imgData : null;
85
282
  var dlgData = {
86
283
  callBackFn: $.proxy(this.saveSign, this, false),
87
284
  locale: this.instance.model.locale,
88
285
  imageData: imgData,
89
- canvas: null
286
+ canvas: null,
287
+ isViewerDialog: false
90
288
  };
91
289
  if (this.hasDesignerInstance(this.instance)) {
92
- var dlgInstance = window['SignatureDialog'].Instance;
93
- dlgInstance.openDialog(this.instance, dlgData);
290
+ this.invokeDialog(dlgData);
94
291
  }
95
292
  };
96
- EJPDFSignature.prototype.getPropertyGridItems = function (baseProperties) {
97
- var itemProperties = [{
98
- 'CategoryId': 'basicsettings',
99
- 'DisplayName': 'categoryBasicSettings',
100
- 'IsExpand': true,
101
- 'IsIgnoreCommon': true,
102
- 'Items': [{
103
- ItemId: 'signature',
104
- Name: 'signature',
105
- DisplayName: 'signature',
106
- ItemType: 'CustomBtn',
107
- IsVisible: true
108
- }]
109
- }];
110
- baseProperties.HeaderText = this.customJSON.Name;
111
- baseProperties.PropertyType = 'sign';
112
- baseProperties.SubType = 'signature';
113
- baseProperties.IsEditHeader = true;
114
- baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
115
- baseProperties.getItemProperty = {
116
- event: $.proxy(this.customAction, this), eventData: {}
117
- };
118
- return baseProperties;
119
- };
120
- EJPDFSignature.prototype.setSign = function (imgData, canvas, bgColor) {
121
- if (canvas) {
122
- canvas.style.backgroundColor = bgColor;
123
- if (imgData) {
124
- var image = new Image();
125
- image.src = imgData;
126
- image.onload = $.proxy(this.drawImage, this, image, canvas);
127
- }
293
+ EJPDFSignature.prototype.saveSign = function (isUndoRedo, imageDetails) {
294
+ var imgData = imageDetails ? imageDetails.imageData : null;
295
+ var imgDiv = this.customItemDiv.find('.e-pdfsign-signImg');
296
+ var prevVal = this.getPropertyValue(this.customJSON.CustomProperties, 'SignatureValue');
297
+ prevVal = prevVal && prevVal.length > 0 ? "data:image/png;base64," + prevVal : prevVal;
298
+ if (imgData) {
299
+ var base64String = imgData.replace('data:image/png;base64,', '');
300
+ this.updatePropertyVal('SignatureValue', base64String);
301
+ this.setSign(imgData, imgDiv);
302
+ }
303
+ else {
304
+ this.clearSign(imgDiv);
305
+ this.updatePropertyVal('SignatureValue', '');
128
306
  }
307
+ if (!isUndoRedo) {
308
+ this.customItemInstance.addCustomAction('CommandAction', [{ method: 'saveSign', imageData: prevVal, propertyName: 'pdfsignature', undoRedo: false }], [{ method: 'saveSign', imageData: imgData, propertyName: 'pdfsignature', undoRedo: true }]);
309
+ }
310
+ };
311
+ EJPDFSignature.prototype.setSign = function (imgData, imgDiv) {
312
+ imgDiv.removeClass('e-pdfsign-signImg-bgImg');
313
+ imgDiv.css('background-image', "url(" + imgData + ")");
314
+ };
315
+ EJPDFSignature.prototype.clearSign = function (imgDiv) {
316
+ imgDiv.css('background-image', 'none');
317
+ imgDiv.addClass('e-pdfsign-signImg-bgImg');
129
318
  };
130
- EJPDFSignature.prototype.drawImage = function (image, canvas) {
131
- var ctx = canvas.getContext('2d');
132
- ctx.clearRect(0, 0, canvas.width, canvas.height);
133
- ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
319
+ EJPDFSignature.prototype.getDataConfigDisplay = function (customProperties) {
320
+ var _this = this;
321
+ var properties = ['Reason', 'Location', 'Date', 'ContactInfo', 'SignedName'];
322
+ return properties.some(function (prop) { return _this.booleanValue(_this.getPropertyValue(customProperties, prop)); });
134
323
  };
135
- EJPDFSignature.prototype.clearSign = function (canvas) {
136
- if (canvas && canvas.getContext) {
137
- var ctx = canvas.getContext('2d');
138
- ctx.clearRect(0, 0, canvas.width, canvas.height);
324
+ EJPDFSignature.prototype.getFormattedDate = function (locale) {
325
+ var currentDate = new Date();
326
+ var dateOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };
327
+ var formattedDate = new Intl.DateTimeFormat(locale, dateOptions).format(currentDate);
328
+ var timeOptions = { hour: '2-digit', minute: '2-digit', second: '2-digit', timeZoneName: 'short' };
329
+ var formattedTime = new Intl.DateTimeFormat(locale, timeOptions).format(currentDate);
330
+ return formattedDate + ", " + formattedTime;
331
+ };
332
+ EJPDFSignature.prototype.getReportItemJson = function () {
333
+ if (this.customJSON === null) {
334
+ this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
335
+ this.setPropertyVal('ContentEditable', 'true');
336
+ this.setPropertyVal('Reason', 'true');
337
+ this.setPropertyVal('Location', 'true');
338
+ this.setPropertyVal('Date', 'true');
339
+ this.setPropertyVal('SignatureValue', '');
340
+ this.setPropertyVal('SignedName', 'true');
341
+ this.setPropertyVal('ContactInfo', 'true');
342
+ this.setPropertyVal('DataConfig', this.isDataConfigured() ? 'false' : 'true');
139
343
  }
344
+ return this.customJSON;
345
+ };
346
+ EJPDFSignature.prototype.setReportItemJson = function (reportItem) {
347
+ this.customJSON = reportItem;
140
348
  };
141
349
  EJPDFSignature.prototype.setPropertyVal = function (name, val) {
142
350
  if (this.customJSON.CustomProperties === null) {
@@ -144,18 +352,8 @@ var EJPDFSignature = (function () {
144
352
  }
145
353
  this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val));
146
354
  };
147
- EJPDFSignature.prototype.getPropertyVal = function (name) {
148
- if (this.customJSON && this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
149
- for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
150
- if (this.customJSON.CustomProperties[index].Name === name) {
151
- return this.customJSON.CustomProperties[index].Value;
152
- }
153
- }
154
- }
155
- return null;
156
- };
157
355
  EJPDFSignature.prototype.updatePropertyVal = function (propertyName, value) {
158
- if (this.customJSON && this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
356
+ if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
159
357
  for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
160
358
  if (this.customJSON.CustomProperties[index].Name === propertyName) {
161
359
  this.customJSON.CustomProperties[index].Value = value;
@@ -164,69 +362,232 @@ var EJPDFSignature = (function () {
164
362
  }
165
363
  }
166
364
  };
167
- EJPDFSignature.prototype.getReportItemJson = function () {
168
- if (this.customJSON === null) {
169
- this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
170
- this.setPropertyVal('SignatureValue', '');
171
- this.setPropertyVal('ContentEditable', 'true');
365
+ EJPDFSignature.prototype.getPropertyValue = function (customProperties, value) {
366
+ for (var index = 0; customProperties && index < customProperties.length; index++) {
367
+ if (customProperties[index].Name === value) {
368
+ return customProperties[index].Value;
369
+ }
172
370
  }
173
- return this.customJSON;
371
+ return null;
174
372
  };
175
- EJPDFSignature.prototype.setReportItemJson = function (reportItem) {
176
- this.customJSON = reportItem;
373
+ EJPDFSignature.prototype.invokeDialog = function (dlgData) {
374
+ var dlgInstance = window['SignatureDialog'].Instance;
375
+ if (dlgInstance) {
376
+ dlgInstance.openDialog(this.instance, dlgData);
377
+ }
177
378
  };
178
- EJPDFSignature.prototype.saveSign = function (isUndoRedo, imageDetails) {
179
- var imgData = imageDetails ? imageDetails.imageData : null;
180
- var prevVal = this.getPropertyVal('SignatureValue');
181
- prevVal = prevVal && prevVal.length > 0 ? 'data:image/png;base64,' + prevVal : prevVal;
182
- if (imgData) {
183
- var base64String = imgData.replace('data:image/png;base64,', '');
184
- this.updatePropertyVal('SignatureValue', base64String);
185
- this.setSign(imgData, document.getElementById(this.customJSON.Name + '_customItem_canvas'), this.customJSON.Style.BackgroundColor === 'Transparent' ? 'white' : this.customJSON.Style.BackgroundColor);
379
+ EJPDFSignature.prototype.dispose = function () {
380
+ this.customJSON = null;
381
+ this.rootElement = null;
382
+ this.customItemDiv = null;
383
+ this.instance = null;
384
+ this.customItemInstance = null;
385
+ this.designPanel = null;
386
+ };
387
+ EJPDFSignature.prototype.hasDesignerInstance = function (instance) {
388
+ return instance && instance.pluginName && instance.pluginName.toLowerCase() === 'boldreportdesigner';
389
+ };
390
+ EJPDFSignature.prototype.hasViewerInstance = function (instance) {
391
+ return instance && instance.pluginName && instance.pluginName.toLowerCase() === 'boldreportviewer';
392
+ };
393
+ EJPDFSignature.prototype.renderItemPreview = function (criModel, targetDiv, locale) {
394
+ var customProperties = criModel.CustomProperties;
395
+ var canDataConfig = this.booleanValue(this.getPropertyValue(customProperties, 'DataConfig'));
396
+ if (canDataConfig) {
397
+ var isReason = this.booleanValue(this.getPropertyValue(customProperties, 'Reason'));
398
+ var isLocation = this.booleanValue(this.getPropertyValue(customProperties, 'Location'));
399
+ var isDate = this.booleanValue(this.getPropertyValue(customProperties, 'Date'));
400
+ var isContactInfo = this.booleanValue(this.getPropertyValue(customProperties, 'ContactInfo'));
401
+ var isSignedName = this.booleanValue(this.getPropertyValue(customProperties, 'SignedName'));
402
+ var isDataPresent = isSignedName || isContactInfo || isReason || isDate || isLocation;
403
+ var imgData = criModel.ImageUrl;
404
+ var configDiv = this.buildElement('div', 'e-pdfsign-config', '', {}, { 'display': 'flex' });
405
+ var imgDiv = this.buildElement('div', 'e-pdfsign-signImg', '', {}, { 'display': 'flex', 'width': '50%', 'height': '100%' });
406
+ var editIcon = this.buildElement('span', 'e-designer-click e-rptdesigner-sign-editIcon', '', {}, { 'display': 'none' });
407
+ var base64Prefix = 'data:image/png;base64,';
408
+ var signatureData = "" + base64Prefix + imgData;
409
+ var proxy_1 = this;
410
+ imgDiv.attr('imageString', signatureData);
411
+ var callBackFn = function (imageDetails) {
412
+ proxy_1.updateSignature(imageDetails, ej.isNullOrUndefined(criModel.ItemName) ? criModel.Name : criModel.ItemName);
413
+ proxy_1.saveViewerSignature(imageDetails);
414
+ };
415
+ var dlgData = {
416
+ callBackFn: $.proxy(callBackFn, this),
417
+ locale: locale,
418
+ imageData: imgDiv.attr('imageString'),
419
+ canvas: imgDiv,
420
+ isViewerDialog: true
421
+ };
422
+ if (imgData) {
423
+ this.setSign(signatureData, imgDiv);
424
+ }
425
+ else {
426
+ this.clearSign(imgDiv);
427
+ }
428
+ configDiv.bind('mouseenter', $.proxy(this.showEditIcon, this, editIcon, customProperties));
429
+ configDiv.bind('mouseleave', $.proxy(this.hideEditIcon, this, editIcon));
430
+ editIcon.bind('click', $.proxy(this.invokeDialog, this, dlgData));
431
+ configDiv.append(imgDiv, editIcon);
432
+ if (isDataPresent) {
433
+ var dataDiv = this.buildElement('div', 'e-pdfsign-dataConfig', '', {}, { 'display': 'flex' });
434
+ if (isSignedName) {
435
+ this.appendElement(dataDiv, 'e-pdfsign-signedName', this.getLocale('signednamelabel') + ': ' + this.getLocale('signednamevalue'), isSignedName);
436
+ }
437
+ if (isContactInfo) {
438
+ this.appendElement(dataDiv, 'e-pdfsign-contactInfo', this.getLocale('contactinfolabel') + ': ' + this.getLocale('contactinfovalue'), isContactInfo);
439
+ }
440
+ if (isReason) {
441
+ this.appendElement(dataDiv, 'e-pdfsign-reason', this.getLocale('reasonlabel') + ': ' + this.getLocale('reasonvalue'), isReason);
442
+ }
443
+ if (isLocation) {
444
+ this.appendElement(dataDiv, 'e-pdfsign-location', this.getLocale('locationlabel') + ': ' + this.getLocale('designlocation'), isLocation);
445
+ }
446
+ if (isDate) {
447
+ this.appendElement(dataDiv, 'e-pdfsign-date', this.getLocale('datelabel') + ': ' + this.getFormattedDate(this.instance.model.locale), isDate);
448
+ }
449
+ configDiv.append(dataDiv);
450
+ }
451
+ $(targetDiv).append(configDiv);
186
452
  }
187
453
  else {
188
- this.clearSign(document.getElementById(this.customJSON.Name + '_customItem_canvas'));
189
- this.updatePropertyVal('SignatureValue', '');
454
+ var defaultDiv = this.buildElement('div', 'e-pdfsign-default', this.getLocale('defaulttxt'), {}, { 'display': 'flex' });
455
+ $(targetDiv).append(defaultDiv);
456
+ $(targetDiv).css({
457
+ 'border': 'none',
458
+ 'background-color': 'Transparent'
459
+ });
190
460
  }
191
- if (!isUndoRedo) {
192
- this.customItemInstance.addCustomAction('CommandAction', [{ method: 'saveSign', imageData: prevVal, propertyName: 'signature', undoRedo: false }], [{ method: 'saveSign', imageData: imgData, propertyName: 'signature', undoRedo: true }]);
461
+ };
462
+ EJPDFSignature.prototype.saveViewerSignature = function (imageDetails) {
463
+ var imgData = imageDetails != null ? imageDetails.imageData : null;
464
+ var imgDiv = imageDetails.canvasElement;
465
+ if (imgData && imgDiv) {
466
+ this.setSign(imgData, imgDiv);
467
+ imgDiv.attr('imageString', imgData);
468
+ }
469
+ else if (imgDiv) {
470
+ this.clearSign(imgDiv);
193
471
  }
194
472
  };
195
- EJPDFSignature.prototype.undoRedoAction = function (canvasInfo) {
196
- if (canvasInfo) {
197
- if (canvasInfo.propertyName && canvasInfo.propertyName.toLowerCase() === 'signature') {
198
- ej.ReportUtil.invokeMethod(this, canvasInfo.method, [canvasInfo.undoRedo, { imageData: canvasInfo.imageData }]);
199
- }
473
+ EJPDFSignature.prototype.updateSignature = function (imageDetails, reportItemName) {
474
+ if (this.hasViewerInstance(this.instance) && imageDetails.imageData && imageDetails.imageData.length > 0) {
475
+ (this.instance).doAjaxPost('POST', (this.instance)._actionUrl, JSON.stringify({
476
+ 'reportAction': 'UpdateValue',
477
+ 'modelType': 'CustomReportItemModel',
478
+ 'newValue': { 'imageData': imageDetails.imageData.replace(/^data:image\/png;base64,/, '') },
479
+ 'itemName': reportItemName
480
+ }), '_handleCustomItemError');
200
481
  }
201
482
  };
202
- EJPDFSignature.prototype.hasDesignerInstance = function (instance) {
203
- return instance && instance.pluginName && instance.pluginName.toLowerCase() === 'boldreportdesigner';
483
+ EJPDFSignature.prototype.showEditIcon = function (editIcon) {
484
+ editIcon.css('display', 'block');
204
485
  };
205
- EJPDFSignature.prototype.hasViewerInstance = function (instance) {
206
- return instance && instance.pluginName && instance.pluginName.toLowerCase() === 'boldreportviewer';
486
+ EJPDFSignature.prototype.hideEditIcon = function (editIcon) {
487
+ editIcon.css('display', 'none');
207
488
  };
208
489
  EJPDFSignature.prototype.getLocale = function (text) {
209
- var signatureLocale;
210
490
  var defaultLocale = EJPDFSignature.Locale['en-US'];
211
- if (this.instance && this.hasDesignerInstance(this.instance) && !ej.isNullOrUndefined(this.instance.model) && !ej.isNullOrUndefined(EJPDFSignature.Locale[this.instance.model.locale])) {
212
- signatureLocale = EJPDFSignature.Locale[this.instance.model.locale];
491
+ var pdfSignatureLocale;
492
+ if (this.instance && !ej.isNullOrUndefined(this.instance.model) && !ej.isNullOrUndefined(EJPDFSignature.Locale[this.instance.model.locale])) {
493
+ pdfSignatureLocale = EJPDFSignature.Locale[this.instance.model.locale];
213
494
  }
214
495
  switch (text.toLowerCase()) {
215
- case 'signature':
216
- if (signatureLocale && signatureLocale.signatureLabel) {
217
- return signatureLocale.signatureLabel;
218
- }
219
- return defaultLocale.signatureLabel;
220
496
  case 'categorybasicsettings':
221
- if (signatureLocale && signatureLocale.categoryBasicSettings) {
222
- return signatureLocale.categoryBasicSettings;
497
+ if (pdfSignatureLocale && pdfSignatureLocale.categoryBasicSettings) {
498
+ return pdfSignatureLocale.categoryBasicSettings;
223
499
  }
224
500
  return defaultLocale.categoryBasicSettings;
501
+ case 'prptyreason':
502
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.reason) {
503
+ return pdfSignatureLocale.basicSettingsLabels.reason;
504
+ }
505
+ return defaultLocale.basicSettingsLabels.reason;
506
+ case 'prptylocation':
507
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.location) {
508
+ return pdfSignatureLocale.basicSettingsLabels.location;
509
+ }
510
+ return defaultLocale.basicSettingsLabels.location;
511
+ case 'prptydate':
512
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.date) {
513
+ return pdfSignatureLocale.basicSettingsLabels.date;
514
+ }
515
+ return defaultLocale.basicSettingsLabels.date;
516
+ case 'prptysignedname':
517
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.signedName) {
518
+ return pdfSignatureLocale.basicSettingsLabels.signedName;
519
+ }
520
+ return defaultLocale.basicSettingsLabels.signedName;
521
+ case 'prptycontactinfo':
522
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.contactInfo) {
523
+ return pdfSignatureLocale.basicSettingsLabels.contactInfo;
524
+ }
525
+ return defaultLocale.basicSettingsLabels.contactInfo;
526
+ case 'showdata':
527
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.showdata) {
528
+ return pdfSignatureLocale.basicSettingsLabels.showdata;
529
+ }
530
+ return defaultLocale.basicSettingsLabels.showdata;
531
+ case 'reasonvalue':
532
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.reason) {
533
+ return pdfSignatureLocale.designPanelLabels.reason;
534
+ }
535
+ return defaultLocale.designPanelLabels.reason;
536
+ case 'locationvalue':
537
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.location) {
538
+ return pdfSignatureLocale.designPanelLabels.location;
539
+ }
540
+ return defaultLocale.designPanelLabels.location;
541
+ case 'signednamevalue':
542
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.signedName) {
543
+ return pdfSignatureLocale.designPanelLabels.signedName;
544
+ }
545
+ return defaultLocale.designPanelLabels.signedName;
546
+ case 'contactinfovalue':
547
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.contactInfo) {
548
+ return pdfSignatureLocale.designPanelLabels.contactInfo;
549
+ }
550
+ return defaultLocale.designPanelLabels.contactInfo;
551
+ case 'reasonlabel':
552
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.reasonLabel) {
553
+ return pdfSignatureLocale.designPanelLabels.reasonLabel;
554
+ }
555
+ return defaultLocale.designPanelLabels.reasonLabel;
556
+ case 'locationlabel':
557
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.locationLabel) {
558
+ return pdfSignatureLocale.designPanelLabels.locationLabel;
559
+ }
560
+ return defaultLocale.designPanelLabels.locationLabel;
561
+ case 'contactinfolabel':
562
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.contactInfoLabel) {
563
+ return pdfSignatureLocale.designPanelLabels.contactInfoLabel;
564
+ }
565
+ return defaultLocale.designPanelLabels.contactInfoLabel;
566
+ case 'signednamelabel':
567
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.signedNameLabel) {
568
+ return pdfSignatureLocale.designPanelLabels.signedNameLabel;
569
+ }
570
+ return defaultLocale.designPanelLabels.signedNameLabel;
571
+ case 'datelabel':
572
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.dateLabel) {
573
+ return pdfSignatureLocale.designPanelLabels.dateLabel;
574
+ }
575
+ return defaultLocale.designPanelLabels.dateLabel;
576
+ case 'defaulttxt':
577
+ if (pdfSignatureLocale && pdfSignatureLocale.designPanelLabels.defaultText) {
578
+ return pdfSignatureLocale.designPanelLabels.defaultText;
579
+ }
580
+ return defaultLocale.designPanelLabels.defaultText;
225
581
  case 'btndisplaytext':
226
- if (signatureLocale && signatureLocale.btnText) {
227
- return signatureLocale.btnText;
582
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.btnText) {
583
+ return pdfSignatureLocale.basicSettingsLabels.btnText;
228
584
  }
229
- return defaultLocale.btnText;
585
+ return defaultLocale.basicSettingsLabels.btnText;
586
+ case 'signature':
587
+ if (pdfSignatureLocale && pdfSignatureLocale.basicSettingsLabels.signatureLabel) {
588
+ return pdfSignatureLocale.basicSettingsLabels.signatureLabel;
589
+ }
590
+ return defaultLocale.basicSettingsLabels.signatureLabel;
230
591
  }
231
592
  return text;
232
593
  };
@@ -253,187 +614,339 @@ var EJPDFSignature = (function () {
253
614
  }
254
615
  return $(tagElement);
255
616
  };
256
- EJPDFSignature.prototype.dispose = function () {
257
- this.canvasTag = null;
258
- this.instance = null;
259
- this.customItemInstance = null;
260
- this.customItemDiv = null;
261
- this.customJSON = null;
262
- this.rootElement = null;
263
- };
264
- EJPDFSignature.prototype.renderItemPreview = function (criModel, targetDiv, locale) {
265
- var canvas = this.buildElement('canvas', '', '', {}, { width: '100%', height: '100%' });
266
- var editIcon = this.buildElement('span', 'e-designer-click e-rptdesigner-sign-editIcon', '', {}, { 'display': 'none' });
267
- var bgColor = criModel.BackgroundColor;
268
- var imgData = criModel.ImageUrl;
269
- var proxy = this;
270
- var callBackFn = function (imageDetails) {
271
- proxy.updateSignature(imageDetails, ej.isNullOrUndefined(criModel.ItemName) ? criModel.Name : criModel.ItemName);
272
- proxy.saveViewerSignature(imageDetails);
273
- };
274
- $(targetDiv).append(canvas, editIcon);
275
- $(targetDiv).bind('mouseenter', $.proxy(this.showEditIcon, this, editIcon));
276
- $(targetDiv).bind('mouseleave', $.proxy(this.hideEditIcon, this, editIcon));
277
- imgData = imgData && imgData.length > 0 ? 'data:image/png;base64,' + imgData : imgData;
278
- bgColor = bgColor === 'Transparent' ? 'white' : bgColor;
279
- this.setSign(imgData, canvas[0], bgColor);
280
- canvas.attr('imageString', imgData);
281
- var dataInfo = {
282
- callBackfn: callBackFn, locale: locale
283
- };
284
- editIcon.bind('click', $.proxy(this.invokeDialog, this, canvas, dataInfo));
285
- };
286
- EJPDFSignature.prototype.updateSignature = function (imageDetails, reportItemName) {
287
- if (this.hasViewerInstance(this.instance) && imageDetails.imageData && imageDetails.imageData.length > 0) {
288
- (this.instance).doAjaxPost('POST', (this.instance)._actionUrl, JSON.stringify({
289
- 'reportAction': 'UpdateValue',
290
- 'modelType': 'CustomReportItemModel',
291
- 'newValue': { 'imageData': imageDetails.imageData.replace(/^data:image\/png;base64,/, '') },
292
- 'itemName': reportItemName
293
- }), '_handleCustomItemError');
294
- }
295
- };
296
- EJPDFSignature.prototype.showEditIcon = function (editIcon) {
297
- editIcon.css('display', 'block');
298
- };
299
- EJPDFSignature.prototype.hideEditIcon = function (editIcon) {
300
- editIcon.css('display', 'none');
301
- };
302
- EJPDFSignature.prototype.invokeDialog = function (canvas, dataInfo) {
303
- var dlgInstance = window['SignatureDialog'].Instance;
304
- var dlgData = {
305
- callBackFn: $.proxy(dataInfo.callBackfn, this),
306
- locale: dataInfo.locale,
307
- imageData: canvas.attr('imageString'),
308
- canvas: canvas
309
- };
310
- if (this.hasViewerInstance(this.instance) && dlgInstance) {
311
- dlgInstance.openDialog(this.instance, dlgData);
312
- }
313
- };
314
- EJPDFSignature.prototype.saveViewerSignature = function (imageDetails) {
315
- var imgData = imageDetails != null ? imageDetails.imageData : null;
316
- if (imgData) {
317
- var canvas = imageDetails.canvasElement;
318
- if (canvas) {
319
- this.setSign(imgData, canvas[0], imageDetails.bgColor);
320
- $(canvas).attr('imageString', imgData);
321
- }
322
- }
323
- else {
324
- this.clearSign(imageDetails.canvasElement);
325
- }
617
+ EJPDFSignature.prototype.booleanValue = function (value) {
618
+ return value && value === true || (typeof value === 'string' && value.toLowerCase() === 'true');
326
619
  };
327
620
  return EJPDFSignature;
328
621
  }());
329
622
  EJPDFSignature.Locale = {};
330
- EJPDFSignature.Locale['ar-AE'] = {
331
- btnText: 'رسم',
332
- categoryBasicSettings: 'الإعدادات الأساسية',
333
- signatureLabel: 'التوقيع',
623
+ EJPDFSignature.Locale['en-US'] = {
624
+ categoryBasicSettings: 'Basic Settings',
625
+ basicSettingsLabels: {
626
+ reason: 'Show Reason',
627
+ location: 'Show Location',
628
+ date: 'Show Current Date',
629
+ signatureLabel: 'Signature',
630
+ btnText: 'Draw',
631
+ showdata: 'Show Data',
632
+ contactInfo: 'Show Contact Info',
633
+ signedName: 'Show Signed Name',
634
+ },
635
+ designPanelLabels: {
636
+ reason: 'Your signing reason',
637
+ location: 'Your signing location',
638
+ defaultText: 'Digital PDF Signature',
639
+ contactInfo: 'Your contact info',
640
+ signedName: 'Digitally signed by your common name',
641
+ reasonLabel: 'Reason',
642
+ locationLabel: 'Location',
643
+ contactInfoLabel: 'Contact',
644
+ signedNameLabel: 'Name',
645
+ dateLabel: 'Date'
646
+ },
334
647
  toolTip: {
335
- requirements: 'عرض أي توقيع إلكتروني للتوقيع.',
336
- description: 'يُستخدم عنصر التقرير هذا لإضافة توقيع رسومي',
337
- title: 'التوقيع'
648
+ requirements: 'Add a report item to the designer area.',
649
+ description: 'This report item is used to add a PDF signature.',
650
+ title: 'PDF Signature'
338
651
  }
339
652
  };
340
- EJPDFSignature.Locale['en-US'] = {
341
- btnText: 'Draw',
653
+ EJPDFSignature.Locale['en-AU'] = {
342
654
  categoryBasicSettings: 'Basic Settings',
343
- signatureLabel: 'Signature',
655
+ basicSettingsLabels: {
656
+ reason: 'Show Reason',
657
+ location: 'Show Location',
658
+ date: 'Show Current Date',
659
+ signatureLabel: 'Signature',
660
+ btnText: 'Draw',
661
+ showdata: 'Show Data',
662
+ contactInfo: 'Show Contact Info',
663
+ signedName: 'Show Signed Name',
664
+ },
665
+ designPanelLabels: {
666
+ reason: 'Your signed reason',
667
+ location: 'Your signed location',
668
+ defaultText: 'Digital PDF Signature',
669
+ contactInfo: 'Your contact Info',
670
+ signedName: 'Your signed Name',
671
+ reasonLabel: 'Reason',
672
+ locationLabel: 'Location',
673
+ contactInfoLabel: 'Contact',
674
+ signedNameLabel: 'Name',
675
+ dateLabel: 'Date'
676
+ },
344
677
  toolTip: {
345
- requirements: 'Display any electronic signature for signing.',
346
- description: 'This report item is used to add a graphic signature',
347
- title: 'Signature'
678
+ requirements: 'Add a report item to the designer area.',
679
+ description: 'This report item is used to add a PDF signature.',
680
+ title: 'PDF Signature'
348
681
  }
349
682
  };
350
- EJPDFSignature.Locale['fr-FR'] = {
351
- signatureLabel: 'Signature',
352
- btnText: 'Dessiner',
353
- categoryBasicSettings: 'Paramètres de base',
683
+ EJPDFSignature.Locale['en-CA'] = {
684
+ categoryBasicSettings: 'Basic Settings',
685
+ basicSettingsLabels: {
686
+ reason: 'Show Reason',
687
+ location: 'Show Location',
688
+ date: 'Show Current Date',
689
+ signatureLabel: 'Signature',
690
+ btnText: 'Draw',
691
+ showdata: 'Show Data',
692
+ contactInfo: 'Show Contact Info',
693
+ signedName: 'Show Signed Name',
694
+ },
695
+ designPanelLabels: {
696
+ reason: 'Your signed reason',
697
+ location: 'Your signed location',
698
+ defaultText: 'Digital PDF Signature',
699
+ contactInfo: 'Your contact Info',
700
+ signedName: 'Your signed Name',
701
+ reasonLabel: 'Reason',
702
+ locationLabel: 'Location',
703
+ contactInfoLabel: 'Contact',
704
+ signedNameLabel: 'Name',
705
+ dateLabel: 'Date'
706
+ },
354
707
  toolTip: {
355
- requirements: 'Afficher toute signature électronique pour la signature.',
356
- description: 'Cet élément de rapport est utilisé pour ajouter une signature graphique',
357
- title: 'Signature'
708
+ requirements: 'Add a report item to the designer area.',
709
+ description: 'This report item is used to add a PDF signature.',
710
+ title: 'PDF Signature'
358
711
  }
359
712
  };
360
713
  EJPDFSignature.Locale['de-DE'] = {
361
- signatureLabel: 'Unterschrift',
362
- btnText: 'ziehen',
363
- categoryBasicSettings: 'Grundlegende Einstellungen',
714
+ categoryBasicSettings: 'Grundeinstellungen',
715
+ basicSettingsLabels: {
716
+ reason: 'Grund anzeigen',
717
+ location: 'Ort anzeigen',
718
+ date: 'Aktuelles Datum anzeigen',
719
+ signatureLabel: 'Signatur',
720
+ btnText: 'Zeichnen',
721
+ showdata: 'Daten anzeigen',
722
+ contactInfo: 'Kontaktinfo anzeigen',
723
+ signedName: 'Unterschriebenen Namen anzeigen',
724
+ },
725
+ designPanelLabels: {
726
+ reason: 'Ihr Signiergrund',
727
+ location: 'Ihr Signierort',
728
+ defaultText: 'Digitale PDF-Signatur',
729
+ contactInfo: 'Ihre Kontaktinformationen',
730
+ signedName: 'Digital signiert von Ihrem allgemeinen Namen',
731
+ reasonLabel: 'Grund',
732
+ locationLabel: 'Ort',
733
+ contactInfoLabel: 'Kontakt',
734
+ signedNameLabel: 'Name',
735
+ dateLabel: 'Datum'
736
+ },
364
737
  toolTip: {
365
- requirements: 'Zeigen Sie alle elektronischen Signaturen für die Unterschrift an.',
366
- description: 'Dieses Element wird verwendet, um eine grafische Unterschrift hinzuzufügen.',
367
- title: 'Unterschrift'
738
+ requirements: 'Fügen Sie ein Berichtselement in den Designerbereich hinzu.',
739
+ description: 'Dieses Berichtselement wird verwendet, um eine PDF-Signatur hinzuzufügen.',
740
+ title: 'PDF-Signatur'
368
741
  }
369
742
  };
370
- EJPDFSignature.Locale['en-AU'] = {
371
- btnText: 'Draw',
372
- categoryBasicSettings: 'Basic Settings',
373
- signatureLabel: 'Signature',
743
+ EJPDFSignature.Locale['ar-AE'] = {
744
+ categoryBasicSettings: 'الإعدادات الأساسية',
745
+ basicSettingsLabels: {
746
+ reason: 'إظهار السبب',
747
+ location: 'إظهار الموقع',
748
+ date: 'إظهار التاريخ الحالي',
749
+ signatureLabel: 'التوقيع',
750
+ btnText: 'رسم',
751
+ showdata: 'إظهار البيانات',
752
+ contactInfo: 'إظهار معلومات الاتصال',
753
+ signedName: 'إظهار الاسم الموقع',
754
+ },
755
+ designPanelLabels: {
756
+ reason: 'سبب توقيعك',
757
+ location: 'موقع توقيعك',
758
+ defaultText: 'توقيع PDF رقمي',
759
+ contactInfo: 'معلومات الاتصال الخاصة بك',
760
+ signedName: 'تم التوقيع رقميًا بواسطة اسمك الشائع',
761
+ reasonLabel: 'السبب',
762
+ locationLabel: 'الموقع',
763
+ contactInfoLabel: 'الاتصال',
764
+ signedNameLabel: 'الاسم',
765
+ dateLabel: 'التاريخ'
766
+ },
374
767
  toolTip: {
375
- requirements: 'Display any electronic signature for signing.',
376
- description: 'This report item is used to add a graphic signature',
377
- title: 'Signature'
768
+ requirements: 'أضف عنصر تقرير إلى منطقة المصمم.',
769
+ description: 'يُستخدم عنصر التقرير هذا لإضافة توقيع PDF.',
770
+ title: 'توقيع PDF'
378
771
  }
379
772
  };
380
- EJPDFSignature.Locale['en-CA'] = {
381
- btnText: 'Draw',
382
- categoryBasicSettings: 'Basic Settings',
383
- signatureLabel: 'Signature',
773
+ EJPDFSignature.Locale['fr-FR'] = {
774
+ categoryBasicSettings: 'Paramètres de base',
775
+ basicSettingsLabels: {
776
+ reason: 'Afficher la raison',
777
+ location: 'Afficher le lieu',
778
+ date: 'Afficher la date actuelle',
779
+ signatureLabel: 'Signature',
780
+ btnText: 'Dessiner',
781
+ showdata: 'Afficher les données',
782
+ contactInfo: 'Afficher les informations de contact',
783
+ signedName: 'Afficher le nom signé',
784
+ },
785
+ designPanelLabels: {
786
+ reason: 'Votre raison de signature',
787
+ location: 'Votre emplacement de signature',
788
+ defaultText: 'Signature numérique PDF',
789
+ contactInfo: 'Vos informations de contact',
790
+ signedName: 'Signé numériquement par votre nom commun',
791
+ reasonLabel: 'Raison',
792
+ locationLabel: 'Emplacement',
793
+ contactInfoLabel: 'Contact',
794
+ signedNameLabel: 'Nom',
795
+ dateLabel: 'Date'
796
+ },
384
797
  toolTip: {
385
- requirements: 'Display any electronic signature for signing.',
386
- description: 'This report item is used to add a graphic signature',
387
- title: 'Signature'
798
+ requirements: 'Ajoutez un élément de rapport dans la zone de conception.',
799
+ description: 'Cet élément de rapport est utilisé pour ajouter une signature PDF.',
800
+ title: 'Signature PDF'
388
801
  }
389
802
  };
390
- EJPDFSignature.Locale['es-ES'] = {
391
- signatureLabel: 'Firma',
392
- categoryBasicSettings: 'Configuración básica',
393
- btnText: 'Dibujar',
803
+ EJPDFSignature.Locale['fr-CA'] = {
804
+ categoryBasicSettings: 'Paramètres de base',
805
+ basicSettingsLabels: {
806
+ reason: 'Afficher la raison',
807
+ location: 'Afficher l’emplacement',
808
+ date: 'Afficher la date actuelle',
809
+ signatureLabel: 'Signature',
810
+ btnText: 'Dessiner',
811
+ showdata: 'Afficher les données',
812
+ contactInfo: 'Afficher les informations de contact',
813
+ signedName: 'Afficher le nom signé',
814
+ },
815
+ designPanelLabels: {
816
+ reason: 'Votre raison de signature',
817
+ location: 'Votre emplacement de signature',
818
+ defaultText: 'Signature numérique PDF',
819
+ contactInfo: 'Vos informations de contact',
820
+ signedName: 'Signé numériquement par votre nom commun',
821
+ reasonLabel: 'Raison',
822
+ locationLabel: 'Emplacement',
823
+ contactInfoLabel: 'Contact',
824
+ signedNameLabel: 'Nom',
825
+ dateLabel: 'Date'
826
+ },
394
827
  toolTip: {
395
- requirements: 'Mostrar todas las firmas electrónicas para la firma.',
396
- description: 'Este elemento de informe se utiliza para agregar una firma gráfica.',
397
- title: 'Firma'
828
+ requirements: 'Ajoutez un élément de rapport à la zone de conception.',
829
+ description: 'Cet élément de rapport est utilisé pour ajouter une signature PDF.',
830
+ title: 'Signature PDF'
398
831
  }
399
832
  };
400
833
  EJPDFSignature.Locale['it-IT'] = {
401
- signatureLabel: 'Firma',
402
834
  categoryBasicSettings: 'Impostazioni di base',
403
- btnText: 'Disegna',
835
+ basicSettingsLabels: {
836
+ reason: 'Mostra motivo',
837
+ location: 'Mostra posizione',
838
+ date: 'Mostra data corrente',
839
+ signatureLabel: 'Firma',
840
+ btnText: 'Disegna',
841
+ showdata: 'Mostra dati',
842
+ contactInfo: 'Mostra informazioni di contatto',
843
+ signedName: 'Mostra nome firmato',
844
+ },
845
+ designPanelLabels: {
846
+ reason: 'Il motivo della tua firma',
847
+ location: 'La tua posizione di firma',
848
+ defaultText: 'Firma digitale PDF',
849
+ contactInfo: 'Le tue informazioni di contatto',
850
+ signedName: 'Firmato digitalmente dal tuo nome comune',
851
+ reasonLabel: 'Motivo',
852
+ locationLabel: 'Posizione',
853
+ contactInfoLabel: 'Contatto',
854
+ signedNameLabel: 'Nome',
855
+ dateLabel: 'Data'
856
+ },
404
857
  toolTip: {
405
- requirements: 'Mostra tutte le firme elettroniche per la firma.',
406
- description: 'Questo elemento di report viene utilizzato per aggiungere una firma grafica.',
407
- title: 'Firma'
858
+ requirements: 'Aggiungi un elemento di report all’area del designer.',
859
+ description: 'Questo elemento di report è utilizzato per aggiungere una firma PDF.',
860
+ title: 'Firma PDF'
408
861
  }
409
862
  };
410
- EJPDFSignature.Locale['fr-CA'] = {
411
- signatureLabel: 'Signature',
412
- categoryBasicSettings: 'Paramètres de base',
413
- btnText: 'Dessiner',
863
+ EJPDFSignature.Locale['es-ES'] = {
864
+ categoryBasicSettings: 'Configuración básica',
865
+ basicSettingsLabels: {
866
+ reason: 'Mostrar motivo',
867
+ location: 'Mostrar ubicación',
868
+ date: 'Mostrar fecha actual',
869
+ signatureLabel: 'Firma',
870
+ btnText: 'Dibujar',
871
+ showdata: 'Mostrar datos',
872
+ contactInfo: 'Mostrar información de contacto',
873
+ signedName: 'Mostrar nombre firmado',
874
+ },
875
+ designPanelLabels: {
876
+ reason: 'Su motivo de firma',
877
+ location: 'Su ubicación de firma',
878
+ defaultText: 'Firma digital en PDF',
879
+ contactInfo: 'Su información de contacto',
880
+ signedName: 'Firmado digitalmente por su nombre común',
881
+ reasonLabel: 'Motivo',
882
+ locationLabel: 'Ubicación',
883
+ contactInfoLabel: 'Contacto',
884
+ signedNameLabel: 'Nombre',
885
+ dateLabel: 'Fecha'
886
+ },
414
887
  toolTip: {
415
- requirements: 'Afficher toute signature électronique pour la signature.',
416
- description: 'Cet élément de rapport est utilisé pour ajouter une signature graphique',
417
- title: 'Signature'
888
+ requirements: 'Agregue un elemento de informe al área del diseñador.',
889
+ description: 'Este elemento de informe se utiliza para agregar una firma PDF.',
890
+ title: 'Firma PDF'
418
891
  }
419
892
  };
420
893
  EJPDFSignature.Locale['tr-TR'] = {
421
- signatureLabel: 'İmza',
422
894
  categoryBasicSettings: 'Temel Ayarlar',
423
- btnText: 'çizmek',
895
+ basicSettingsLabels: {
896
+ reason: 'Nedeni Göster',
897
+ location: 'Konumu Göster',
898
+ date: 'Geçerli Tarihi Göster',
899
+ signatureLabel: 'İmza',
900
+ btnText: 'Çiz',
901
+ showdata: 'Veriyi Göster',
902
+ contactInfo: 'İletişim Bilgilerini Göster',
903
+ signedName: 'İmzalanmış İsmi Göster',
904
+ },
905
+ designPanelLabels: {
906
+ reason: 'İmza nedeniniz',
907
+ location: 'İmza konumunuz',
908
+ defaultText: 'Dijital PDF İmzası',
909
+ contactInfo: 'İletişim bilgileriniz',
910
+ signedName: 'Genel adınızla dijital olarak imzalandı',
911
+ reasonLabel: 'Neden',
912
+ locationLabel: 'Konum',
913
+ contactInfoLabel: 'İletişim',
914
+ signedNameLabel: 'Ad',
915
+ dateLabel: 'Tarih'
916
+ },
424
917
  toolTip: {
425
- requirements: 'İmza için tüm elektronik imzaları göster.',
426
- description: 'Bu rapor öğesi grafiksel bir imza eklemek için kullanılır.',
427
- title: 'İmza'
918
+ requirements: 'Tasarımcı alanına bir rapor öğesi ekleyin.',
919
+ description: 'Bu rapor öğesi, bir PDF imzası eklemek için kullanılır.',
920
+ title: 'PDF İmzası'
428
921
  }
429
922
  };
430
923
  EJPDFSignature.Locale['zh-CN'] = {
431
- signatureLabel: '签名',
432
924
  categoryBasicSettings: '基本设置',
433
- btnText: '绘制签名',
925
+ basicSettingsLabels: {
926
+ reason: '显示原因',
927
+ location: '显示位置',
928
+ date: '显示当前日期',
929
+ signatureLabel: '签名',
930
+ btnText: '绘制',
931
+ showdata: '显示数据',
932
+ contactInfo: '显示联系信息',
933
+ signedName: '显示签名名称',
934
+ },
935
+ designPanelLabels: {
936
+ reason: '您的签署原因',
937
+ location: '您的签署位置',
938
+ defaultText: '数字 PDF 签名',
939
+ contactInfo: '您的联系信息',
940
+ signedName: '由您的常用名进行数字签名',
941
+ reasonLabel: '原因',
942
+ locationLabel: '位置',
943
+ contactInfoLabel: '联系方式',
944
+ signedNameLabel: '姓名',
945
+ dateLabel: '日期'
946
+ },
434
947
  toolTip: {
435
- requirements: '显示所有电子签名以进行签名。',
436
- description: '此报表项用于添加图形签名。',
437
- title: '签名'
948
+ requirements: '将报告项添加到设计区域。',
949
+ description: '此报告项用于添加 PDF 签名。',
950
+ title: 'PDF 签名'
438
951
  }
439
952
  };