Skip to content

Commit 7decaaf

Browse files
committed
Merge branch 'release/0.13.1' into master
2 parents b8b7495 + 4673082 commit 7decaaf

File tree

8 files changed

+123
-55
lines changed

8 files changed

+123
-55
lines changed

.travis.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ language: node_js
33
sudo: false
44

55
node_js:
6-
- "0.12"
6+
- '0.12'
77

88
before_script:
9-
- "npm update -g npm"
10-
- "export DISPLAY=:99.0"
11-
- "sh -e /etc/init.d/xvfb start"
12-
- "npm install -g grunt-cli"
9+
- export DISPLAY=:99.0
10+
- sh -e /etc/init.d/xvfb start
11+
- npm install -g grunt-cli
12+
13+
notifications:
14+
email: false
15+
slack:
16+
secure: RVZTvjJhyjbZ+z7D7enUNWMBuHW6It9+33ArMcO1RbfuwzlA5aeQl+PnpDNNYITnEig1xOoSs4blBj7rLSJlC9xigLS8qzsE8Q+SLY6dvXRZ6l0dmIaduwijO0f5sPsd2neoDN3fFihlWhQKBuU/+3R9zRTfma3PS0nU1x5yHnM=
17+
on_failure: change
18+
on_success: change

demo/build/app.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
3838
}
3939
config.$inject = ['$sceDelegateProvider', '$httpProvider', '$stateProvider', '$compileProvider', '$urlRouterProvider', 'demoMapProvider'];
4040

41-
app.constant('version', 'v0.13.0');
41+
app.constant('version', 'v0.13.1');
4242
app.config(config);
4343

