@boldreports/javascript-reporting-extensions 8.1.8 → 9.1.7

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.
@@ -15,11 +15,13 @@ var EJSignature = (function () {
15
15
  args.minimumHeight = 15;
16
16
  args.minimumWidth = 90;
17
17
  };
18
- EJSignature.prototype.renderItem = function (customJson, target) {
19
- this.customJSON = customJson;
20
- this.rootElement = target;
21
- this.customItemInstance = target.data('CustomItem');
22
- this.renderSignature();
18
+ EJSignature.prototype.renderItem = function (customJson, target, eventData) {
19
+ if (eventData.eventName === 'begin') {
20
+ this.customJSON = customJson;
21
+ this.rootElement = target;
22
+ this.customItemInstance = target.data('CustomItem');
23
+ this.renderSignature();
24
+ }
23
25
  };
24
26
  EJSignature.prototype.renderSignature = function () {
25
27
  var bgColor = (this.customJSON && this.customJSON.Style) ? (this.customJSON.Style.BackgroundColor === 'Transparent' ?
@@ -91,30 +93,29 @@ var EJSignature = (function () {
91
93
  dlgInstance.openDialog(this.instance, dlgData);
92
94
  }
93
95
  };
94
- EJSignature.prototype.getPropertyGridItems = function () {
95
- var propertyItems = {
96
- 'HeaderText': this.customJSON.Name,
97
- 'PropertyType': 'sign',
98
- 'SubType': 'signature',
99
- 'IsEditHeader': true,
100
- 'Items': [{
101
- 'CategoryId': 'basicsettings',
102
- 'DisplayName': 'categoryBasicSettings',
103
- 'IsExpand': true,
104
- 'IsIgnoreCommon': true,
105
- 'Items': [{
106
- ItemId: 'signature',
107
- Name: 'signature',
108
- DisplayName: 'signature',
109
- ItemType: 'CustomBtn',
110
- IsVisible: true
111
- }]
112
- }],
113
- 'getItemProperty': {
114
- event: $.proxy(this.customAction, this), eventData: {}
115
- }
96
+ EJSignature.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: {}
116
117
  };
117
- return propertyItems;
118
+ return baseProperties;
118
119
  };
119
120
  EJSignature.prototype.setSign = function (imgData, canvas, bgColor) {
120
121
  if (canvas) {