[Jifty-commit] jifty branch, jquery_with_ui, updated. 9964f82cb5f02256002544c221a53d749c19f43f
Jifty commits
jifty-commit at lists.jifty.org
Wed Jan 27 06:47:57 EST 2010
The branch, jquery_with_ui has been updated
via 9964f82cb5f02256002544c221a53d749c19f43f (commit)
from 3df4adc62988c3b8c40dee215d0fcf8654a72db1 (commit)
Summary of changes:
share/web/static/js/ordered-list.js | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 share/web/static/js/ordered-list.js
- Log -----------------------------------------------------------------
commit 9964f82cb5f02256002544c221a53d749c19f43f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 27 19:47:49 2010 +0800
add ordered-list.js
diff --git a/share/web/static/js/ordered-list.js b/share/web/static/js/ordered-list.js
new file mode 100644
index 0000000..049fc68
--- /dev/null
+++ b/share/web/static/js/ordered-list.js
@@ -0,0 +1,20 @@
+jQuery(document).ready(function(){
+ jQuery("div.ordered-list-container ul.unselected").sortable({
+ connectWith: 'ul.selected',
+ cancel: 'li.head'
+ });
+
+ jQuery("div.ordered-list-container ul.selected").sortable({
+ connectWith: 'ul.unselected',
+ cancel: 'li.head',
+ update: function () {
+ var box = jQuery(this).parents('div.ordered-list-container');
+ var select = box.find('select.submit');
+ select.children('option').remove();
+ jQuery(this).find('li:not(.head)').each( function() {
+ var value = jQuery(this).find('input.value').val();
+ jQuery('<option selected="selected" value="' + value + '" >' + value + '</option>').appendTo(select);
+ });
+ }
+ });
+});
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list