Browse Source

* code style

experimental
RubaXa 9 years ago
parent
commit
b1defd32ff
  1. 7
      Sortable.js
  2. 2
      Sortable.min.js
  3. 10
      knockout-sortable.js

7
Sortable.js

@ -4,7 +4,6 @@
* @license MIT * @license MIT
*/ */
(function (factory) { (function (factory) {
"use strict"; "use strict";
@ -24,10 +23,10 @@
})(function () { })(function () {
"use strict"; "use strict";
if (typeof window == "undefined" || typeof window.document == "undefined") { if (typeof window == "undefined" || !window.document) {
return function() { return function SortableError() {
throw new Error("Sortable.js requires a window with a document"); throw new Error("Sortable.js requires a window with a document");
} };
} }
var dragEl, var dragEl,

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

10
knockout-sortable.js

@ -1,3 +1,5 @@
/*global ko*/
(function (factory) { (function (factory) {
"use strict"; "use strict";
//get ko ref via global or require //get ko ref via global or require
@ -28,10 +30,14 @@
else if (typeof define === 'function' && define.amd) { else if (typeof define === 'function' && define.amd) {
//we may have a reference to only 1, or none //we may have a reference to only 1, or none
if (koRef !== undefined && sortableRef === undefined) { if (koRef !== undefined && sortableRef === undefined) {
define(['./Sortable'], function(amdSortableRef){ factory(koRef, amdSortableRef); }); define(['./Sortable'], function (amdSortableRef) {
factory(koRef, amdSortableRef);
});
} }
else if (koRef === undefined && sortableRef !== undefined) { else if (koRef === undefined && sortableRef !== undefined) {
define(['knockout'], function(amdKnockout){ factory(amdKnockout, sortableRef); }); define(['knockout'], function (amdKnockout) {
factory(amdKnockout, sortableRef);
});
} }
else if (koRef === undefined && sortableRef === undefined) { else if (koRef === undefined && sortableRef === undefined) {
define(['knockout', './Sortable'], factory); define(['knockout', './Sortable'], factory);

Loading…
Cancel
Save