rails-angular-ui-sortable 0.13.3.1 → 0.13.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86ca1f6afa74a83c8a2806a7778d1113bf863bc
|
4
|
+
data.tar.gz: aaf7c7a884994d13282b0ddcd16b3ff4e814e347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072f498f2718050218ce754105aaf89ac505f7b66458252047b59d48c492f295c5382e266b43016b0e442114678483095ed1db6d97791287c01f9a7c0693d599
|
7
|
+
data.tar.gz: a3fffcc89dfd6b590e5d86348f34e6ba68217e324f1b46f3366bde86201724910ec692a2032c696d1954c395f00ef4824318eb6167b533643b4aebd90e9cd660
|
data/README.md
CHANGED
@@ -12,6 +12,10 @@ Add the following to your Rails JavaScript manifest file:
|
|
12
12
|
|
13
13
|
//= require angular-ui-sortable
|
14
14
|
|
15
|
+
For minified version add .min suffix:
|
16
|
+
|
17
|
+
//= require angular-ui-sortable.min
|
18
|
+
|
15
19
|
## Versioning
|
16
20
|
|
17
|
-
Current version of jQuery-UI Sortable - 0.13.
|
21
|
+
Current version of jQuery-UI Sortable - 0.13.4
|
@@ -1,3 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* angular-ui-sortable - This directive allows you to jQueryUI Sortable.
|
3
|
+
* @version v0.13.4 - 2015-07-15
|
4
|
+
* @link http://angular-ui.github.com
|
5
|
+
* @license MIT
|
6
|
+
*/
|
7
|
+
|
1
8
|
(function(window, angular, undefined) {
|
2
9
|
'use strict';
|
3
10
|
/*
|
@@ -21,9 +28,9 @@ angular.module('ui.sortable', [])
|
|
21
28
|
|
22
29
|
function combineCallbacks(first,second){
|
23
30
|
if(second && (typeof second === 'function')) {
|
24
|
-
return function(
|
25
|
-
first(
|
26
|
-
second(
|
31
|
+
return function() {
|
32
|
+
first.apply(this, arguments);
|
33
|
+
second.apply(this, arguments);
|
27
34
|
};
|
28
35
|
}
|
29
36
|
return first;
|
@@ -288,7 +295,7 @@ angular.module('ui.sortable', [])
|
|
288
295
|
wrappers.helper = function (inner) {
|
289
296
|
if (inner && typeof inner === 'function') {
|
290
297
|
return function (e, item) {
|
291
|
-
var innerResult = inner(
|
298
|
+
var innerResult = inner.apply(this, arguments);
|
292
299
|
item.sortable._isCustomHelperUsed = item !== innerResult;
|
293
300
|
return innerResult;
|
294
301
|
};
|
@@ -351,4 +358,4 @@ angular.module('ui.sortable', [])
|
|
351
358
|
}
|
352
359
|
]);
|
353
360
|
|
354
|
-
})(window, window.angular);
|
361
|
+
})(window, window.angular);
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* angular-ui-sortable - This directive allows you to jQueryUI Sortable.
|
3
|
+
* @version v0.13.4 - 2015-07-15
|
4
|
+
* @link http://angular-ui.github.com
|
5
|
+
* @license MIT
|
6
|
+
*/
|
7
|
+
|
8
|
+
!function(a,b,c){"use strict";b.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(a,d,e){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(f,g,h,i){function j(a,b){return b&&"function"==typeof b?function(){a.apply(this,arguments),b.apply(this,arguments)}:a}function k(a){var b=a.data("ui-sortable");return b&&"object"==typeof b&&"ui-sortable"===b.widgetFullName?b:null}function l(a,b){var c=a.sortable("option","helper");return"clone"===c||"function"==typeof c&&b.item.sortable.isCustomHelperUsed()}function m(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}function n(a,b){for(var c=null,d=0;d<a.length;d++){var e=a[d];if(e.element[0]===b[0]){c=e.scope;break}}return c}function o(a,b){b.item.sortable._destroy()}var p,q={},r={"ui-floating":c},s={receive:null,remove:null,start:null,stop:null,update:null},t={helper:null};return b.extend(q,r,a,f.uiSortable),b.element.fn&&b.element.fn.jquery?(i?(f.$watch("ngModel.length",function(){d(function(){k(g)&&g.sortable("refresh")},0,!1)}),s.start=function(a,d){if("auto"===q["ui-floating"]){var e=d.item.siblings(),f=k(b.element(a.target));f.floating=m(e)}d.item.sortable={model:i.$modelValue[d.item.index()],index:d.item.index(),source:d.item.parent(),sourceModel:i.$modelValue,cancel:function(){d.item.sortable._isCanceled=!0},isCanceled:function(){return d.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!d.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:d.item.sortable._isCustomHelperUsed,_destroy:function(){b.forEach(d.item.sortable,function(a,b){d.item.sortable[b]=c})}}},s.activate=function(a,c){p=g.contents();var d=g.sortable("option","placeholder");if(d&&d.element&&"function"==typeof d.element){var e=d.element();e=b.element(e);var h=g.find('[class="'+e.attr("class")+'"]:not([ng-repeat], [data-ng-repeat])');p=p.not(h)}var i=c.item.sortable._connectedSortables||[];i.push({element:g,scope:f}),c.item.sortable._connectedSortables=i},s.update=function(a,b){if(!b.item.sortable.received){b.item.sortable.dropindex=b.item.index();var c=b.item.parent();b.item.sortable.droptarget=c;var d=n(b.item.sortable._connectedSortables,c);b.item.sortable.droptargetModel=d.ngModel,g.sortable("cancel")}l(g,b)&&!b.item.sortable.received&&"parent"===g.sortable("option","appendTo")&&(p=p.not(p.last())),p.appendTo(g),b.item.sortable.received&&(p=null),b.item.sortable.received&&!b.item.sortable.isCanceled()&&f.$apply(function(){i.$modelValue.splice(b.item.sortable.dropindex,0,b.item.sortable.moved)})},s.stop=function(a,b){!b.item.sortable.received&&"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()?f.$apply(function(){i.$modelValue.splice(b.item.sortable.dropindex,0,i.$modelValue.splice(b.item.sortable.index,1)[0])}):"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()||l(g,b)||p.appendTo(g),p=null},s.receive=function(a,b){b.item.sortable.received=!0},s.remove=function(a,b){"dropindex"in b.item.sortable||(g.sortable("cancel"),b.item.sortable.cancel()),b.item.sortable.isCanceled()||f.$apply(function(){b.item.sortable.moved=i.$modelValue.splice(b.item.sortable.index,1)[0]})},t.helper=function(a){return a&&"function"==typeof a?function(b,c){var d=a.apply(this,arguments);return c.sortable._isCustomHelperUsed=c!==d,d}:a},f.$watch("uiSortable",function(a){var c=k(g);c&&b.forEach(a,function(a,b){return b in r?("ui-floating"!==b||a!==!1&&a!==!0||(c.floating=a),void(q[b]=a)):(s[b]?("stop"===b&&(a=j(a,function(){f.$apply()}),a=j(a,o)),a=j(s[b],a)):t[b]&&(a=t[b](a)),q[b]=a,void g.sortable("option",b,a))})},!0),b.forEach(s,function(a,b){q[b]=j(a,q[b]),"stop"===b&&(q[b]=j(q[b],o))})):e.info("ui.sortable: ngModel not provided!",g),void g.sortable(q)):void e.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-angular-ui-sortable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Bobrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-angularjs
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- lib/rails-angular-ui-sortable/engine.rb
|
51
51
|
- lib/rails-angular-ui-sortable/version.rb
|
52
52
|
- vendor/assets/javascripts/angular-ui-sortable.js
|
53
|
+
- vendor/assets/javascripts/angular-ui-sortable.min.js
|
53
54
|
homepage: https://github.com/alexkpek/rails-angular-ui-sortable
|
54
55
|
licenses:
|
55
56
|
- MIT
|
@@ -75,4 +76,3 @@ signing_key:
|
|
75
76
|
specification_version: 4
|
76
77
|
summary: UI.Sortable directive on Rails
|
77
78
|
test_files: []
|
78
|
-
has_rdoc:
|