Bonjour à tous,

Je souhaite obtenir votre aide, afin de réussir un casse tête, certainement super simple pour vous.
Je mis en place un Drag&Drop jquery-ui qui me permet de droppé plusieurs éléments, je souhaiterais à chaque Drop insérer en base de donnée, mon problème est comment passer en paramétre dans ajax url Zend et comment recupéré dans mon controller les actions passer en ajax et comment enregistré en base de donnée.

Avant de venir sur ce site afin d'obtenir de l'aide sur ce casse tête, j'ai tenté e réussir tout seul comme un grand donc voici mes débuts :

ma partie ajax avec jquery :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 
$(function() {
			// there's the gallery and the trash
			var $gallery = $('#gallery'), $trash = $('#trash');
			$.ajax({
			type:"POST",
			url: "<?php $this->baseUrl('/index/index')?>",
			// j'en sais rien comment faire
 
			)
 
			// let the gallery items be draggable
			$('.slot',$gallery).draggable({
				cancel: 'a.ui-icon',// clicking an icon won't initiate dragging
				revert: 'invalid', // when not dropped, the item will revert back to its initial position
				containment: $('#slot').length ? '#slotbase' : 'document', // stick to demo-frame if present
				helper: 'clone',
				cursor: 'move',
 
			});
			// let the trash be droppable, accepting the gallery items
			$arm.droppable({
				accept: '#gallery  .slot',
				activeClass: 'ui-state-highlight',
				drop: function(ev, ui) {
					deleteImage(ui.draggable);
				}
 
			});
			// let the trash be droppable, accepting the gallery items
			// let the gallery be droppable as well, accepting items from the trash
			$gallery.droppable({
				accept: '#trash  .slot',
				activeClass: 'custom-state-active',
				drop: function(ev, ui) {
					recycleImage(ui.draggable);
				}
			});
			// image deletion function
			var recycle_icon = '<a href="link/to/recycle/script/when/we/have/js/off" title="Recycle this image" class="ui-icon ui-icon-refresh"></a>';
			function deleteImage($item) {
				$item.fadeOut(function() {
					var $list = $('.slotbaseCard',$arm).length ? $('.slotbaseCard',$arm) : $('<div class="slotabseCard">').appendTo($arm);
 
					//$item.find('a.ui-icon-trash').remove();
					$item.append(recycle_icon).appendTo($list).fadeIn(function() {
						$item.animate({ width: '30px' }).find('img').animate({ height: '39px' });
					});
				});
			}
			// image recycle function
			var trash_icon = '<a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash"></a>';
			function recycleImage($item) {
				$item.fadeOut(function() {
					$item.find('a.ui-icon-refresh').remove();
					$item.css('width','30px').append(trash_icon).find('img').css('height','39px').end().appendTo($gallery).fadeIn();
				});
			}
 
 
			// resolve the icons behavior with event delegation
			$('ul.gallery > li').click(function(ev) {
				var $item = $(this);
				var $target = $(ev.target);
 
				if ($target.is('a.ui-icon-trash')) {
					deleteImage($item);
				} else if ($target.is('a.ui-icon-zoomin')) {
					viewLargerImage($target);
				} else if ($target.is('a.ui-icon-refresh')) {
					recycleImage($item);
				}
 
				return false;
			});
		});
ma partie controller
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
// je ne sais pas comment faire pour récuperer ajax
Merci d'avance de l'aide donc vous pourrez m'apporter.
sam