rails 0.14.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails might be problematic. Click here for more details.
- data/CHANGELOG +13 -0
- data/Rakefile +5 -5
- data/html/index.html +1 -1
- data/html/javascripts/dragdrop.js +177 -132
- data/html/javascripts/effects.js +258 -308
- data/html/javascripts/prototype.js +25 -8
- data/lib/commands/performance/benchmarker.rb +1 -1
- data/lib/commands/performance/profiler.rb +1 -1
- data/lib/rails_generator/commands.rb +5 -6
- data/lib/rails_generator/lookup.rb +5 -2
- data/lib/rails_generator/scripts.rb +2 -2
- data/lib/rails_version.rb +3 -3
- metadata +7 -7
data/CHANGELOG
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
*1.0.0* (December 13th, 2005)
|
2
|
+
|
3
|
+
* Update to script.aculo.us 1.5.0 final (equals 1.5.0_rc6) [Thomas Fuchs]
|
4
|
+
|
5
|
+
* Update to Prototype 1.4.0 final [Sam Stephenson]
|
6
|
+
|
7
|
+
* Update instructions on how to find and install generators. #3172. [Chad Fowler]
|
8
|
+
|
9
|
+
* Generator looks in vendor/generators also. [Chad Fowler]
|
10
|
+
|
11
|
+
* Generator copies files in binary mode. #3156 [minimudboy@gmail.com]
|
12
|
+
|
13
|
+
|
1
14
|
*0.14.4 (RC5)* (December 7th, 2005)
|
2
15
|
|
3
16
|
* Add builtin/ to the gemspec. Closes #3047. [Nicholas Seckar, Sam Stephenson]
|
data/Rakefile
CHANGED
@@ -273,11 +273,11 @@ spec = Gem::Specification.new do |s|
|
|
273
273
|
EOF
|
274
274
|
|
275
275
|
s.add_dependency('rake', '>= 0.6.2')
|
276
|
-
s.add_dependency('activesupport', '= 1.2.
|
277
|
-
s.add_dependency('activerecord', '= 1.13.
|
278
|
-
s.add_dependency('actionpack', '= 1.11.
|
279
|
-
s.add_dependency('actionmailer', '= 1.1.
|
280
|
-
s.add_dependency('actionwebservice', '= 0.
|
276
|
+
s.add_dependency('activesupport', '= 1.2.5' + PKG_BUILD)
|
277
|
+
s.add_dependency('activerecord', '= 1.13.2' + PKG_BUILD)
|
278
|
+
s.add_dependency('actionpack', '= 1.11.2' + PKG_BUILD)
|
279
|
+
s.add_dependency('actionmailer', '= 1.1.5' + PKG_BUILD)
|
280
|
+
s.add_dependency('actionwebservice', '= 1.0.0' + PKG_BUILD)
|
281
281
|
|
282
282
|
s.rdoc_options << '--exclude' << '.'
|
283
283
|
s.has_rdoc = false
|
data/html/index.html
CHANGED
@@ -8,7 +8,7 @@ var Droppables = {
|
|
8
8
|
drops: [],
|
9
9
|
|
10
10
|
remove: function(element) {
|
11
|
-
this.drops = this.drops.reject(function(d) { return d.element
|
11
|
+
this.drops = this.drops.reject(function(d) { return d.element==$(element) });
|
12
12
|
},
|
13
13
|
|
14
14
|
add: function(element) {
|
@@ -43,7 +43,7 @@ var Droppables = {
|
|
43
43
|
return drop._containers.detect(function(c) { return parentNode == c });
|
44
44
|
},
|
45
45
|
|
46
|
-
isAffected: function(
|
46
|
+
isAffected: function(point, element, drop) {
|
47
47
|
return (
|
48
48
|
(drop.element!=element) &&
|
49
49
|
((!drop._containers) ||
|
@@ -51,7 +51,7 @@ var Droppables = {
|
|
51
51
|
((!drop.accept) ||
|
52
52
|
(Element.classNames(element).detect(
|
53
53
|
function(v) { return drop.accept.include(v) } ) )) &&
|
54
|
-
Position.within(drop.element,
|
54
|
+
Position.within(drop.element, point[0], point[1]) );
|
55
55
|
},
|
56
56
|
|
57
57
|
deactivate: function(drop) {
|
@@ -61,38 +61,32 @@ var Droppables = {
|
|
61
61
|
},
|
62
62
|
|
63
63
|
activate: function(drop) {
|
64
|
-
if(this.last_active) this.deactivate(this.last_active);
|
65
64
|
if(drop.hoverclass)
|
66
65
|
Element.addClassName(drop.element, drop.hoverclass);
|
67
66
|
this.last_active = drop;
|
68
67
|
},
|
69
68
|
|
70
|
-
show: function(
|
69
|
+
show: function(point, element) {
|
71
70
|
if(!this.drops.length) return;
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
var i = this.drops.length-1; do {
|
77
|
-
var drop = this.drops[i];
|
78
|
-
if(this.isAffected(pX, pY, element, drop)) {
|
71
|
+
|
72
|
+
if(this.last_active) this.deactivate(this.last_active);
|
73
|
+
this.drops.each( function(drop) {
|
74
|
+
if(Droppables.isAffected(point, element, drop)) {
|
79
75
|
if(drop.onHover)
|
80
76
|
drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
|
81
77
|
if(drop.greedy) {
|
82
|
-
|
83
|
-
|
78
|
+
Droppables.activate(drop);
|
79
|
+
throw $break;
|
84
80
|
}
|
85
81
|
}
|
86
|
-
}
|
87
|
-
|
88
|
-
if(this.last_active) this.deactivate(this.last_active);
|
82
|
+
});
|
89
83
|
},
|
90
84
|
|
91
85
|
fire: function(event, element) {
|
92
86
|
if(!this.last_active) return;
|
93
87
|
Position.prepare();
|
94
88
|
|
95
|
-
if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active))
|
89
|
+
if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
|
96
90
|
if (this.last_active.onDrop)
|
97
91
|
this.last_active.onDrop(element, this.last_active.element, event);
|
98
92
|
},
|
@@ -104,21 +98,78 @@ var Droppables = {
|
|
104
98
|
}
|
105
99
|
|
106
100
|
var Draggables = {
|
101
|
+
drags: [],
|
107
102
|
observers: [],
|
103
|
+
|
104
|
+
register: function(draggable) {
|
105
|
+
if(this.drags.length == 0) {
|
106
|
+
this.eventMouseUp = this.endDrag.bindAsEventListener(this);
|
107
|
+
this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
|
108
|
+
this.eventKeypress = this.keyPress.bindAsEventListener(this);
|
109
|
+
|
110
|
+
Event.observe(document, "mouseup", this.eventMouseUp);
|
111
|
+
Event.observe(document, "mousemove", this.eventMouseMove);
|
112
|
+
Event.observe(document, "keypress", this.eventKeypress);
|
113
|
+
}
|
114
|
+
this.drags.push(draggable);
|
115
|
+
},
|
116
|
+
|
117
|
+
unregister: function(draggable) {
|
118
|
+
this.drags = this.drags.reject(function(d) { return d==draggable });
|
119
|
+
if(this.drags.length == 0) {
|
120
|
+
Event.stopObserving(document, "mouseup", this.eventMouseUp);
|
121
|
+
Event.stopObserving(document, "mousemove", this.eventMouseMove);
|
122
|
+
Event.stopObserving(document, "keypress", this.eventKeypress);
|
123
|
+
}
|
124
|
+
},
|
125
|
+
|
126
|
+
activate: function(draggable) {
|
127
|
+
window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
|
128
|
+
this.activeDraggable = draggable;
|
129
|
+
},
|
130
|
+
|
131
|
+
deactivate: function(draggbale) {
|
132
|
+
this.activeDraggable = null;
|
133
|
+
},
|
134
|
+
|
135
|
+
updateDrag: function(event) {
|
136
|
+
if(!this.activeDraggable) return;
|
137
|
+
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
138
|
+
// Mozilla-based browsers fire successive mousemove events with
|
139
|
+
// the same coordinates, prevent needless redrawing (moz bug?)
|
140
|
+
if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
|
141
|
+
this._lastPointer = pointer;
|
142
|
+
this.activeDraggable.updateDrag(event, pointer);
|
143
|
+
},
|
144
|
+
|
145
|
+
endDrag: function(event) {
|
146
|
+
if(!this.activeDraggable) return;
|
147
|
+
this._lastPointer = null;
|
148
|
+
this.activeDraggable.endDrag(event);
|
149
|
+
},
|
150
|
+
|
151
|
+
keyPress: function(event) {
|
152
|
+
if(this.activeDraggable)
|
153
|
+
this.activeDraggable.keyPress(event);
|
154
|
+
},
|
155
|
+
|
108
156
|
addObserver: function(observer) {
|
109
157
|
this.observers.push(observer);
|
110
158
|
this._cacheObserverCallbacks();
|
111
159
|
},
|
160
|
+
|
112
161
|
removeObserver: function(element) { // element instead of observer fixes mem leaks
|
113
162
|
this.observers = this.observers.reject( function(o) { return o.element==element });
|
114
163
|
this._cacheObserverCallbacks();
|
115
164
|
},
|
165
|
+
|
116
166
|
notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
|
117
167
|
if(this[eventName+'Count'] > 0)
|
118
168
|
this.observers.each( function(o) {
|
119
169
|
if(o[eventName]) o[eventName](eventName, draggable, event);
|
120
170
|
});
|
121
171
|
},
|
172
|
+
|
122
173
|
_cacheObserverCallbacks: function() {
|
123
174
|
['onStart','onEnd','onDrag'].each( function(eventName) {
|
124
175
|
Draggables[eventName+'Count'] = Draggables.observers.select(
|
@@ -140,68 +191,48 @@ Draggable.prototype = {
|
|
140
191
|
},
|
141
192
|
reverteffect: function(element, top_offset, left_offset) {
|
142
193
|
var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
|
143
|
-
new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur});
|
194
|
+
element._revert = new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur});
|
144
195
|
},
|
145
196
|
endeffect: function(element) {
|
146
|
-
|
197
|
+
new Effect.Opacity(element, {duration:0.2, from:0.7, to:1.0});
|
147
198
|
},
|
148
199
|
zindex: 1000,
|
149
|
-
revert: false
|
200
|
+
revert: false,
|
201
|
+
snap: false // false, or xy or [x,y] or function(x,y){ return [x,y] }
|
150
202
|
}, arguments[1] || {});
|
151
203
|
|
152
|
-
this.element
|
204
|
+
this.element = $(element);
|
205
|
+
|
153
206
|
if(options.handle && (typeof options.handle == 'string'))
|
154
|
-
this.handle = Element.childrenWithClassName(this.element, options.handle)[0];
|
155
|
-
|
207
|
+
this.handle = Element.childrenWithClassName(this.element, options.handle)[0];
|
156
208
|
if(!this.handle) this.handle = $(options.handle);
|
157
209
|
if(!this.handle) this.handle = this.element;
|
158
210
|
|
159
211
|
Element.makePositioned(this.element); // fix IE
|
160
212
|
|
161
|
-
this.
|
162
|
-
this.
|
163
|
-
this.
|
164
|
-
this.originalTop = this.currentTop();
|
165
|
-
this.originalX = this.element.offsetLeft;
|
166
|
-
this.originalY = this.element.offsetTop;
|
167
|
-
|
168
|
-
this.options = options;
|
169
|
-
|
170
|
-
this.active = false;
|
171
|
-
this.dragging = false;
|
213
|
+
this.delta = this.currentDelta();
|
214
|
+
this.options = options;
|
215
|
+
this.dragging = false;
|
172
216
|
|
173
|
-
this.eventMouseDown = this.
|
174
|
-
this.
|
175
|
-
this.eventMouseMove = this.update.bindAsEventListener(this);
|
176
|
-
this.eventKeypress = this.keyPress.bindAsEventListener(this);
|
217
|
+
this.eventMouseDown = this.initDrag.bindAsEventListener(this);
|
218
|
+
Event.observe(this.handle, "mousedown", this.eventMouseDown);
|
177
219
|
|
178
|
-
|
220
|
+
Draggables.register(this);
|
179
221
|
},
|
222
|
+
|
180
223
|
destroy: function() {
|
181
224
|
Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
|
182
|
-
|
183
|
-
},
|
184
|
-
registerEvents: function() {
|
185
|
-
Event.observe(document, "mouseup", this.eventMouseUp);
|
186
|
-
Event.observe(document, "mousemove", this.eventMouseMove);
|
187
|
-
Event.observe(document, "keypress", this.eventKeypress);
|
188
|
-
Event.observe(this.handle, "mousedown", this.eventMouseDown);
|
189
|
-
},
|
190
|
-
unregisterEvents: function() {
|
191
|
-
//if(!this.active) return;
|
192
|
-
//Event.stopObserving(document, "mouseup", this.eventMouseUp);
|
193
|
-
//Event.stopObserving(document, "mousemove", this.eventMouseMove);
|
194
|
-
//Event.stopObserving(document, "keypress", this.eventKeypress);
|
225
|
+
Draggables.unregister(this);
|
195
226
|
},
|
196
|
-
|
197
|
-
|
227
|
+
|
228
|
+
currentDelta: function() {
|
229
|
+
return([
|
230
|
+
parseInt(this.element.style.left || '0'),
|
231
|
+
parseInt(this.element.style.top || '0')]);
|
198
232
|
},
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
startDrag: function(event) {
|
203
|
-
if(Event.isLeftClick(event)) {
|
204
|
-
|
233
|
+
|
234
|
+
initDrag: function(event) {
|
235
|
+
if(Event.isLeftClick(event)) {
|
205
236
|
// abort on form elements, fixes a Firefox issue
|
206
237
|
var src = Event.element(event);
|
207
238
|
if(src.tagName && (
|
@@ -209,20 +240,53 @@ Draggable.prototype = {
|
|
209
240
|
src.tagName=='SELECT' ||
|
210
241
|
src.tagName=='BUTTON' ||
|
211
242
|
src.tagName=='TEXTAREA')) return;
|
243
|
+
|
244
|
+
if(this.element._revert) {
|
245
|
+
this.element._revert.cancel();
|
246
|
+
this.element._revert = null;
|
247
|
+
}
|
212
248
|
|
213
|
-
// this.registerEvents();
|
214
|
-
this.active = true;
|
215
249
|
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
216
|
-
var
|
217
|
-
this.
|
218
|
-
|
250
|
+
var pos = Position.cumulativeOffset(this.element);
|
251
|
+
this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
|
252
|
+
|
253
|
+
Draggables.activate(this);
|
219
254
|
Event.stop(event);
|
220
255
|
}
|
221
256
|
},
|
257
|
+
|
258
|
+
startDrag: function(event) {
|
259
|
+
this.dragging = true;
|
260
|
+
|
261
|
+
if(this.options.zindex) {
|
262
|
+
this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
|
263
|
+
this.element.style.zIndex = this.options.zindex;
|
264
|
+
}
|
265
|
+
|
266
|
+
if(this.options.ghosting) {
|
267
|
+
this._clone = this.element.cloneNode(true);
|
268
|
+
Position.absolutize(this.element);
|
269
|
+
this.element.parentNode.insertBefore(this._clone, this.element);
|
270
|
+
}
|
271
|
+
|
272
|
+
Draggables.notify('onStart', this, event);
|
273
|
+
if(this.options.starteffect) this.options.starteffect(this.element);
|
274
|
+
},
|
275
|
+
|
276
|
+
updateDrag: function(event, pointer) {
|
277
|
+
if(!this.dragging) this.startDrag(event);
|
278
|
+
Position.prepare();
|
279
|
+
Droppables.show(pointer, this.element);
|
280
|
+
Draggables.notify('onDrag', this, event);
|
281
|
+
this.draw(pointer);
|
282
|
+
if(this.options.change) this.options.change(this);
|
283
|
+
|
284
|
+
// fix AppleWebKit rendering
|
285
|
+
if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
|
286
|
+
Event.stop(event);
|
287
|
+
},
|
288
|
+
|
222
289
|
finishDrag: function(event, success) {
|
223
|
-
// this.unregisterEvents();
|
224
|
-
|
225
|
-
this.active = false;
|
226
290
|
this.dragging = false;
|
227
291
|
|
228
292
|
if(this.options.ghosting) {
|
@@ -236,14 +300,13 @@ Draggable.prototype = {
|
|
236
300
|
|
237
301
|
var revert = this.options.revert;
|
238
302
|
if(revert && typeof revert == 'function') revert = revert(this.element);
|
239
|
-
|
303
|
+
|
304
|
+
var d = this.currentDelta();
|
240
305
|
if(revert && this.options.reverteffect) {
|
241
306
|
this.options.reverteffect(this.element,
|
242
|
-
|
243
|
-
this.currentLeft()-this.originalLeft);
|
307
|
+
d[1]-this.delta[1], d[0]-this.delta[0]);
|
244
308
|
} else {
|
245
|
-
this.
|
246
|
-
this.originalTop = this.currentTop();
|
309
|
+
this.delta = d;
|
247
310
|
}
|
248
311
|
|
249
312
|
if(this.options.zindex)
|
@@ -252,71 +315,48 @@ Draggable.prototype = {
|
|
252
315
|
if(this.options.endeffect)
|
253
316
|
this.options.endeffect(this.element);
|
254
317
|
|
255
|
-
|
318
|
+
Draggables.deactivate(this);
|
256
319
|
Droppables.reset();
|
257
320
|
},
|
321
|
+
|
258
322
|
keyPress: function(event) {
|
259
|
-
if(
|
260
|
-
|
261
|
-
|
262
|
-
Event.stop(event);
|
263
|
-
}
|
264
|
-
}
|
323
|
+
if(!event.keyCode==Event.KEY_ESC) return;
|
324
|
+
this.finishDrag(event, false);
|
325
|
+
Event.stop(event);
|
265
326
|
},
|
327
|
+
|
266
328
|
endDrag: function(event) {
|
267
|
-
if(this.
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
329
|
+
if(!this.dragging) return;
|
330
|
+
this.finishDrag(event, true);
|
331
|
+
Event.stop(event);
|
332
|
+
},
|
333
|
+
|
334
|
+
draw: function(point) {
|
335
|
+
var pos = Position.cumulativeOffset(this.element);
|
336
|
+
var d = this.currentDelta();
|
337
|
+
pos[0] -= d[0]; pos[1] -= d[1];
|
338
|
+
|
339
|
+
var p = [0,1].map(function(i){ return (point[i]-pos[i]-this.offset[i]) }.bind(this));
|
340
|
+
|
341
|
+
if(this.options.snap) {
|
342
|
+
if(typeof this.options.snap == 'function') {
|
343
|
+
p = this.options.snap(p[0],p[1]);
|
344
|
+
} else {
|
345
|
+
if(this.options.snap instanceof Array) {
|
346
|
+
p = p.map( function(v, i) {
|
347
|
+
return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
|
348
|
+
} else {
|
349
|
+
p = p.map( function(v) {
|
350
|
+
return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
|
351
|
+
}
|
352
|
+
}}
|
353
|
+
|
279
354
|
var style = this.element.style;
|
280
355
|
if((!this.options.constraint) || (this.options.constraint=='horizontal'))
|
281
|
-
style.left =
|
356
|
+
style.left = p[0] + "px";
|
282
357
|
if((!this.options.constraint) || (this.options.constraint=='vertical'))
|
283
|
-
style.top =
|
358
|
+
style.top = p[1] + "px";
|
284
359
|
if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
|
285
|
-
},
|
286
|
-
update: function(event) {
|
287
|
-
if(this.active) {
|
288
|
-
if(!this.dragging) {
|
289
|
-
var style = this.element.style;
|
290
|
-
this.dragging = true;
|
291
|
-
|
292
|
-
if(Element.getStyle(this.element,'position')=='')
|
293
|
-
style.position = "relative";
|
294
|
-
|
295
|
-
if(this.options.zindex) {
|
296
|
-
this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
|
297
|
-
style.zIndex = this.options.zindex;
|
298
|
-
}
|
299
|
-
|
300
|
-
if(this.options.ghosting) {
|
301
|
-
this._clone = this.element.cloneNode(true);
|
302
|
-
Position.absolutize(this.element);
|
303
|
-
this.element.parentNode.insertBefore(this._clone, this.element);
|
304
|
-
}
|
305
|
-
|
306
|
-
Draggables.notify('onStart', this, event);
|
307
|
-
if(this.options.starteffect) this.options.starteffect(this.element);
|
308
|
-
}
|
309
|
-
|
310
|
-
Droppables.show(event, this.element);
|
311
|
-
Draggables.notify('onDrag', this, event);
|
312
|
-
this.draw(event);
|
313
|
-
if(this.options.change) this.options.change(this);
|
314
|
-
|
315
|
-
// fix AppleWebKit rendering
|
316
|
-
if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
|
317
|
-
|
318
|
-
Event.stop(event);
|
319
|
-
}
|
320
360
|
}
|
321
361
|
}
|
322
362
|
|
@@ -329,9 +369,11 @@ SortableObserver.prototype = {
|
|
329
369
|
this.observer = observer;
|
330
370
|
this.lastValue = Sortable.serialize(this.element);
|
331
371
|
},
|
372
|
+
|
332
373
|
onStart: function() {
|
333
374
|
this.lastValue = Sortable.serialize(this.element);
|
334
375
|
},
|
376
|
+
|
335
377
|
onEnd: function() {
|
336
378
|
Sortable.unmark();
|
337
379
|
if(this.lastValue != Sortable.serialize(this.element))
|
@@ -341,10 +383,12 @@ SortableObserver.prototype = {
|
|
341
383
|
|
342
384
|
var Sortable = {
|
343
385
|
sortables: new Array(),
|
386
|
+
|
344
387
|
options: function(element){
|
345
388
|
element = $(element);
|
346
389
|
return this.sortables.detect(function(s) { return s.element == element });
|
347
390
|
},
|
391
|
+
|
348
392
|
destroy: function(element){
|
349
393
|
element = $(element);
|
350
394
|
this.sortables.findAll(function(s) { return s.element == element }).each(function(s){
|
@@ -354,6 +398,7 @@ var Sortable = {
|
|
354
398
|
});
|
355
399
|
this.sortables = this.sortables.reject(function(s) { return s.element == element });
|
356
400
|
},
|
401
|
+
|
357
402
|
create: function(element) {
|
358
403
|
element = $(element);
|
359
404
|
var options = Object.extend({
|
@@ -447,7 +492,7 @@ var Sortable = {
|
|
447
492
|
if(!element.hasChildNodes()) return null;
|
448
493
|
var elements = [];
|
449
494
|
$A(element.childNodes).each( function(e) {
|
450
|
-
if(e.tagName && e.tagName==options.tag.toUpperCase() &&
|
495
|
+
if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() &&
|
451
496
|
(!options.only || (Element.hasClassName(e, options.only))))
|
452
497
|
elements.push(e);
|
453
498
|
if(options.tree) {
|
@@ -531,7 +576,7 @@ var Sortable = {
|
|
531
576
|
name: element.id,
|
532
577
|
format: sortableOptions.format || /^[^_]*_(.*)$/
|
533
578
|
}, arguments[1] || {});
|
534
|
-
return $(this.findElements(element, options) || []).
|
579
|
+
return $(this.findElements(element, options) || []).map( function(item) {
|
535
580
|
return (encodeURIComponent(options.name) + "[]=" +
|
536
581
|
encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : ''));
|
537
582
|
}).join("&");
|