Skip to content

Commit

Permalink
Merge branch 'release/0.13.1' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
budnix committed Aug 20, 2020
2 parents b8b7495 + 4673082 commit 7decaaf
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 55 deletions.
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ language: node_js
sudo: false

node_js:
- "0.12"
- '0.12'

before_script:
- "npm update -g npm"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "npm install -g grunt-cli"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install -g grunt-cli

notifications:
email: false
slack:
secure: RVZTvjJhyjbZ+z7D7enUNWMBuHW6It9+33ArMcO1RbfuwzlA5aeQl+PnpDNNYITnEig1xOoSs4blBj7rLSJlC9xigLS8qzsE8Q+SLY6dvXRZ6l0dmIaduwijO0f5sPsd2neoDN3fFihlWhQKBuU/+3R9zRTfma3PS0nU1x5yHnM=
on_failure: change
on_success: change
44 changes: 22 additions & 22 deletions demo/build/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
}
config.$inject = ['$sceDelegateProvider', '$httpProvider', '$stateProvider', '$compileProvider', '$urlRouterProvider', 'demoMapProvider'];

app.constant('version', 'v0.13.0');
app.constant('version', 'v0.13.1');
app.config(config);

angular.element(document).ready(function() {
Expand Down Expand Up @@ -253,123 +253,123 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
module.exports = {
'intro': {
'simple-example': {
url: getUrl('nudumu/4'),
url: getUrl('nudumu/6'),
title: 'Simple example',
description: 'Simple example'
},
'full-featured-demo': {
url: getUrl('xezevi/3'),
url: getUrl('xezevi/4'),
title: 'Full featured demo',
description: 'Full featured demo'
}
},
'configuration': {
'configuration-by-object': {
url: getUrl('getazu/3'),
url: getUrl('getazu/4'),
title: 'By `settings` object',
description: 'Configuration by setting `settings` object'
},
'configuration-declarative-way': {
url: getUrl('jupeme/3'),
url: getUrl('jupeme/4'),
title: 'In declarative way',
description: 'Configuration in declarative way'
}
},
'columns': {
'add-remove-column-ng-repeat': {
url: getUrl('muluto/4'),
url: getUrl('muluto/5'),
title: 'Add/Remove (ng-repeat)',
description: 'Add/Remove columns using ng-repeat'
},
'add-remove-column-by-attr': {
url: getUrl('xayeru/3'),
url: getUrl('xayeru/4'),
title: 'Add/Remove (`columns` attribute)',
description: 'Add/Remove columns using `columns` attribute'
}
},
'binding': {
'data-binding': {
url: getUrl('lupile/4'),
url: getUrl('lupile/5'),
title: 'Data binding',
description: 'Data binding'
},
'settings-binding': {
url: getUrl('xaqasi/3'),
url: getUrl('xaqasi/4'),
title: 'Table settings binding',
description: 'Table settings binding'
}
},
'callbacks': {
'callbacks-by-object': {
url: getUrl('nayito/5', 'html,js,console,output'),
url: getUrl('nayito/7', 'html,js,console,output'),
title: 'By `settings` object',
description: 'Listening callbacks using `settings` object'
},
'callbacks-declarative-way': {
url: getUrl('pucale/4', 'html,js,console,output'),
url: getUrl('pucale/5', 'html,js,console,output'),
title: 'In declarative way',
description: 'Listening callbacks in declarative way'
}
},
'plugins': {
'copy-paste-context-menu': {
url: getUrl('zohoge/2'),
url: getUrl('zohoge/3'),
title: 'Enable copy/paste in context menu',
description: 'Enable copy/paste in context menu'
}
},
'pagination': {
'rows-pagination': {
url: getUrl('fohohenabo/1'),
url: getUrl('rorozo/1'),
title: 'Paginate rows',
description: 'Paginate rows'
},
'columns-pagination': {
url: getUrl('qudufogafu/1'),
url: getUrl('kolerig/1'),
title: 'Paginate columns',
description: 'Paginate columns'
},
},
'other': {
'access-to-instance': {
url: getUrl('fovoxu/4'),
url: getUrl('fovoxu/5'),
title: 'Access to Handsontable instance',
description: 'Access to Handsontable instance'
},
'custom-validator': {
url: getUrl('qoweju/3'),
url: getUrl('qoweju/4'),
title: 'Custom validator',
description: 'Custom validator'
},
'custom-renderer': {
url: getUrl('locome/2'),
url: getUrl('locome/3'),
title: 'Custom renderer',
description: 'Custom renderer'
},
},
'PRO': {
'collapsing-columns-with-nested-headers': {
url: getUrl('wilani/3'),
url: getUrl('wilani/4'),
title: 'Collapsing columns with nested headers',
description: 'Create a nested, hierarchical structure of headers with expandable and collapsible columns'
},
'filtering-simple': {
url: getUrl('fijida/3'),
url: getUrl('fijida/4'),
title: 'Data filtering (simple example)',
description: 'Display rows that meet your criteria and hide the rest'
},
'filtering-external-inputs': {
url: getUrl('rewefa/9'),
url: getUrl('rewefa/10'),
title: 'Data filtering (external inputs)',
description: 'Display rows that meet your criteria and hide the rest'
},
'hiding-columns': {
url: getUrl('wapufa/2'),
url: getUrl('wapufa/3'),
title: 'Hiding columns',
description: 'Hide specific columns and show the rest'
},
'hiding-rows': {
url: getUrl('roximi/3'),
url: getUrl('roximi/4'),
title: 'Hiding rows',
description: 'Hide specific rows and show the rest'
},
Expand Down
42 changes: 21 additions & 21 deletions demo/js/demos.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,123 +12,123 @@
module.exports = {
'intro': {
'simple-example': {
url: getUrl('nudumu/4'),
url: getUrl('nudumu/6'),
title: 'Simple example',
description: 'Simple example'
},
'full-featured-demo': {
url: getUrl('xezevi/3'),
url: getUrl('xezevi/4'),
title: 'Full featured demo',
description: 'Full featured demo'
}
},
'configuration': {
'configuration-by-object': {
url: getUrl('getazu/3'),
url: getUrl('getazu/4'),
title: 'By `settings` object',
description: 'Configuration by setting `settings` object'
},
'configuration-declarative-way': {
url: getUrl('jupeme/3'),
url: getUrl('jupeme/4'),
title: 'In declarative way',
description: 'Configuration in declarative way'
}
},
'columns': {
'add-remove-column-ng-repeat': {
url: getUrl('muluto/4'),
url: getUrl('muluto/5'),
title: 'Add/Remove (ng-repeat)',
description: 'Add/Remove columns using ng-repeat'
},
'add-remove-column-by-attr': {
url: getUrl('xayeru/3'),
url: getUrl('xayeru/4'),
title: 'Add/Remove (`columns` attribute)',
description: 'Add/Remove columns using `columns` attribute'
}
},
'binding': {
'data-binding': {
url: getUrl('lupile/4'),
url: getUrl('lupile/5'),
title: 'Data binding',
description: 'Data binding'
},
'settings-binding': {
url: getUrl('xaqasi/3'),
url: getUrl('xaqasi/4'),
title: 'Table settings binding',
description: 'Table settings binding'
}
},
'callbacks': {
'callbacks-by-object': {
url: getUrl('nayito/5', 'html,js,console,output'),
url: getUrl('nayito/7', 'html,js,console,output'),
title: 'By `settings` object',
description: 'Listening callbacks using `settings` object'
},
'callbacks-declarative-way': {
url: getUrl('pucale/4', 'html,js,console,output'),
url: getUrl('pucale/5', 'html,js,console,output'),
title: 'In declarative way',
description: 'Listening callbacks in declarative way'
}
},
'plugins': {
'copy-paste-context-menu': {
url: getUrl('zohoge/2'),
url: getUrl('zohoge/3'),
title: 'Enable copy/paste in context menu',
description: 'Enable copy/paste in context menu'
}
},
'pagination': {
'rows-pagination': {
url: getUrl('fohohenabo/1'),
url: getUrl('rorozo/1'),
title: 'Paginate rows',
description: 'Paginate rows'
},
'columns-pagination': {
url: getUrl('qudufogafu/1'),
url: getUrl('kolerig/1'),
title: 'Paginate columns',
description: 'Paginate columns'
},
},
'other': {
'access-to-instance': {
url: getUrl('fovoxu/4'),
url: getUrl('fovoxu/5'),
title: 'Access to Handsontable instance',
description: 'Access to Handsontable instance'
},
'custom-validator': {
url: getUrl('qoweju/3'),
url: getUrl('qoweju/4'),
title: 'Custom validator',
description: 'Custom validator'
},
'custom-renderer': {
url: getUrl('locome/2'),
url: getUrl('locome/3'),
title: 'Custom renderer',
description: 'Custom renderer'
},
},
'PRO': {
'collapsing-columns-with-nested-headers': {
url: getUrl('wilani/3'),
url: getUrl('wilani/4'),
title: 'Collapsing columns with nested headers',
description: 'Create a nested, hierarchical structure of headers with expandable and collapsible columns'
},
'filtering-simple': {
url: getUrl('fijida/3'),
url: getUrl('fijida/4'),
title: 'Data filtering (simple example)',
description: 'Display rows that meet your criteria and hide the rest'
},
'filtering-external-inputs': {
url: getUrl('rewefa/9'),
url: getUrl('rewefa/10'),
title: 'Data filtering (external inputs)',
description: 'Display rows that meet your criteria and hide the rest'
},
'hiding-columns': {
url: getUrl('wapufa/2'),
url: getUrl('wapufa/3'),
title: 'Hiding columns',
description: 'Hide specific columns and show the rest'
},
'hiding-rows': {
url: getUrl('roximi/3'),
url: getUrl('roximi/4'),
title: 'Hiding rows',
description: 'Hide specific rows and show the rest'
},
Expand Down
26 changes: 24 additions & 2 deletions dist/ngHandsontable.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* ng-handsontable 0.13.0
* ng-handsontable 0.13.1
*
* Copyright 2012-2015 Marcin Warpechowski
* Copyright 2015 Handsoncode sp. z o.o. <[email protected]>
* Licensed under the MIT license.
* https://github.com/handsontable/ngHandsontable
* Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST)
* Date: Thu Aug 20 2020 11:07:09 GMT+0200 (CEST)
*/

if (document.all && !document.addEventListener) { // IE 8 and lower
Expand Down Expand Up @@ -470,6 +470,10 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
};
this.removeColumnSetting = function(column) {
if (!$scope.hotInstance) {
return;
}

if ($scope.htSettings.columns.indexOf(column) > -1) {
$scope.htSettings.columns.splice($scope.htSettings.columns.indexOf(column), 1);
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
Expand Down Expand Up @@ -597,6 +601,24 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
settingFactory.updateHandsontableSettings(scope.hotInstance, scope.htSettings);
}
});

function destroyInstance() {
if (scope.hotInstance) {
scope.hotInstance.destroy();
scope.hotInstance = null;
scope.htSettings = {};
}
}

// Destroy triggered by controller or scope destroying
scope.$on('$destroy', function() {
destroyInstance();
});

// Destroy triggered by DOM element removing
element.on('$destroy', function() {
destroyInstance();
});
};
}
};
Expand Down
Loading

0 comments on commit 7decaaf

Please sign in to comment.