- Revision
- 490
- Author
- mauro
- Date
- 2007-12-15 09:55:09 -0600 (Sat, 15 Dec 2007)
Log Message
Moved dnd.js to examples as not sufficiently generic.
Modified Paths
- trunk/examples/paranamer-example/src/main/webapp/ajaxexample.jspx
- trunk/examples/simple-example/src/main/webapp/ajaxexample.jspx
Added Paths
- trunk/examples/paranamer-example/src/main/webapp/scripts/dnd.js
- trunk/examples/simple-example/src/main/webapp/scripts/dnd.js
Removed Paths
Diff
Modified: trunk/examples/paranamer-example/src/main/webapp/ajaxexample.jspx (489 => 490)
--- trunk/examples/paranamer-example/src/main/webapp/ajaxexample.jspx 2007-12-15 15:44:46 UTC (rev 489) +++ trunk/examples/paranamer-example/src/main/webapp/ajaxexample.jspx 2007-12-15 15:55:09 UTC (rev 490) @@ -18,10 +18,10 @@ <script src="" type="text/_javascript_"> // </script> - <script src="" type="text/_javascript_"> + <script src="" type="text/_javascript_"> // </script> - <script src="" type="text/_javascript_"> + <script src="" type="text/_javascript_"> // </script>
Added: trunk/examples/paranamer-example/src/main/webapp/scripts/dnd.js (0 => 490)
--- trunk/examples/paranamer-example/src/main/webapp/scripts/dnd.js (rev 0) +++ trunk/examples/paranamer-example/src/main/webapp/scripts/dnd.js 2007-12-15 15:55:09 UTC (rev 490) @@ -0,0 +1,12 @@ + +function makeDraggable(className) { + var items = document.getElementsByClassName(className); + for (var i = 0; i < items.length; i++) { + new Draggable(items[i].id, {ghosting:true, revert:true}) + } +} + +function handleDrop(element, dropon, event) { + var pars = 'method=' + element.id; + new Ajax.Updater({success: 'selection'}, "waffle", {method: 'get', parameters: pars, evalScripts:true}); +} \ No newline at end of file
Modified: trunk/examples/simple-example/src/main/webapp/ajaxexample.jspx (489 => 490)
--- trunk/examples/simple-example/src/main/webapp/ajaxexample.jspx 2007-12-15 15:44:46 UTC (rev 489) +++ trunk/examples/simple-example/src/main/webapp/ajaxexample.jspx 2007-12-15 15:55:09 UTC (rev 490) @@ -18,13 +18,13 @@ <script src="" type="text/_javascript_"> // </script> + <script src="" type="text/_javascript_"> + // + </script> <script src="" type="text/_javascript_"> // </script> - <script src="" type="text/_javascript_"> - // - </script> - + <style type="text/css" title="currentStyle" media="screen"> @import "stylesheets/style.css"; </style>
Copied: trunk/examples/simple-example/src/main/webapp/scripts/dnd.js (from rev 487, trunk/waffle-resources/src/main/resources/js/waffle/dnd.js) (0 => 490)
--- trunk/examples/simple-example/src/main/webapp/scripts/dnd.js (rev 0) +++ trunk/examples/simple-example/src/main/webapp/scripts/dnd.js 2007-12-15 15:55:09 UTC (rev 490) @@ -0,0 +1,12 @@ + +function makeDraggable(className) { + var items = document.getElementsByClassName(className); + for (var i = 0; i < items.length; i++) { + new Draggable(items[i].id, {ghosting:true, revert:true}) + } +} + +function handleDrop(element, dropon, event) { + var pars = 'method=' + element.id; + new Ajax.Updater({success: 'selection'}, "waffle", {method: 'get', parameters: pars, evalScripts:true}); +} \ No newline at end of file
Deleted: trunk/waffle-resources/src/main/resources/js/waffle/dnd.js (489 => 490)
--- trunk/waffle-resources/src/main/resources/js/waffle/dnd.js 2007-12-15 15:44:46 UTC (rev 489) +++ trunk/waffle-resources/src/main/resources/js/waffle/dnd.js 2007-12-15 15:55:09 UTC (rev 490) @@ -1,20 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2005,2006 Michael Ward * - * All rights reserved. * - * ------------------------------------------------------------------------- * - * The software in this package is published under the terms of the BSD * - * style license a copy of which has been included with this distribution in * - * the LICENSE.txt file. * - *****************************************************************************/ - -function makeDraggable(className) { - var items = document.getElementsByClassName(className); - for (var i = 0; i < items.length; i++) { - new Draggable(items[i].id, {ghosting:true, revert:true}) - } -} - -function handleDrop(element, dropon, event) { - var pars = 'method=' + element.id; - new Ajax.Updater({success: 'selection'}, "waffle", {method: 'get', parameters: pars, evalScripts:true}); -} \ No newline at end of file
To unsubscribe from this list please visit:
