@boldreports/javascript-reporting-extensions 6.3.29 → 6.3.31
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.
- package/package.json +1 -1
- package/signature.dialog.css +6 -15
- package/signature.dialog.js +81 -33
- package/signature.reportitem.js +9 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boldreports/javascript-reporting-extensions",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.31",
|
|
4
4
|
"description": "The Bold Reports Extensions by Syncfusion contains scripts and themes for barcode report item to be integrated in JavaScript Report Viewer and JavaScript Report Designer for enterprise web development(HTML5)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/signature.dialog.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
font-family: var(--designer-font-family);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.e-signDialog-strokeColorDiv, .e-signDialog-strokeWidthDiv
|
|
10
|
+
.e-signDialog-strokeColorDiv, .e-signDialog-strokeWidthDiv {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: space-between;
|
|
@@ -44,12 +44,14 @@
|
|
|
44
44
|
border: 2px dashed #f00;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.e-signDialog-
|
|
47
|
+
.e-signDialog-cropIconDiv {
|
|
48
48
|
background-image: url('images/cropicon.svg');
|
|
49
49
|
background-repeat: no-repeat;
|
|
50
50
|
background-position: 50% 50%;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
border: 1px solid dodgerblue;
|
|
52
|
+
border-radius: 3px;
|
|
53
|
+
height: 29px;
|
|
54
|
+
width: 42px;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.e-signDialog-canvas {
|
|
@@ -61,20 +63,9 @@
|
|
|
61
63
|
.e-signDialog-cropIcon-enable {
|
|
62
64
|
cursor: pointer;
|
|
63
65
|
background-color: lightblue;
|
|
64
|
-
pointer-events: none;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
.e-signDialog-cropIcon-disable {
|
|
68
69
|
background-color: transparent;
|
|
69
70
|
cursor: default;
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.e-signDialog-cropIconChildDiv {
|
|
74
|
-
border: 1px solid dodgerblue;
|
|
75
|
-
border-radius: 3px;
|
|
76
|
-
height: 29px;
|
|
77
|
-
width: 42px;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
71
|
}
|
package/signature.dialog.js
CHANGED
|
@@ -81,7 +81,7 @@ var SignatureDialog = (function () {
|
|
|
81
81
|
}
|
|
82
82
|
this.renderDialog();
|
|
83
83
|
this.renderBody();
|
|
84
|
-
this.
|
|
84
|
+
this.wiredEvents();
|
|
85
85
|
this.dlgInstance.show();
|
|
86
86
|
this.setSign(dialogInfo.imageData);
|
|
87
87
|
};
|
|
@@ -109,18 +109,14 @@ var SignatureDialog = (function () {
|
|
|
109
109
|
target.append(labelDiv);
|
|
110
110
|
};
|
|
111
111
|
SignatureDialog.prototype.appendCropButton = function (target) {
|
|
112
|
-
var cropBtn = this.buildElement('div', 'e-signDialog-cropIconDiv', '', {}, {});
|
|
113
|
-
var cropDiv = this.buildElement('div', 'e-signDialog-cropIconChildDiv e-signDialog-cropIcon-disable', '', {}, {});
|
|
114
|
-
var cropText = this.buildElement('span', 'e-signDialog-cropIcon', '', {}, { 'title': this.getLocale('crop') });
|
|
115
|
-
cropDiv.append(cropText);
|
|
116
|
-
cropBtn.append(cropDiv);
|
|
112
|
+
var cropBtn = this.buildElement('div', 'e-signDialog-cropIconDiv e-signDialog-cropIcon-disable', '', {}, { 'title': this.getLocale('crop'), 'aria-label': this.getLocale('arialabelcrop'), 'tabindex': '0', 'role': 'button', 'aria-disabled': 'true' });
|
|
117
113
|
cropBtn.bind('click', $.proxy(this.updateCropState, this));
|
|
118
114
|
target.append(cropBtn);
|
|
119
115
|
};
|
|
120
116
|
SignatureDialog.prototype.appendStrokeColor = function (target) {
|
|
121
117
|
var strokeColorDiv = this.buildElement('div', 'e-signDialog-strokeColorDiv', '', {}, {});
|
|
122
|
-
var strokeColorLabel = this.buildElement('span', 'e-rptdesigner-add-label e-signDialog-text-span', this.getLocale('strokeColor'), {}, { type: 'label', 'title': this.getLocale('strokeColor') });
|
|
123
|
-
var strokeColorTag = this.buildElement('div', 'e-signDialog-strokeColorTag', '', {}, {});
|
|
118
|
+
var strokeColorLabel = this.buildElement('span', 'e-rptdesigner-add-label e-signDialog-text-span', this.getLocale('strokeColor'), {}, { 'id': this.id + '_stroke_color_label', type: 'label', 'title': this.getLocale('strokeColor'), 'aria-label': this.getLocale('strokeColor') });
|
|
119
|
+
var strokeColorTag = this.buildElement('div', 'e-signDialog-strokeColorTag', '', {}, { 'aria-labelledby': this.id + '_stroke_color_label', 'tabindex': '0' });
|
|
124
120
|
var strokeColor = this.buildElement('input', 'e-signDialog-strokeColor', '', null, {});
|
|
125
121
|
this.strokeColorObj = new ejs.inputs.ColorPicker({
|
|
126
122
|
value: '#000000',
|
|
@@ -138,7 +134,7 @@ var SignatureDialog = (function () {
|
|
|
138
134
|
};
|
|
139
135
|
SignatureDialog.prototype.appendStrokeWidth = function (target) {
|
|
140
136
|
var strokeWidth = this.buildElement('div', 'e-signDialog-strokeWidthDiv', '', {}, {});
|
|
141
|
-
var drpdwnLbl = this.buildElement('span', 'e-rptdesigner-add-label e-signDialog-text-span', this.getLocale('strokeWidth'), {}, { type: 'label', 'title': this.getLocale('strokeWidth') });
|
|
137
|
+
var drpdwnLbl = this.buildElement('span', 'e-rptdesigner-add-label e-signDialog-text-span', this.getLocale('strokeWidth'), {}, { 'id': this.id + '_stroke_width_label', type: 'label', 'title': this.getLocale('strokeWidth'), 'aria-label': this.getLocale('strokeWidth') });
|
|
142
138
|
var drpdwnTag = this.buildElement('div', 'e-signDialog-drpDwnTag', '', {}, {});
|
|
143
139
|
var dropDown = this.buildElement('input', 'e-field', '', {}, { type: 'text' });
|
|
144
140
|
this.dropDownObj = new ejs.dropdowns.DropDownList({
|
|
@@ -148,10 +144,10 @@ var SignatureDialog = (function () {
|
|
|
148
144
|
value: 2,
|
|
149
145
|
enabled: true,
|
|
150
146
|
placeHolder: '2',
|
|
151
|
-
cssClass: 'e-rptdesigner-param-assign e-designer-ejwidgets e-
|
|
152
|
-
allowFiltering: true,
|
|
147
|
+
cssClass: 'e-rptdesigner-param-assign e-designer-ejwidgets e-designer-dropdownlist',
|
|
153
148
|
popupHeight: '180px',
|
|
154
|
-
change: $.proxy(this.onLineWidthChange, this)
|
|
149
|
+
change: $.proxy(this.onLineWidthChange, this),
|
|
150
|
+
htmlAttributes: { 'aria-labelledby': this.id + '_stroke_width_label' }
|
|
155
151
|
});
|
|
156
152
|
drpdwnTag.append(dropDown);
|
|
157
153
|
strokeWidth.append(drpdwnLbl, drpdwnTag);
|
|
@@ -159,9 +155,7 @@ var SignatureDialog = (function () {
|
|
|
159
155
|
target.append(strokeWidth);
|
|
160
156
|
};
|
|
161
157
|
SignatureDialog.prototype.appendClearBtn = function (target) {
|
|
162
|
-
var clearBtn = this.buildElement('div', 'e-signDialog-btn-clear', '', {}, {});
|
|
163
|
-
var textSpan = this.buildElement('span', 'e-btntxt e-rptdesigner-add-btn e-signDialog-text-span', this.getLocale('clear'), {}, { 'title': this.getLocale('clear') });
|
|
164
|
-
clearBtn.append(textSpan);
|
|
158
|
+
var clearBtn = this.buildElement('div', 'e-rptdesigner-add-btn e-signDialog-btn-clear e-signDialog-text-span', this.getLocale('clear'), {}, { 'title': this.getLocale('clear'), 'aria-label': this.getLocale('arialabelclear'), 'tabindex': '0', 'role': 'button' });
|
|
165
159
|
clearBtn.bind('click', $.proxy(this.clearSignature, this));
|
|
166
160
|
target.append(clearBtn);
|
|
167
161
|
};
|
|
@@ -178,6 +172,8 @@ var SignatureDialog = (function () {
|
|
|
178
172
|
canvas.className = 'e-signDialog-canvas';
|
|
179
173
|
canvas.width = this.initialWdth;
|
|
180
174
|
canvas.height = this.initialHgt;
|
|
175
|
+
canvas.setAttribute('tabindex', '0');
|
|
176
|
+
canvas.setAttribute('aria-label', this.getLocale('arialabelcanvas'));
|
|
181
177
|
context.lineWidth = 2;
|
|
182
178
|
context.strokeStyle = '#000000';
|
|
183
179
|
canvasContDiv.append(canvas, cropBox);
|
|
@@ -237,11 +233,12 @@ var SignatureDialog = (function () {
|
|
|
237
233
|
};
|
|
238
234
|
SignatureDialog.prototype.enableCropIcon = function () {
|
|
239
235
|
var cropBox = this.container.find('.e-signDialog-cropBox');
|
|
240
|
-
var cropDiv = this.container.find('.e-signDialog-
|
|
236
|
+
var cropDiv = this.container.find('.e-signDialog-cropIconDiv');
|
|
241
237
|
if (cropBox.hasClass('crop-disable')) {
|
|
242
238
|
cropBox.removeClass('crop-disable');
|
|
243
239
|
cropBox.addClass('crop-enable');
|
|
244
240
|
cropDiv.removeClass('e-signDialog-cropIcon-disable');
|
|
241
|
+
cropDiv.attr('aria-disabled', 'false');
|
|
245
242
|
cropDiv.addClass('e-signDialog-cropIcon-enable');
|
|
246
243
|
var canvas = this.container.find('#' + this.id + '_signDialog_canvas')[0];
|
|
247
244
|
if (canvas) {
|
|
@@ -252,13 +249,14 @@ var SignatureDialog = (function () {
|
|
|
252
249
|
};
|
|
253
250
|
SignatureDialog.prototype.disableCropIcon = function () {
|
|
254
251
|
var canvas = this.container.find('#' + this.id + '_signDialog_canvas')[0];
|
|
255
|
-
var cropDiv = this.container.find('.e-signDialog-
|
|
252
|
+
var cropDiv = this.container.find('.e-signDialog-cropIconDiv');
|
|
256
253
|
var cropBox = this.container.find('.e-signDialog-cropBox');
|
|
257
254
|
if (cropBox.hasClass('crop-enable')) {
|
|
258
255
|
cropBox.removeClass('crop-enable');
|
|
259
256
|
cropBox.addClass('crop-disable');
|
|
260
257
|
cropDiv.addClass('e-signDialog-cropIcon-disable');
|
|
261
258
|
cropDiv.removeClass('e-signDialog-cropIcon-enable');
|
|
259
|
+
cropDiv.attr('aria-disabled', 'true');
|
|
262
260
|
}
|
|
263
261
|
cropBox.css({ width: '0px', height: '0px', display: 'none' });
|
|
264
262
|
canvas.style.cursor = 'default';
|
|
@@ -374,7 +372,8 @@ var SignatureDialog = (function () {
|
|
|
374
372
|
width: '0px',
|
|
375
373
|
height: '0px',
|
|
376
374
|
left: this.cropStartX + "px",
|
|
377
|
-
top: this.cropStartY + "px"
|
|
375
|
+
top: this.cropStartY + "px",
|
|
376
|
+
pointerEvents: 'none'
|
|
378
377
|
});
|
|
379
378
|
}
|
|
380
379
|
};
|
|
@@ -408,7 +407,8 @@ var SignatureDialog = (function () {
|
|
|
408
407
|
width: Math.abs(currentX - this.cropStartX) + "px",
|
|
409
408
|
height: Math.abs(currentY - this.cropStartY) + "px",
|
|
410
409
|
left: Math.min(this.cropStartX, currentX) + "px",
|
|
411
|
-
top: Math.min(this.cropStartY, currentY) + "px"
|
|
410
|
+
top: Math.min(this.cropStartY, currentY) + "px",
|
|
411
|
+
pointerEvents: 'none'
|
|
412
412
|
});
|
|
413
413
|
};
|
|
414
414
|
SignatureDialog.prototype.clearSignature = function () {
|
|
@@ -440,7 +440,7 @@ var SignatureDialog = (function () {
|
|
|
440
440
|
this.dlgInstance.hide();
|
|
441
441
|
};
|
|
442
442
|
SignatureDialog.prototype.resetValues = function () {
|
|
443
|
-
this.
|
|
443
|
+
this.unwiredEvents();
|
|
444
444
|
if (this.hasViewerInstance(this.instance)) {
|
|
445
445
|
this.instance._destroyEJ2Objects(this.container.find('.e-dlg-content .e-signDialog-root-container'));
|
|
446
446
|
}
|
|
@@ -458,7 +458,7 @@ var SignatureDialog = (function () {
|
|
|
458
458
|
};
|
|
459
459
|
SignatureDialog.prototype.updateSize = function () {
|
|
460
460
|
};
|
|
461
|
-
SignatureDialog.prototype.
|
|
461
|
+
SignatureDialog.prototype.wiredEvents = function () {
|
|
462
462
|
var canvas = this.container.find('#' + this.id + '_signDialog_canvas')[0];
|
|
463
463
|
canvas.addEventListener('mousedown', $.proxy(this.onMouseDown, this));
|
|
464
464
|
canvas.addEventListener('mousemove', $.proxy(this.onMouseMove, this));
|
|
@@ -469,7 +469,7 @@ var SignatureDialog = (function () {
|
|
|
469
469
|
canvas.addEventListener('touchmove', $.proxy(this.onMouseMove, this));
|
|
470
470
|
canvas.addEventListener('touchend', $.proxy(this.onMouseUp, this));
|
|
471
471
|
};
|
|
472
|
-
SignatureDialog.prototype.
|
|
472
|
+
SignatureDialog.prototype.unwiredEvents = function () {
|
|
473
473
|
var canvas = this.container.find('#' + this.id + '_signDialog_canvas')[0];
|
|
474
474
|
canvas.removeEventListener('mousedown', $.proxy(this.onMouseDown, this));
|
|
475
475
|
canvas.removeEventListener('mousemove', $.proxy(this.onMouseMove, this));
|
|
@@ -527,6 +527,21 @@ var SignatureDialog = (function () {
|
|
|
527
527
|
return locale.crop;
|
|
528
528
|
}
|
|
529
529
|
return defaultLocale.crop;
|
|
530
|
+
case 'arialabelcanvas':
|
|
531
|
+
if (locale && locale.ariaLabelCanvas) {
|
|
532
|
+
return locale.ariaLabelCanvas;
|
|
533
|
+
}
|
|
534
|
+
return defaultLocale.ariaLabelCanvas;
|
|
535
|
+
case 'arialabelcrop':
|
|
536
|
+
if (locale && locale.ariaLabelCrop) {
|
|
537
|
+
return locale.ariaLabelCrop;
|
|
538
|
+
}
|
|
539
|
+
return defaultLocale.ariaLabelCrop;
|
|
540
|
+
case 'arialabelclear':
|
|
541
|
+
if (locale && locale.ariaLabelClear) {
|
|
542
|
+
return locale.ariaLabelClear;
|
|
543
|
+
}
|
|
544
|
+
return defaultLocale.ariaLabelClear;
|
|
530
545
|
}
|
|
531
546
|
return text;
|
|
532
547
|
};
|
|
@@ -633,7 +648,10 @@ SignatureDialog.Locale['en-US'] = {
|
|
|
633
648
|
title: 'Signature',
|
|
634
649
|
strokeColor: 'Stroke Color',
|
|
635
650
|
strokeWidth: 'Stroke Width',
|
|
636
|
-
crop: 'Crop'
|
|
651
|
+
crop: 'Crop',
|
|
652
|
+
ariaLabelCanvas: 'Canvas area to draw your signature',
|
|
653
|
+
ariaLabelCrop: 'Crop the signature',
|
|
654
|
+
ariaLabelClear: 'Clear the signature'
|
|
637
655
|
};
|
|
638
656
|
SignatureDialog.Locale['ar-AE'] = {
|
|
639
657
|
cancel: 'إلغاء',
|
|
@@ -643,7 +661,10 @@ SignatureDialog.Locale['ar-AE'] = {
|
|
|
643
661
|
title: 'التوقيع',
|
|
644
662
|
strokeColor: 'لون الخط',
|
|
645
663
|
strokeWidth: 'عرض الخط',
|
|
646
|
-
crop: 'اقتصاص'
|
|
664
|
+
crop: 'اقتصاص',
|
|
665
|
+
ariaLabelCanvas: 'منطقة اللوحة لرسم توقيعك',
|
|
666
|
+
ariaLabelCrop: 'قص التوقيع',
|
|
667
|
+
ariaLabelClear: 'مسح التوقيع'
|
|
647
668
|
};
|
|
648
669
|
SignatureDialog.Locale['fr-FR'] = {
|
|
649
670
|
cancel: 'Annuler',
|
|
@@ -653,7 +674,10 @@ SignatureDialog.Locale['fr-FR'] = {
|
|
|
653
674
|
clear: 'Effacer',
|
|
654
675
|
strokeColor: 'Couleur du trait',
|
|
655
676
|
strokeWidth: 'Épaisseur du trait',
|
|
656
|
-
crop: 'Recadrer'
|
|
677
|
+
crop: 'Recadrer',
|
|
678
|
+
ariaLabelCanvas: 'Zone de toile pour dessiner votre signature',
|
|
679
|
+
ariaLabelCrop: 'Rogner la signature',
|
|
680
|
+
ariaLabelClear: 'Effacer la signature'
|
|
657
681
|
};
|
|
658
682
|
SignatureDialog.Locale['de-DE'] = {
|
|
659
683
|
cancel: 'Abbrechen',
|
|
@@ -663,7 +687,10 @@ SignatureDialog.Locale['de-DE'] = {
|
|
|
663
687
|
clear: 'Löschen',
|
|
664
688
|
strokeColor: 'Strichfarbe',
|
|
665
689
|
strokeWidth: 'Strichstärke',
|
|
666
|
-
crop: 'Zuschneiden'
|
|
690
|
+
crop: 'Zuschneiden',
|
|
691
|
+
ariaLabelCanvas: 'Leinwandbereich zum Zeichnen Ihrer Unterschrift',
|
|
692
|
+
ariaLabelCrop: 'Unterschrift zuschneiden',
|
|
693
|
+
ariaLabelClear: 'Unterschrift löschen'
|
|
667
694
|
};
|
|
668
695
|
SignatureDialog.Locale['en-AU'] = {
|
|
669
696
|
cancel: 'Cancel',
|
|
@@ -673,7 +700,10 @@ SignatureDialog.Locale['en-AU'] = {
|
|
|
673
700
|
title: 'Signature',
|
|
674
701
|
strokeColor: 'Stroke Color',
|
|
675
702
|
strokeWidth: 'Stroke Width',
|
|
676
|
-
crop: 'Crop'
|
|
703
|
+
crop: 'Crop',
|
|
704
|
+
ariaLabelCanvas: 'Canvas area to draw your signature',
|
|
705
|
+
ariaLabelCrop: 'Crop the signature',
|
|
706
|
+
ariaLabelClear: 'Clear the signature'
|
|
677
707
|
};
|
|
678
708
|
SignatureDialog.Locale['en-CA'] = {
|
|
679
709
|
cancel: 'Cancel',
|
|
@@ -683,7 +713,10 @@ SignatureDialog.Locale['en-CA'] = {
|
|
|
683
713
|
title: 'Signature',
|
|
684
714
|
strokeColor: 'Stroke Color',
|
|
685
715
|
strokeWidth: 'Stroke Width',
|
|
686
|
-
crop: 'Crop'
|
|
716
|
+
crop: 'Crop',
|
|
717
|
+
ariaLabelCanvas: 'Canvas area to draw your signature',
|
|
718
|
+
ariaLabelCrop: 'Crop the signature',
|
|
719
|
+
ariaLabelClear: 'Clear the signature'
|
|
687
720
|
};
|
|
688
721
|
SignatureDialog.Locale['it-IT'] = {
|
|
689
722
|
cancel: 'Annulla',
|
|
@@ -693,7 +726,10 @@ SignatureDialog.Locale['it-IT'] = {
|
|
|
693
726
|
clear: 'Cancella',
|
|
694
727
|
strokeColor: 'Colore tratto',
|
|
695
728
|
strokeWidth: 'Spessore tratto',
|
|
696
|
-
crop: 'Ritaglia'
|
|
729
|
+
crop: 'Ritaglia',
|
|
730
|
+
ariaLabelCanvas: 'Area della tela per disegnare la tua firma',
|
|
731
|
+
ariaLabelCrop: 'Ritaglia la firma',
|
|
732
|
+
ariaLabelClear: 'Cancella la firma'
|
|
697
733
|
};
|
|
698
734
|
SignatureDialog.Locale['es-ES'] = {
|
|
699
735
|
cancel: 'Cancelar',
|
|
@@ -703,7 +739,10 @@ SignatureDialog.Locale['es-ES'] = {
|
|
|
703
739
|
clear: 'Borrar',
|
|
704
740
|
strokeColor: 'Color del trazo',
|
|
705
741
|
strokeWidth: 'Ancho del trazo',
|
|
706
|
-
crop: 'Recortar'
|
|
742
|
+
crop: 'Recortar',
|
|
743
|
+
ariaLabelCanvas: 'Área de lienzo para dibujar tu firma',
|
|
744
|
+
ariaLabelCrop: 'Recortar la firma',
|
|
745
|
+
ariaLabelClear: 'Borrar la firma'
|
|
707
746
|
};
|
|
708
747
|
SignatureDialog.Locale['fr-CA'] = {
|
|
709
748
|
cancel: 'Annuler',
|
|
@@ -713,7 +752,10 @@ SignatureDialog.Locale['fr-CA'] = {
|
|
|
713
752
|
clear: 'Effacer',
|
|
714
753
|
strokeColor: 'Couleur du trait',
|
|
715
754
|
strokeWidth: 'Épaisseur du trait',
|
|
716
|
-
crop: 'Recadrer'
|
|
755
|
+
crop: 'Recadrer',
|
|
756
|
+
ariaLabelCanvas: 'Zone de canevas pour dessiner votre signature',
|
|
757
|
+
ariaLabelCrop: 'Recadrer la signature',
|
|
758
|
+
ariaLabelClear: 'Effacer la signature'
|
|
717
759
|
};
|
|
718
760
|
SignatureDialog.Locale['tr-TR'] = {
|
|
719
761
|
cancel: 'İptal',
|
|
@@ -723,7 +765,10 @@ SignatureDialog.Locale['tr-TR'] = {
|
|
|
723
765
|
clear: 'Temizle',
|
|
724
766
|
strokeColor: 'Çizgi Rengi',
|
|
725
767
|
strokeWidth: 'Çizgi Kalınlığı',
|
|
726
|
-
crop: 'Kırp'
|
|
768
|
+
crop: 'Kırp',
|
|
769
|
+
ariaLabelCanvas: 'İmzanızı çizmek için tuval alanı',
|
|
770
|
+
ariaLabelCrop: 'İmzayı kırp',
|
|
771
|
+
ariaLabelClear: 'İmzayı temizle'
|
|
727
772
|
};
|
|
728
773
|
SignatureDialog.Locale['zh-CN'] = {
|
|
729
774
|
cancel: '取消',
|
|
@@ -733,5 +778,8 @@ SignatureDialog.Locale['zh-CN'] = {
|
|
|
733
778
|
clear: '清除',
|
|
734
779
|
strokeColor: '笔触颜色',
|
|
735
780
|
strokeWidth: '笔触宽度',
|
|
736
|
-
crop: '裁剪'
|
|
781
|
+
crop: '裁剪',
|
|
782
|
+
ariaLabelCanvas: '签名绘制区域',
|
|
783
|
+
ariaLabelCrop: '裁剪签名',
|
|
784
|
+
ariaLabelClear: '清除签名'
|
|
737
785
|
};
|
package/signature.reportitem.js
CHANGED
|
@@ -22,12 +22,12 @@ var EJSignature = (function () {
|
|
|
22
22
|
this.renderSignature();
|
|
23
23
|
};
|
|
24
24
|
EJSignature.prototype.renderSignature = function () {
|
|
25
|
-
this.customItemDiv = this.buildElement('div', 'customitem e-rptdesigner-customItem-sign', '', {}, {});
|
|
26
|
-
this.canvasTag = this.buildElement('canvas', '', '', { id: this.customJSON.Name + '_customItem_canvas' }, { width: '100%', height: '100%' });
|
|
27
|
-
this.customItemDiv.append(this.canvasTag);
|
|
28
|
-
this.rootElement.append(this.customItemDiv);
|
|
29
25
|
var bgColor = (this.customJSON && this.customJSON.Style) ? (this.customJSON.Style.BackgroundColor === 'Transparent' ?
|
|
30
26
|
'white' : this.customJSON.Style.BackgroundColor) : 'white';
|
|
27
|
+
this.customItemDiv = this.buildElement('div', 'customitem e-rptdesigner-customItem-sign', '', { 'id': this.customJSON.Name + '_customItem' }, { 'background-color': bgColor });
|
|
28
|
+
this.canvasTag = this.buildElement('canvas', '', '', { 'id': this.customJSON.Name + '_customItem_canvas' }, { width: '100%', height: '100%' });
|
|
29
|
+
this.customItemDiv.append(this.canvasTag);
|
|
30
|
+
this.rootElement.append(this.customItemDiv);
|
|
31
31
|
var imgData = this.getPropertyVal('SignatureValue');
|
|
32
32
|
imgData = imgData && imgData.length > 0 ? 'data:image/png;base64,' + imgData : imgData;
|
|
33
33
|
this.setSign(imgData, document.getElementById(this.customJSON.Name + '_customItem_canvas'), bgColor);
|
|
@@ -39,7 +39,9 @@ var EJSignature = (function () {
|
|
|
39
39
|
}
|
|
40
40
|
switch (name.toLowerCase()) {
|
|
41
41
|
case 'backgroundcolor':
|
|
42
|
-
|
|
42
|
+
var bgColor = newValue === 'Transparent' ? 'white' : newValue;
|
|
43
|
+
this.customItemDiv.css('background-color', bgColor);
|
|
44
|
+
this.canvasTag.css('background-color', bgColor);
|
|
43
45
|
break;
|
|
44
46
|
}
|
|
45
47
|
};
|
|
@@ -62,26 +64,16 @@ var EJSignature = (function () {
|
|
|
62
64
|
width: width,
|
|
63
65
|
height: height
|
|
64
66
|
});
|
|
65
|
-
this.canvasTag.css({
|
|
66
|
-
width: width,
|
|
67
|
-
height: height
|
|
68
|
-
});
|
|
69
67
|
}
|
|
70
68
|
else if (!ej.isNullOrUndefined(height) && ej.isNullOrUndefined(width)) {
|
|
71
69
|
this.customItemDiv.css({
|
|
72
70
|
height: height
|
|
73
71
|
});
|
|
74
|
-
this.canvasTag.css({
|
|
75
|
-
height: height
|
|
76
|
-
});
|
|
77
72
|
}
|
|
78
73
|
else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
|
|
79
74
|
this.customItemDiv.css({
|
|
80
75
|
width: width
|
|
81
76
|
});
|
|
82
|
-
this.canvasTag.css({
|
|
83
|
-
width: width
|
|
84
|
-
});
|
|
85
77
|
}
|
|
86
78
|
this.setSign(imgData, document.getElementById(this.customJSON.Name + '_customItem_canvas'), this.customJSON.Style.BackgroundColor === 'Transparent' ? 'white' : this.customJSON.Style.BackgroundColor);
|
|
87
79
|
};
|
|
@@ -152,7 +144,7 @@ var EJSignature = (function () {
|
|
|
152
144
|
this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val));
|
|
153
145
|
};
|
|
154
146
|
EJSignature.prototype.getPropertyVal = function (name) {
|
|
155
|
-
if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
|
|
147
|
+
if (this.customJSON && this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
|
|
156
148
|
for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
|
|
157
149
|
if (this.customJSON.CustomProperties[index].Name === name) {
|
|
158
150
|
return this.customJSON.CustomProperties[index].Value;
|
|
@@ -162,7 +154,7 @@ var EJSignature = (function () {
|
|
|
162
154
|
return null;
|
|
163
155
|
};
|
|
164
156
|
EJSignature.prototype.updatePropertyVal = function (propertyName, value) {
|
|
165
|
-
if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
|
|
157
|
+
if (this.customJSON && this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
|
|
166
158
|
for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
|
|
167
159
|
if (this.customJSON.CustomProperties[index].Name === propertyName) {
|
|
168
160
|
this.customJSON.CustomProperties[index].Value = value;
|