From 87d8baa3d3f3029dc59648bd4e7b45cf64b7c4b6 Mon Sep 17 00:00:00 2001 From: ynt Date: Mon, 8 Dec 2014 05:46:03 +0300 Subject: [PATCH 1/3] Defines as `ractive` not `Ractive` RactiveJS defines itself as `ractive` not `Ractive`. --- Ractive-decorators-sortable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ractive-decorators-sortable.js b/Ractive-decorators-sortable.js index bfd8ad6..beb0e87 100644 --- a/Ractive-decorators-sortable.js +++ b/Ractive-decorators-sortable.js @@ -64,12 +64,12 @@ // Common JS (i.e. browserify) environment if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) { - factory( require( 'Ractive' ) ); + factory( require( 'ractive' ) ); } // AMD? else if ( typeof define === 'function' && define.amd ) { - define([ 'Ractive' ], factory ); + define([ 'ractive' ], factory ); } // browser global @@ -199,4 +199,4 @@ Ractive.decorators.sortable = sortable; -})); \ No newline at end of file +})); From c88e78213cf530942a5b29adf6005a76ac1d4b56 Mon Sep 17 00:00:00 2001 From: ynt Date: Mon, 8 Dec 2014 05:48:13 +0300 Subject: [PATCH 2/3] Defines as `ractive` not `Ractive` --- Ractive-decorators-sortable.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ractive-decorators-sortable.min.js b/Ractive-decorators-sortable.min.js index 90fa355..529f1ad 100644 --- a/Ractive-decorators-sortable.min.js +++ b/Ractive-decorators-sortable.min.js @@ -1 +1 @@ -!function(a,b){"use strict";if("undefined"!=typeof module&&module.exports&&"function"==typeof require)b(require("Ractive"));else if("function"==typeof define&&define.amd)define(["Ractive"],b);else{if(!a.Ractive)throw new Error("Could not find Ractive! It must be loaded before the Ractive-decorators-sortable plugin");b(a.Ractive)}}("undefined"!=typeof window?window:this,function(a){"use strict";var b,c,d,e,f,g,h,i,j,k;b=function(a){return a.draggable=!0,a.addEventListener("dragstart",g,!1),a.addEventListener("dragenter",h,!1),a.addEventListener("dragleave",i,!1),a.addEventListener("drop",i,!1),a.addEventListener("dragover",j,!1),{teardown:function(){a.removeEventListener("dragstart",g,!1),a.removeEventListener("dragenter",h,!1),a.removeEventListener("dragleave",i,!1),a.removeEventListener("drop",i,!1),a.removeEventListener("dragover",j,!1)}}},b.targetClass="droptarget",k="The sortable decorator only works with elements that correspond to array members",g=function(a){var b,g=this._ractive;if(d=g.keypath,b=d.lastIndexOf("."),-1===b)throw new Error(k);if(e=d.substr(0,b),f=+d.substring(b+1),isNaN(f))throw new Error(k);a.dataTransfer.setData("foo",!0),c=g.root},h=function(){var a,d,g,h,i,j;if(this._ractive.root===c){if(a=this._ractive.keypath,d=a.lastIndexOf("."),-1===d)throw new Error(k);if(g=a.substr(0,d),h=+a.substring(d+1),g===e){if(h===f)return this.classList.add(b.targetClass),void 0;i=c.get(e),j=i.splice(f,1)[0],f=h,i.splice(f,0,j)}}},i=function(){this.classList.remove(b.targetClass)},j=function(a){a.preventDefault()},a.decorators.sortable=b}); \ No newline at end of file +!function(a,b){"use strict";if("undefined"!=typeof module&&module.exports&&"function"==typeof require)b(require("ractive"));else if("function"==typeof define&&define.amd)define(["ractive"],b);else{if(!a.Ractive)throw new Error("Could not find Ractive! It must be loaded before the Ractive-decorators-sortable plugin");b(a.Ractive)}}("undefined"!=typeof window?window:this,function(a){"use strict";var b,c,d,e,f,g,h,i,j,k;b=function(a){return a.draggable=!0,a.addEventListener("dragstart",g,!1),a.addEventListener("dragenter",h,!1),a.addEventListener("dragleave",i,!1),a.addEventListener("drop",i,!1),a.addEventListener("dragover",j,!1),{teardown:function(){a.removeEventListener("dragstart",g,!1),a.removeEventListener("dragenter",h,!1),a.removeEventListener("dragleave",i,!1),a.removeEventListener("drop",i,!1),a.removeEventListener("dragover",j,!1)}}},b.targetClass="droptarget",k="The sortable decorator only works with elements that correspond to array members",g=function(a){var b,g=this._ractive;if(d=g.keypath,b=d.lastIndexOf("."),-1===b)throw new Error(k);if(e=d.substr(0,b),f=+d.substring(b+1),isNaN(f))throw new Error(k);a.dataTransfer.setData("foo",!0),c=g.root},h=function(){var a,d,g,h,i,j;if(this._ractive.root===c){if(a=this._ractive.keypath,d=a.lastIndexOf("."),-1===d)throw new Error(k);if(g=a.substr(0,d),h=+a.substring(d+1),g===e){if(h===f)return this.classList.add(b.targetClass),void 0;i=c.get(e),j=i.splice(f,1)[0],f=h,i.splice(f,0,j)}}},i=function(){this.classList.remove(b.targetClass)},j=function(a){a.preventDefault()},a.decorators.sortable=b}); From 12cd36a97f16f651a2eba3a5ddca2019563f7d44 Mon Sep 17 00:00:00 2001 From: ynt Date: Mon, 8 Dec 2014 05:49:01 +0300 Subject: [PATCH 3/3] Defines as `ractive` not `Ractive` --- src/Ractive-decorators-sortable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ractive-decorators-sortable.js b/src/Ractive-decorators-sortable.js index d0e54c4..2137285 100644 --- a/src/Ractive-decorators-sortable.js +++ b/src/Ractive-decorators-sortable.js @@ -64,12 +64,12 @@ // Common JS (i.e. browserify) environment if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) { - factory( require( 'Ractive' ) ); + factory( require( 'ractive' ) ); } // AMD? else if ( typeof define === 'function' && define.amd ) { - define([ 'Ractive' ], factory ); + define([ 'ractive' ], factory ); } // browser global @@ -199,4 +199,4 @@ Ractive.decorators.sortable = sortable; -})); \ No newline at end of file +}));