4444
angular.element(document).ready(function() {
@@ -253,123 +253,123 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
253253
module.exports = {
254254
'intro': {
255255
'simple-example': {
256-
url: getUrl('nudumu/4'),
256+
url: getUrl('nudumu/6'),
257257
title: 'Simple example',
258258
description: 'Simple example'
259259
},
260260
'full-featured-demo': {
261-
url: getUrl('xezevi/3'),
261+
url: getUrl('xezevi/4'),
262262
title: 'Full featured demo',
263263
description: 'Full featured demo'
264264
}
265265
},
266266
'configuration': {
267267
'configuration-by-object': {
268-
url: getUrl('getazu/3'),
268+
url: getUrl('getazu/4'),
269269
title: 'By `settings` object',
270270
description: 'Configuration by setting `settings` object'
271271
},
272272
'configuration-declarative-way': {
273-
url: getUrl('jupeme/3'),
273+
url: getUrl('jupeme/4'),
274274
title: 'In declarative way',
275275
description: 'Configuration in declarative way'
276276
}
277277
},
278278
'columns': {
279279
'add-remove-column-ng-repeat': {
280-
url: getUrl('muluto/4'),
280+
url: getUrl('muluto/5'),
281281
title: 'Add/Remove (ng-repeat)',
282282
description: 'Add/Remove columns using ng-repeat'
283283
},
284284
'add-remove-column-by-attr': {
285-
url: getUrl('xayeru/3'),
285+
url: getUrl('xayeru/4'),
286286
title: 'Add/Remove (`columns` attribute)',
287287
description: 'Add/Remove columns using `columns` attribute'
288288
}
289289
},
290290
'binding': {
291291
'data-binding': {
292-
url: getUrl('lupile/4'),
292+
url: getUrl('lupile/5'),
293293
title: 'Data binding',
294294
description: 'Data binding'
295295
},
296296
'settings-binding': {
297-
url: getUrl('xaqasi/3'),
297+
url: getUrl('xaqasi/4'),
298298
title: 'Table settings binding',
299299
description: 'Table settings binding'
300300
}
301301
},
302302
'callbacks': {
303303
'callbacks-by-object': {
304-
url: getUrl('nayito/5', 'html,js,console,output'),
304+
url: getUrl('nayito/7', 'html,js,console,output'),
305305
title: 'By `settings` object',
306306
description: 'Listening callbacks using `settings` object'
307307
},
308308
'callbacks-declarative-way': {
309-
url: getUrl('pucale/4', 'html,js,console,output'),
309+
url: getUrl('pucale/5', 'html,js,console,output'),
310310
title: 'In declarative way',
311311
description: 'Listening callbacks in declarative way'
312312
}
313313
},
314314
'plugins': {
315315
'copy-paste-context-menu': {
316-
url: getUrl('zohoge/2'),
316+
url: getUrl('zohoge/3'),
317317
title: 'Enable copy/paste in context menu',
318318
description: 'Enable copy/paste in context menu'
319319
}
320320
},
321321
'pagination': {
322322
'rows-pagination': {
323-
url: getUrl('fohohenabo/1'),
323+
url: getUrl('rorozo/1'),
324324
title: 'Paginate rows',
325325
description: 'Paginate rows'
326326
},
327327
'columns-pagination': {
328-
url: getUrl('qudufogafu/1'),
328+
url: getUrl('kolerig/1'),
329329
title: 'Paginate columns',
330330
description: 'Paginate columns'
331331
},
332332
},
333333
'other': {
334334
'access-to-instance': {
335-
url: getUrl('fovoxu/4'),
335+
url: getUrl('fovoxu/5'),
336336
title: 'Access to Handsontable instance',
337337
description: 'Access to Handsontable instance'
338338
},
339339
'custom-validator': {
340-
url: getUrl('qoweju/3'),
340+
url: getUrl('qoweju/4'),
341341
title: 'Custom validator',
342342
description: 'Custom validator'
343343
},
344344
'custom-renderer': {
345-
url: getUrl('locome/2'),
345+
url: getUrl('locome/3'),
346346
title: 'Custom renderer',
347347
description: 'Custom renderer'
348348
},
349349
},
350350
'PRO': {
351351
'collapsing-columns-with-nested-headers': {
352-
url: getUrl('wilani/3'),
352+
url: getUrl('wilani/4'),
353353
title: 'Collapsing columns with nested headers',
354354
description: 'Create a nested, hierarchical structure of headers with expandable and collapsible columns'
355355
},
356356
'filtering-simple': {
357-
url: getUrl('fijida/3'),
357+
url: getUrl('fijida/4'),
358358
title: 'Data filtering (simple example)',
359359
description: 'Display rows that meet your criteria and hide the rest'
360360
},
361361
'filtering-external-inputs': {
362-
url: getUrl('rewefa/9'),
362+
url: getUrl('rewefa/10'),
363363
title: 'Data filtering (external inputs)',
364364
description: 'Display rows that meet your criteria and hide the rest'
365365
},
366366
'hiding-columns': {
367-
url: getUrl('wapufa/2'),
367+
url: getUrl('wapufa/3'),
368368
title: 'Hiding columns',
369369
description: 'Hide specific columns and show the rest'
370370
},
371371
'hiding-rows': {
372-
url: getUrl('roximi/3'),
372+
url: getUrl('roximi/4'),
373373
title: 'Hiding rows',
374374
description: 'Hide specific rows and show the rest'
375375
},

demo/js/demos.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,123 +12,123 @@
1212
module.exports = {
1313
'intro': {
1414
'simple-example': {
15-
url: getUrl('nudumu/4'),
15+
url: getUrl('nudumu/6'),
1616
title: 'Simple example',
1717
description: 'Simple example'
1818
},
1919
'full-featured-demo': {
20-
url: getUrl('xezevi/3'),
20+
url: getUrl('xezevi/4'),
2121
title: 'Full featured demo',
2222
description: 'Full featured demo'
2323
}
2424
},
2525
'configuration': {
2626
'configuration-by-object': {
27-
url: getUrl('getazu/3'),
27+
url: getUrl('getazu/4'),
2828
title: 'By `settings` object',
2929
description: 'Configuration by setting `settings` object'
3030
},
3131
'configuration-declarative-way': {
32-
url: getUrl('jupeme/3'),
32+
url: getUrl('jupeme/4'),
3333
title: 'In declarative way',
3434
description: 'Configuration in declarative way'
3535
}
3636
},
3737
'columns': {
3838
'add-remove-column-ng-repeat': {
39-
url: getUrl('muluto/4'),
39+
url: getUrl('muluto/5'),
4040
title: 'Add/Remove (ng-repeat)',
4141
description: 'Add/Remove columns using ng-repeat'
4242
},
4343
'add-remove-column-by-attr': {
44-
url: getUrl('xayeru/3'),
44+
url: getUrl('xayeru/4'),
4545
title: 'Add/Remove (`columns` attribute)',
4646
description: 'Add/Remove columns using `columns` attribute'
4747
}
4848
},
4949
'binding': {
5050
'data-binding': {
51-
url: getUrl('lupile/4'),
51+
url: getUrl('lupile/5'),
5252
title: 'Data binding',
5353
description: 'Data binding'
5454
},
5555
'settings-binding': {
56-
url: getUrl('xaqasi/3'),
56+
url: getUrl('xaqasi/4'),
5757
title: 'Table settings binding',
5858
description: 'Table settings binding'
5959
}
6060
},
6161
'callbacks': {
6262
'callbacks-by-object': {
63-
url: getUrl('nayito/5', 'html,js,console,output'),
63+
url: getUrl('nayito/7', 'html,js,console,output'),
6464
title: 'By `settings` object',
6565
description: 'Listening callbacks using `settings` object'
6666
},
6767
'callbacks-declarative-way': {
68-
url: getUrl('pucale/4', 'html,js,console,output'),
68+
url: getUrl('pucale/5', 'html,js,console,output'),
6969
title: 'In declarative way',
7070
description: 'Listening callbacks in declarative way'
7171
}
7272
},
7373
'plugins': {
7474
'copy-paste-context-menu': {
75-
url: getUrl('zohoge/2'),
75+
url: getUrl('zohoge/3'),
7676
title: 'Enable copy/paste in context menu',
7777
description: 'Enable copy/paste in context menu'
7878
}
7979
},
8080
'pagination': {
8181
'rows-pagination': {
82-
url: getUrl('fohohenabo/1'),
82+
url: getUrl('rorozo/1'),
8383
title: 'Paginate rows',
8484
description: 'Paginate rows'
8585
},
8686
'columns-pagination': {
87-
url: getUrl('qudufogafu/1'),
87+
url: getUrl('kolerig/1'),
8888
title: 'Paginate columns',
8989
description: 'Paginate columns'
9090
},
9191
},
9292
'other': {
9393
'access-to-instance': {
94-
url: getUrl('fovoxu/4'),
94+
url: getUrl('fovoxu/5'),
9595
title: 'Access to Handsontable instance',
9696
description: 'Access to Handsontable instance'
9797
},
9898
'custom-validator': {
99-
url: getUrl('qoweju/3'),
99+
url: getUrl('qoweju/4'),
100100
title: 'Custom validator',
101101
description: 'Custom validator'
102102
},
103103
'custom-renderer': {
104-
url: getUrl('locome/2'),
104+
url: getUrl('locome/3'),
105105
title: 'Custom renderer',
106106
description: 'Custom renderer'
107107
},
108108
},
109109
'PRO': {
110110
'collapsing-columns-with-nested-headers': {
111-
url: getUrl('wilani/3'),
111+
url: getUrl('wilani/4'),
112112
title: 'Collapsing columns with nested headers',
113113
description: 'Create a nested, hierarchical structure of headers with expandable and collapsible columns'
114114
},
115115
'filtering-simple': {
116-
url: getUrl('fijida/3'),
116+
url: getUrl('fijida/4'),
117117
title: 'Data filtering (simple example)',
118118
description: 'Display rows that meet your criteria and hide the rest'
119119
},
120120
'filtering-external-inputs': {
121-
url: getUrl('rewefa/9'),
121+
url: getUrl('rewefa/10'),
122122
title: 'Data filtering (external inputs)',
123123
description: 'Display rows that meet your criteria and hide the rest'
124124
},
125125
'hiding-columns': {
126-
url: getUrl('wapufa/2'),
126+
url: getUrl('wapufa/3'),
127127
title: 'Hiding columns',
128128
description: 'Hide specific columns and show the rest'
129129
},
130130
'hiding-rows': {
131-
url: getUrl('roximi/3'),
131+
url: getUrl('roximi/4'),
132132
title: 'Hiding rows',
133133
description: 'Hide specific rows and show the rest'
134134
},

dist/ngHandsontable.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* ng-handsontable 0.13.0
2+
* ng-handsontable 0.13.1
33
*
44
* Copyright 2012-2015 Marcin Warpechowski
55
* Copyright 2015 Handsoncode sp. z o.o. <hello@handsontable.com>
66
* Licensed under the MIT license.
77
* https://github.com/handsontable/ngHandsontable
8-
* Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST)
8+
* Date: Thu Aug 20 2020 11:07:09 GMT+0200 (CEST)
99
*/
1010

1111
if (document.all && !document.addEventListener) { // IE 8 and lower
@@ -470,6 +470,10 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
470470
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
471471
};
472472
this.removeColumnSetting = function(column) {
473+
if (!$scope.hotInstance) {
474+
return;
475+
}
476+
473477
if ($scope.htSettings.columns.indexOf(column) > -1) {
474478
$scope.htSettings.columns.splice($scope.htSettings.columns.indexOf(column), 1);
475479
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
@@ -597,6 +601,24 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
597601
settingFactory.updateHandsontableSettings(scope.hotInstance, scope.htSettings);
598602
}
599603
});
604+
605+
function destroyInstance() {
606+
if (scope.hotInstance) {
607+
scope.hotInstance.destroy();
608+
scope.hotInstance = null;
609+
scope.htSettings = {};
610+
}
611+
}
612+
613+
// Destroy triggered by controller or scope destroying
614+
scope.$on('$destroy', function() {
615+
destroyInstance();
616+
});
617+
618+
// Destroy triggered by DOM element removing
619+
element.on('$destroy', function() {
620+
destroyInstance();
621+
});
600622
};
601623
}
602624
};

0 commit comments

Comments
 (0)