New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-ui-sortable-multiselection

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-ui-sortable-multiselection - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

2

bower.json
{
"name": "angular-ui-sortable-multiselection",
"version": "0.5.0",
"version": "0.6.0",
"description": "This directive allows multiple element sorting in UI-Sortable.",

@@ -5,0 +5,0 @@ "author": "https://github.com/thgreasi/ui-sortable-multiselection/graphs/contributors",

{
"name": "angular-ui-sortable-multiselection",
"version": "0.5.0",
"version": "0.6.0",
"description": "This directive allows multiple element sorting in UI-Sortable.",

@@ -5,0 +5,0 @@ "author": "https://github.com/thgreasi/ui-sortable-multiselection/graphs/contributors",

@@ -16,4 +16,32 @@ ui-sortable-multiselection

[MultiSelect on Click Demo pen](http://codepen.io/thgreasi/pen/KgoPmY)
## ui.item.sortableMultiSelect API documentation
### Allow multi-selection on click
For better touch device support, use the option 'multiSelectOnClick'. This will allow click/tap to select and deselect individual items instead of requiring a modifier key to be held down.
Example usage:
```javascript
// set the sortable options
$scope.sortableOptions = uiSortableMultiSelectionMethods.extendOptions({
'multiSelectOnClick': true,
start: function() {
// ...
},
stop: function() {
// ...
}
});
```
```html
<ul class="sortable-list" ui-sortable="sortableOptions" ng-model="items">
<li ng-repeat="item in items" class="sortable-item" ui-sortable-selectable>
<div class="sortable-item__inner">{item.name}</div>
</li>
</ul>
```
The `ui` argument of the available callbacks gets enriched with some extra properties as specified below:

@@ -20,0 +48,0 @@

@@ -12,3 +12,7 @@ angular.module('ui.sortable.multiselection', [])

var $parent = $this.parent();
var multiSelectOnClick = $parent.sortable('option', 'multiSelectOnClick') || false;
var isDisabled = $parent.sortable('option', 'disabled');
if (isDisabled){

@@ -28,3 +32,3 @@ return;

var validHandle = false;
$parent.find(jquerySortableHandleOption).find('*').addBack().each(function () {

@@ -46,3 +50,3 @@ if (this === e.target) {

if (e.ctrlKey || e.metaKey) {
if (e.ctrlKey || e.metaKey || multiSelectOnClick) {
$this.toggleClass(selectedItemClass);

@@ -274,3 +278,3 @@ } else if (e.shiftKey && lastIndex !== undefined && lastIndex >= 0) {

var draggedModel = ngModel[newPosition];
// get the models and remove them from the list

@@ -280,3 +284,3 @@ // the code should run in reverse order,

var models = extractGroupedModelsFromIndexes(ngModel, indexes.above, indexes.below);
// add the models to the list

@@ -283,0 +287,0 @@ Array.prototype.splice.apply(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc