summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/source/packages.php5
-rwxr-xr-xframework/Web/Javascripts/source/prado/activecontrols/dragdrop.js24
2 files changed, 27 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/source/packages.php b/framework/Web/Javascripts/source/packages.php
index 7c0a1674..b19a5d18 100644
--- a/framework/Web/Javascripts/source/packages.php
+++ b/framework/Web/Javascripts/source/packages.php
@@ -47,7 +47,8 @@ $packages = array(
),
'dragdrop'=>array(
- SCRIPTACULOUS_DIR.'/dragdrop.js'
+ SCRIPTACULOUS_DIR.'/dragdrop.js',
+ 'prado/activecontrols/dragdrop.js'
),
'slider'=>array(
@@ -78,7 +79,7 @@ $dependencies = array(
'datepicker' => array('prado', 'datepicker'),
'colorpicker' => array('prado', 'colorpicker'),
'ajax' => array('prado', 'effects', 'ajax'),
- 'dragdrop' => array('prado', 'effects', 'dragdrop'),
+ 'dragdrop' => array('prado', 'effects', 'ajax', 'dragdrop'),
'slider' => array('prado', 'slider'),
'keyboard' => array('prado', 'keyboard'),
'tabpanel' => array('prado', 'tabpanel'),
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js b/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js
new file mode 100755
index 00000000..0b42afd5
--- /dev/null
+++ b/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js
@@ -0,0 +1,24 @@
+/**
+ * DropContainer control
+ */
+
+Prado.WebUI.DropContainer = Class.extend(Prado.WebUI.CallbackControl);
+
+Object.extend(Prado.WebUI.DropContainer.prototype,
+{
+ initialize: function(options)
+ {
+ this.options = options;
+ Object.extend (this.options,
+ {
+ onDrop: this.onDrop.bind(this)
+ });
+
+ Droppables.add (options.ID, this.options);
+ },
+
+ onDrop: function(dragElement, dropElement)
+ {
+ Prado.Callback(this.options.EventTarget, dragElement.id, null, this.options);
+ }
+});