|
|
@ -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
|
|
|
@ -25,13 +27,17 @@ |
|
|
|
factory(koRef, sortableRef); |
|
|
|
factory(koRef, sortableRef); |
|
|
|
} |
|
|
|
} |
|
|
|
//if both references aren't found yet, get via AMD if available
|
|
|
|
//if both references aren't found yet, get via AMD if available
|
|
|
|
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); |
|
|
|