Hello,
  I discover jquery some weeks ago and this list yesterday, so pardon me
if I'm not on the right place for my question, but I didn't find any
feedback way about "interface" :

  I use interface isortable and wanted to use onStart and onStop
callbacks, but onStop didn't worked : it was calling onStart !
  I changed some lines (unachieved copy/paste it seems) to correct this,
patch is attached.

  I also had to change calls to hasWord() by className.has(), but i'm
not sure it's correct as it seems to be a change between jquery
versions. Is there a min/max jquery version marked as compatible with
interface ?

  Last point, but I can't find the solution : if I add a new sortable
item, with sortableAddItem(), it doesn't have onStart/onStop callbacks
activated.
  Any idea ?

-- 
Bye, Pif.

diff -ur interface.orig/idrag.js interface/idrag.js
--- interface.orig/idrag.js	2006-09-04 21:20:00.000000000 +0200
+++ interface/idrag.js	2006-09-08 09:11:53.000000000 +0200
@@ -351,8 +351,8 @@
 		if (dragged.dragCfg.onChange && (nx != dragged.dragCfg.oR.x || ny != dragged.dragCfg.oR.y)){
 			dragged.dragCfg.onChange.apply(dragged, dragged.dragCfg.lastSi);
 		}
-		if (dragged.dragCfg.onStart)
-			dragged.dragCfg.onStart.apply(elm);
+		if (dragged.dragCfg.onStop)
+			dragged.dragCfg.onStop.apply(elm);
 		
 		/*if (dragged && dragged.dragCfg.prot == false) {
 			if (dragged.dragCfg.ghosting == false) {
@@ -657,7 +657,7 @@
 					hpc : o.hpc ? o.hpc : false,
 					onDrag : {},
 					onStart : o.onStart && o.onStart.constructor == Function ? o.onStart : false,
-					onStop : o.onStart && o.onStart.constructor == Function ? o.onStop : false,
+					onStop : o.onStop && o.onStop.constructor == Function ? o.onStop : false,
 					onChange : o.onChange && o.onChange.constructor == Function ? o.onChange : false,
 					axis : /vertically|horizontally/.test(o.axis) ? o.axis : false
 					
diff -ur interface.orig/isortables.js interface/isortables.js
--- interface.orig/isortables.js	2006-09-03 22:02:32.000000000 +0200
+++ interface/isortables.js	2006-09-08 08:57:45.000000000 +0200
@@ -238,7 +238,7 @@
 		return this.each(
 			function ()
 			{
-				if(!jQuery.hasWord(e, this.sortCfg.accept))
+				if(!jQuery.className.has(e, this.sortCfg.accept))
 					jQuery(e).addClass(this.sortCfg.accept);
 				jQuery(e).Draggable(this.sortCfg);
 			}
@@ -289,7 +289,7 @@
 							handle: o.handle ? o.handle : null,
 							containment: o.containment ? o.containment : null,
 							onStart : o.onStart && o.onStart.constructor == Function ? o.onStart : false,
-							onStop : o.onStart && o.onStart.constructor == Function ? o.onStop : false,
+							onStop : o.onStop && o.onStop.constructor == Function ? o.onStop : false,
 							axis : /vertically|horizontally/.test(o.axis) ? o.axis : false
 						}
 					);
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to