Browse files

Merge pull request #18 from nodren/master

Adding  .sortable() on the main ul, now you can sort both inputs and also values in checkboxes/radios/selects
  • Loading branch information...
2 parents b74d0d3 + 1d678cf commit 7db84c9b836948602dcb314f9318cd0ad5e2733a @viveleroi committed Feb 10, 2014
Showing with 3 additions and 3 deletions.
  1. +2 −2 css/jquery.formbuilder.css
  2. +1 −1 js/jquery.formbuilder.js
View
4 css/jquery.formbuilder.css
@@ -20,7 +20,7 @@ ul.frmb {
background: #FFFEEB;
}
-.frmb .legend {
+.ui-sortable > li {
cursor: move;
}
@@ -117,4 +117,4 @@ ul.frmb {
}
/* html display helpers */
-textarea, .multi-row span { display: block; }
+textarea, .multi-row span { display: block; }
View
2 js/jquery.formbuilder.js
@@ -45,7 +45,7 @@
var opts = $.extend(defaults, options);
var frmb_id = 'frmb-' + $('ul[id^=frmb-]').length++;
return this.each(function () {
- var ul_obj = $(this).append('<ul id="' + frmb_id + '" class="frmb"></ul>').find('ul');
+ var ul_obj = $(this).append('<ul id="' + frmb_id + '" class="frmb"></ul>').find('ul').sortable();
var field = '', field_type = '', last_id = 1, help, form_db_id;
// Add a unique class to the current element
$(ul_obj).addClass(frmb_id);

0 comments on commit 7db84c9

Please sign in to comment.